Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented May 26, 2018

Pickles of type variables and subscripted generics are now future-proof and compatible with older Python versions.

https://bugs.python.org/issue33652

Pickles of type variables and subscripted generics are now future-proof
and compatible with older Python versions.
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I don't see any problems with this implementation. Only one concern is operator module loading time. People complained that typing slows down application startup, and operator is not that often imported nowadays. Did you make any measurements of import time with this PR?

@serhiy-storchaka
Copy link
Member Author

The import time of typing varies from 8.3 to 9.7 ms (when run ./python -X importtime -c 'import typing' several times sequentially). Importing operator takes 0.35 ms (around 4% of total time), but it is imported by collections in any case, and therefore this PR doesn't affect the import time.

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it is imported by collections in any case, and therefore this PR doesn't affect the import time.

Ah, OK then!

@ned-deily ned-deily removed their request for review May 26, 2018 12:56
@ned-deily
Copy link
Member

I'm OK with merging this for 3.7 if @ilevkivskyi and/or @gvanrossum are/is.

@ilevkivskyi
Copy link
Member

ilevkivskyi commented May 26, 2018

I am fine with backporting this to 3.7.

@gvanrossum
Copy link
Member

Yes, fine with me to for the backport.

@ilevkivskyi ilevkivskyi merged commit 09f3221 into python:master May 26, 2018
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR, and @ilevkivskyi for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-7132 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 26, 2018
Pickles of type variables and subscripted generics are now future-proof
and compatible with older Python versions.
(cherry picked from commit 09f3221)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington added a commit that referenced this pull request May 26, 2018
Pickles of type variables and subscripted generics are now future-proof
and compatible with older Python versions.
(cherry picked from commit 09f3221)

Co-authored-by: Serhiy Storchaka <[email protected]>
@serhiy-storchaka serhiy-storchaka deleted the typing-pickle branch July 7, 2018 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants