R. David Murray added the comment:
The fix looks good to me. Don't know how I made that mistake, and obviously I
didn't write a test for it...
--
___
Python tracker
<https://bugs.python.o
New submission from Philip R Brenan :
a = false
# Traceback (most recent call last):
# File "test.py", line 1, in
# a = false
# NameError: name 'false' is not defined
# Compilation finished successfully.
Please make this a syntax error rather than a run ti
Change by R. David Murray :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
This routine will repro the issue without relying on garbage collection to
trigger the error:
```
import io
import zipfile
buf = io.BytesIO()
zf = zipfile.ZipFile(buf, mode='w')
zp = zipfile.Path(zf)
with zp.joinpath('zile-a').open(
Jason R. Coombs added the comment:
I'm a little surprised from Nick's original post that the behavior is
triggered. After all, the code [already has a protection for a
previously-closed
zipfile](https://github.com/python/cpython/blob/0dd98c2d00a75efbec19c2ed942923981bc06683/Lib/
Change by Jason R. Coombs :
--
nosy: +steve.dower
___
Python tracker
<https://bugs.python.org/issue41282>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jason R. Coombs added the comment:
Łukasz, would it be possible to add the deprecation warning and documented
deprecation to Python 3.9?
--
nosy: +lukasz.langa
___
Python tracker
<https://bugs.python.org/issue41
Change by Jason R. Coombs :
--
nosy: +ncoghlan, paul.moore
___
Python tracker
<https://bugs.python.org/issue41282>
___
___
Python-bugs-list mailing list
Unsub
New submission from Jason R. Coombs :
Setuptools has adopted distutils as outlined in
[pypa/packaging-problems#127](https://github.com/pypa/packaging-problems/issues/127).
Although there are some straggling issues, the current release of Setuptools
fully obviates distutils if a certain
R. David Murray added the comment:
The as_strings docs say:
"Flattening the message may trigger changes to the Message if defaults need to
be filled in to complete the transformation to a string (for example, MIME
boundaries may be generated or modified)."
So, while this is ind
Change by Jason R. Coombs :
--
pull_requests: +20542
pull_request: https://github.com/python/cpython/pull/21394
___
Python tracker
<https://bugs.python.org/issue16
Change by Jason R. Coombs :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3, Python
3.4
___
Python tracker
<https://bugs.python.org/issue16
R. David Murray added the comment:
I'm short of time, if someone could approve Mark's PR and merge it it would be
great. There wasn't supposed to be any behavior change other than the one
documented in #40597.
--
___
Python
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +20504
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21359
___
Python tracker
<https://bugs.python.org/issu
Jason R. Coombs added the comment:
I learned the magical incantation to port commits from pypa/distutils to
CPython:
```
cpython bugfix/41207-rewrite-filenotfound $ git -C ~/p/pypa/distutils
format-patch HEAD~2 --stdout | git am --directory Lib
Applying: Add
Jason R. Coombs added the comment:
Sure. I'll submit patches.
--
___
Python tracker
<https://bugs.python.org/issue41207>
___
___
Python-bugs-list m
Jason R. Coombs added the comment:
CPython should also consider [this
change](https://github.com/pypa/distutils/commit/d9ba43436d), which unifies the
`DEBUG` handling, consolidates the exception trapping, and uses
`subprocess.check_call` to re-use exit code checking
Jason R. Coombs added the comment:
In
[pypa/distutils@7aa5abeafc](https://github.com/pypa/distutils/commit/7aa5abeafc1e0b1b351c4c8ac7eb14c310366a46),
I've pushed a fix (with a repro test in the parent commit). I recommend this
fix be applied to CPytho
Jason R. Coombs added the comment:
Well, the issue is potentially ignorable, especially if distutils is deprecated
and removed from CPython. Alternately, CPython could adopt the [patch from
distutils](https://github.com/pypa/distutils/pull/1/commits/c3a052aefbba0d5fda10790e676223c0dc12f0ed
Change by Jason R. Coombs :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue41207>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jason R. Coombs :
In [pypa/setuptools#2228](https://github.com/pypa/setuptools/issues/2228), by
adopting the distutils codebase from a late release of CPython, Setuptools
stumbled onto an API-breaking change in distutils rooted at issue39763.
Details are in the Setuptools
Jason R. Coombs added the comment:
I've flagged issue41207 as a regression stemming from this effort.
--
nosy: +jaraco
___
Python tracker
<https://bugs.python.org/is
Jason R. Coombs added the comment:
For easy reference, the relevant commit is
https://github.com/python/cpython/commit/97345680dc.
--
___
Python tracker
<https://bugs.python.org/issue18
Jason R. Coombs added the comment:
In [pypa/distutils#1](https://github.com/pypa/distutils/pull/1), I learned that
the test doesn't have the intended effect. Patching `get_config_var()` has no
effect because the function under test calls `get_config_vars()`. In some
environments, su
Jason R. Coombs added the comment:
Yes, I generally agree with your assessment. Let me know if you have any
questions about the implementation as you're exploring a solution.
--
___
Python tracker
<https://bugs.python.org/is
Change by Jason R. Coombs :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
>>It seems you may have discovered a use-case that violates that expectation, a
>>case where `/a.txt` is identical to `a.txt`.
> The thing is: it's not.
I think maybe you misunderstood. I mean that the zipfile you have seems to be
tr
Jason R. Coombs added the comment:
I created [jaraco/zipp#56](https://github.com/jaraco/zipp/issues/56) to track
the issue in the backport.
--
___
Python tracker
<https://bugs.python.org/issue41
Jason R. Coombs added the comment:
Thanks sorrow for filing a report.
I primarily developed this functionality. As I did, I found the 'zip' format to
be under-specified, so I used real-world examples as models to infer a spec.
It seems you may have discovered a use-case that vio
R. David Murray added the comment:
If you use the 'sendmail' function for sending, then it is entirely your
responsibility to turn the email into "wire format". Unicode is not wire
format, but if you give sendmail a string that only has ascii in it it nicely
converts
Change by Jason R. Coombs :
--
pull_requests: +20049
pull_request: https://github.com/python/cpython/pull/20857
___
Python tracker
<https://bugs.python.org/issue40
Jason R. Coombs added the comment:
Thanks for the notice Ned. I've revived the PR and addressed all the comments
from Victor. Any chance this can get into Python 3.7?
--
___
Python tracker
<https://bugs.python.org/is
Change by Jason R. Coombs :
--
pull_requests: +20017
pull_request: https://github.com/python/cpython/pull/20820
___
Python tracker
<https://bugs.python.org/issue40
Jason R. Coombs added the comment:
Thanks for the thorough and considerate response.
I do think your original recommendation of reverting the broken feature is the
best approach at this point. That is, keep resources.files with the fallback
shim and eliminate support for loaders supplying
r n added the comment:
Sorry, please ignore my previous comment, I can see that the issue is not in
the queue, but probably be somewhere in my setup.
I'll close this bug therefore. Thanks again for the clarification.
--
resolution: -> not a bug
stage: -> resolved
s
r n added the comment:
Thanks for the response.
However, if you see, every condition object has their own queue of waiters in
self._waiters, that get notified during notify(), which are different for
not_empty and not_full.
I see a hang very very rarely, like 1/25 times, in my program, which
Jason R. Coombs added the comment:
I feel terrible and really regret that this was able to break things so badly.
What options are available at this point? I'd at the very least like to remove
the `loader.files()` behavior to avoid encouraging other loaders to implement
it. Should we
Jason R. Coombs added the comment:
This issue stems from improper reliance on implementation details of
`importlib.resources.path`, which returns a context manager that is designed to
clean up the file after the context closes. certifi would have encountered the
same problem on older
Change by r n :
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue40907>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jason R. Coombs added the comment:
I understand the issue here and can supply more details soon (no later than
this weekend).
--
___
Python tracker
<https://bugs.python.org/issue40
Change by r n :
--
nosy: +rhettinger -r n2
title: cpython/queue.py: put() does not acquire not_empty before notifying on
it -> cpython/lib/queue.py: put() does not acquire not_empty before notifying
on it
___
Python tracker
<
Change by r n :
--
title: cpython/queue.py: put() does not acquire not_empty lock before notifying
on it -> cpython/queue.py: put() does not acquire not_empty before notifying on
it
___
Python tracker
<https://bugs.python.org/issu
Change by r n :
--
versions: +Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue40907>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by r n :
--
components: Library (Lib)
nosy: r n2
priority: normal
severity: normal
status: open
title: cpython/queue.py: put() does not acquire not_empty lock before notifying
on it
type: behavior
versions: Python 3.8
___
Python tracker
Jason R. Coombs added the comment:
New changeset 843c27765652e2322011fb3e5d88f4837de38c06 by Jason R. Coombs in
branch 'master':
bpo-39791 native hooks for importlib.resources.files (GH-20576)
https://github.com/python/cpython/commit/843c27765652e2322011fb3e5d88f4
Jason R. Coombs added the comment:
New changeset 2efe18bf277dd0f38a1d248ae6bdd30947c26880 by Jason R. Coombs in
branch 'master':
bpo-39791: Support file systems that cannot support non-ascii filenames
(skipping tests in that case). (#20681)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
See GH-20681 for a proposed fix. I've scheduled the build bots to run the
patch. Will build bots prove the fix? If not, can you test the patch in the
same environment where it was discovered?
--
___
P
Change by Jason R. Coombs :
--
pull_requests: +19894
pull_request: https://github.com/python/cpython/pull/20681
___
Python tracker
<https://bugs.python.org/issue39
Jason R. Coombs added the comment:
Thanks for the report Michael. I'm trying to figure out the best way to address
the issue. That test is shared with importlib_metadata, so needs to run without
CPython's test suite fixtures, such as the ones that generate non-ascii
filenames. I
Jason R. Coombs added the comment:
New changeset a4fa9a95153a3800dea60b3029b2dcaf8a4f6acb by Miss Islington (bot)
in branch '3.9':
bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659)
(GH-20661)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
New changeset 161541ab45278df6603dd870113b10f13e4d9e16 by Jason R. Coombs in
branch 'master':
bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659)
https://github.com/python/cpython/commit/161541ab45278df6603dd870113b10
Change by Jason R. Coombs :
--
pull_requests: +19878
pull_request: https://github.com/python/cpython/pull/20659
___
Python tracker
<https://bugs.python.org/issue39
Change by Jason R. Coombs :
--
pull_requests: +19875
pull_request: https://github.com/python/cpython/pull/20656
___
Python tracker
<https://bugs.python.org/issue39
Jason R. Coombs added the comment:
In [this latest
routine](https://github.com/jaraco/jaraco.develop/blob/6469c7a61e7349b93f191df38eed6cd020dd79be/jaraco/develop/macos-build-python.py),
on my macOS workstation with Homebrew installed locally, Python builds
successfully with just a few
Jason R. Coombs added the comment:
In [this
commit](https://github.com/jaraco/jaraco.develop/commit/e3e5f66ca6693d8ec3abd31d99d491f6dfa1f67d),
I include "xz" in the routine. Should Python's developer docs include
something like that to ensur
Jason R. Coombs added the comment:
This issue doesn't happen on my mac that installs homebrew globally. Do the
build instructions assume Homebrew is installed system-wide?
--
___
Python tracker
<https://bugs.python.org/is
New submission from Jason R. Coombs :
Attempting to build Python on macOS following [the
instructions](https://devguide.python.org/setup/#macos-and-os-x) (for Homebrew).
xz is installed:
```
$ brew --prefix xz
Change by Jason R. Coombs :
--
components: +macOS
nosy: +ned.deily, ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue40840>
___
___
Python-bug
Change by Jason R. Coombs :
--
pull_requests: +19816
pull_request: https://github.com/python/cpython/pull/20576
___
Python tracker
<https://bugs.python.org/issue39
R. David Murray added the comment:
New changeset 21017ed904f734be9f195ae1274eb81426a9e776 by Abhilash Raj in
branch 'master':
bpo-39040: Fix parsing of email mime headers with whitespace between
encoded-words. (gh-17620)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
What do you think about readlink returning something like:
class Link(str):
print_name = None # type: str | None
@property
def friendly_name(self) -> str:
return self.print_name or self
os.readlink would always return one of these Link obje
Jason R. Coombs added the comment:
New changeset 5c1d745da5e1166a8724b619060165dcf3949e93 by Miss Islington (bot)
in branch '3.8':
bpo-39830: Add zipfile.Path to __all__ (GH-19115) (GH-19116)
https://github.com/python/cpython/commit/5c1d745da5e1166a8724b619060165
Jason R. Coombs added the comment:
Thanks Steve. While I was able to avoid the original symptom by not using
readlink, I still think there's an issue here, both in the surprising behavior
observed by shutil.copyfile, but also by the essential behavior of readlink.
The more essential
Jason R. Coombs added the comment:
Good news is it looks like the issue with setuptools_scm can be address in a
relatively straightforward manner
(https://github.com/pypa/setuptools_scm/issues/436#issuecomment-632899446).
I think that means the answers to the above questions are
Jason R. Coombs added the comment:
To make matters more complicated, `git rev-parse --show-toplevel` also returns
the realpath:
```
# git rev-parse --show-toplevel
//vmware-host/Shared Folders/home/code/main/path
```
--
___
Python tracker
<ht
Jason R. Coombs added the comment:
It's because on Unix:
```
>>> os.path.relpath('/Users/jaraco/code/main/path/.flake8', '')
'.flake8'
```
But on Windows, relpath raises an error for the comparable call:
```
>>> os.path.relpath('\\
Jason R. Coombs added the comment:
It seems the underlying reason the behavior fails is the (intended) difference
resolving the empty path to a realpath when a symlink points to another volume.
The failing routine invokes realpath early
(https://github.com/pypa/setuptools_scm/blob
Change by Jason R. Coombs :
--
nosy: +eryksun
___
Python tracker
<https://bugs.python.org/issue40732>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jason R. Coombs added the comment:
> Perhaps related...
Now I'm thinking the issue is different, so I've created issue40732 to track
the realpath issue.
--
___
Python tracker
<https://bugs.pytho
New submission from Jason R. Coombs :
I've encountered an apparent regression on Python 3.8 on Windows when the
current working directory is in a symlink to another volume and one runs
`setup.py develop` on a project using setuptools_scm
(https://github.com/pypa/setuptools_scm/issue
Jason R. Coombs added the comment:
> I'll see if `realpath` satisfies the test suite needs for path pie.
I've tried replacing `readlink` with `realpath` and the tests still pass on
Unix-like OSs, and also passes on Python 3.8 on Windows, but now fails on older
Pythons on Windo
Jason R. Coombs added the comment:
Perhaps related, I've encountered another apparent regression on Python 3.8 on
Windows when the current working directory is in a symlink to another volume
and one runs `setup.py develop` on a project using setuptools_scm
(https://github.com
Jason R. Coombs added the comment:
> Unless you're specifically testing single steps through symlink chains, you
> probably want to just use realpath anyway.
I do see now the references to `realpath` in the docs... and I think that
satisfies the need I described above. It doesn
Jason R. Coombs added the comment:
> Changing readlink to always return the correct path was deliberate.
Understood. However, this statement assumes the "correct path" is the most
precise path to resolve the target. If you instead define "correct path" as the
one that
New submission from Micah R Ledbetter :
When using the random.Random class, using the .seed() method with version=1
does not always reproduce the same results as the .seed() method did in Python
2.
>From the docs, I did expect this, but on closer inspection, I can't tell
>wheth
Jason R. Coombs added the comment:
> This is only an issue for broken symlinks, right? (More precisely, those that
> cannot be resolved, which may include very long paths on some machines.)
Unfortunately, no. In the original post above, you can see temp/bar points to
C:\Users\jarac
Change by R. David Murray :
--
stage: backport needed -> resolved
___
Python tracker
<https://bugs.python.org/issue40597>
___
___
Python-bugs-list mai
R. David Murray added the comment:
New changeset c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5 by Miss Islington (bot)
in branch '3.8':
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently
(gh-20038) (gh-20084)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
I strongly suspect bpo-37834 and GH-15231 is where the difference was
introduced.
--
___
Python tracker
<https://bugs.python.org/issue40
Jason R. Coombs added the comment:
Thank you Eryk for the thorough and informative investigation. Seriously, wow.
> Do you want 3.8 to revert to using the print name, at least for symlinks?
> (ntpath._readlink_deep would need to be modified to support long target
> paths.) Or
New submission from Jason R. Coombs :
In https://github.com/jaraco/path/issues/186, the Path project discovered a
regression with Python 3.8. It seems that if one creates a symlink with an
absolute path. I used `shutil.copytree('temp', 'temp2', True)` and it p
Jason R. Coombs added the comment:
> I thought it might be useful for testing purposes if os.path (i.e. ntpath and
> posixpath) had a way to set the home directory that it uses in way that
> wouldn't affect other libraries and child processes.
I was thinking about this, and
Jason R. Coombs added the comment:
> Platform differences can be papered over with functions.
I’m not suggesting that from within Python there should be another way to
detect a home directory. The expanduser functionality as written is just fine
for that, though I agree with Steve that us
Jason R. Coombs added the comment:
I addressed the [setuptools test suite
issue](https://github.com/pypa/setuptools/issues/2112) with [this
commit](https://github.com/pypa/setuptools/commit/f866311d60f54499c3637309e3429780d8c8f218).
What was a one-line elegant solution is now multiple lines
Jason R. Coombs added the comment:
I should also point out that this was a documented feature of Python that was
removed without any deprecation period.
--
___
Python tracker
<https://bugs.python.org/issue36
Jason R. Coombs added the comment:
Today I ran into an issue due to this change. I have a test that sets
`os.environ['HOME']` in order to ensure that `os.path.expanduser(~)` returns
that value
(https://github.com/pypa/setuptools/blob/f6f25adfc81df76e186bf6c3738a1baa0f92be05/setupt
R. David Murray added the comment:
Thanks, Arkadiusz.
--
resolution: -> fixed
stage: patch review -> backport needed
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/i
R. David Murray added the comment:
New changeset 6f2f475d5a2cd7675dce844f3af436ba919ef92b by Arkadiusz Hiler in
branch 'master':
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently
(gh-20038)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
My bad. I probably could have been more proactive about providing a reproducer.
The problem, as described above (msg335220) and in the associated cmdix ticket,
is that invocation of `platform.(anything)` causes shelling out to execute
"uname", s
R. David Murray added the comment:
The PR looks good to me, but I describe the change differently. I'm not sure
how I missed this in the original implementation, since I obviously checked it
for the 8bit case. Too long ago to rem
Jason R. Coombs added the comment:
In issue40570, Marc-Andre writes:
> I don't think that deprecating standard tuple access is an option
for the uname() return value, since it's documented to be a tuple.
My thinking here is that as part of the deprecation, the documentation woul
Jason R. Coombs added the comment:
> you added a late binding optimization for the whole uname return
tuple to save the effort of ... shell access.
It wasn't to save the effort and it wasn't an optimization. There was a
fundamental race condition where it became impossible t
Jason R. Coombs added the comment:
In https://github.com/jaraco/cpython/tree/bc73729eb9, I started drafting a
proposed implementation to address this concern, but ran into a snag - the
tests immediately reveal that `tuple(platform.uname())` invokes `__len__`,
triggering the deprecation
Jason R. Coombs added the comment:
I've gone ahead and merged PR 20015 to fix the issue, but I'm happy to revisit
if a better approach is proposed.
--
keywords: +3.9regression -patch
resolution: -> fixed
stage: patch review -> resolved
status
Jason R. Coombs added the comment:
New changeset 2c3d508c5fabe40dac848fb9ae558069f0576879 by Jason R. Coombs in
branch 'master':
bpo-40570: Improve compatibility of uname_result with late-bound .platform
(#20015)
https://github.com/python/cpyt
Jason R. Coombs added the comment:
Thanks Marc-Andre for the suggestion, but I don't think that approach is viable
here. The whole point of issue35967 was to defer the execution of the
`.processor` behavior until it was requested. The intention is not to extend
the tuple, but to short
New submission from Jason R. Coombs :
In issue40570, I learned that some users are still relying on legacy tuple-like
behaviors of `platform.uname()`, namely the access by item position and length:
```
platform.uname()[0]
len(platform.uname())
```
I propose to deprecate these behaviors and
Jason R. Coombs added the comment:
Thanks David for the report and the draft PR (which helped me validate my
thinking on the matter). In PR 20015, I've included additional tests. I've also
re-written the compatibility functions to rely on the main `__iter__` override.
Another
Jason R. Coombs added the comment:
I've merged PR 19722. Some follow up actions I'd like to do:
- Add hooks for `.files()` on built-in loaders.
- Replace `loader.get_resource_reader()` with adapters around `.files()` for
built-
Change by Jason R. Coombs :
--
pull_requests: +19326
pull_request: https://github.com/python/cpython/pull/20015
___
Python tracker
<https://bugs.python.org/issue40
501 - 600 of 12187 matches
Mail list logo