[issue46546] `importlib.metadata.DeprecatedList` leaks `method_name` variable

2022-01-27 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Thanks Nikita for the report. I agree, it's inelegant that this property leaks. 
Because this code is synced with importlib_metadata, I'm not sure it's worth 
the effort of changing it here. Your change here implies a cherry-pick to the 
backport and updating its changelog there too.

I'd be more inclined to accept a change like this on importlib_metadata, which 
has a faster iteration and whose changes get naturally incorporated into 
CPython periodically.

What's the harm in leaving this attribute on a class that is itself standing in 
for deprecated behavior and slated for removal?

--

___
Python tracker 
<https://bugs.python.org/issue46546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 1514d1252f96e6a83eb65c439522a6b5443f6a1a by Jason R. Coombs in 
branch '3.9':
[3.9] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with 
importlib_metadata 4.10.1) (GH-30803). (GH-30828)
https://github.com/python/cpython/commit/1514d1252f96e6a83eb65c439522a6b5443f6a1a


--

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset a7a4ca4f06c8c31d7f403113702ad2e80bfc326b by Jason R. Coombs in 
branch '3.10':
[3.10] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with 
importlib_metadata 4.10.1) (GH-30803) (GH-30827)
https://github.com/python/cpython/commit/a7a4ca4f06c8c31d7f403113702ad2e80bfc326b


--

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +29016
pull_request: https://github.com/python/cpython/pull/30829

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +29015
pull_request: https://github.com/python/cpython/pull/30828

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-23 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +29014
pull_request: https://github.com/python/cpython/pull/30827

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 51c3e28c8a163e58dc753765e3cc51d5a717e70d by Jason R. Coombs in 
branch 'main':
bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 
4.10.1) (GH-30803)
https://github.com/python/cpython/commit/51c3e28c8a163e58dc753765e3cc51d5a717e70d


--

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 443dec6c9a104386ee90165d32fb28d0c5d29043 by Jason R. Coombs in 
branch 'main':
bpo-46474: Apply changes from importlib_metadata 4.10.0 (GH-30802)
https://github.com/python/cpython/commit/443dec6c9a104386ee90165d32fb28d0c5d29043


--

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset d888ff5381594641126065e78dc9210dae4436a4 by Jason R. Coombs in 
branch 'main':
bpo-46425: Partially revert "bpo-46425: fix direct invocation of 
`test_importlib` (GH-30682)" (GH-30799)
https://github.com/python/cpython/commit/d888ff5381594641126065e78dc9210dae4436a4


--

___
Python tracker 
<https://bugs.python.org/issue46425>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
stage: patch review -> needs patch

___
Python tracker 
<https://bugs.python.org/issue41682>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28989
pull_request: https://github.com/python/cpython/pull/30803

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28990
pull_request: https://github.com/python/cpython/pull/30803

___
Python tracker 
<https://bugs.python.org/issue46425>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28988
pull_request: https://github.com/python/cpython/pull/30802

___
Python tracker 
<https://bugs.python.org/issue46425>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28987
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30802

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Because I want this security issue to be back-portable to older Pythons, I'll 
first apply importlib_metadata 4.10.0 and then apply the change from 4.10.1 
separately.

--

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46474] Inefficient regular expression complexity in EntryPoint.pattern

2022-01-22 Thread Jason R. Coombs


New submission from Jason R. Coombs :

Originally reported to the Python Security Response Team, the 
EntryPoint.pattern demonstrates a potential 
[ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_).

The issue has been patched and fix released with importlib_metadata 4.10.1. 
Let's get that fix incorporated into Python as well.

--
assignee: jaraco
components: Library (Lib)
messages: 411282
nosy: jaraco
priority: normal
severity: normal
status: open
title: Inefficient regular expression complexity in EntryPoint.pattern
type: security
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue46474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28984
pull_request: https://github.com/python/cpython/pull/30799

___
Python tracker 
<https://bugs.python.org/issue46425>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2022-01-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I've merged the fix for regrtest and I'll explore Terry's concerns and see what 
I can devise for those concerns as well.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
nosy: +jaraco

___
Python tracker 
<https://bugs.python.org/issue46425>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2022-01-21 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Closing, presumed fixed. Please re-open if not.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46304] Unable to iterate over lines in a file without a block of code

