[issue32873] Pickling of typing types

2018-04-04 Thread miss-islington
miss-islington added the comment: New changeset 04eac02088f60192c7e54c7364bcaa892d7c05cf by Miss Islington (bot) in branch '3.7': bpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)

[issue32873] Pickling of typing types

2018-04-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +6090 ___ Python tracker ___

[issue32873] Pickling of typing types

2018-04-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 2a363d2930e29ec6d8a774973ed5a4965f881f5f by Ivan Levkivskyi in branch 'master': bpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)

[issue32873] Pickling of typing types

2018-04-04 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +6088 ___ Python tracker ___ ___

[issue32873] Pickling of typing types

2018-04-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Apparently there is another type with a similar problem -- DefaultDict. Will fix this now. -- ___ Python tracker

[issue32873] Pickling of typing types

2018-04-04 Thread Will T
Will T added the comment: I believe I hit a bug with this fix (just pulled the code a few min ago): In [10]: pickle.loads(pickle.dumps(typing.List)) Out[10]: typing.List In [11]: pickle.loads(pickle.dumps(typing.FrozenSet))

[issue32873] Pickling of typing types

2018-03-26 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32873] Pickling of typing types

2018-03-26 Thread miss-islington
miss-islington added the comment: New changeset d0e04c82448c750d4dc27f2bddeddea74bd353ff by Miss Islington (bot) in branch '3.7': bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

[issue32873] Pickling of typing types

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5990 ___ Python tracker ___

[issue32873] Pickling of typing types

2018-03-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 834940375ae88bc95794226dd8eff1f25fba1cf9 by Ivan Levkivskyi in branch 'master': bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

[issue32873] Pickling of typing types

2018-03-24 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch pull_requests: +5961 stage: -> patch review ___ Python tracker ___

[issue32873] Pickling of typing types

2018-02-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I am sick now, so can't work on this. There is a small chance I will be able to work on this issue this week. Is it possible to fix this in 3.7b3? -- ___ Python tracker

[issue32873] Pickling of typing types

2018-02-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thank you, Ned! -- ___ Python tracker ___ ___

[issue32873] Pickling of typing types

2018-02-26 Thread Ned Deily
Ned Deily added the comment: > Is it possible to fix this in 3.7b3? Yes. Get well first! -- ___ Python tracker ___

[issue32873] Pickling of typing types

2018-02-26 Thread Ned Deily
Ned Deily added the comment: So we need a decision on this about what, if anything, to do for 3.7. The 3.7.0 ABI freeze is in 3.7.0b3; it would be better to get it resolved for 3.7.0b2. -- nosy: +ned.deily priority: normal -> deferred blocker

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I'm honestly not too concerned about what happens with List[int] (though doing a sensible thing here is not wrong :-), but I feel strongly that a pickle containing a reference to typing.List should be compatible between Python 3.6 and 3.7.

[issue32873] Pickling of typing types

2018-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be better to pickle `typing.List[int]` as `operator.getitem(typing.List, int)`. def __reduce__(self): if self._special: return self._name # __module__ = 'typing' index =

[issue32873] Pickling of typing types

2018-02-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Here is the situation for 3.6 and before: Generic classes are all actual class objects, so they are pickled as immutable. However this creates a problem, parameterized generics, such as `List[int]` _cannot_ be pickled in 3.6 and

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I think it would be nice it would be pickled by name so the pickles are compatible between Python versions. What would we do for List[int]? How are regular ABCs pickled? -- ___ Python tracker

[issue32873] Pickling of typing types

2018-02-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In 3.6 typing types are pickled by names: >>> import pickle, pickletools, typing >>> pickletools.optimize(pickle.dumps(typing.List)) b'\x80\x03ctyping\nList\n.' >>>