Created on 2015-09-05 10:42 by serhiy.storchaka, last changed 2018-06-27 18:07 by serhiy.storchaka. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| patch.diff | introom, 2015-09-12 14:00 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 7940 | merged | ZackerySpytz, 2018-06-26 22:59 | |
| Messages (6) | |||
|---|---|---|---|
| msg249902 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-09-05 10:42 | |
zlib compressor and decompressor objects can be copied with the copy() method, but not with copy.copy(). It is easy to add support of copy protocol to them (just add __copy__() as an alias to copy()). |
|||
| msg250521 - (view) | Author: shiyao.ma (introom) * | Date: 2015-09-12 14:00 | |
per serhiy's suggestion, added two aliases. |
|||
| msg258706 - (view) | Author: Josh Rosenberg (josh.r) * | Date: 2016-01-20 18:12 | |
Patch looks good, but incomplete. Supporting __deepcopy__ (as a simple wrapper around __copy__ that ignores the second argument) would provide complete support. Also, should there be tests? I mean, I assume the .copy() method itself is tested, but just to detect stupid regressions, seems like testing __copy__/__deepcopy__ for identical behavior would be a good thing. |
|||
| msg258709 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-01-20 18:26 | |
I agree with Josh. Needed __deepcopy__ and tests. And I think there may be problem with sharing a docstring (that includes a signature) between copy() and __copy__(). It is better to just add separate method that calls the implementation of copy(). |
|||
| msg320604 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-06-27 18:04 | |
New changeset d2cbfffc842b00b5257aa1c25dbcdeb456b6a249 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-25007: Add copy protocol support to zlib compressors and decompressors (GH-7940) https://github.com/python/cpython/commit/d2cbfffc842b00b5257aa1c25dbcdeb456b6a249 |
|||
| msg320605 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-06-27 18:07 | |
Thank you for your contribution Zackery! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-06-27 18:07:13 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg320605 stage: patch review -> resolved |
| 2018-06-27 18:04:54 | serhiy.storchaka | set | messages: + msg320604 |
| 2018-06-26 23:01:48 | ZackerySpytz | set | nosy:
+ ZackerySpytz versions: + Python 3.8, - Python 3.6 |
| 2018-06-26 22:59:36 | ZackerySpytz | set | stage: needs patch -> patch review pull_requests: + pull_request7549 |
| 2016-02-07 23:35:00 | serhiy.storchaka | set | stage: needs patch |
| 2016-01-20 18:26:26 | serhiy.storchaka | set | messages: + msg258709 |
| 2016-01-20 18:12:56 | josh.r | set | nosy:
+ josh.r messages: + msg258706 |
| 2016-01-20 17:56:00 | serhiy.storchaka | link | issue26166 superseder |
| 2015-09-12 14:00:52 | introom | set | files:
+ patch.diff nosy:
+ introom keywords: + patch |
| 2015-09-05 10:42:33 | serhiy.storchaka | create | |