2022-01-08 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Nice reference. Indeed, the 
[rationale](https://www.python.org/dev/peps/pep-0533/#id15) of that pep gives a 
similar example and the 
[background](https://www.python.org/dev/peps/pep-0533/#id3) describes the 
problem with the solution I've drafted above (it still depends on garbage 
collection to close the file).

I guess that means that in general, it's not possible to accomplish what I'd 
like.

As author of the PEP, I'm looping in njs.

--
nosy: +njs

___
Python tracker 
<https://bugs.python.org/issue46304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46304] Unable to iterate over lines in a file without a block of code

2022-01-08 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Hi Eric. I did mention that option in my report, but that option requires 
loading the whole file into memory. I'd like something equivalent to the 
iterator that `open()` provides, which yields lines lazily.

Serihy, thanks for the feedback. I do indeed not want to rely on the implicit 
closing of the file handle. I'd instead like a helper function/method that will 
close the file after the iterator is consumed.

Something like:

def read_lines(path):
with path.open() as strm:
yield from strm

What I'm seeking is for that block to be placed somewhere in the stdlib so that 
I don't have to copy it into every project that needs/wants this behavior.

--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue46304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46304] Unable to iterate over lines in a file without a block of code

2022-01-07 Thread Jason R. Coombs


New submission from Jason R. Coombs :

I'd like to be able to do something pretty fundamental: lazily load lines from 
a file in a single expression.

Best I can tell, that's not possible in the language without triggering 
warnings.

One can use 'open' but that triggers a ResourceWarning:

```
$ $PYTHONWARNINGS='error' python -c "lines = open('/dev/null'); tuple(lines)"
Exception ignored in: <_io.FileIO name='/dev/null' mode='rb' closefd=True>
ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r' 
encoding='UTF-8'>
```

One can use a `with` statement, but that requires a block of code and can't be 
written easily in a single expression. One can use 
`pathlib.Path.read_text().splitlines()`, but that loads the whole file into 
memory.

This issue affected the pip-run project, which required 5 new lines in order to 
make such an expression possible 
(https://github.com/jaraco/pip-run/commit/e2f395d8814539e1da467ac09295922d8ccaf14d).

Can the standard library supply a function or method that would provide this 
behavior?

--
components: Library (Lib)
messages: 410075
nosy: jaraco
priority: normal
severity: normal
status: open
title: Unable to iterate over lines in a file without a block of code
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43976] Allow Python distributors to add custom site install schemes

2022-01-05 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I don't have a good answer, but given the title of this issue (which is 
specifically scoped to site install schemes), I'm tempted to say we should deal 
with prefixes in a separate, perhaps broader issue, and there address the 
reported issue (that a user's prefix override isn't honored by the scheme) and 
maybe more broadly the issue that there's not a design/spec for python 
installations (and probably there should be).

--

___
Python tracker 
<https://bugs.python.org/issue43976>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-01-04 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Today I learned something. Thanks Arie. Yes, I agree that's a mistake. Perhaps 
the test suite should also have a test to capture the missed expectation (that 
__dict__ should not be present or setting attributes on EntryPoints instances 
should fail).

--

___
Python tracker 
<https://bugs.python.org/issue46246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-01-03 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Perhaps it is a mistake. The `__slots__` were added as a (possible premature) 
optimization in [this 
conversation](https://github.com/python/importlib_metadata/pull/278/files#r565475347).

It's not obvious to me what the danger is in defining __slots__ in a child 
class but not in a parent. Can you point me to resources or examples that help 
me understand the concern or missed expectation? The primary motivation behind 
defining slots is to help ensure immutability.  Does the lack of slots violate 
that expectation?

Convince me of the value of fixing this concern and please feel free to proceed 
with a PR.

--

___
Python tracker 
<https://bugs.python.org/issue46246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45649] Add tarinfo.Path

2022-01-01 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I'd recommend not to block on issue24132. It's not obvious to me that 
subclassing would be valuable. It depends on how it's implemented, but in my 
experience, zipfile.Path doesn't and cannot implement the full interface of 
pathlib.Path. Instead zipfile.Path attempts to implement a protocol. At the 
time, the protocol was undefined, but now there exists 
importlib.resources.abc.Traversable 
(https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable), 
the interface needed by importlib.resources. I'd honestly just create a 
standalone class, see if it can implement Traversable, and only then consider 
if it should implement a more complicated interface (such as something with 
symlink support or perhaps even later subclassing from pathlib.Path).

--

___
Python tracker 
<https://bugs.python.org/issue45649>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2022-01-01 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> > I presume I don't need to explain why docstrings are nice and preferable 
> > over comments.

> Actually, can you?

I searched around and didn't find any good treatise or thorough overview  of 
reasons _why_ docstrings should be preferred, so I performed an internal 
deconstruction of my motivations and published [this 
article](https://blog.jaraco.com/why-docstrings-are-preferable-to-comments/) on 
my blog.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2022-01-01 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46109] Separate resources docs from other importlib docs

2021-12-31 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 35628e4cde71e54afe12aea50c74069afe2c3389 by Jason R. Coombs in 
branch 'main':
bpo-46118: Make sure importlib.resources is included. (GH-30311)
https://github.com/python/cpython/commit/35628e4cde71e54afe12aea50c74069afe2c3389


--

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37043] Buildbots fail when new files are added

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I encountered this issue again today in issue46118.

