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
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
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
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
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
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
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
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
Eric Snow added the comment:
Why not `PyAPI_FUNC(PyObject *) PyErr_GetActiveException(void);`?
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
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
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
Eric Snow added the comment:
Is this a duplicate of bpo-15751? (also see bpo-10915)
--
___
Python tracker
<https://bugs.python.org/issue46295>
___
___
Pytho
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
Change by Eric Snow :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue46263>
___
___
Python-bugs-list mailing list
Unsubscrib
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
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
Change by Eric Snow :
--
pull_requests: +28645
pull_request: https://github.com/python/cpython/pull/30438
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
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
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
Eric Snow added the comment:
are there any objections to my PR?
--
___
Python tracker
<https://bugs.python.org/issue46006>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
+1
--
___
Python tracker
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
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
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
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
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
Change by Eric Snow :
--
pull_requests: +28350
pull_request: https://github.com/python/cpython/pull/30131
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
Change by Eric Snow :
--
pull_requests: +28319
pull_request: https://github.com/python/cpython/pull/30096
___
Python tracker
<https://bugs.python.org/issue45
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
Change by Eric Snow :
--
pull_requests: +28315
pull_request: https://github.com/python/cpython/pull/30092
___
Python tracker
<https://bugs.python.org/issue45
Eric Snow added the comment:
You're welcome! Thanks for doing the work!
--
___
Python tracker
<https://bugs.python.org/issue45949>
___
___
Python-bugs-list m
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
Change by Eric Snow :
--
pull_requests: +28221
pull_request: https://github.com/python/cpython/pull/29998
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
Change by Eric Snow :
--
pull_requests: +28204
pull_request: https://github.com/python/cpython/pull/29978
___
Python tracker
<https://bugs.python.org/issue46
Change by Eric Snow :
--
pull_requests: +28203
pull_request: https://github.com/python/cpython/pull/29977
___
Python tracker
<https://bugs.python.org/issue46
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
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
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
Change by Eric Snow :
--
pull_requests: +28198
pull_request: https://github.com/python/cpython/pull/29973
___
Python tracker
<https://bugs.python.org/issue46
Change by Eric Snow :
--
pull_requests: +28197
pull_request: https://github.com/python/cpython/pull/29972
___
Python tracker
<https://bugs.python.org/issue46
Change by Eric Snow :
--
pull_requests: +28196
pull_request: https://github.com/python/cpython/pull/29971
___
Python tracker
<https://bugs.python.org/issue46
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
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
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__
Eric Snow added the comment:
Hurray! Thanks, Steve!
--
___
Python tracker
<https://bugs.python.org/issue45582>
___
___
Python-bugs-list mailing list
Unsub
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
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
Change by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Eric Snow added the comment:
Ideally we would not have two scripts that do the same thing.
--
___
Python tracker
<https://bugs.python.org/issue45949>
___
___
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
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
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
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
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
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
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
Eric Snow added the comment:
maybe related:
https://github.com/python/cpython/pull/29041#discussion_r734085599
--
___
Python tracker
<https://bugs.python.org/issue45
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
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
Change by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue45696>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Eric Snow :
--
resolution: fixed ->
stage: resolved -> patch review
status: closed -> open
___
Python tracker
<https://bugs.python.or
Eric Snow added the comment:
This is done now.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Eric Snow :
--
pull_requests: +27565
pull_request: https://github.com/python/cpython/pull/29301
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +27564
pull_request: https://github.com/python/cpython/pull/29300
___
Python tracker
<https://bugs.python.org/issue45
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
Change by Eric Snow :
--
pull_requests: +27560
pull_request: https://github.com/python/cpython/pull/28778
___
Python tracker
<https://bugs.python.org/issue45
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
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
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
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
Eric Snow added the comment:
(See https://bugs.python.org/issue45020#msg402118.)
--
___
Python tracker
<https://bugs.python.org/issue45654>
___
___
Python-bug
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
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
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
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
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
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
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
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
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
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://
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
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
Change by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
101 - 200 of 2619 matches
Mail list logo