Re: Python-pickle error

2023-05-09 Thread Tony Flury via Python-list
Charles, by your own admission, you deleted your pkl file, And your code doesn't write that pkl file (pickle.dumps(...) doesn't write a file it creates a new string and at no point will it write to the file : What you need is this : import pickle number=2

Re: Python-pickle error

2023-04-19 Thread Thomas Passin
On 4/19/2023 12:14 PM, charles wiewiora wrote: Hello, I am experincing problems with the pickle moducle the folowing code was working before, import pickle number=2 my_pickeld_object=pickle.dumps(number) print("this is my pickled object",{my_pickeld_object},) with open('file.pkl', 'rb

Python-pickle error

2023-04-19 Thread charles wiewiora
Hello, I am experincing problems with the pickle moducle the folowing code was working before, import pickle number=2 my_pickeld_object=pickle.dumps(number) print("this is my pickled object",{my_pickeld_object},) with open('file.pkl', 'rb') as file: number=pickle

[issue593656] pickle/cPickle incompatibility

2022-04-10 Thread admin
Change by admin : -- github: None -> 37015 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue523020] pickle/cPickle Inconsistent EOF handling

2022-04-10 Thread admin
Change by admin : -- github: None -> 36163 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue504723] Bad exceptions from pickle

2022-04-10 Thread admin
Change by admin : -- github: None -> 35933 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue453914] bad example in pickle documentation

2022-04-10 Thread admin
Change by admin : -- github: None -> 35024 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue501830] cPickle cannot pickle time.localtime tup

2022-04-10 Thread admin
Change by admin : -- github: None -> 35898 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue505705] Remove eval in pickle and cPickle

2022-04-10 Thread admin
Change by admin : -- github: None -> 35952 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue502503] pickle interns strings

2022-04-10 Thread admin
Change by admin : -- github: None -> 35908 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue502085] pickle problems (with Boost.Python)

2022-04-10 Thread admin
Change by admin : -- github: None -> 35903 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue501795] pickle/cPickle EOL incompatibility

2022-04-10 Thread admin
Change by admin : -- github: None -> 35897 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue494904] Cannot pickle a class with a metaclass

2022-04-10 Thread admin
Change by admin : -- github: None -> 35791 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue471893] Security review of pickle/marshal docs

2022-04-10 Thread admin
Change by admin : -- github: None -> 35339 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue481882] pickle/cPickle can raise SystemError

2022-04-10 Thread admin
Change by admin : -- github: None -> 35524 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue451547] pickle / cPickle can't load lambdas

2022-04-10 Thread admin
Change by admin : -- github: None -> 34974 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue445484] pickle lacks float('inf')

2022-04-10 Thread admin
Change by admin : -- github: None -> 34850 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401486] Unexpected Evaluation of Expressions from Pickle Patch

2022-04-10 Thread admin
Change by admin : -- github: None -> 33097 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue436948] cPickle.loads(): Insecure string pickle

2022-04-10 Thread admin
Change by admin : -- github: None -> 34680 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue229810] Memore leak in pickle and cPickle

2022-04-10 Thread admin
Change by admin : -- github: None -> 33782 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue223634] Pickle broken on Unicode strings

2022-04-10 Thread admin
Change by admin : -- github: None -> 33516 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue216295] pickle fails to reduce class instances as documented

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue401486] Unexpected Evaluation of Expressions from Pickle Patch

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue214293] Unexpected Evaluation of Expressions from Pickle

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue223634] Pickle broken on Unicode strings

2022-04-10 Thread admin
Change by admin : -- github: None -> 33516 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue216295] pickle fails to reduce class instances as documented

2022-04-10 Thread admin
Change by admin : -- github: None -> 33307 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue214293] Unexpected Evaluation of Expressions from Pickle