I started looking into creating the patchcheck, but I realize it may be a 
little tricky to detect the introduction of a new folder, because `git diff` 
doesn't actually report new folders, and my initial research indicates it's 
[far from straightforward](https://stackoverflow.com/a/36293191/70170).

I thought maybe git diff --dirstat might help, but it doesn't. It reports 100% 
different for a new file in a new folder and same for a new file in an existing 
folder.

--

___
Python tracker 
<https://bugs.python.org/issue37043>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

And the underlying cause is reported in issue37043.

--

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Looks like I encountered the same foot gun when originally introducing the 
importlib.metadata package (issue34632).

--
stage: patch review -> resolved

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28525
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/30311

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Installed buildbots are failing (like this one: 
https://buildbot.python.org/all/#/builders/350/builds/1164). I'm going to see 
if it's a simple fix like updating the makefile or if a rollback is called for.

--
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46109] Separate resources docs from other importlib docs

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 99945c6b5cf280bd90075cffae942af44941abcc by Jason R. Coombs in 
branch 'main':
bpo-46109: Separate out files relating to importlib.resources (GH-30160)
https://github.com/python/cpython/commit/99945c6b5cf280bd90075cffae942af44941abcc


--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset e712a5b277866a71c195f38c1b5d87d9126dba3e by Jason R. Coombs in 
branch 'main':
bpo-46118: Move importlib.resources to its own package. (#30176)
https://github.com/python/cpython/commit/e712a5b277866a71c195f38c1b5d87d9126dba3e


--

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-28 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Normalize_path from legacy implementation: 
https://github.com/python/importlib_resources/blob/3beb2fd5831e65f7b45033e1ec276c4a6b4ca973/importlib_resources/_legacy.py#L30-L40

--

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-28 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> Does `joinpath` have less validation?

Yes. Previously, resources.* would perform some validation on the path to 
ensure that it didn't contain path separators (to avoid users attempting to get 
resources in subdirectories or perhaps manipulating the path in other ways).

So no, they're not equivalent. If `resource_name` or "zones" ever contained 
path separators, the former implementation would raise an error whereas this 
implementation would attempt to join those characters to the path. Since 
"zones" is a static string, it's clearly not affected. And `resource_name` 
can't have posixpath.sep. If `key` had an ntpath.sep, that might behave 
differently, but that seemed like an edge case not worth exploring.

If it is worth exploring, I would recommend not to use normalize_path, but 
instead to implement the validation in zoneinfo._common. That is, wrap key in 
`_validate_key()` that protects against invalid paths. But in practice, it's 
better to do that closer to where the unsanitized data would be encountered (if 
at all).

--

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46109] Separate resources docs from other importlib docs

2021-12-19 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I realize, I can limit the scope of this issue to address 'resources' alone, 
leaving ABCs where they are except for resource-related ones, allowing us to 
defer a larger refactoring to a separate issue/effort.

