Skip to content

Add 3.10 stdlib to torch.package#81261

Closed
malfet wants to merge 1 commit intomasterfrom
malfet/add-py310-stdlib
Closed

Add 3.10 stdlib to torch.package#81261
malfet wants to merge 1 commit intomasterfrom
malfet/add-py310-stdlib

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented Jul 11, 2022

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jul 11, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 899b6f8 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@malfet malfet requested a review from suo July 11, 2022 18:16
@malfet malfet modified the milestone: 1.12.1 Jul 11, 2022
@malfet malfet requested a review from a team July 11, 2022 18:18
@malfet
Copy link
Copy Markdown
Contributor Author

malfet commented Jul 11, 2022

@pytorchbot merge -f

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Copy Markdown
Contributor

Hey @malfet.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@malfet malfet added release notes: package/deploy release notes category topic: bug fixes topic category labels Jul 11, 2022
@malfet malfet deleted the malfet/add-py310-stdlib branch July 11, 2022 21:57
facebook-github-bot pushed a commit that referenced this pull request Jul 12, 2022
pytorchmergebot pushed a commit that referenced this pull request Jul 15, 2022
I noticed that in #81261 all of the stdlib module names were explicitly listed, however as of Python 3.10 the stdlib now has a mechanism for this. python/cpython#87121

I figured it was better to use `sys.stdlib_module_names` going forward for 3.10+ instead of having to maintain this file for every new Python release. For docs see:
https://docs.python.org/3/library/sys.html#sys.stdlib_module_names

I did a symmetric difference to determine what the effective change would be. I verified that everything listed in this file ins included in sys.stdlib_module_names. However, there are files in sys.stdlib_module_names that are not included in the previous hard coded definition. Namely these are:

```
frozenset({'__future__',
           '_abc',
           '_aix_support',
           '_asyncio',
           '_bisect',
           '_blake2',
           '_bootsubprocess',
           '_bz2',
           '_codecs',
           '_codecs_cn',
           '_codecs_hk',
           '_codecs_iso2022',
           '_codecs_jp',
           '_codecs_kr',
           '_codecs_tw',
           '_collections',
           '_collections_abc',
           '_compat_pickle',
           '_compression',
           '_contextvars',
           '_crypt',
           '_csv',
           '_ctypes',
           '_curses',
           '_curses_panel',
           '_datetime',
           '_dbm',
           '_decimal',
           '_elementtree',
           '_frozen_importlib',
           '_frozen_importlib_external',
           '_functools',
           '_gdbm',
           '_hashlib',
           '_heapq',
           '_imp',
           '_io',
           '_json',
           '_locale',
           '_lsprof',
           '_lzma',
           '_markupbase',
           '_md5',
           '_msi',
           '_multibytecodec',
           '_multiprocessing',
           '_opcode',
           '_operator',
           '_osx_support',
           '_overlapped',
           '_pickle',
           '_posixshmem',
           '_posixsubprocess',
           '_py_abc',
           '_pydecimal',
           '_pyio',
           '_queue',
           '_random',
           '_scproxy',
           '_sha1',
           '_sha256',
           '_sha3',
           '_sha512',
           '_signal',
           '_sitebuiltins',
           '_socket',
           '_sqlite3',
           '_sre',
           '_ssl',
           '_stat',
           '_statistics',
           '_string',
           '_strptime',
           '_struct',
           '_symtable',
           '_threading_local',
           '_tkinter',
           '_tracemalloc',
           '_uuid',
           '_warnings',
           '_weakref',
           '_weakrefset',
           '_winapi',
           '_zoneinfo',
           'antigravity',
           'genericpath',
           'idlelib',
           'nt',
           'nturl2path',
           'opcode',
           'pydoc_data',
           'pyexpat',
           'this'})
```