2022-04-10 Thread admin
Change by admin : -- github: None -> 33096 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2022-04-05 Thread Adam
Adam added the comment: Hi, First-time contributor here, I've made a patch in follow-up to the discussions that happened in Amir's patch in regards to this. I'd appreciate it if someone would be able to take a look and review it! https://github.com/python/cpython/pull/32257 --

[issue47206] pickle docs are wrong about nested classes

2022-04-04 Thread Géry
Change by Géry : -- nosy: +maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47206] pickle docs are wrong about nested classes

2022-04-03 Thread Jelle Zijlstra
qualname__ was added (https://docs.python.org/3/library/stdtypes.html#definition.__qualname__). Similarly, the docs claim only top-level functions can be pickled, but in fact methods nested in classes work fine. Example script demonstrating that these work: import pickle class X:

[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2022-04-02 Thread Adam
Change by Adam : -- nosy: +achhina nosy_count: 7.0 -> 8.0 pull_requests: +30326 pull_request: https://github.com/python/cpython/pull/32257 ___ Python tracker ___

[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Grégory Starck
Grégory Starck added the comment: FWIW -1 as well, for same reasons. -- nosy: +gstarck ___ Python tracker ___ ___ Python-bugs-list

[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Irit Katriel
Irit Katriel added the comment: -1. This is basically a request to add API to the stdlib to turn a two-liner into a one-liner. -- nosy: +iritkatriel ___ Python tracker ___

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: You're probably doing something like: parent.i = 3 instead of: parent.child.field = 0.6 In the first one, you're setting an instance attribute on parent, on the second, you're modifying an attribute of the class attribute. In any event, there's no bug

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread jeffersonqin
jeffersonqin <1247006...@qq.com> added the comment: Thanks! This fully answers my question. Sorry, but I've got another question regards to your answer. It is that when I deal with other fields in class Parent similar to child, with the only difference is that their types are builtin types

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread Eric V. Smith
presumably setting self.child, which will then create an instance attribute which will get saved by pickle. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread jeffersonqin
New submission from jeffersonqin <1247006...@qq.com>: For the following code piece: ``` import pickle class Child: def __init__(self, field): self.field = field class Parent: child = Child(0.5) if __name__ == '__main__': i = input() if i

Re: Pickle file and send via socket

2022-02-18 Thread Chris Angelico
On Sat, 19 Feb 2022 at 05:47, UTKARSH PANDEY wrote: > > On Wednesday, August 8, 2012 at 8:37:33 PM UTC+5:30, lipska the kat wrote: > > ... > Directly read bytes from file and send it over the socket object from client > side in while loop until all content from file is read. > Almost ten years.

Re: Pickle file and send via socket

2022-02-18 Thread UTKARSH PANDEY
/docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files > > > it should be straightforward to read and write pickled files > Not sure why you want to pickle a text file over the network when you > could just stream it between ports ! > > however ... > > I'm curre

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I approved this but the code wasn't wrong. Once an object has demonstrated that it can pickle at all, it is the testing responsibility of the pickle module tests to make sure that new protocols handle the same inputs as the old ones. I went ahead

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 37eab55ac9da6b6361f136a1da15bfcef12ed954 by Nikita Sobolev in branch 'main': bpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections` (GH-30614) https://github.com/python/cpython/commit

[issue44901] Info about used pickle protocol used by multiprocessing.Queue

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

Re: Pickle segfaults with custom type

2022-01-15 Thread Marco Sulla
and iter types. Python segfaults if I try to pickle > them. > > For example, I have: > > > static PyTypeObject PyFrozenDictIterKey_Type = { > PyVarObject_HEAD_INIT(NULL, 0) > "frozendict.keyiterator", /* tp_name */ > sizeof(dictit

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28817 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30614 ___ Python tracker ___

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now this test does not test all pickle protocols: https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_collections.py#L680-L682 But, I guess that it should, like all other tests do. PR is on its way

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Irit Katriel
Irit Katriel added the comment: I added Serhiy as the author of the deepcopy optimization. Although it was the first to use the 6th item, it is not documented so I wonder if it's the easier of the two to change. -- nosy: +iritkatriel ___ Python

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +pitrou, rhettinger versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue46336] Sixth element of tuple from __reduce__(), inconsistency between pickle and copy

2022-01-10 Thread Lev Bishop
New submission from Lev Bishop : As discussed in discord thread https://discuss.python.org/t/sixth-element-of-tuple-from-reduce-inconsistency-between-pickle-and-copy/12902 where guido suggested to open this issue. Both the pickle and copy modules of the standard library make use of a class’s

Pickle segfaults with custom type

2022-01-07 Thread Marco Sulla
I have a custom implementation of dict using a C extension. All works but the pickling of views and iter types. Python segfaults if I try to pickle them. For example, I have: static PyTypeObject PyFrozenDictIterKey_Type = { PyVarObject_HEAD_INIT(NULL, 0) "frozendict.keyite

[issue29466] pickle does not serialize Exception __cause__ field

2022-01-06 Thread Irit Katriel
Irit Katriel added the comment: > Attributes __context__, __cause__ and __traceback__ are not pickled. The > traceback objects are even not pickleable. It's not guaranteed that the __cause__ and __context__ are picklable either. Should we try to pickle them, or should we do

Re: recover pickled data: pickle data was truncated

2022-01-05 Thread iMath
Thanks for all your kind help, wish you a promising year! -- https://mail.python.org/mailman/listinfo/python-list

Re: recover pickled data: pickle data was truncated

2022-01-02 Thread Barry Scott
se JSON, it is far better as a way of exchanging data than pickle. Easy to read and check, can be processes in many languages. Barry > > On Sat, 1 Jan 2022 at 14:11, Barry wrote: >> >> >> >>> On 31 Dec 2021, at 17:53, iMath wrote: >>> >>>

Re: recover pickled data: pickle data was truncated

2022-01-01 Thread Marco Sulla
y, Chris and Avi. IMHO your data is lost. Unpickling > >> it by hand is a harsh work and maybe unreliable. > >> > >> Is there any reason you can't simply add a semaphore to avoid writing > >> at the same time and re-run the code and regenerate the data? > > > >

Re: recover pickled data: pickle data was truncated

2022-01-01 Thread Barry
the code and regenerate the data? > > Thanks for your replies! I didn't have a sense of adding a semaphore on > writing to pickle data before, so corrupted the data. > Since my data was colleted in the daily usage, so cannot re-run the code and > regenerate the data. > In orde

Re: recover pickled data: pickle data was truncated

2021-12-31 Thread iMath
adding a semaphore on writing to pickle data before, so corrupted the data. Since my data was colleted in the daily usage, so cannot re-run the code and regenerate the data. In order to avoid corrupting my data again and the complicity of using a semaphore, now I am using json text to store my dat

Re: recover pickled data: pickle data was truncated

2021-12-29 Thread Marco Sulla
On Wed, 29 Dec 2021 at 18:33, iMath wrote: > But I found the size of the file of the shelve data didn't change much, so I > guess the data are still in it , I just wonder any way to recover my data. I agree with Barry, Chris and Avi. IMHO your data is lost. Unpickling it by hand is a harsh work

RE: recover pickled data: pickle data was truncated

2021-12-29 Thread Avi Gross via Python-list
in and checking it. But corruption can happen for many reasons including at the level of the disk it is written to. -Original Message- From: Python-list On Behalf Of iMath Sent: Wednesday, December 29, 2021 10:51 AM To: python-list@python.org Subject: Re: recover pickled data: pickle data

Re: recover pickled data: pickle data was truncated

2021-12-29 Thread Chris Angelico
ns got interleaved, in which case I strongly advise you NOT to try unpickling it. If you really feel like delving into it, try manually decoding the pickle stream, but be very careful. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: recover pickled data: pickle data was truncated

2021-12-29 Thread iMath
> You have lost the data in that case. But I found the size of the file of the shelve data didn't change much, so I guess the data are still in it , I just wonder any way to recover my data. -- https://mail.python.org/mailman/listinfo/python-list

Re: recover pickled data: pickle data was truncated

2021-12-26 Thread Barry Scott
write by two >> processes, thus corrupted it. Is there any way to recover all data in it ? >> Currently I just get "pickle data was truncated" exception after reading a >> portion of the data? You have lost the data in that case. You will need to do what Marco sugge

Re: recover pickled data: pickle data was truncated

2021-12-26 Thread Marco Sulla
ver all data in it ? > Currently I just get "pickle data was truncated" exception after reading a > portion of the data? > > Data and code here > :https://drive.google.com/file/d/137nJFc1TvOge88EjzhnFX9bXg6vd0RYQ/view?usp=sharing > -- > https://mail.python.org/mailman/listinfo/pyth

recover pickled data: pickle data was truncated

2021-12-25 Thread iMath
Normally, the shelve data should be read and write by only one process at a time, but unfortunately it was simultaneously read and write by two processes, thus corrupted it. Is there any way to recover all data in it ? Currently I just get "pickle data was truncated" exception aft

[issue1062277] Pickle breakage with reduction of recursive structures

2021-12-16 Thread Daniel Diniz
Change by Daniel Diniz : -- versions: +Python 3.11 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14336] Difference between pickle implementations for function objects

2021-12-10 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue26695] pickle and _pickle accelerator have different behavior when unpickling an object with falsy __getstate__ return

2021-12-05 Thread Irit Katriel
Irit Katriel added the comment: See also issue12290. -- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue16242] [doc] Document that __getattr__ can be called before __init__ (e.g. by pickle)

2021-11-26 Thread Irit Katriel
Change by Irit Katriel : -- title: Pickle and __getattr__ -> [doc] Document that __getattr__ can be called before __init__ (e.g. by pickle) type: behavior -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 ___ Python t

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-11-03 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg405650 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-11-03 Thread Ethan Furman
Ethan Furman added the comment: Eric, I'm already aware of the nested class issue; what I was hoping for was your actual use-case? You're pickling and sending an entire enum (and all its members) to another system/process? -- ___ Python tracker

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-29 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Nikita! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-28 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7203ecd332eca3a44a3f1c8bdadd76a08c5568a1 by Miss Islington (bot) in branch '3.10': bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167) (GH-29296) https://github.com/python/cpython/commit/7203ecd332eca3a44a3f1c8bdadd76a08c5568a1

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-28 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset dd674ca96f2150fb3f7b4086ef7ec0022c4e2058 by Miss Islington (bot) in branch '3.9': bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167) (GH-29295) https://github.com/python/cpython/commit/dd674ca96f2150fb3f7b4086ef7ec0022c4e2058

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27558 pull_request: https://github.com/python/cpython/pull/29295 ___ Python tracker

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +27559 pull_request: https://github.com/python/cpython/pull/29296 ___ Python tracker ___

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-28 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 66e6b3dcd3bbab06feeff2cbaf8aade7b6223d6c by Nikita Sobolev in branch 'main': bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167) https://github.com/python/cpython/commit/66e6b3dcd3bbab06feeff2cbaf8aade7b6223d6c -- nosy

[issue45566] dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-24 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45566] dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-24 Thread miss-islington
miss-islington added the comment: New changeset 36971fd1f490664fb62b1fab869c5637669f0967 by Miss Islington (bot) in branch '3.10': bpo-45566: `test_frozen_pickle` checks all `pickle` protocols (GH-29150) https://github.com/python/cpython/commit/36971fd1f490664fb62b1fab869c5637669f0967

[issue45566] dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +27470 pull_request: https://github.com/python/cpython/pull/29201 ___ Python tracker ___

[issue45566] dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-24 Thread miss-islington
miss-islington added the comment: New changeset 07236d562e59c6650227be18fa6ffc66b18d4741 by Nikita Sobolev in branch 'main': bpo-45566: `test_frozen_pickle` checks all `pickle` protocols (GH-29150) https://github.com/python/cpython/commit/07236d562e59c6650227be18fa6ffc66b18d4741

[issue45566] dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclasses `test_frozen_pickle` does not use all possible `pickle` protocols -> dataclasses’s `test_frozen_pickle` does not use all possible `pickle` protocols ___ Python tracker <https://bugs.pyth

[issue45566] dataclasses `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Eric V. Smith
Change by Eric V. Smith : -- title: `test_frozen_pickle` does not use all possible `pickle` protocols -> dataclasses `test_frozen_pickle` does not use all possible `pickle` protocols ___ Python tracker <https://bugs.python.org/issu

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27440 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29167 ___ Python tracker ___

[issue45577] Make `test_zoneinfo.py` to check all pickle protocols

2021-10-22 Thread Nikita Sobolev
severity: normal status: open title: Make `test_zoneinfo.py` to check all pickle protocols type: behavior versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45

[issue45566] `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27427 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29150 ___ Python tracker ___