--
title: Separate resources and abc docs from other importlib docs -> Separate 
resources docs from other importlib docs

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-19 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I recently noticed that some docs already refer to `importlib.resources.abc` 
even though it doesn't currently exist 
(https://github.com/python/cpython/blame/main/Doc/library/importlib.rst#L948). 
That finding leads me to adjust my expectation that perhaps exposing those 
classes from that module would be preferable (since that was the expectation 
from the start).

--

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-19 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

As I'm exploring this issue, I notice that currently, the docs refer to 
:class:`importlib.resources.abc.Traversable` (even though that doesn't 
currently exist) 
(https://github.com/python/cpython/blame/main/Doc/library/importlib.rst#L948).

--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-19 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> a ToC at the top of the main page which identifies the submodules (and 
> provides a brief summary for each) would be extra helpful. 

I've added this in the latest commit (1adefaf552).

--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-19 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The reason I wanted to consider issue46118 first was because I wanted to 
explore whether the ABCs from `importlib_resources.abc` should be _documented_ 
as `importlib.resources.abc` or `importlib.abc` (as they are now).

After filing the issue and exploring the concerns (namely, should users be 
directed _away_ from `importlib.abc` for these classes), I'm uncertain whether 
it's worth the effort to make that transition, and certainly not in haste, so 
this effort can proceed to document the status quo (ABCs presented primarily in 
`importlib.abc`).

--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee: jaraco -> p-ganssle

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28415
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30194

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

After some investigation (and tracing calls through a dozen or more layers), I 
found that Python's own regression tests can disable this behavior thus:

```
diff --git a/Lib/test/support/testresult.py b/Lib/test/support/testresult.py
index 2cd1366cd8..328ca8760e 100644
--- a/Lib/test/support/testresult.py
+++ b/Lib/test/support/testresult.py
@@ -145,7 +145,8 @@ def get_test_runner_class(verbosity, buffer=False):
 return functools.partial(unittest.TextTestRunner,
  resultclass=RegressionTestResult,
  buffer=buffer,
- verbosity=verbosity)
+ verbosity=verbosity,
+ descriptions=False,)
 return functools.partial(QuietRegressionTestRunner, buffer=buffer)
 
 def get_test_runner(stream, verbosity, capture_output=False):
```

Combined with the above diff (with a docstring), the output is now as desired:

```
$ ./python.exe -m test -v test_importlib | grep '... ERROR'
test_entry_points_unique_packages 
(test.test_importlib.test_metadata_api.APITests) ... ERROR
test test_importlib failed
```

It seems it would be wise to enable this setting by default, given that without 
it, every test module is forced to replace docstrings with comments.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

It looks like that 'descriptions' attribute is passed through from 
TextTestRunner, which sets it to True by default 
(https://github.com/python/cpython/blob/9b52920173735ac609664c6a3a3021d24a95a092/Lib/unittest/runner.py#L163).
 It seems that behavior isn't controllable through any command-line options or 
environment variables.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Looks like the code, I believe here's where the reporting happens: 
https://github.com/python/cpython/blob/9b52920173735ac609664c6a3a3021d24a95a092/Lib/unittest/runner.py#L48-L51

I see a "description" property there that may already provide the feature.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

My guess is the tests were run with something like this:

```
./python.exe -E -We -m test -v test_importlib | grep '... ERROR'
Entry points should only be exposed for the first package ... ERROR
test test_importlib failed
```

In that case, the location of the test is replaced with the first line of the 
docstring. If there's no docstring, however, the location of the failure is 
easier to detect:

```
$ ./python.exe -E -We -m test -v test_importlib | grep '... ERROR'
test_entry_points_unique_packages 
(test.test_importlib.test_metadata_api.APITests) ... ERROR
test test_importlib failed
```

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I created this diff:

```diff
diff --git a/Lib/test/test_importlib/test_metadata_api.py 
b/Lib/test/test_importlib/test_metadata_api.py
index e16773a7e8..92aacd5ad5 100644
--- a/Lib/test/test_importlib/test_metadata_api.py
+++ b/Lib/test/test_importlib/test_metadata_api.py
@@ -90,8 +90,11 @@ def test_entry_points_distribution(self):
 self.assertEqual(ep.dist.version, "1.0.0")
 
 def test_entry_points_unique_packages(self):
-# Entry points should only be exposed for the first package
-# on sys.path with a given name.
+"""
+Entry points should only be exposed for the first package
+on sys.path with a given name.
+"""
+raise ValueError("Failing on purpose")
 alt_site_dir = self.fixtures.enter_context(fixtures.tempdir())
 self.fixtures.enter_context(self.add_sys_path(alt_site_dir))
 alt_pkg = {
```

And then ran the tests, but the output is easy to totally scrutable:

```
cpython bpo-46126/bad-error-message $ ./python.exe -m test.test_importlib
sE.x..
 
sTrying
 20 threads ... 44.7 ms OK.
Trying 50 threads ... 36.8 ms OK.
Trying 20 threads ... 27.7 ms OK.
Trying 50 threads ... 28.0 ms OK.
Trying 20 threads ... 27.9 ms OK.
Trying 50 threads ... 31.1 ms OK.
.Trying 20 threads ... 7.1 ms OK.
Trying 50 threads ... 7.6 ms OK.
Trying 20 threads ... 3.2 ms OK.
Trying 50 threads ... 8.5 ms OK.
Trying 20 threads ... 3.4 ms OK.
Trying 50 threads ... 8.7 ms OK.
.Trying 20 threads ... 40.3 ms OK.
Trying 50 threads ... 8.7 ms OK.
Trying 20 threads ... 3.5 ms OK.
Trying 50 threads ... 6.5 ms OK.
Trying 20 threads ... 3.2 ms OK.
Trying 50 threads ... 6.5 ms OK.
..ssss...
==
ERROR: test_entry_points_unique_packages 
(test.test_importlib.test_metadata_api.APITests)
Entry points should only be exposed for the first package
--
Traceback (most recent call last):
  File 
"/Users/jaraco/code/public/cpython/Lib/test/test_importlib/test_metadata_api.py",
 line 97, in test_entry_points_unique_packages
raise ValueError("Failing on purpose")
^^
ValueError: Failing on purpose

--
Ran 1426 tests in 2.377s

FAILED (errors=1, skipped=6, expected failures=1)
```

So there must be some other test invocation that doesn't provide the clarity of 
which test is failing.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Absolutely. I was thinking to do just that.

--

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46125] Test the preferred API instead of relying on legacy for coverage

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 9b52920173735ac609664c6a3a3021d24a95a092 by Jason R. Coombs in 
branch 'main':
bpo-46125: Refactor tests to test traversable API directly. Includes changes 
from importlib_resources 5.4.0. (GH-30189)
https://github.com/python/cpython/commit/9b52920173735ac609664c6a3a3021d24a95a092


--

___
Python tracker 
<https://bugs.python.org/issue46125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28410
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30190

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46125] Test the preferred API instead of relying on legacy for coverage

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28409
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30189

___
Python tracker 
<https://bugs.python.org/issue46125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46126] Unittest output drives developers to avoid docstrings

2021-12-18 Thread Jason R. Coombs


New submission from Jason R. Coombs :

In https://github.com/python/importlib_metadata/issues/302, I learned that the 
way unittest reports failures in tests is incentivizing the replacement of 
docstrings with comments in order not to make resolution of the relevant 
failing test more difficult to locate.

I presume I don't need to explain why docstrings are nice and preferable over 
comments.

Better would be for unittest to provide an option to ignore the docstrings or 
to emit the test path regardless of whether a docstring was present and to 
employ that option in CPython, allowing for docstrings in tests.

--
components: Tests
messages: 408876
nosy: jaraco
priority: normal
severity: normal
status: open
title: Unittest output drives developers to avoid docstrings
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46126>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I filed issue46125 to track that issue separately.

--

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46125] Test the preferred API instead of relying on legacy for coverage

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 
<https://bugs.python.org/issue46125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46125] Test the preferred API instead of relying on legacy for coverage

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
components: +Library (Lib)
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46125] Test the preferred API instead of relying on legacy for coverage

2021-12-18 Thread Jason R. Coombs


New submission from Jason R. Coombs :

importlib_resources 5.4 did some refactoring to ensure that the preferred 
traversable API was tested 
(https://github.com/python/importlib_resources/pull/239). Let's incorporate 
those changes for importlib.resources.

--
messages: 408872
nosy: jaraco
priority: normal
severity: normal
status: open
title: Test the preferred API instead of relying on legacy for coverage

___
Python tracker 
<https://bugs.python.org/issue46125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I just confirmed, and `normalize_path` has been moved to the _legacy module for 
importlib_resources, so I'd expect that change to land in CPython soon too.

--

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46124] Deprecation warning in zoneinfo module

2021-12-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I would hope that normalize_path would not be needed. It might be for drop-in 
compatibility. If it's needed for zoneinfo, I'd like to consider why and what 
implications that has for the deprecation of the legacy API.

--

___
Python tracker 
<https://bugs.python.org/issue46124>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Compatibility considerations: 

- importlib.readers and importlib.simple are public, so probably need aliases.
- Same abc classes.

Should we embark on an effort to migrate users to the new names in 
`importlib.resources`, or simply leave the `importlib.{mod}` names as 
preferred? My instinct is to do the former, mainly because then the names would 
be congruent between `importlib.resources` and `importlib_resources`. But I'm 
also reluctant to introduce a deprecation (even deferred) comparable to what 
happened with `collections.abc`.

--

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28393
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30176

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I wonder if maybe it's more important to address issue46118 first.

--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


New submission from Jason R. Coombs :

The importlib.resources module has several modules on which it relies 
(_adapters, _legacy, simple) and some classes in other modules shared by other 
parts of importlib (namely abc).

Because these implementations overlap, it adds difficulty in maintaining the 
`importlib_resources` backport, which must maintain these modules but keep them 
separate from the unrelated functionality in other parts of importlib.

In an earlier refactoring, `importlib.metadata` was refactored into its own 
package (https://github.com/python/cpython/pull/25565). This refactoring had 
benefits of making it clearer which functionality of importlib was related to 
metadata and which was not.

I'd like to do the same for importlib.resources.

The main complicate

--
messages: 408815
nosy: jaraco
priority: normal
severity: normal
status: open
title: Migrate importlib.resources into a package
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46118>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

My main motivation for moving `.abc` was because it contains classes 
exclusively relevant to `.resources` (those also present in 
`importlib_resources.abc`. I want to explore moving those classes to the 
resources documentation so they're available together and maintained 
independently.

Other classes in `.abc` are relevant to the import system more generally, so 
maybe should stay in the main docs.

--

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28379
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30160

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-12-16 Thread Jason R. Coombs


New submission from Jason R. Coombs :

The `importlib` documentation is fairly long and covers a number of topics. 
Furthermore, the `importlib.metadata` is separately documented and presents a 
good example of breaking out major aspects. Let's do the same with `.abc` and 
`.resources`.

--
assignee: jaraco
components: Documentation
messages: 408749
nosy: jaraco
priority: normal
severity: normal
status: open
title: Separate resources and abc docs from other importlib docs
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Expect the fix in 3.11a3.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 864ec170e14b663f999eb415a4f1a0067ec6833a by Jason R. Coombs in 
branch '3.9':
[3.9] bpo-46105: Honor spec when generating requirement specs with urls and 
extras. (GH-30151). (GH-30157)
https://github.com/python/cpython/commit/864ec170e14b663f999eb415a4f1a0067ec6833a


--

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28376
pull_request: https://github.com/python/cpython/pull/30157

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 04deaee4c8d313717f3ea8f6a4fd70286d510d6e by Jason R. Coombs in 
branch 'main':
bpo-44893: Implement EntryPoint as simple class with attributes. (GH-30150)
https://github.com/python/cpython/commit/04deaee4c8d313717f3ea8f6a4fd70286d510d6e


--

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 109d96602199a91e94eb14b8cb3720841f22ded7 by Jason R. Coombs in 
branch 'main':
bpo-46105: Honor spec when generating requirement specs with urls and extras. 
(GH-30151)
https://github.com/python/cpython/commit/109d96602199a91e94eb14b8cb3720841f22ded7


--

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests:  -28371

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The change as implemented for importlib_metadata involves refactorings that 
can't be backported, so the fix will only go into Python 3.11. I'll consider 
backporting a more selective fix for this issue if it's important, but I 
suspect there may not be, given that Ronny has reported that he's already 
migrated to a solution accessing by attribute.

--
versions:  -Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28370
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30151

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +28371
pull_request: https://github.com/python/cpython/pull/30151

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46105] Requirement syntax broken when extras indicated on url_req

2021-12-16 Thread Jason R. Coombs


New submission from Jason R. Coombs :

In https://github.com/python/importlib_metadata/issues/357, a user reported an 
issue where a requirement generated by importlib.metadata from egg info 
metadata would result in a parse error attempting to parse the error. A fix was 
released in importlib_metadata 4.8.3.

--
assignee: jaraco
messages: 408727
nosy: jaraco
priority: normal
severity: normal
status: open
title: Requirement syntax broken when extras indicated on url_req
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue46105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44893] importlib.metadata Entrypoint has a broken _asdict

