bpo-20774: Add a JSON serializer to collections.deque#830
Conversation
|
@lisroach, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tiran, @benjaminp and @loewis to be potential reviewers. |
rhettinger
left a comment
There was a problem hiding this comment.
Over this looks good. Can you please add some tests.
| /* Encode Python object obj to a JSON term */ | ||
| PyObject *newobj; | ||
| int rv; | ||
| PyObject *mo = PyImport_ImportModule("collections"); |
There was a problem hiding this comment.
Wouldn't you need to decrease the reference counter to mo and deque_type after using them?
|
To try and help move older pull requests forward, we are going through and backfilling 'awaiting' labels on pull requests that are lacking the label. Based on the current reviews, the best we can tell in an automated fashion is that a core developer requested changes to be made to this pull request. If/when the requested changes have been made, please leave a comment that says, |
|
For those who arrived here like me when searching quick solution to encode dqeue object into JSON; Below code (as per documentation) shall be good enough. |
|
@lisroach are you interested in writting the tests, or may I? :) |
|
Sorry, just realized I had this sitting for so long! @carlbordum feel free to add more tests if you think of them :) |
|
|
||
| from test.support import bigmemtest, _1G | ||
|
|
||
|
|
There was a problem hiding this comment.
Maybe you could remove this blank line
| @@ -47,7 +48,6 @@ def __lt__(self, o): | |||
| d[1337] = "true.dat" | |||
| self.assertEqual(self.dumps(d, sort_keys=True), '{"1337": "true.dat"}') | |||
|
|
|||
|
@lisroach, should this pull request be closed based on the performance benchmarks mentioned on the bug tracker or were you still working on this change? Thanks! |
|
This PR is stale because it has been open for 30 days with no activity. |
|
@lisroach, are you going to follow up this PR? |
|
Closing because of lack of response and conflicts, feel free to reopen if you want to work on this. |
PR for issue 20774, adding a JSON serializer to collections.deque.
https://bugs.python.org/issue20774