Change by Eric Snow :
--
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issue45096>
___
___
Python-bugs-list mailing list
Un
Change by Eric Snow :
--
pull_requests: -27485
___
Python tracker
<https://bugs.python.org/issue45096>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric Snow :
--
keywords: +patch
pull_requests: +27506
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29222
___
Python tracker
<https://bugs.python.org/issu
New submission from Eric Snow :
I found that Tools/freeze doesn't get tested. It has a "test" directory but
it's more of a rudimentary sanity check that must be run manually. Since the
tool isn't tested through our test suite, there's a high likelihood it
Eric Snow added the comment:
FYI, I figured out the problem on my end. I wasn't using an installed python.
Once I did it worked fine.
--
___
Python tracker
<https://bugs.python.org/is
Change by Eric Snow :
--
keywords: +patch
pull_requests: +27485
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29222
___
Python tracker
<https://bugs.python.org/issu
Eric Snow added the comment:
New changeset 6afb285ff0790471a6858e44f85d143f07fda70c by Eric Snow in branch
'main':
bpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997)
https://github.com/python/cpython/commit/6afb285ff0790471a685
Eric Snow added the comment:
Thanks for bringing this up, Greg!
--
___
Python tracker
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
New changeset 17c61045c51512add61a9e75e9c7343cf4e4fb82 by Eric Snow in branch
'main':
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)
https://github.com/python/cpython/commit/17c61045c51512add61a9e75e9c734
Eric Snow added the comment:
See bpo-35673. Also, it is actually in importlib._bootstrap_external.
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue18
Eric Snow added the comment:
On Thu, Oct 21, 2021 at 11:54 AM Barry A. Warsaw wrote:
> Thanks for your comprehensive comments Eric! While I digest them, my TL;DR
> is that we probably need a PEP to describe everything from the current
> situation, to the the desired end state and
Eric Snow added the comment:
I ended up writing up more thoughts on this in the issue about __package__:
https://bugs.python.org/issue45540#msg404619.
Users can call importlib.util.find_spec(), which is probably good enough to
figure out how a module was originally imported. So I don
Eric Snow added the comment:
On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw wrote:
> This is what leads me to think that having a proxy to keep them in sync and
> relaxing the read-only restriction is the path forward, even if writing
> __package__ doesn’t make sense. It also s
Eric Snow added the comment:
On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw wrote:
> I guess a question to answer then is whether we philosophically want the
> module attributes to be equivalent to the spec attributes. And by
> equivalent, I mean enforced to be exactly so, and thu
Eric Snow added the comment:
On Mon, Jan 7, 2019 at 11:41 PM Eric V. Smith wrote:
> Namespace packages (PEP 420) predate ModuleSpec (PEP 451). So, I think this
> probably happened when 451 was implemented. Maybe Eric Snow recalls?
PEP 451 talks about this a little
(https://www.pyth
Eric Snow added the comment:
On Wed, Oct 20, 2021 at 11:11 AM Barry A. Warsaw wrote:
> Maybe we should relax the restriction on module.__spec__.parent so that it's
> writeable just like module.__package__.
Hmm, I hadn't realized __package__ is used in __import__(). T
Eric Snow added the comment:
On Wed, Oct 20, 2021 at 8:38 AM Marc-Andre Lemburg
wrote:
> Yes, 3.10 is next, once I have 3.9 ironed out. And then I'll give 3.11 a try.
Thanks!
> Sorry, I wasn't clear. PGO is not a problem for test_embed. I just
> wonder why the test_embe
Eric Snow added the comment:
+1 on a proxy (with read-only attrs) for everything but __name__, __file__, and
__path__ (which can all be different than the spec). Ideally __name__ and
__file__ would be read-only too but they'd have to be stored somewhere other
than the spec (e.g. o
Eric Snow added the comment:
(Not sure how I missed this issue.)
The spec identifies how a module should be loaded (or how it was loaded and
should be reloaded). We should be careful to preserve that identify and not
invite uses to modify the spec after (or while) the module is loaded
Eric Snow added the comment:
On Wed, Oct 20, 2021 at 6:01 AM Marc-Andre Lemburg
wrote:
> I have PyRun mostly working with Python 3.9.
> ...
> No changes were necessary to Tools/freeze/.
Great! Thanks for getting to that so quickly. Are you going to take
a look at 3.10 after you
Eric Snow added the comment:
New changeset f4b12440cf24d7636755aac5b2645e47713557c7 by Eric Snow in branch
'main':
bpo-45506: Go back to not running most of test_embed in out-of-tree builds.
(gh-29063)
https://github.com/python/cpython/commit/f4b12440cf24d7636755aac5b2645e
Eric Snow added the comment:
On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum wrote:
> Is gh-28940 only for UNIX?
It wasn't meant to be. :(
> I built on Windows with default options (PCbuild\build.bat) and it looks like
> the frozen modules are used by default even though I
Eric Snow added the comment:
On Tue, Oct 19, 2021 at 10:47 AM Marc-Andre Lemburg
wrote:
> Ok, I'll start looking into this and post updates here.
Thanks!
--
___
Python tracker
<https://bugs.python.org
Change by Eric Snow :
--
pull_requests: +27330
pull_request: https://github.com/python/cpython/pull/29063
___
Python tracker
<https://bugs.python.org/issue45
Eric Snow added the comment:
The PR I put up should fix the problem. If it doesn't then I'll probably drop
the checks in the second half of FrozenImporter._fix_module().
--
___
Python tracker
<https://bugs.python.o
Change by Eric Snow :
--
keywords: +patch
pull_requests: +27311
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29040
___
Python tracker
<https://bugs.python.org/issu
Eric Snow added the comment:
> Do our buildbots only do in-tree builds?
>From what I understand, we do not have any (stable?) buildbots that check
>out-of-tree builds.
FWIW, in the last month I started testing my changes out-of-tree before
merging, after Victor once pointed out t
Eric Snow added the comment:
I'm looking into it.
--
___
Python tracker
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscr
Eric Snow added the comment:
On Sat, Oct 16, 2021 at 5:01 AM Marc-Andre Lemburg
wrote:
> I can try to port PyRun to 3.9 and 3.10 to see whether I run into any issues.
> Would that help ?
Yeah, that would totally help.
--
___
Python t
Eric Snow added the comment:
New changeset b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b by Eric Snow in branch
'main':
bpo-45020: Default to using frozen modules unless running from source tree.
(gh-28940)
https://github.com/python/cpython/commit/b9cdd0fb9c463c2503a4d854bb6529
Change by Eric Snow :
--
pull_requests: +27280
pull_request: https://github.com/python/cpython/pull/28997
___
Python tracker
<https://bugs.python.org/issue45
Eric Snow added the comment:
@MAL, who's maintaining Tools/freeze? I'm not aware of who's using it (other
than you, of course). It looks like PyRun isn't compatible with anything newer
than 3.5, so it seems like that isn't verifying that Tools/freeze still work
Eric Snow added the comment:
On Fri, Oct 15, 2021 at 3:56 AM STINNER Victor wrote:
> New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in
> branch 'main':
> bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)
FYI, _xxsubinterpreter
New submission from Eric Snow :
By design, _xxsubinterpretersmodule is not supposed to be a builtin module. As
a regular extension module it should only use public (or
private-but-not-internal) APIs. In fact, I was careful to not use any internal
APIs in the implementation. However, some
Eric Snow added the comment:
I've merged the change to add __file__ for frozen stdlib modules (when
possible) and to set __path__ appropriately. There are still a number of
things to address though:
* set co_filename (for tracebacks)
* implement FrozenImporter.get_filename()
* impl
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
Eric Snow added the comment:
Thanks, Victor!
--
___
Python tracker
<https://bugs.python.org/issue35134>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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 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
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
Change by Eric Snow :
--
pull_requests: +27243
pull_request: https://github.com/python/cpython/pull/28954
___
Python tracker
<https://bugs.python.org/issue45
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
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
Change by Eric Snow :
--
pull_requests: +27229
pull_request: https://github.com/python/cpython/pull/28940
___
Python tracker
<https://bugs.python.org/issue45
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
Eric Snow added the comment:
I've posted a PR that demonstrates a reasonable solution.
--
___
Python tracker
<https://bugs.python.org/issue45395>
___
___
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
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
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
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
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
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
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,
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
Change by Eric Snow :
--
pull_requests: +27087
pull_request: https://github.com/python/cpython/pull/28740
___
Python tracker
<https://bugs.python.org/issue45
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 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
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
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
Change by Eric Snow :
--
pull_requests: +27045
pull_request: https://github.com/python/cpython/pull/28655
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +27030
pull_request: https://github.com/python/cpython/pull/28665
___
Python tracker
<https://bugs.python.org/issue45
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
Change by Eric Snow :
--
pull_requests: +27029
pull_request: https://github.com/python/cpython/pull/28664
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +27022
pull_request: https://github.com/python/cpython/pull/28656
___
Python tracker
<https://bugs.python.org/issue21
Change by Eric Snow :
--
pull_requests: +27021
pull_request: https://github.com/python/cpython/pull/28655
___
Python tracker
<https://bugs.python.org/issue21
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
Change by Eric Snow :
--
pull_requests: +27004
pull_request: https://github.com/python/cpython/pull/28635
___
Python tracker
<https://bugs.python.org/issue45
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
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
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
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
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
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
Change by Eric Snow :
--
pull_requests: +26972
pull_request: https://github.com/python/cpython/pull/28590
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +26968
pull_request: https://github.com/python/cpython/pull/28586
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +26967
pull_request: https://github.com/python/cpython/pull/28585
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +26966
pull_request: https://github.com/python/cpython/pull/28584
___
Python tracker
<https://bugs.python.org/issue45
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
Change by Eric Snow :
--
pull_requests: +26965
pull_request: https://github.com/python/cpython/pull/28583
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +26937
pull_request: https://github.com/python/cpython/pull/28554
___
Python tracker
<https://bugs.python.org/issue45
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
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
Change by Eric Snow :
--
pull_requests: +26923
pull_request: https://github.com/python/cpython/pull/28538
___
Python tracker
<https://bugs.python.org/issue45
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
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
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
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
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
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
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!
--
___
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
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
Eric Snow added the comment:
Thanks for fixing that, Victor!
--
___
Python tracker
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailin
Change by Eric Snow :
--
pull_requests: +26812
pull_request: https://github.com/python/cpython/pull/28398
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric Snow :
--
pull_requests: +26811
pull_request: https://github.com/python/cpython/pull/28379
___
Python tracker
<https://bugs.python.org/issue34
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
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
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
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
201 - 300 of 2629 matches
Mail list logo