[issue45188] De-couple the Windows builds from freezing modules.

2021-09-14 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26747 pull_request: https://github.com/python/cpython/pull/28335 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-14 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26745 pull_request: https://github.com/python/cpython/pull/28335 ___ Python tracker <https://bugs.python.org/issue45

[issue21736] Add __file__ attribute to frozen modules

2021-09-14 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28335 ___ Python tracker <https://bugs.python.org/issu

[issue45020] Freeze all modules imported during startup.

2021-09-14 Thread Eric Snow
Eric Snow added the comment: New changeset a65c86889e208dddb26a7ebe7840c24edbcca775 by Eric Snow in branch 'main': bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of frozen modules. (gh-28320) https://github.com/python/cpyt

[issue45189] Drop the "list_frozen" command from _test_embed.

2021-09-14 Thread Eric Snow
Eric Snow added the comment: Yeah, sorry, I got the PRs mixed up. I added it in https://github.com/python/cpython/pull/28320. _imp._get_frozen_module_names() should work just fine. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset cbeb81971057d6c382f45ecce92df2b204d4106a by Eric Snow in branch 'main': bpo-45020: Freeze some of the modules imported during startup. (gh-28335) https://github.com/python/cpython/commit/cbeb81971057d6c382f45ecce92df2

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset cbeb81971057d6c382f45ecce92df2b204d4106a by Eric Snow in branch 'main': bpo-45020: Freeze some of the modules imported during startup. (gh-28335) https://github.com/python/cpython/commit/cbeb81971057d6c382f45ecce92df2

[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset cbeb81971057d6c382f45ecce92df2b204d4106a by Eric Snow in branch 'main': bpo-45020: Freeze some of the modules imported during startup. (gh-28335) https://github.com/python/cpython/commit/cbeb81971057d6c382f45ecce92df2

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 Thread Eric Snow
New submission from Eric Snow : Currently we calculate a number of filesystem paths during runtime initialization in Modules/getpath.c (with the key goal of producing what will end up in sys.path). Some of those paths are preserved and some are not. In cases where the discarded data comes

[issue45019] Freezing modules has manual steps but could be automated.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: On Wed, Sep 15, 2021 at 7:51 AM Karthikeyan Singaravelan wrote: > The PR 28319 seems to have introduced a new deprecation warning in tests : I'll fix that. -- ___ Python tracker <https://bugs.python.org

[issue45213] Frozen modules are looked up using a linear search.

2021-09-15 Thread Eric Snow
New submission from Eric Snow : When looking up a frozen modules, we loop over the array of frozen modules until we find a match (or don't). See find_frozen() in Python/import.c. The frozen importer sits right after the builtin importer and right before the file-based importer. This

[issue45213] Frozen modules are looked up using a linear search.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: Realistically, I doubt this will ever be a problem. The list of frozen modules is fairly small and the loop in the C code is a lightweight. So it isn't that big of a deal relative to the other costs involved in import. Even if the number of frozen mo

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: At this point the fundamental work is done. Here are some follow-up tasks to wrap up this issue: * freeze the remaining stdlib modules imported during startup (os, site, codecs, encodings.*) + blocked by bpo-45186 and bpo-45188 * default to "on"

[issue45019] Freezing modules has manual steps but could be automated.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26776 pull_request: https://github.com/python/cpython/pull/28362 ___ Python tracker <https://bugs.python.org/issue45

[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: That's a good idea. It's certainly cleaner than the approach I took (optionally pass in to marshal.dumps() the list of "before" object/refcount pairs to compare in w_ref()). Adding a flag to marshal.dumps() to opt out shouldn't be to

[issue45019] Freezing modules has manual steps but could be automated.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset 4b30aaa0c9dc4da956199dbd48af9c06089cb271 by Eric Snow in branch 'main': bpo-45019: Silence a warning in test_ctypes. (gh-28362) https://github.com/python/cpython/commit/4b30aaa0c9dc4da956199dbd48af9c

[issue45019] Freezing modules has manual steps but could be automated.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26788 pull_request: https://github.com/python/cpython/pull/28374 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26790 pull_request: https://github.com/python/cpython/pull/28375 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: Setting __file__ on frozen modules is only one example. I actually need the stdlib dir to be preserved for other uses. FWIW, I think you're probably right about __file__ on frozen modules. That said, further discussion about __file__ (or __path__) is pro

[issue45019] Freezing modules has manual steps but could be automated.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset 3814e2036d96e2b6c69afce61926bb0a2a34d2d9 by Eric Snow in branch 'main': bpo-45019: Clean up the frozen __hello__ module. (gh-28374) https://github.com/python/cpython/commit/3814e2036d96e2b6c69afce61926bb

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: On Wed, Sep 15, 2021 at 12:03 PM Guido van Rossum wrote: > I would move "default to "on" (except if actually running out of the source > tree)" to the "maybe" category. I left a few comments in other deps. I think > we sho

[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: FYI, I have a PR up for dropping the .h files: https://github.com/python/cpython/pull/28375. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: Can we close this? -- ___ Python tracker <https://bugs.python.org/issue45188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset a9757bf34d8b4cb3c24bbb70d50a06c815e2e8f3 by Eric Snow in branch 'main': bpo-45020: Drop the frozen .h files from the repo. (gh-28375) https://github.com/python/cpython/commit/a9757bf34d8b4cb3c24bbb70d50a06

[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26794 pull_request: https://github.com/python/cpython/pull/28379 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: Looks like that last commit broke one of the buildbots: https://buildbot.python.org/all/#/builders/483/builds/812 I'll fix that right away. -- ___ Python tracker <https://bugs.python.org/is

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: Never mind. It's pretty late here so I'm going to revert it and sort it out in the morning. -- ___ Python tracker <https://bugs.python.o

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26795 pull_request: https://github.com/python/cpython/pull/28380 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow
Eric Snow added the comment: New changeset 9fd87a5fe5c468cf94265365091267838b004b7f by Eric Snow in branch 'main': bpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380) https://github.com/python/cpython/commit/9fd87a5fe5c468cf9426

[issue45186] Marshal output isn't completely deterministic.

2021-09-16 Thread Eric Snow
Eric Snow added the comment: Thanks, Inada-san. That's super helpful. -- ___ Python tracker <https://bugs.python.org/issue45186> ___ ___ Python-bugs-list m

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-09-16 Thread Eric Snow
Eric Snow added the comment: This is more likely to relate to bpo-45188, "De-couple the Windows builds from freezing modules.", for which the PR was merged yesterday: New changeset 09b4ad11f323f8702cde795e345b75e0fbb1a9a5 by Steve Dower in branch 'main': bpo-45188: Win

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-09-16 Thread Eric Snow
Eric Snow added the comment: Of course, it might also be unrelated. -- ___ Python tracker <https://bugs.python.org/issue45220> ___ ___ Python-bugs-list mailin

[issue45020] Freeze all modules imported during startup.

2021-09-16 Thread Eric Snow
Eric Snow added the comment: I left a comment on bpo-45220. -- ___ Python tracker <https://bugs.python.org/issue45020> ___ ___ Python-bugs-list mailin

[issue45020] Freeze all modules imported during startup.

2021-09-16 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26804 pull_request: https://github.com/python/cpython/pull/28392 ___ Python tracker <https://bugs.python.org/issue45

[issue45186] Marshal output isn't completely deterministic.

2021-09-16 Thread Eric Snow
Eric Snow added the comment: I'm closing this in favor of bpo-34093. -- ___ Python tracker <https://bugs.python.org/issue45186> ___ ___ Python-bugs-list m

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-16 Thread Eric Snow
Eric Snow added the comment: FYI, I unknowingly created a duplicate of this issue a few days ago, bpo-45186, and created a PR for it: https://github.com/python/cpython/pull/28379. Interestingly, while I did that PR independently, it has a lot in common with Inada-san's second PR

[issue45186] Marshal output isn't completely deterministic.

2021-09-16 Thread Eric Snow
Change by Eric Snow : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Reproducible pyc: FLAG_REF is not stable. ___ Python tracker <https://bugs.python

[issue45020] Freeze all modules imported during startup.

2021-09-16 Thread Eric Snow
Eric Snow added the comment: New changeset fdc6b3d9316501d2f0068a1bf4334debc1949e62 by Eric Snow in branch 'main': bpo-45020: Drop the frozen .h files from the repo. (gh-28392) https://github.com/python/cpython/commit/fdc6b3d9316501d2f0068a1bf4334d

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-16 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26811 pull_request: https://github.com/python/cpython/pull/28379 ___ Python tracker <https://bugs.python.org/issue34

[issue45020] Freeze all modules imported during startup.

2021-09-16 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26812 pull_request: https://github.com/python/cpython/pull/28398 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-17 Thread Eric Snow
Eric Snow added the comment: Thanks for fixing that, Victor! -- ___ Python tracker <https://bugs.python.org/issue45020> ___ ___ Python-bugs-list mailin

[issue45020] Freeze all modules imported during startup.

2021-09-17 Thread Eric Snow
Eric Snow added the comment: New changeset 090591636c4f03ce06a039079bd7716a5b23631e by Eric Snow in branch 'main': bpo-45020: Freeze os, site, and codecs. (gh-28398) https://github.com/python/cpython/commit/090591636c4f03ce06a039079bd771

[issue45020] Freeze all modules imported during startup.

2021-09-17 Thread Eric Snow
Eric Snow added the comment: On Fri, Sep 17, 2021 at 4:22 PM Guido van Rossum wrote: > BTW, why does the script still run Programs/_freeze_module over all the > modules to be frozen? Isn't that up to the Makefile or its Windows equivalent? Yeah, it used to matter but we probably

[issue45213] Frozen modules are looked up using a linear search.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: On Mon, Sep 20, 2021 at 12:55 AM Raymond Hettinger wrote: > If you close this out, consider adding a prominent comment so that the issue > will be on the minds of people looking at this code. Good idea! -- ___

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: It turns out that I don't need this after all (once I merged gh-28392 and bpo-45188 was resolved). That impacts how much time I have to spend on this, so I might not be able to pursue this further. That said, I think it is worth doing and the PR I ha

[issue34093] Reproducible pyc: FLAG_REF is not stable.

2021-09-20 Thread Eric Snow
Eric Snow added the comment: FWIW, I found a faster solution than calling `w_object()` twice. Currently the logic for w_ref() (used for each "complex" object) looks like this: * if ob_ref == 1 * do not apply FLAG_REF * marshal normally * else if seen for the first time

[issue45213] Frozen modules are looked up using a linear search.

2021-09-22 Thread Eric Snow
Eric Snow added the comment: On Wed, Sep 22, 2021 at 7:12 AM Dong-hee Na wrote: > I thought about the Trie implementation for this case. On Wed, Sep 22, 2021 at 7:22 AM Marc-Andre Lemburg wrote: > Perhaps a frozen dict could be used instead of the linear search. > > This could

[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-09-23 Thread Eric Snow
New submission from Eric Snow : The list of frozen modules in Python/frozen.c is generated by Tools/scripts/freeze_modules.py. Currently we freeze both posixpath and ntpath, even though for startup we only need one of the two (depending on the OS). In this case both modules are available

[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-09-23 Thread Eric Snow
Eric Snow added the comment: FYI, currently os.path is also frozen and *is* OS-specific. However, that's a separate matter. See bpo-45272. -- ___ Python tracker <https://bugs.python.org/is

[issue45272] 'os.path' should not be a frozen module

2021-09-23 Thread Eric Snow
Eric Snow added the comment: The matter here boils down to the design of _imp.is_frozen() [1]. It only checks to see if the given module name shows up in the list of frozen modules in Python/frozen.c. This broke things when I froze os and posixpath/ntpath. The simplest solution was to

[issue45020] Freeze all modules imported during startup.

2021-09-23 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26923 pull_request: https://github.com/python/cpython/pull/28538 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-24 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +26933 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28550 ___ Python tracker <https://bugs.python.org/issu

[issue45020] Freeze all modules imported during startup.

2021-09-24 Thread Eric Snow
Eric Snow added the comment: New changeset 7c801e0fa603b155eab3fd19698aa90854ac5a7b by Eric Snow in branch 'main': bpo-45020: Fix some corner cases for frozen module generation. (gh-28538) https://github.com/python/cpython/commit/7c801e0fa603b155eab3fd19698aa9

[issue45020] Freeze all modules imported during startup.

2021-09-24 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26937 pull_request: https://github.com/python/cpython/pull/28554 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26965 pull_request: https://github.com/python/cpython/pull/28583 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Eric Snow added the comment: New changeset ae7839bbe817329dd015f9195da308a0f3fbd3e2 by Eric Snow in branch 'main': bpo-45211: Move helpers from getpath.c to internal API. (gh-28550) https://github.com/python/cpython/commit/ae7839bbe817329dd015f9195da308

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26966 pull_request: https://github.com/python/cpython/pull/28584 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26967 pull_request: https://github.com/python/cpython/pull/28585 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26968 pull_request: https://github.com/python/cpython/pull/28586 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26972 pull_request: https://github.com/python/cpython/pull/28590 ___ Python tracker <https://bugs.python.org/issue45

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-28 Thread Eric Snow
Eric Snow added the comment: New changeset 0c50b8c0b8274d54d6b71ed7bd21057d3642f138 by Eric Snow in branch 'main': bpo-45211: Remember the stdlib dir during startup. (gh-28586) https://github.com/python/cpython/commit/0c50b8c0b8274d54d6b71ed7bd2105

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-28 Thread Eric Snow
Eric Snow added the comment: I have what I need for now (stdlib dir). There may be more info to preserve, but I'll leave it others to pursue that. -- assignee: eric.snow -> ___ Python tracker <https://bugs.python.org

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-29 Thread Eric Snow
Eric Snow added the comment: Yeah, I was thinking along those lines too but hesitated. :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
New submission from Eric Snow : Currently FrozenImporter (in Lib/importlib/_bootstrap.py) does minimal work in its find_spec() method. It only checks whether or not the module is frozen. However, in doing so it has gathered all the info we need to load the module. We end up repeating that

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
Eric Snow added the comment: Taking care of this will also be necessary (probably) as we work on adding __file__ to frozen stdlib modules. (See bpo-21736.) -- ___ Python tracker <https://bugs.python.org/issue45

[issue45324] The frozen importer should capture info in find_spec().

2021-09-29 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27002 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28633 ___ Python tracker <https://bugs.python.org/issu

[issue45020] Freeze all modules imported during startup.

2021-09-29 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27004 pull_request: https://github.com/python/cpython/pull/28635 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-29 Thread Eric Snow
Eric Snow added the comment: New changeset 45ca1c04139300ec0289a32f78c7ac922a4f7b07 by Eric Snow in branch 'main': bpo-45020: Do not freeze /__init__.py twice. (gh-28635) https://github.com/python/cpython/commit/45ca1c04139300ec0289a32f78c7ac

[issue21736] Add __file__ attribute to frozen modules

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27021 pull_request: https://github.com/python/cpython/pull/28655 ___ Python tracker <https://bugs.python.org/issue21

[issue21736] Add __file__ attribute to frozen modules

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27022 pull_request: https://github.com/python/cpython/pull/28656 ___ Python tracker <https://bugs.python.org/issue21

[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27029 pull_request: https://github.com/python/cpython/pull/28664 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Eric Snow added the comment: New changeset 7e5c107541726b90d3f2e6e69ef37180cf58335d by Eric Snow in branch 'main': bpo-45020: Add more test cases for frozen modules. (gh-28664) https://github.com/python/cpython/commit/7e5c107541726b90d3f2e6e69ef371

[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27030 pull_request: https://github.com/python/cpython/pull/28665 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-10-01 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27045 pull_request: https://github.com/python/cpython/pull/28655 ___ Python tracker <https://bugs.python.org/issue45

[issue45364] Add more documentation for ModuleSpec.loader_state.

2021-10-04 Thread Eric Snow
New submission from Eric Snow : Currently ModuleSpec.loader_state is documented briefly once in the importlib docs. [1] It should have more explanation, e.g. about when/why it should be used. It should also be mentioned meaningfully in the MetapathFinder [2] and Loader [3] docs, as well as

[issue45379] Improve errors related to frozen modules.

2021-10-05 Thread Eric Snow
New submission from Eric Snow : In Python/import.c there are various situations in which an error state related to frozen modules might result and even lead to an exception. In gh-28633 we consolidated these cases into a new "frozen_status" enum and added "set_frozen_er

[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow
Eric Snow added the comment: New changeset c3d9ac8b340fcbf54cee865737e67f11fcd70ed3 by Eric Snow in branch 'main': bpo-45324: Capture data in FrozenImporter.find_spec() to use in exec_module(). (gh-28633) https://github.com/python/cpython/commit/c3d9ac8b340fcbf54cee865737e67f

[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27087 pull_request: https://github.com/python/cpython/pull/28740 ___ Python tracker <https://bugs.python.org/issue45

[issue45020] Freeze all modules imported during startup.

2021-10-05 Thread Eric Snow
Eric Snow added the comment: New changeset 08285d563e64c179a56ab2f952345b3dbcdb54f3 by Eric Snow in branch 'main': bpo-45020: Identify which frozen modules are actually aliases. (gh-28655) https://github.com/python/cpython/commit/08285d563e64c179a56ab2f952345b

[issue45020] Freeze all modules imported during startup.

2021-10-06 Thread Eric Snow
Eric Snow added the comment: On Tue, Oct 5, 2021 at 11:31 AM Guido van Rossum wrote: > Whoa. os.path is not always an alias for posixpath, is it? Steve brought this to my attention a couple weeks ago. Bottom line: the frozen module entry is only there for checks, not for actual import,

[issue45272] 'os.path' should not be a frozen module

2021-10-06 Thread Eric Snow
Eric Snow added the comment: On Wed, Oct 6, 2021 at 11:38 AM Guido van Rossum wrote: > I'm trying to understand the proposed solution, "have _imp.is_frozen() check > the module in sys.modules." Does that mean it would do a dict lookup first? Correct. We'd look up

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow
New submission from Eric Snow : The mechanism to add custom frozen modules to the Python runtime is to set PyImport_FrozenModules (see Python/frozen.c) to some new array. This means that the default frozen modules (from _PyImport_FrozenModules) are no longer used unless explicitly added to

[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow
New submission from Eric Snow : Recently we added the "-X frozen_modules" CLI option to control whether or not (non-essential) frozen modules get used. Currently the default is "off", though the plan is to make the default "on". Regardless, this is problemati

[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow
Eric Snow added the comment: (This was motivated by https://github.com/python/cpython/pull/28633#discussion_r720506225.) -- ___ Python tracker <https://bugs.python.org/issue45

[issue45396] Custom frozen modules get ignored.

2021-10-06 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27110 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28776 ___ Python tracker <https://bugs.python.org/issu

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27112 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28778 ___ Python tracker <https://bugs.python.org/issu

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-06 Thread Eric Snow
Eric Snow added the comment: I've posted a PR that demonstrates a reasonable solution. -- ___ Python tracker <https://bugs.python.org/issue45395> ___ ___

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-07 Thread Eric Snow
Eric Snow added the comment: On Thu, Oct 7, 2021 at 1:17 AM Marc-Andre Lemburg wrote: > I'm not sure I follow, but in any case, please make sure that > the freeze tool in Tools/ continues to work with the new mechanism. > > The freeze tool would also need to know which mo

[issue45020] Freeze all modules imported during startup.

2021-10-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27229 pull_request: https://github.com/python/cpython/pull/28940 ___ Python tracker <https://bugs.python.org/issue45

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
New submission from Eric Snow : (This follows bpo-45211.) In gh-28586 I added the code in Py_SetPythonHome() to set _Py_path_config.stdlib_dir to the provided directory. However, this is the wrong value. Furthermore, the relationship between _Py_path_config.home and

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27242 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28954 ___ Python tracker <https://bugs.python.org/issu

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27243 pull_request: https://github.com/python/cpython/pull/28954 ___ Python tracker <https://bugs.python.org/issue45

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main': bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954) https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main': bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954) https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-14 Thread Eric Snow
Eric Snow added the comment: @MAL, what's the best way to make sure Tools/freeze is still working? I don't see any tests for it in the test suite. I tried running the test in Tools/freeze/test, but I can't get that to work on main (or on

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread Eric Snow
Eric Snow added the comment: Thanks, Victor! -- ___ Python tracker <https://bugs.python.org/issue35134> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21736] Add __file__ attribute to frozen modules

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 79cf20e48d0b5d69d9fac2a0204b5ac2c366066a by Eric Snow in branch 'main': bpo-21736: Set __file__ on frozen stdlib modules. (gh-28656) https://github.com/python/cpython/commit/79cf20e48d0b5d69d9fac2a0204b5a

<    5   6   7   8   9   10   11   12   13   14   >