[issue45566] `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/29147 I've noticed that `test_frozen_pickle` does not use all possible `pickle` protocols: https://github.com/python/cpython/blob/276468dddb46c54980c782c09cdb53bd90755752/Lib/test/test_dataclasses.py

[issue45125] Improve tests and docs of how `pickle` works with `SharedMemory` obejcts

2021-10-22 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks everyone. It is now fixed -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-21 Thread Eric Cousineau
pickling the entire class... what am I missing? Sorry about that; the original file, `enum_test.py`, was just trying to pickle an enum field, i.e. `DoesNotWork.a`. However, because it uses the type `DoesNotWork.NestedValue2`, `pickle` tries to unpackage that type, but cannot access it via nam

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Ethan Furman
Ethan Furman added the comment: I'm confused -- your initial report talks about pickling fields, but your tests are pickling the entire class... what am I missing? -- ___ Python tracker

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Eric V. Smith
Eric V. Smith added the comment: I get an error with 3.8.10, but not on the main branch (3.11). I don't have other versions handy to test. Removing 3.6, as it's no longer getting bug fixes, and this doesn't look like a security issue. -- nosy: +eric.smith versions: -Python 3.6

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Eric Cousineau
Eric Cousineau added the comment: Thinking on it some more, I the current `Enum` metaclass doesn't distinguish between nested class and normal field, so it wraps it, thus why `pickle` gets confused. Perhaps it's possible to recognize this case - the class w/ `__qualname__` can be checked

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Eric Cousineau
Eric Cousineau added the comment: Ah, forgot to include error message: ``` E ... _pickle.PicklingError: Can't pickle : it's not the same object as __main__.DoesNotWork.NestedValue2 ``` -- ___ Python tracker <https://bugs.python.org/issue45

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-10-20 Thread Eric Cousineau
New submission from Eric Cousineau : I seem cannot pickle enum values from an enum class w/ a nested frozen dataclass. I can pickle a field from a normal class w/ a nested frozen dataclass, and I can pickle a field from an enum with a top-level frozen dataclass - perhaps it's some interplay

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2021-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: workaround: don't run make as root. run configure & make in a user account and only run your final make install as root after that. (sudo make install or whatnot) 2to3 and lib2to3 are deprecated so this won't be getting fixed (though it's more of a

[issue36313] error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

2021-10-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle ___ Python tracker <https://

[issue41185] lib2to3 generation of pickle files is racy

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: open -> closed superseder: -> Close 2to3 issues and list them here ___ Python tracker ___

[issue30099] Lib2to3 fails with unreadable pickle file

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: open -> closed superseder: -> Close 2to3 issues and list them here ___ Python tracker ___

[issue42935] Pickle can't import builtins at exit

2021-10-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

  1   2   3   4   5   6   7   8   9   10   >