Jason R. Coombs

Results 1062 comments of Jason R. Coombs

> I don't yet understand why the subprocess invocation is unable to honor the sh+exec hack. Oh. The issue seems to be related to me using `subprocess.*`/`shutil.which` inside a [xonsh](https://xon.sh)...

Now that the behavior is in Python 3.12, the repro is: ``` draft 🐚 py -m venv .venv draft 🐚 py -W error::DeprecationWarning:pip._internal.metadata.importlib._dists -m pip install sampleproject Collecting sampleproject Using...

So I've taken a look at the code. I see now that pip implements the `WheelDistribution` because `importlib.metadata.PathDistribution` [holds the `zipfile.Path` open too long](https://github.com/pypa/pip/blob/203780b5d167c4d01c55df7adc91d5ad1a0563aa/src/pip/_internal/metadata/importlib/_dists.py#L43-L45) for pip's needs. I wonder if...

> the `importlib.metadata` docs) haven't explained _why_ our implementation isn't acceptable The trivial "why" is because it's an abstract method, so according to OO rules, subclasses need to implement it...

> It may well be that we could do as you say, but that's new, fragile, code that would need writing and maintaining In [93f71fa](https://github.com/jaraco/pip/commit/93f71fa21168c08d71cf860eade7201c4b2f6edd), I've started exploring what the...

> I think it's a code smell that it's not OK to omit the implementation of this method, but it _is_ OK to implement a method which just raises an...

I supply this proposed change as an illustration of what might address the issue. I'd prefer if someone from pip would contribute the rest of it (or replace it with...

> 1. [This comment](https://github.com/pypa/pip/pull/11685#issuecomment-1368484908) suggests it's not intended as the correct solution, and I'm unsure if it's the correct solution or not. I'm unaware of the internals of pip so...

> CPython changed the rules As the implementer, I can state with authority that it was always the intention that these methods were abstract and were expected by a subclass...

> UPD: Idea from @jaraco: it will be cool to use 🐚 as alternative to `@`. I think it's nice easter egg. Note, I'm not sure it's possible. I'm pretty...