Change by Jason R. Coombs :
--
pull_requests: +25724
pull_request: https://github.com/python/cpython/pull/27188
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
> My python version is 3.8.9 and zipp is at 3.5.0 (but 3.4.1 behaves the same
> for me).
It's not enough to have `zipp` 3.5.0. You need to use `zipp.Path` over
`zipfile.Path`.
--
___
Python tracker
Change by Jason R. Coombs :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Using zipfile.Path with several files prematurely closes zip
___
Python tracker
<https://bugs.python
Jason R. Coombs added the comment:
Changing the repro to:
```
import zipfile
try:
import zipp
except ImportError:
import zipfile as zipp
zip_file = zipfile.ZipFile('zipfile.zip')
name = zip_file.namelist()[0]
zipp.Path(zip_file)
zip_file.open(name)
```
I'm able now to test against
Jason R. Coombs added the comment:
Even simpler:
```
zip_file = zipfile.ZipFile('zipfile.zip')
name = zip_file.namelist()[0]
zipfile.Path(zip_file)
zip_file.open(name)
```
--
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
This also reproduces the failure:
```
zip_file = zipfile.ZipFile('zipfile.zip')
path = zipfile.Path(zip_file)
name = zip_file.namelist()[0]
del path
zip_file.open(name)
```
Removing `del path` bypasses the issue. Something about the destructor
Jason R. Coombs added the comment:
Even simpler:
```
import zipfile
zip_file = zipfile.ZipFile('zipfile.zip')
names = [each.name for each in zipfile.Path(zip_file).iterdir()]
zip_file.open(names[0])
```
--
___
Python tracker
<ht
Jason R. Coombs added the comment:
Here's a much simpler repro that avoids the class construction but triggers the
same error:
```
import zipfile
zip_file = zipfile.ZipFile('zipfile.zip')
names = [each.name for each in zipfile.Path(zip_file).iterdir()]
with zip_file.open(names[0]) as file
Jason R. Coombs added the comment:
I was able to replicate the error using the script as posted:
```
draft $ cat > issue44638.py
import zipfile
class TestClass:
def __init__(self, path):
self.zip_file = zipfile.ZipFile(path)
def iter_dir(self):
return [each.n
Jason R. Coombs added the comment:
Thanks Barry for filing this. I was planning to do it but happy for you to beat
me to it.
I had one question I'd been meaning to ask - with this change, can the code
paths that were deprecated in 3.10 be removed in 3.11 (SelectableGroups and
cast to dict
Jason R. Coombs added the comment:
I was able to export the configuration using these instructions:
https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019
That produced this config:
{
"version": "1.0&
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +25561
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26992
___
Python tracker
<https://bugs.python.org/issu
New submission from Jason R. Coombs :
While investigating issue44461, I observed some complexities to the current
pdb.main implementation, some of which likely contributed to the bug being
present.
- variables are initialized to defaults
(https://github.com/python/cpython/blob
Change by Jason R. Coombs :
--
pull_requests: +25553
pull_request: https://github.com/python/cpython/pull/26992
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
Thanks Irit. Reviewing now...
--
assignee: -> jaraco
___
Python tracker
<https://bugs.python.org/issue44461>
___
___
Py
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
New changeset f4b31cdbc043449f3df7d291da67bcb3736be0db by Miss Islington (bot)
in branch '3.10':
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings.
(GH-26807) (GH-26929)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
New changeset 17b916737bd05a11ec24341990c4d8dbfee8f94b by Jason R. Coombs in
branch '3.9':
[3.9] bpo-37741: make importlib.metadata docs discoverable through a module
directive. (GH-25415) (GH-26500)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
New changeset efe7d08d178a7c09bcca994f2068b019c8633d83 by Jason R. Coombs in
branch 'main':
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings.
(#26807)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
In https://github.com/python/importlib_metadata/issues/324, I painstakingly
created a library to perform robust performance monitoring of behaviors in the
library and specifically added tests that capture the performance of
entry_points against
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +25388
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26807
___
Python tracker
<https://bugs.python.org/issu
New submission from Jason R. Coombs :
importlib_metadata 4.5
(https://importlib-metadata.readthedocs.io/en/latest/history.html#v4-5-0)
removed the special exclusion for flake8 in the deprecation warning for
deprecated interfaces in entry_points. For the same motivations there, do the
same
Jason R. Coombs added the comment:
I submitted https://github.com/brechtm/rinohtype/pull/270 to address the issue
in rinohtype. Please feel free to reopen and address the questions posed above
if appropriate.
--
resolution: -> wont fix
stage: -> resolved
status: open -&g
Jason R. Coombs added the comment:
A small patch to rinoh seems to work around the issue:
```
diff --git a/src/rinoh/resource.py b/src/rinoh/resource.py
index 57143f9d..586a4bb7 100644
--- a/src/rinoh/resource.py
+++ b/src/rinoh/resource.py
@@ -132,7 +132,9 @@ class DynamicEntryPoint
Change by Jason R. Coombs :
--
keywords: -3.10regression
___
Python tracker
<https://bugs.python.org/issue44461>
___
___
Python-bugs-list mailing list
Unsub
Jason R. Coombs added the comment:
I was _unable_ to replicate the issue with a foo.py containing only `raise
ValueError`, even with `python -m pdb -m foo`.
--
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
I can replicate the issue with this command: `python -m pdb -m importlib`
(since `importlib` isn't executable, it triggers an error in runpy).
--
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
I encountered the same error on Python 3.9.
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
It seems that even on Python 3.9 or 3.10b2, the
[DynamicRinohDistribution](https://github.com/brechtm/rinohtype/blob/e7f1c2c6066303d86cff4105be0829f512059be2/src/rinoh/resource.py#L132)
would return `None` for the `name` property (despite the [attempt
Change by Jason R. Coombs :
--
priority: normal -> deferred blocker
___
Python tracker
<https://bugs.python.org/issue44459>
___
___
Python-bugs-list mai
Jason R. Coombs added the comment:
Running the debugger, I can confirm that Distribution.name is None in this case:
```
~ $ python3.10 -m pip-run -q rinohtype -- -m pdb -m rinoh --help
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider
New submission from Jason R. Coombs :
While doing some debugging on issue44459 using Python 3.10b3, I was using Pdb
and after troubleshooting an exception and hitting 'q' to quit, I saw the
following:
```
(Pdb) q
Traceback (most recent call last):
File
"/Library/Frame
Jason R. Coombs added the comment:
I suspect the performance enhancements to distribution deduplication are
relevant here. Previously, distributions were deduplicated based on the
canonical distribution name. Now they're deduplicated on the normalized name.
And it seems that when attempting
Jason R. Coombs added the comment:
Big thanks Miro for the detailed work on this matter.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
New changeset df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6 by Miro Hrončok in
branch 'main':
bpo-44451: Reset DeprecationWarning filters in
test_importlib.test_entry_points_by_index (GH-26784)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
Other tests reset the filters? Good observation. I’d missed that detail. If
it’s easier to submit a PR to importlib_metadata, feel free to do that as I’ll
want the change in both places.
--
components: +Library (Lib) -Tests
stage: patch review
Jason R. Coombs added the comment:
The build error is tracked in issue43298.
--
___
Python tracker
<https://bugs.python.org/issue44246>
___
___
Python-bug
Jason R. Coombs added the comment:
In issue44246, I've encountered this error while attempting to build CPython in
a Docker image (built from
https://github.com/jaraco/jaraco.windows/blob/d2edad2e2af9d469189d7ac6a14a4ba6f6270348/Dockerfile).
Any suggestions on how to install the SDK
Jason R. Coombs added the comment:
I managed to put together a Dockerfile that seemingly has the build tools
installed
(https://github.com/jaraco/jaraco.windows/blob/d2edad2e2af9d469189d7ac6a14a4ba6f6270348/Dockerfile).
When I attempt to build CPython, however, it fails with this error
Jason R. Coombs added the comment:
In [this
Dockerfile](https://github.com/jaraco/jaraco.windows/blob/feature/vs-2/Dockerfile),
I've attempted to install Visual Studio, but without success. Docker fails to
build on [line
6](https://github.com/jaraco/jaraco.windows/blob
Jason R. Coombs added the comment:
As mentioned in msg394775, I'd like to decouple the performance concerns from
the original incompatibility. I recognize that performance regressions are in
their own way a form of incompatibility, but there have been a lot of changes
to entry points
Jason R. Coombs added the comment:
Thanks Steve for the feedback.
> If it's a warning, it could also be that the warning is being triggered
> somewhere else first. Since tests run in a random order, you'll want to look
> for how reliable the failure is.
It is a warning, but
Jason R. Coombs added the comment:
New changeset afb2eed72b32a35b4726ff35f92e4fbf54926046 by wim glenn in branch
'main':
bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)
https://github.com/python/cpython/commit/afb2eed72b32a35b4726ff35f92e4fbf54926046
Jason R. Coombs added the comment:
The line where the failure occurs is the point where it's checking that the
warning was issued. The fact that a StopIteration is raised indicates that no
warnings were caught. I can think of a couple of scenarios where that could
happen:
- That warning
Change by Jason R. Coombs :
--
pull_requests: +25096
pull_request: https://github.com/python/cpython/pull/26500
___
Python tracker
<https://bugs.python.org/issue37
Jason R. Coombs added the comment:
New changeset d0991e2db3bb932e2411ee9dca54fd69ff2611c4 by Miss Islington (bot)
in branch '3.10':
bpo-44246: Remove note about access by index now that a compatibility shim is
offered. (GH-26472) (#26473)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
New changeset 78d9a9b1904f0e1d9db1e941c19782f4f5a881d4 by Jason R. Coombs in
branch 'main':
bpo-44246: Remove note about access by index now that a compatibility shim is
offered. (GH-26472)
https://github.com/python/cpython/commit
Change by Jason R. Coombs :
--
pull_requests: +25067
pull_request: https://github.com/python/cpython/pull/26472
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
The compatibility concerns are addressed with PR 26468 and some of the
performance concerns may be mitigated with PR 26467. As I mentioned before, if
there are continuing performance concerns, please raise them separately
(preferably with python
Jason R. Coombs added the comment:
New changeset c34ed08d975fb7daa7b329f7c631647782290393 by Jason R. Coombs in
branch 'main':
bpo-44246: Restore compatibility in entry_points (GH-26468)
https://github.com/python/cpython/commit/c34ed08d975fb7daa7b329f7c631647782290393
Jason R. Coombs added the comment:
New changeset 410b70d39d9d77384f8b8597560f6731530149ca by Jason R. Coombs in
branch 'main':
bpo-44246: Entry points performance improvements. (GH-26467)
https://github.com/python/cpython/commit/410b70d39d9d77384f8b8597560f6731530149ca
Change by Jason R. Coombs :
--
pull_requests: +25063
pull_request: https://github.com/python/cpython/pull/26468
___
Python tracker
<https://bugs.python.org/issue44
Change by Jason R. Coombs :
--
pull_requests: +25062
pull_request: https://github.com/python/cpython/pull/26467
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
importlib_metadata 4.4 restores compatibility for the reported concerns. I'll
merge those into CPython later.
--
___
Python tracker
<https://bugs.python.org/issue44
Jason R. Coombs added the comment:
There are known performance concerns. I recommend to set those aside for now or
move them to a separate issue because
(a) The performance is theoretically better in the nominal case because it
avoids a sort/group operation.
(b) There are known performance
Jason R. Coombs added the comment:
Thanks Zac for your input.
> Just chiming in with a plea to slow down the rate of changes to
> importlib.metadata - I understand that you want to tidy up the API, but even
> deprecations cause substantial work downstream.
It would be difficult t
Jason R. Coombs added the comment:
> The standard library has clear rules regarding how previously working
> interfaces should be deprecated, and this changeset is violating those. At no
> point was documented that relying on the list/dict trait of the existing
> interface
Jason R. Coombs added the comment:
> there's the tuple subclass which pretends to be a dict.
There's no tuple subclass that's pretending to be a dict. It overrides
__getitem__ for convenience. It never claims to support Mapping.
> mypy complains about incorrect types in overrides fo
Jason R. Coombs added the comment:
New changeset 28f12c9f4f39d283d823d81e311d863526dfdb54 by Jason R. Coombs in
branch 'main':
bpo-44246: Update What's New for importlib.metadata. (#26408)
https://github.com/python/cpython/commit/28f12c9f4f39d283d823d81e311d863526dfdb54
Jason R. Coombs added the comment:
Although it feels the topic has shifted from the original concern (an
unintentional incompatibility) to the broader topic of the API change to
entry_points generally, I'm happy to address your comments:
> - I don't think they were discussed thoroug
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +25001
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26408
___
Python tracker
<https://bugs.python.org/issu
Jason R. Coombs added the comment:
In the What's New, I used :func:`importlib.metadata.entry_points`, but that
doesn't seem to resolve to the docs for the function. I need to figure out how
to link to the entry_points anchor that's
Jason R. Coombs added the comment:
Yes, perhaps the What's New could be refreshed.
There is a Compatibility Note in the docs for `entry_points` about the
deprecated usage
(https://docs.python.org/3.10/library/importlib.metadata.html?highlight=importlib%20metadata#entry-points).
I want
Jason R. Coombs added the comment:
This backward incompatibility was unintentionally introduced in
importlib_metadata 3.6
(https://importlib-metadata.readthedocs.io/en/latest/history.html#v3-6-0,
released Feb 23) and was previously reported in
https://github.com/python/importlib_metadata
Jason R. Coombs added the comment:
The preferred API as implemented in Python 3.9 and importlib_resources 1.1 is
the `files()` API. This simpler API returns a Traversable object, a
pathlib-like handle to the contents of a package. This approach side-steps the
issues described above
Change by Jason R. Coombs :
--
title: tuple subclasses allow kwargs -> tuple subclasses allow arbitrary kwargs
___
Python tracker
<https://bugs.python.org/issu
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
If this issue affects you, please use the `zipp` backport. I realize there are
some use-cases that aren't readily amenable to relying on the backport. Please
report any such use-case here as they may provide a justification for
back-porting the change
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
New changeset 97b4576f655c09e32d2cbcdcdbda72b1bf9f438a by Miss Islington (bot)
in branch '3.10':
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6).
(GH-26387) (#26389)
https://github.com/python/cpython/commit
Change by Jason R. Coombs :
--
pull_requests: -24979
___
Python tracker
<https://bugs.python.org/issue33693>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Jason R. Coombs :
--
pull_requests: +24980
pull_request: https://github.com/python/cpython/pull/26387
___
Python tracker
<https://bugs.python.org/issue38
Change by Jason R. Coombs :
--
nosy: +jaraco
nosy_count: 3.0 -> 4.0
pull_requests: +24979
pull_request: https://github.com/python/cpython/pull/26387
___
Python tracker
<https://bugs.python.org/issu
Jason R. Coombs added the comment:
New changeset 06ac3a4742228b0230981720060248a7425b2486 by Jason R. Coombs in
branch 'main':
bpo-44241: Incorporate changes from importlib_metadata 4.1. (#26382)
https://github.com/python/cpython/commit/06ac3a4742228b0230981720060248a7425b2486
Change by Jason R. Coombs :
--
nosy: +jaraco
nosy_count: 6.0 -> 7.0
pull_requests: +24975
pull_request: https://github.com/python/cpython/pull/26383
___
Python tracker
<https://bugs.python.org/issu
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +24974
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26382
___
Python tracker
<https://bugs.python.org/issu
New submission from Jason R. Coombs :
Importlib_metadata 4.1.0 made some minor tweaks. Let's sync those.
--
___
Python tracker
<https://bugs.python.org/issue44
Change by Jason R. Coombs :
--
components: Library (Lib)
nosy: jaraco
priority: normal
severity: normal
status: open
title: Sync importlib_metadata enhancements through 4.1.
versions: Python 3.10, Python 3.11
___
Python tracker
<ht
Jason R. Coombs added the comment:
I did consider and confirm that mode="rb" does also provide a uniform solution,
but it also regresses the behavior of uncompressed inputs, making them bytes
where they were text. This approach feels like the "Python 1" compatibility
Jason R. Coombs added the comment:
A backport now exists (https://pypi.org/project/backports.hook_compressed) and
addresses the issue (https://github.com/jaraco/cmdix/actions/runs/873404846).
--
___
Python tracker
<https://bugs.python.
Jason R. Coombs added the comment:
The patch for this change has broken code that relied on the old behavior. For
example:
```
import fileinput
import bz2
import pathlib
target = pathlib.Path('data.bz2')
target.write_bytes(bz2.compress(b'Foo\nBar\nBiz'))
inp = fileinput.FileInput([str
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
> are people supposed to be implementing readers with just files(), or are they
> always expected to inherit TraversableResources?
A resource provider could potentially implement only the `files()` method (what
I think you're calling `Traversable
Jason R. Coombs added the comment:
> I think `as_file` should learn to behave like `path`, if `__fspath__` is
> available, it will use that path.
Oh, that's an interesting idea. And that's effectively what happens
[here](https://github.com/python/importlib_resource
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
I've not previously seen a definition of resources. The original implementation
of importlib_resources excluded 'directories' as resources and excluded support
for resources being in subdirectories (only files in packages were allowed).
Now resources can
Jason R. Coombs added the comment:
It would be straightforward to add that parameter to `read_text` but I'm
uncertain if it will be needed. Since a Traversable already provides an open
method which _does_ explicitly pass through keyword arguments to the underlying
opener, perhaps it would
Jason R. Coombs added the comment:
The problem with the `__fspath__` protocol is that it assumes a file system.
The `importlib.resources` and `Traversable` protocols are trying to provide a
lower-level interface that doesn't assume a file system. Fortunately, there
already exists a helper
Jason R. Coombs added the comment:
Having a look at the `open` function
(https://docs.python.org/3/library/functions.html#open), it does not define
which exceptions might be thrown. Similarly for pathlib.Path.open
(https://docs.python.org/3/library/pathlib.html#pathlib.Path.open
Jason R. Coombs added the comment:
After reviewing the PR, I'm not convinced the Traversable methods need any
specification about when to raise FileNotFoundError (or other exceptions).
Let's flesh out what conditions demand prescribed interfaces
Jason R. Coombs added the comment:
I don't believe a `TraversableReader` protocol was intended. Instead, the
referenced change introduced the `TraversableResources` ABC. There's a typo in
the docs. I created PR 26317 instead to correct the mistake. WDYT
Change by Jason R. Coombs :
--
pull_requests: +24912
pull_request: https://github.com/python/cpython/pull/26317
___
Python tracker
<https://bugs.python.org/issue44
Change by Jason R. Coombs :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue44162>
___
___
Python-bugs-list mailing list
Un
Jason R. Coombs added the comment:
Thanks for tracking this down, Filipe. Agreed it sounds like it's fixed in
Python 3.10. It's unlikely the fix will be backported to Python 3.9. Instead,
if this behavior affects your usage, consider using the `importlib_resources`
backport, which also
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +24890
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26284
___
Python tracker
<https://bugs.python.org/issu
Jason R. Coombs added the comment:
I'd intended for the changes in 5.1 to make it into CPython, but I've missed
the deadline, so I've backported the referenced commits to importlib_resources
5.0.5 in order to sync into CPython.
--
versions: +Python 3.11
Jason R. Coombs added the comment:
New changeset ab1c3d99f51188d1a6b5f7797294b056279f62e0 by Miss Islington (bot)
in branch '3.9':
bpo-37741: make importlib.metadata docs discoverable through a module
directive. (GH-25415) (GH-25417)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
Thanks for the excellent patch. I've created
https://github.com/jaraco/zipp/issues/74 to track the backport of these changes.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Jason R. Coombs added the comment:
Sounds good to me. In general, it's easier to contribute first to
https://github.com/jaraco/zipp and those changes can be readily merged into
CPython. No worries, though. If these changes can be accepted here, I should be
able to graft them onto jaraco
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
201 - 300 of 1492 matches
Mail list logo