I'm not sure if excluding these matters. I wouldn't think it would, but if it does and it is better to explicitly update this file each time, then feel free to close this.
Pull Request resolved: #81520
Approved by: https://github.com/malfet
facebook-github-bot pushed a commit that referenced this pull request Jul 18, 2022
Summary:
I noticed that in #81261 all of the stdlib module names were explicitly listed, however as of Python 3.10 the stdlib now has a mechanism for this. python/cpython#87121

I figured it was better to use `sys.stdlib_module_names` going forward for 3.10+ instead of having to maintain this file for every new Python release. For docs see:
https://docs.python.org/3/library/sys.html#sys.stdlib_module_names

I did a symmetric difference to determine what the effective change would be. I verified that everything listed in this file ins included in sys.stdlib_module_names. However, there are files in sys.stdlib_module_names that are not included in the previous hard coded definition. Namely these are:

```
frozenset({'__future__',
           '_abc',
           '_aix_support',
           '_asyncio',
           '_bisect',
           '_blake2',
           '_bootsubprocess',
           '_bz2',
           '_codecs',
           '_codecs_cn',
           '_codecs_hk',
           '_codecs_iso2022',
           '_codecs_jp',
           '_codecs_kr',
           '_codecs_tw',
           '_collections',
           '_collections_abc',
           '_compat_pickle',
           '_compression',
           '_contextvars',
           '_crypt',
           '_csv',
           '_ctypes',
           '_curses',
           '_curses_panel',
           '_datetime',
           '_dbm',
           '_decimal',
           '_elementtree',
           '_frozen_importlib',
           '_frozen_importlib_external',
           '_functools',
           '_gdbm',
           '_hashlib',
           '_heapq',
           '_imp',
           '_io',
           '_json',
           '_locale',
           '_lsprof',
           '_lzma',
           '_markupbase',
           '_md5',
           '_msi',
           '_multibytecodec',
           '_multiprocessing',
           '_opcode',
           '_operator',
           '_osx_support',
           '_overlapped',
           '_pickle',
           '_posixshmem',
           '_posixsubprocess',
           '_py_abc',
           '_pydecimal',
           '_pyio',
           '_queue',
           '_random',
           '_scproxy',
           '_sha1',
           '_sha256',
           '_sha3',
           '_sha512',
           '_signal',
           '_sitebuiltins',
           '_socket',
           '_sqlite3',
           '_sre',
           '_ssl',
           '_stat',
           '_statistics',
           '_string',
           '_strptime',
           '_struct',
           '_symtable',
           '_threading_local',
           '_tkinter',
           '_tracemalloc',
           '_uuid',
           '_warnings',
           '_weakref',
           '_weakrefset',
           '_winapi',
           '_zoneinfo',
           'antigravity',
           'genericpath',
           'idlelib',
           'nt',
           'nturl2path',
           'opcode',
           'pydoc_data',
           'pyexpat',
           'this'})
```

I'm not sure if excluding these matters. I wouldn't think it would, but if it does and it is better to explicitly update this file each time, then feel free to close this.

Pull Request resolved: #81520
Approved by: https://github.com/malfet

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/4c9eae331b2695be011d96534a5ece44ba629601

Reviewed By: DanilBaibak

Differential Revision: D37919540

Pulled By: DanilBaibak

fbshipit-source-id: 6765556778ecad6edf254ad2ffc0d50d57ee1bbf
atalman pushed a commit to atalman/pytorch that referenced this pull request Jul 21, 2022
atalman added a commit that referenced this pull request Jul 21, 2022
Summary:
Copy-n-paste the list from https://github.com/PyCQA/isort/blob/main/isort/stdlibs/py310.py

Tested locally and in #81233

Pull Request resolved: #81261
Approved by: https://github.com/suo

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9ed76c8c89f6875f36619cd27fdd4af01d765a5b

Reviewed By: DanilBaibak

Differential Revision: D37781957

Pulled By: malfet

fbshipit-source-id: e39d94335950022fbdbe7b053674136694b89fad

Co-authored-by: Nikita Shulga (Meta Employee) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants