[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread Eric Snow
Eric Snow added the comment: > adding a new "gc" member in the _PyRuntimeState structure also causes the ABI > CI check to fail. What if you move it to the end of the struct? -- ___ Python tracker <https://bugs.py

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-12 Thread Eric Snow
Eric Snow added the comment: New changeset ed57b36c32e521162dbb97199e64a340d3bff827 by Eric Snow in branch 'main': bpo-45953: Statically allocate the main interpreter (and initial thread state). (gh-29883) https://github.com/python/cpython/commit/ed57b36c32e521162dbb97199e64a340d3bff827

[issue46360] Inconsistent import behavior for (unusual) submodules

2022-01-12 Thread Eric Snow
New submission from Eric Snow : Let's look at a hypothetical module "spam" and its submodule "spam.eggs": ``` # spam.py import sys sys.modules['spam.eggs'] = None ``` Then: >>> import spam.eggs >>> import sys >>> sys.modules['spam.eggs'] is None

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-12 Thread Eric Snow
Eric Snow added the comment: I'm glad we were able to figure it out relatively quickly...and without any big headaches. :) And thanks for testing against the alpha releases!!! You're having a positive impact. -- resolution: -> not a

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-11 Thread Eric Snow
Eric Snow added the comment: It looks like PyThreadState.async_exc is getting set to 0x01 somewhere. There isn't any code like that in https://github.com/python/cpython/commit/32a67246b0d1e08cd50fc3bfa58052cfeb515b2e. However, the struct layout of PyThreadState did change slightly

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-11 Thread Eric Snow
Eric Snow added the comment: FYI, I get the crash with just: pytest test/contrib/test_pyopenssl.py::TestHTTPS::test_verify_none_and_bad_fingerprint -- ___ Python tracker <https://bugs.python.org/issue46

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-11 Thread Eric Snow
Eric Snow added the comment: > pip install -r dev-requirements.txt > pip install ".[socks,secure,brotli]" > pytest I was able to reproduce the crash with these steps. Thanks! -- ___ Python tracker <https://bugs

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-11 Thread Eric Snow
Eric Snow added the comment: New changeset cf496d657a1a82eaf9ebfb47d721676fef6effa5 by Eric Snow in branch 'main': bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096) https://github.com/python/cpython/commit/cf496d657a1a82eaf9ebfb47d721676fef6effa5

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Eric Snow
Eric Snow added the comment: Why not `PyAPI_FUNC(PyObject *) PyErr_GetActiveException(void);`? -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue46

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-10 Thread Eric Snow
Eric Snow added the comment: It looks like the urllib3 CI is passing for 3.11.0a3: https://github.com/urllib3/urllib3/runs/4762856431 (Ubuntu 3.11-dev test-3.11). Is there a urllib3 issue number you could point me at? -- ___ Python tracker

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-10 Thread Eric Snow
Eric Snow added the comment: I must be missing something. Here is what I did: ``` $ cd cpython $ git checkout main $ make -j8 $ ./python -v venv ../venv-urllib3 $ cd .. $ git clone https://github.com/urllib3/urllib3 $ cd urllib3 $ ../venv-urllib3/bin/python3 -m pip install nox $ ../venv

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-10 Thread Eric Snow
Eric Snow added the comment: I'll look into this today. To reproduce, I should run the urllib3 test suite? -- assignee: -> eric.snow stage: -> needs patch ___ Python tracker <https://bugs.python.org/i

[issue46328] add sys.exception()

2022-01-10 Thread Eric Snow
Eric Snow added the comment: FWIW, here's an alternative we should *not* pursue: return just the exception from sys.exc_info(). For compatibility, we would implement `__iter__` and `__getitem__` on BaseException, to duplicate the behavior of the current tuple. There are a number of good

[issue46328] add sys.exception()

2022-01-10 Thread Eric Snow
Eric Snow added the comment: So sys.exception() will be equivalent to sys.exc_info()[1] (or rather, sys.exc_info() will be (type(sys.exception()), sys.exception(), sys.exception().__traceback__))? That seems good to me. -- nosy: +eric.snow

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Eric Snow
Eric Snow added the comment: Is this a duplicate of bpo-15751? (also see bpo-10915) -- ___ Python tracker <https://bugs.python.org/issue46295> ___ ___ Pytho

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: test_pyobject_freed_is_freed is still failing on AMD64 FreeBSD Shared 3.x. -- stage: patch review -> status: pending -> open ___ Python tracker <https://bugs.python.org/i

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Change by Eric Snow : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue46263> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: New changeset 68c76d9766cccb5fd992b0ac4b39645d9665dbe2 by Eric Snow in branch 'main': bpo-46263: Do not ever expect "use_frozen_modules" to be -1. (gh-30438) https://github.com/python/cpython/commit/68c76d9766cccb5fd992b0ac4b3964

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: I just put up a PR that should fix the failure. -- ___ Python tracker <https://bugs.python.org/issue46263> ___ ___ Python-bug

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28645 pull_request: https://github.com/python/cpython/pull/30438 ___ Python tracker <https://bugs.python.org/issue46

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: A FreeBSD builder where it's working: AMD64 FreeBSD Shared 3.x (koobs-freebsd-564d) OS: FreeBSD 14.0-CURRENT main-n244626-cb7cc72c546: GENERIC-NODEBUG (amd64) System: 2-core, 8Gb, VirtualBox (6.x) Guest Features: - Compiler: FreeBSD clang version 11.0.1 (llvmorg

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: Just to be clear, the test_embed failure is on AMD64 FreeBSD Non-Debug 3.x (https://buildbot.python.org/all/#/builders/172). I agree that 99fcf15052 (bpo-45582: Port getpath[p].c to Python (GH-29041)) is likely to be the cause. -- nosy: +steve.dower

[issue46263] FreeBSD buildbots cannot compile Python

2022-01-06 Thread Eric Snow
Eric Snow added the comment: In summary, regarding the test_embed failure: > FWIW: from test_embed.test_init_setpythonhome: > > if not config['executable']: > config['use_frozen_modules'] = -1 > > From the buildbot test stdout (but not pythoninfo) I see that &g

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2022-01-05 Thread Eric Snow
Eric Snow added the comment: > IMO writing a complete rationale for running multiple interpreters in > parallel which require a whole PEP. FYI, I'm planning on having such a PEP published in the next few days. -- ___ Python tracker

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2022-01-05 Thread Eric Snow
Eric Snow added the comment: +1 on just reverting in both branches. I can deal with my stuff separately. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-27 Thread Eric Snow
Eric Snow added the comment: are there any objections to my PR? -- ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Python-bugs-list mailin

[issue46109] Separate resources docs from other importlib docs

2021-12-27 Thread Eric Snow
Eric Snow added the comment: +1 -- ___ Python tracker <https://bugs.python.org/issue46109> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Eric Snow
Eric Snow added the comment: FWIW, one benefit to having everything in one doc (instead of one doc per submodule) is that it's a little easier to see the bigger picture. This is particularly important for folks interested in customizing the import system (rather than just interacting

[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Eric Snow
Eric Snow added the comment: +1 to splitting out the importlib.resources docs I'm mostly +1 for splitting out the others (.abc, .machinery, .util) too, not just .abc. Regardless, a ToC at the top of the main page which identifies the submodules (and provides a brief summary for each) would

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Eric Snow
Eric Snow added the comment: If that seems okay, I'll work on a backport PR for 3.10. -- ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Pytho

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Eric Snow
Eric Snow added the comment: I've created a PR for moving the interned strings and identifiers to _PyRuntimeState until we are ready to move them back to the interpreter. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28350 pull_request: https://github.com/python/cpython/pull/30131 ___ Python tracker <https://bugs.python.org/issue46

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Eric Snow
Eric Snow added the comment: FWIW, it makes sense to me for the interned strings to be per-interpreter eventually. Otherwise strings interned by an interpreter would persist after that interpreter is finalized, potentially leaking memory until the runtime is finalized. However, if we end up

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Eric Snow
Eric Snow added the comment: It sounds like this bug is another case where we have made some objects per-interpreter but others are still global and this is causing problems. _PyUnicode_EqualToASCIIId() wouldn't have any problems if interpreters weren't sharing any objects (or were only

[issue46070] broken subinterpreters

2021-12-14 Thread Eric Snow
Eric Snow added the comment: (related: bpo-44059) Presumably the problem relates to global state used in different interpreters leading to an inconsistent state in the crashing extension (or its dependencies). @graysky, do you know if this was a problem before Python 3.8

[issue45953] Statically allocate interpreter states as much as possible.

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

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-13 Thread Eric Snow
Eric Snow added the comment: New changeset 121f1f893a39d0b58d3d2b5597505c154ecaac2a by Eric Snow in branch 'main': bpo-45953: Statically initialize the small ints. (gh-30092) https://github.com/python/cpython/commit/121f1f893a39d0b58d3d2b5597505c154ecaac2a

[issue45953] Statically allocate interpreter states as much as possible.

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

[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-13 Thread Eric Snow
Eric Snow added the comment: You're welcome! Thanks for doing the work! -- ___ Python tracker <https://bugs.python.org/issue45949> ___ ___ Python-bugs-list m

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-09 Thread Eric Snow
Eric Snow added the comment: New changeset c8749b578324ad4089c8d014d9136bc42b065343 by Eric Snow in branch 'main': bpo-46008: Make runtime-global object/type lifecycle functions and state consistent. (gh-29998) https://github.com/python/cpython/commit

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-08 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28221 pull_request: https://github.com/python/cpython/pull/29998 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: At this point all the changes I was considering have been made, except for splitting type/object init into logical phases. That may or may not happen. Regardless, it can be done in a new issue. -- resolution: -> fixed stage: patch review -> re

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: New changeset 32a67246b0d1e08cd50fc3bfa58052cfeb515b2e by Eric Snow in branch 'main': bpo-46008: Move Py*State init into distinct functions. (gh-29977) https://github.com/python/cpython/commit/32a67246b0d1e08cd50fc3bfa58052cfeb515b2e

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: New changeset 758b74e71eb22e1e83a9eb937d1c015e461745a1 by Eric Snow in branch 'main': bpo-46008: Add _PyInterpreterState_Main(). (gh-29978) https://github.com/python/cpython/commit/758b74e71eb22e1e83a9eb937d1c015e461745a1

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28204 pull_request: https://github.com/python/cpython/pull/29978 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28203 pull_request: https://github.com/python/cpython/pull/29977 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: New changeset 1f384e318481532323bb9076f4447bc02da07209 by Eric Snow in branch 'main': bpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973) https://github.com/python/cpython/commit/1f384e318481532323bb9076f4447bc02da07209

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: New changeset 313f92a57bc3887026ec16adb536bb2b7580ce47 by Eric Snow in branch 'main': bpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971) https://github.com/python/cpython/commit/313f92a57bc3887026ec16adb536bb2b7580ce47

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Eric Snow added the comment: New changeset 8262c96bcc1841188866c1b022d9087e89639d98 by Eric Snow in branch 'main': bpo-46008: Return void from _PyEval_InitState(). (gh-29970) https://github.com/python/cpython/commit/8262c96bcc1841188866c1b022d9087e89639d98

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28198 pull_request: https://github.com/python/cpython/pull/29973 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28197 pull_request: https://github.com/python/cpython/pull/29972 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28196 pull_request: https://github.com/python/cpython/pull/29971 ___ Python tracker <https://bugs.python.org/issue46

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

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

[issue46008] Prepare runtime/interp/thread state and init for upcoming changes.

2021-12-07 Thread Eric Snow
New submission from Eric Snow : There are a few things in `_PyRuntimeState`, `PyInterpreterState`, `PyThreadState`, and there initialization (Python/pystate.c & Python/pylifecycle.c) that would benefit from some minor cleanup. Normally I wouldn't bother (due to the cost of c

[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-06 Thread Eric Snow
Eric Snow added the comment: The key point is that loaders should be using the spec, not any of the module attrs (like `__file__` and `__cached__`), nor setting them. For the specific paragraph I referenced, it would look more like: It is also appropriate to set __cached__ when __file__

[issue45582] Rewrite getpath.c in Python

2021-12-02 Thread Eric Snow
Eric Snow added the comment: Hurray! Thanks, Steve! -- ___ Python tracker <https://bugs.python.org/issue45582> ___ ___ Python-bugs-list mailing list Unsub

[issue45953] Statically allocate interpreter states as much as possible.

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

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Eric Snow
New submission from Eric Snow : Currently we allocate each new PyInterpreterState in PyInterpreterState_New(). Furthermore, PyInterpreterState is full of pointers which are almost all allocated on the heap during runtime init. We can statically allocate (and initialize?) most of what goes

[issue45952] Tools/c-analyzer is out-of-date.

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

[issue45952] Tools/c-analyzer is out-of-date.

2021-12-01 Thread Eric Snow
Eric Snow added the comment: New changeset ee94aa0850191712e6adfc1f4a9df08ec3240195 by Eric Snow in branch 'main': bpo-45952: Get the C analyzer tool working again. (gh-29882) https://github.com/python/cpython/commit/ee94aa0850191712e6adfc1f4a9df08ec3240195

[issue45952] Tools/c-analyzer is out-of-date.

2021-12-01 Thread Eric Snow
New submission from Eric Snow : Some relatively recent changes broke "./python Tools/c-analyzer/c-analyzer.py ...". Also, Tools/c-analyzer/TODO is a bit out of date. -- assignee: eric.snow components: Demos and Tools messages: 407474 nosy: eric.snow priority: normal pul

[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-01 Thread Eric Snow
Eric Snow added the comment: Ideally we would not have two scripts that do the same thing. -- ___ Python tracker <https://bugs.python.org/issue45949> ___ ___

[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-01 Thread Eric Snow
Eric Snow added the comment: IIRC, Programs/_freeze_module.c was originally a C implementation of the basic functionality in Tools/freeze/freeze.py. -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue45

[issue45887] [subinterpreters] Pull all interpreter-global objects into one place.

2021-11-23 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29737 ___ Python tracker <https://bugs.python.org/issu

[issue45887] [subinterpreters] Pull all interpreter-global objects into one place.

2021-11-23 Thread Eric Snow
New submission from Eric Snow : Currently there are still a bunch of PyObject static variables in the code that need to become per-interpreter. This includes quite a few static types (e.g. in Objects/*.c), as well as freelists and caches. To make the transition easier I'd like to move all

[issue45582] Rewrite getpath.c in Python

2021-11-11 Thread Eric Snow
Eric Snow added the comment: On Thu, Nov 11, 2021 at 6:27 PM Steve Dower wrote: > rather than streamline anything by changing it (yet). We can do those once we > know we've got something working. +1 -- ___ Python tracker

[issue45783] test_freeze fails if a file is removed

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

[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Eric Snow
Eric Snow added the comment: Thanks for the report, Petr! I'll take a look. -- assignee: -> eric.snow components: +Tests stage: -> needs patch ___ Python tracker <https://bugs.python.org/i

[issue45582] Rewrite getpath.c in Python

2021-11-04 Thread Eric Snow
Eric Snow added the comment: On Wed, Nov 3, 2021 at 6:25 PM Steve Dower wrote: > Now to find out why the old getpath could somehow locate the stdlib but new > getpath cannot... (I'm guessing it is finding the "original" stdlib rather > than the fresh clone, since AFAICT t

[issue45651] -X frozen_modules not defaulting to "off" on Windows when running in source tree?

2021-11-04 Thread Eric Snow
Eric Snow added the comment: maybe related: https://github.com/python/cpython/pull/29041#discussion_r734085599 -- ___ Python tracker <https://bugs.python.org/issue45

[issue45582] Rewrite getpath.c in Python

2021-11-03 Thread Eric Snow
Eric Snow added the comment: On Wed, Nov 3, 2021 at 1:21 PM Steve Dower wrote: > Last remaining test failure is one that I can't figure out on my own - the > freeze test is rerunning a CPython build (on Linux) and is apparently > building getpath.c with the ".c.o&quo

[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-11-03 Thread Eric Snow
Eric Snow added the comment: New changeset 7b438282d39e742b2628a32e7c6699a140ff4cfb by Eric Snow in branch 'main': bpo-45506: Stop skipping test_embed. (gh-29300) https://github.com/python/cpython/commit/7b438282d39e742b2628a32e7c6699a140ff4cfb

[issue45696] "Deep-freeze": skip the marshal step by generating C code

2021-11-02 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue45696> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45695] Out-of-tree builds are not tested.

2021-11-02 Thread Eric Snow
New submission from Eric Snow : Currently we don't test builds done outside the source tree, neither on GitHub nor the buildbots. [1] As a result, such builds get broken occasionally. I've certainly broken then a couple times, inadvertently. It would be helpful if we tested out-of-tree

[issue45396] Custom frozen modules get ignored.

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

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

2021-10-28 Thread Eric Snow
Eric Snow added the comment: This is done now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45396] Custom frozen modules get ignored.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: The behavior has been addressed in the fix for bpo-45395. However, I'd like to change the name of the -X option from "frozen_modules" to "frozen_stdlib", to avoid any confusion in the future. After that this issue is done. -- r

[issue45396] Custom frozen modules get ignored.

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

[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

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

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

2021-10-28 Thread Eric Snow
Eric Snow added the comment: New changeset 074fa5750640a067d9894c69378a00ceecc3b948 by Eric Snow in branch 'main': bpo-45395: Make custom frozen modules additions instead of replacements. (gh-28778) https://github.com/python/cpython/commit/074fa5750640a067d9894c69378a00ceecc3b948

[issue45396] Custom frozen modules get ignored.

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

[issue45653] Freeze the encodings module.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: On Thu, Oct 28, 2021 at 12:15 PM Marc-Andre Lemburg wrote: > encodings is a package. I think you first have to check whether mixing > frozen and non-frozen submodules are even supported. I've never tried > having only part of a package frozen. It work

[issue45020] Freeze all modules imported during startup.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: I consider this done. There is some lingering follow-up work, for which I've created a number of issues: * https://bugs.python.org/issue45396 - -X frozen_modules=off ignores custom frozen modules * https://bugs.python.org/issue45395 - custom modules override

[issue45661] [meta] Freeze commonly used stdlib modules.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: One to consider that isn't necessarily used that commonly is sysconfig. However, that could also involve freezing the "sysconfigdata" file (without needing to expose it as a module). -- ___ Python track

[issue45661] [meta] Freeze commonly used stdlib modules.

2021-10-28 Thread Eric Snow
New submission from Eric Snow : We're already freezing modules needed for bootstrapping the runtime, as well as the modules imported during startup. [1][2] We're also planning on freezing argparse. [3] There may be other modules (or files) worth freezing (assuming we don't just freeze

[issue45654] Freeze the runpy module.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: (See https://bugs.python.org/issue45020#msg402118.) -- ___ Python tracker <https://bugs.python.org/issue45654> ___ ___ Python-bug

[issue45660] Freeze the argparse module.

2021-10-28 Thread Eric Snow
New submission from Eric Snow : (See https://bugs.python.org/issue45020#msg402116.) On Fri, Sep 17, 2021 at 7:56 PM Raymond Hettinger wrote: > It would be nice to freeze argparse.py and its dependencies. For > command-line tools, startup time is important. This would include fr

[issue21736] Add __file__ attribute to frozen modules

2021-10-28 Thread Eric Snow
Eric Snow added the comment: I've opened the following issues related to frozen stdlib modules: https://bugs.python.org/issue45652 https://bugs.python.org/issue45658 https://bugs.python.org/issue45659 Again, I'm leaving this issue open to deal with the broader question of frozen modules

[issue45659] Add FrozenImporter.get_filename().

2021-10-28 Thread Eric Snow
Eric Snow added the comment: Note that there isn't any intent currently to implement the FileLoader ABC [1], which would require having FrozenImporter instances, adding the "name" and "path" attributes to them, as well as the get_data() method. The same goes for the

[issue45659] Add FrozenImporter.get_filename().

2021-10-28 Thread Eric Snow
New submission from Eric Snow : Now that __file__ is set on frozen (stdlib) modules, we can add an implementation for FrozenImporter.get_filename(). This would make FrozenImporter and implementation of ExecutionLoader. [1] There is a caveat: in spec_from_loader() [2] we infer the presence

[issue45658] Implement FrozenImporter.get_source()

2021-10-28 Thread Eric Snow
New submission from Eric Snow : FrozenImporter (in Lib/importlib/_bootstrap.py) has a get_source() method but it always returns None. Now that __file__ is set on frozen (stdlib) modules, we can implement FrozenImporter.get_source() appropriately. -- components: Library (Lib

[issue45658] Implement FrozenImporter.get_source()

2021-10-28 Thread Eric Snow
Eric Snow added the comment: Note that once the get_source() implementation is done, the only missing method for importlib.abc.InspectLoader is source_to_code(). (See https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader

[issue45654] Freeze the runpy module.

2021-10-28 Thread Eric Snow
New submission from Eric Snow : Currently we are freezing the modules that are imported during startup. However, if someone uses "python -m module" then the runtime imports the runpy module and uses it. Given that this case is quite common, runpy and its dependencies should

[issue45653] Freeze the encodings module.

2021-10-28 Thread Eric Snow
New submission from Eric Snow : Currently we freeze all the modules imported during runtime initialization, except for the encodings module. It has a lot of submodules and this results in a lot of extra noise in builds. We hadn't frozen it yet because we were still ironing out changes

[issue45652] co_filename does not match __file__ for frozen stdlib modules

2021-10-28 Thread Eric Snow
New submission from Eric Snow : Frozen modules currently have co_filename set to "". It would be good to have it match __file__ instead. This will require require also fixing any code objects in the module's co_consts (and so on). It may make sense to take care of the while un

[issue45651] -X frozen_modules not defaulting to "off" on Windows when running in source tree?

2021-10-28 Thread Eric Snow
Change by Eric Snow : -- title: -X frozen_modules not defaulting to "on" on Windows? -> -X frozen_modules not defaulting to "off" on Windows when running in source tree? ___ Python tracker <https://

[issue45020] Freeze all modules imported during startup.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum wrote: > Is gh-28940 only for UNIX? > I built on Windows with default options (PCbuild\build.bat) and it looks like > the frozen modules are used by default even though I am running in the source > d

[issue45651] -X frozen_modules not defaulting to "on" on Windows?

2021-10-28 Thread Eric Snow
New submission from Eric Snow : (forked from https://bugs.python.org/issue45020#msg404344) On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum wrote: > I built on Windows with default options (PCbuild\build.bat) and it looks like > the frozen modules are used by default even though I am r

[issue45629] Tools/freeze needs tests in the test suite.

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

[issue45629] Tools/freeze needs tests in the test suite.

2021-10-28 Thread Eric Snow
Eric Snow added the comment: New changeset 13d9205f4057f80a25d410ad123876dc60cd by Eric Snow in branch 'main': bpo-45629: Add a test for the "freeze" tool. (gh-29222) https://github.com/python/cpython/commit/13d9205f4057f80a25d410ad12

<    1   2   3   4   5   6   7   8   9   10   >