2021-12-16 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +28369
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30150

___
Python tracker 
<https://bugs.python.org/issue44893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45558] shutil.copytree: Give the option to disable copystat

2021-11-26 Thread Jason R. Coombs

New submission from Jason R. Coombs :

Can you provide a description of what motivated you to change the behavior or 
what benefits this change would have for you or others? Do you know why others 
haven’t reported this need previously?

--
nosy: +jaraco

___
Python tracker 
<https://bugs.python.org/issue45558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45514] Deprecate legacy functions from importlib.resources (importlib_resources 5.3)

2021-11-23 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

See 
https://discuss.python.org/t/deprecating-importlib-resources-legacy-api/11386 
for some lively discussion on this deprecation.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45514>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45514] Deprecate legacy functions from importlib.resources (importlib_resources 5.3)

2021-11-23 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset d5cd2effa69551c6bc7edfef8a414d545dea9117 by Jason R. Coombs in 
branch 'main':
bpo-45514: Deprecate importlib resources legacy functions. (GH-29036)
https://github.com/python/cpython/commit/d5cd2effa69551c6bc7edfef8a414d545dea9117


--

___
Python tracker 
<https://bugs.python.org/issue45514>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset ed55426acd58f030ccc0cf1297e66078f538797c by Miss Islington (bot) 
in branch '3.10':
[bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510)
https://github.com/python/cpython/commit/ed55426acd58f030ccc0cf1297e66078f538797c


--

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 3e0b830e859ca8792401bfd1402d659f56f99941 by Jason R. Coombs in 
branch '3.9':
[3.9] [bpo-45765] Fix distribution discovery on empty path. (GH-29487). 
(GH-29511)
https://github.com/python/cpython/commit/3e0b830e859ca8792401bfd1402d659f56f99941


--

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +27762
pull_request: https://github.com/python/cpython/pull/29511

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c by Jason R. Coombs in 
branch 'main':
[bpo-45765] Fix distribution discovery on empty path. (#29487)
https://github.com/python/cpython/commit/6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c


--

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +27738
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29487

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


New submission from Jason R. Coombs :

Reported in https://github.com/python/importlib_metadata/issues/353, 
importlib.metadata fails to find distributions in the path "". A fix was 
applied to importlib_metadata 2.1.2 and 4.8.2. Let's apply that fix and 
backport it to supported Pythons.

--
messages: 406022
nosy: jaraco
priority: normal
severity: normal
status: open
title: importlib.metadata fails to find distributions in empty path

___
Python tracker 
<https://bugs.python.org/issue45765>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45649] Add tarinfo.Path

2021-10-28 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I vaguely recall exploring this concept and finding that tarfiles don’t supply 
the requisite interface because they’re not random access. I’m only 10% 
confident in that recollection, so worth exploring.

--

___
Python tracker 
<https://bugs.python.org/issue45649>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45516] Add protocol description to the Traversable and TraversableResources documentation

2021-10-23 Thread Jason R. Coombs

Jason R. Coombs  added the comment:


New changeset 8ce20bbdd6d2b1277a5e74154fcdcef2cb0fee49 by Filipe Laíns in 
branch 'main':
bpo-45516: add protocol description to the TraversableResources documentation 
(#29173)
https://github.com/python/cpython/commit/8ce20bbdd6d2b1277a5e74154fcdcef2cb0fee49


--

___
Python tracker 
<https://bugs.python.org/issue45516>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45516] Add protocol description to the Traversable and TraversableResources documentation

2021-10-18 Thread Jason R. Coombs

Jason R. Coombs  added the comment:


New changeset c0295675305f6896e4ba7496441cc470d7edca89 by Filipe Laíns in 
branch 'main':
bpo-45516: use documentation links in TraversableResources' description 
(GH-29045)
https://github.com/python/cpython/commit/c0295675305f6896e4ba7496441cc470d7edca89


--

___
Python tracker 
<https://bugs.python.org/issue45516>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >