[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Ivan Marton


Ivan Marton  added the comment:

Well, there is nothing in the documentation that would say the logrotation can 
be only performed by continously running scripts, thats why. :)

There are scripts or even daemons written in Python that need to be restarted 
from time to time. If the logrotate period is greater than restart period the 
log files will never be rotated, however they could be.

We were looking for something that works like the logrotate do, but without 
involving any external logic, but the one written in python. And 
TimedLogrotateHandler appears to be one of those, unless it checks the MTIME of 
the files instead of the CTIME.

What is the logic behind checking the MTIME instead of CTIME when one is 
calculating the age of a file when tries to calculate whether it has to be 
rotated or not? If the only purpose of this initial rollover calculation would 
be to start a predefined long period (as you suggest), now() (time of 
execution) should used instead and no file attribute should be involved. From 
the code I have to assume that the original author also tried to prepare for 
the cases where the execution is interrupted and/or restarted and (s)he wanted 
the TimedLogrotateHandler to be resumed where it was during the previous 
execution. Dnn't you agree?

--

___
Python tracker 

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



[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-13 Thread Jacob Nilsson


Change by Jacob Nilsson :


--
nosy: +ajoino

___
Python tracker 

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



[issue44909] configure should pick /usr/bin/g++ automatically if present

2021-08-13 Thread Paul Menzel


New submission from Paul Menzel :

[copied from closed (out of date) issue https://bugs.python.org/issue25946]

Reproduced with Python 3.9.6.

./configure` both prints `checking for g++... no` and 

WARNING:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

if `/usr/bin/g++` is present and executable which doesn't seem to be 
constructive because it's quite common that one wants to use `/usr/bin/g++` as 
CXX compiler if available. In case incompatibilities exists with other C++ 
compilers there should a check and more detailed error message.

Furthermore the error message doesn't explain if a part of distutils won't be 
build because the message sounds like the C++ extension is built, but does it 
work without a C++ compiler?

Specifying `CXX` environment variable or `--with-cxx-main=/usr/bin/g++` 
`configure` option works fine.

--
components: Build
messages: 399497
nosy: iritkatriel, krichter, pmenzel
priority: normal
severity: normal
status: open
title: configure should pick /usr/bin/g++ automatically if present
versions: Python 3.9

___
Python tracker 

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



[issue25946] configure should pick /usr/bin/g++ automatically if present

2021-08-13 Thread Paul Menzel


Paul Menzel  added the comment:

I created https://bugs.python.org/issue44909.

--
nosy: +pmenzel

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip


Vinay Sajip  added the comment:

> Well, there is nothing in the documentation that would say the logrotation 
> can be only performed by continously running scripts, thats why. :)

Well, what's the need to rotate based on time when you just run scripts 
sporadically or they're very short-lived? Not trying to argue, just trying to 
understand.

> There are scripts or even daemons written in Python that need to be restarted 
> from time to time. If the logrotate period is greater than restart period the 
> log files will never be rotated, however they could be.

Yes, but generally daemons are long-lived relative to the rotation interval, 
aren't they? "From time to time" certainly implies that to me.

> What is the logic behind checking the MTIME instead of CTIME when one is 
> calculating the age of a file when tries to calculate whether it has to be 
> rotated or not?

I can't remember, that code is over 12 years old and that specific decision 
wasn't documented :-(

> From the code I have to assume that the original author also tried to prepare 
> for the cases where the execution is interrupted and/or restarted and (s)he 
> wanted the TimedLogrotateHandler to be resumed where it was during the 
> previous execution. Dnn't you agree?

I take it you mean TimedRotatingFileHandler. Certainly it assumes that the 
script might be restarted, which is why it opens the file in append mode.

If the computation using MTIME were changed to use CTIME, that would be a 
behaviour change, which could conceivably break someone's code that relied on 
current behaviour (unlikely, but you just never know). I've no other objection 
to using CTIME rather than MTIME - perhaps I'm just being hyper-cautious about 
breakage?

--

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip


Vinay Sajip  added the comment:

I just checked - the relevant code (using MTIME) was added in 2010, as a fix 
for bpo-8117 - around the time that Python 2.6 was released.

--

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

I believe this to be fixed.

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

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

Ned, is this still an issue with the release candidate of 3.10?

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

I'd like to close this, as the exception handling is all done and working 
correctly.

Is there a separate issue for how we are handling CodeType()?

--

___
Python tracker 

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



[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

I guess this will be resolved when the great PEP 563/649 debate is concluded. 
No need for another issue.

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

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2021-08-13 Thread Mark Shannon


Change by Mark Shannon :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44772] Regression in memory use of instances due to dictionary ordering

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

Duplicate of https://bugs.python.org/issue40116

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-08-13 Thread Mark Shannon


Change by Mark Shannon :


--
nosy: +rhettinger

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Ivan Marton


Ivan Marton  added the comment:

> Well, what's the need to rotate based on time when you just run scripts 
> sporadically or they're very short-lived? Not trying to argue, just trying to 
> understand.
> Yes, but generally daemons are long-lived relative to the rotation interval, 
> aren't they? "From time to time" certainly implies that to me.

In one of our use-cases, where I faced with this bug/behaviour of 
TimedRotatingFileHandler, we are using it in a daemon for daily logrotate. The 
aim is to have the logs separated day by day, just like the majority of our 
other components running on a linux. We've just realized that some days are 
missing from the series of logs and the investigation led to the service 
restart and the MTIME checking that we are talking about here. When a logger is 
configured to rotate daily one just simply assume that it will rotate daily 
regardless the daemon restart. (As en extreme(?) example, when a the system - 
and the daemon of course - is restarted each day - or just never running for a 
whole day - and btw it logs often, the log file won't be ever rotated and can 
inrease over every limits.)

I've quickly googled around and found someone who execute some logic from cron 
and expects the loghandler to rotate his files, that wouldn't happened for the 
same reason:
https://stackoverflow.com/questions/30569164/logging-handler-timedrotatingfilehandler-never-rotates-the-log

> I just checked - the relevant code (using MTIME) was added in 2010, as a fix 
> for bpo-8117 - around the time that Python 2.6 was released.
As I understand bpo-8117, the goal was to do the rollover even after script 
restarts. (To be frank, only an extreme case was mentioned in the issue opener 
entry, when the rollover period had been reached when the script wasn't 
running.) I believe for this purpose MTIME wasn't the best choice, but using 
CTIME instead would make the script do what is expected to.

> I take it you mean TimedRotatingFileHandler. Certainly it assumes that the 
> script might be restarted, which is why it opens the file in append mode.

> If the computation using MTIME were changed to use CTIME, that would be a 
> behaviour change, which could conceivably break someone's code that relied on 
> current behaviour (unlikely, but you just never know). I've no other 
> objection to using CTIME rather than MTIME - perhaps I'm just being 
> hyper-cautious about breakage?

You are far better and more experienced in maintaining widely used opensource 
codebases so I wouldn't argue with you, but... :)

- In case of scripts that create the log file for themselves the change would 
have no effect.
- In case of scripts that are using already existing files for logging (by 
opening them for append) could change the behaviour, but just slighly. The 
first rollover would happen before adding the first new log line if the file 
age reached the configured time, and not when the age of last log line written 
to the file before having the script started reached the same value. No further 
rotation would be effected.

I _believe_ no one expects the current initial behaviour in case of resumed log 
files, and for sure, the documentation doesn't cover this part so I don't know 
how to proceed.

I _believe_ (again) that changing the behaviour wouldn't break the script 
outside, but rather would help them working the way how the developers 
originally assumed they did.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel

Irit Katriel  added the comment:

It’s not deterministic.

--

___
Python tracker 

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



[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-08-13 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

AFAIK this is already resolved on the main (https://bugs.python.org/issue42725)

--

___
Python tracker 

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



[issue44869] MacOS Monterrey malloc issue

2021-08-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

There is a 3th possibility: This could be a bug in the OS, Monterey is still in 
beta at this point and beta's tend to contain more bugs than release versions.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7bf28cbb4bf37fa6bdfc2d3f8a3939066b3f8f22 by Irit Katriel in 
branch 'main':
bpo-44895: Temporarily add an extra gc.collect() call (GH-27746)
https://github.com/python/cpython/commit/7bf28cbb4bf37fa6bdfc2d3f8a3939066b3f8f22


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +26229
pull_request: https://github.com/python/cpython/pull/27753

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Since the refleak investigation moved to its own issue, I'm re-closing this one 
for clarity.

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

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset ef36dfe4de1ee0df11cde94fd76465336aa8141d by Benjamin Peterson in 
branch '3.10':
[3.10] bpo-33930: Fix typo in the test name. (GH-27736)
https://github.com/python/cpython/commit/ef36dfe4de1ee0df11cde94fd76465336aa8141d


--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

> what is the source of the indeterminism -- some kind of race condition or 
> something else?


My hunch is it could be timing of GC. But it's hard to say at this point.

--

___
Python tracker 

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



[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Dennis, there's an existing issue on making the test suite more pypy-compatible:

https://bugs.python.org/issue25130


In that issue Maciej says pypy adopted a policy to adjust tests when they have 
to so I'd say that unless we get a report on which additional tests should be 
marked as cpython_only, I wouldn't proactively do it myself.

In fact, a RustPython core dev is specifically asking for more tests here so I 
don't see why we shouldn't accommodate that.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44907] examples code output do not macth the current version 3.9

2021-08-13 Thread meowmeowcat


meowmeowcat  added the comment:

Thanks! Confirmed with Python 3.9.2. I will open a PR for fixing this.

--
nosy: +meowmeowmeowcat

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread meowmeowcat


Change by meowmeowcat :


--
title: examples code output do not macth the current version 3.9 -> examples 
code output do not match the current version 3.9

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x, 12.1

2021-08-13 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +26230
pull_request: https://github.com/python/cpython/pull/27754

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread meowmeowcat


Change by meowmeowcat :


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

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset ebc59262349d6901b825ed9101d604e826757262 by Miss Islington (bot) 
in branch '3.10':
bpo-44895: Temporarily add an extra gc.collect() call (GH-27746)
https://github.com/python/cpython/commit/ebc59262349d6901b825ed9101d604e826757262


--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

I merged the workaround to get refleak buildbots unstuck for the weekend. I 
bumped the issue stage back to "needs patch" as the available one isn't a 
solution.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +26232
pull_request: https://github.com/python/cpython/pull/27756

___
Python tracker 

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



[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a2ce538e16d5e3a6168704366bdd7a8c5af29881 by Nikita Sobolev in 
branch 'main':
bpo-44891: Tests `id` preserving on `* 1` for `str` and `bytes` (GH-27745)
https://github.com/python/cpython/commit/a2ce538e16d5e3a6168704366bdd7a8c5af29881


--

___
Python tracker 

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



[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks Neil for the thorough explanation!

I think in any case we should benchmark this because this will affect *all* GC 
types if I understand correctly and the TS mechanism had shown slowdowns before

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Is there a separate issue for how we are handling CodeType()?

No, that's why this is marked as release blocker, because this is the first 
issue where CodeType was changed. 

If you wish to close this one, please open a new issue explaining the situation 
and mark that one as release blocker.

--

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x, 12.1

2021-08-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26233
pull_request: https://github.com/python/cpython/pull/27758

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x, 12.1

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset dd8eb303b90d63e1f56684bedadca6674bb74a29 by Łukasz Langa in 
branch 'main':
bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)
https://github.com/python/cpython/commit/dd8eb303b90d63e1f56684bedadca6674bb74a29


--

___
Python tracker 

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



[issue44873] base64 RFC4648 test cases

2021-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +26234
pull_request: https://github.com/python/cpython/pull/27757

___
Python tracker 

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



[issue36700] base64 has old references that should be updated

2021-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +26235
pull_request: https://github.com/python/cpython/pull/27759

___
Python tracker 

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



[issue36700] base64 has old references that should be updated

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e43b9bbc31c22a0d97dc4fc420300e40c2d74166 by andrei kulakov in 
branch 'main':
bpo-36700: [doc] Update base64 RFC references to RFC 4648 (GH-27700)
https://github.com/python/cpython/commit/e43b9bbc31c22a0d97dc4fc420300e40c2d74166


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset 45a97d91a42795fb0b220e67ee25a14b940c7e50 by Miss Islington (bot) 
in branch '3.10':
bpo-44891: Tests `id` preserving on `* 1` for `str` and `bytes` (GH-27745)
https://github.com/python/cpython/commit/45a97d91a42795fb0b220e67ee25a14b940c7e50


--

___
Python tracker 

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



[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

I opted for landing this and backporting to 3.10 to increase visibility. There 
will be a NEWS entry about this so if any alt implementations have issues with 
this test, they can reach us and we'll adapt.

Thanks, Nikita! ✨ 🍰 ✨

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

___
Python tracker 

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



[issue44873] base64 RFC4648 test cases

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Andrei! ✨ 🍰 ✨

--
nosy: +lukasz.langa
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x, 12.1

2021-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset d4128485d6c2cbfebe756f3eeec2c60137b63bba by Miss Islington (bot) 
in branch '3.10':
bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)
https://github.com/python/cpython/commit/d4128485d6c2cbfebe756f3eeec2c60137b63bba


--

___
Python tracker 

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



[issue36700] base64 has old references that should be updated

2021-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset 16f73c8b5dbe02b4bf7f91ff9dbcd0886529bfe5 by Miss Islington (bot) 
in branch '3.10':
bpo-36700: [doc] Update base64 RFC references to RFC 4648 (GH-27700)
https://github.com/python/cpython/commit/16f73c8b5dbe02b4bf7f91ff9dbcd0886529bfe5


--

___
Python tracker 

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



[issue36700] base64 has old references that should be updated

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for reporting, Paul, and Andrei for the patch! ✨ 🍰 ✨

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

___
Python tracker 

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



[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e4ed9d21534c2ed4397fdee0bb530a6e6a2c5af8 by dnknth in branch 
'main':
bpo-30077: Add support for Apple aifc/sowt pseudo-compression (GH-24449)
https://github.com/python/cpython/commit/e4ed9d21534c2ed4397fdee0bb530a6e6a2c5af8


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2021-08-13 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for reporting and the initial patch, Toby. And thanks for pushing this 
across the finish line, Yussuf! ✨ 🍰 ✨

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue16580] [doc] Add examples to int.to_bytes and int.from_bytes

2021-08-13 Thread Gautam Chaudhuri


Change by Gautam Chaudhuri :


--
pull_requests: +26236
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27760

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-13 Thread Gautam Chaudhuri


Change by Gautam Chaudhuri :


--
nosy: +quantum

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip


Vinay Sajip  added the comment:

> You are far better and more experienced in maintaining widely used opensource 
> codebases so I wouldn't argue with you, but... :)

Well, if a change introduces a problem, it will be my lookout, won't it? Just 
as the original patch for bpo-8117 is proving to be :-)

OK, how about this? We update the PR to add a new use_ctime=False keyword 
argument to TimedRotatingHandler.__init__(). If nothing else changes, the 
behaviour is as it is currently. If use_ctime=True is passed in the 
instantiation, then the constructor will use CTIME rather than MTIME. Will that 
work for you? I'd be OK with that approach.

--

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-13 Thread PySimpleGUI


PySimpleGUI  added the comment:

Thank you Terry!  I'm glad I got it right.

I've been trying to keep the wiki page updated that you mentioned as best I can:
https://wiki.python.org/moin/GuiProgramming

I agree with the overall conclusion that the wiki is the place these lists 
should live.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread STINNER Victor


STINNER Victor  added the comment:

Chris:
> Out of curiosity, is the failure deterministic in environments where it 
> fails? If not, what is the source of the indeterminism -- some kind of race 
> condition or something else?

The GC uses counters and thresholds to decide which collection and when they 
should be collected. I tried to play with gc.set_threshold(), but I failed to 
reproduce the issue on Linux.

Maybe it's a very precise threshold which triggers the issue. Between Linux and 
macOS, the site module executes different code paths which produce different GC 
counters.

Sometimes, the GC must happen in a very precise line, one line later is too 
late. See bpo-44422 for a case of threading.enumerate() (different kind of bug, 
but it's related to the GC). See bpo-44184 for another example of GC bug which 
only occurred on Windows and only if you type an exact command line.

--

___
Python tracker 

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



[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-13 Thread Alex Waygood


Alex Waygood  added the comment:

+1 to this suggestion. I had a use case for this the other day. It currently 
feels like something of a discrepancy between ABCs and `typing.Property`, which 
can be seen as analogous in some ways to "an ABC for the static type-checker". 
`typing.Property` allows you to specify that an object must have certain 
attributes, as well as certain methods, while for ABCs it is only the latter.

--
nosy: +AlexWaygood

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

I propose we declare all APIs for code objects *unstable*, liable to change 
each (feature) release.

I want to get rid of PyCode_NewWithPosArgs() and just have PyCode_New(). All 
callers to either one must be changed anyways. (And we’re not done changing 
this in 3.11 either.)

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>> I want to get rid of PyCode_NewWithPosArgs() and just have PyCode_New(). 

That as added because of PEP 387 and unfortunately removing it is backwards 
incompatible.

>> I propose we declare all APIs for code objects *unstable*, liable to change 
>> each (feature) release.

I agree that we should do this, but this needs at least a discussion in 
python-dev because currently these APIs are protected by PEP 387 so changing 
them is backwards incompatible

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have tried to reproduce this on my Linux and Mac machines and I have been 
unable to do it for the time being in either of them.

--
nosy: +pablogsal

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

> >> I want to get rid of PyCode_NewWithPosArgs() and just have PyCode_New(). 

> That as added because of PEP 387 and unfortunately removing it is backwards 
> incompatible.

Is changing the signature allowed? Because it *must* be changed (at the very 
least to accommodate the exceptiontable, but there are several others too -- 
your PEP 657 touched it last to add endlinetable and columntable).

I think this was a mistake in PEP 387 and we just need to retract that. Perhaps 
it could be left as a dummy that always returns an error?

> >> I propose we declare all APIs for code objects *unstable*, liable to 
> >> change each (feature) release.

> I agree that we should do this, but this needs at least a discussion in 
> python-dev because currently these APIs are protected by PEP 387 so changing 
> them is backwards incompatible

Yeah that's the crux. :-(

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

The script below hangs on my mac (it's an extract from 
test_recursion_in_except_handler).

---
import sys

count = 0
def main():

  def f():
global count
count += 1
try:
f()
except RecursionError:
f()

  sys.setrecursionlimit(30)

  try:
f()
  except RecursionError:
pass

main()
print(count)
---




When I kill it the traceback shows it alternating between the two recursive 
calls, but not in a regular pattern:


... [snipped a lot]

  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  [Previous line repeated 2 more times]
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/tt.py", line 11, in f
f()
^^^
  File "/Users/iritkatriel/src/cpython/tt.py", line 13, in f
f()
^^^
RecursionError: maximum recursion depth exceeded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython/

[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

Adding Mark since he worked on recursion recently.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na


Dong-hee Na  added the comment:

>From my macOS, I was not able to reproduce the issue also as like as Victor 
>and Pablo.

repeat 10 ./python.exe -m test -R 3:3 test_exceptions -m 
test_no_hang_on_context_chain_cycle2 -m 
test_recursion_normalizing_infinite_exception -m 
test_recursion_in_except_handler -m test_recursion_normalizing_with_no_memory

However hang was able to reproduce.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na


Dong-hee Na  added the comment:

> However hang was able to reproduce.

I meant msg399539

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +26237
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27761

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Dong-hee Na


Dong-hee Na  added the comment:

Oops sorry. 

Without PR 27746, I was able to reproduce on my macOS environment.

test_exceptions leaked [6, 6, 6] references, sum=18
test_exceptions leaked [6, 6, 6] memory blocks, sum=18
test_exceptions failed (reference leak)

--

___
Python tracker 

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



[issue41234] Remove symbol.sym_name

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Andrei, on bpo, # tags numbers as bpo numbers, and creates links to bpo issues, 
whereas in PRs, # tags numbers as PR numbers and creates links to PRs.  So # 
must be removed and PR added when transferring references. So: PR 21624 or 
PR21624 or even, says the tracker doc, pull request 21624.

--

___
Python tracker 

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



[issue41234] Remove symbol.sym_name

2021-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Remove the old parser

___
Python tracker 

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



[issue41234] Remove symbol.sym_name

2021-08-13 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Terry: thanks! - that's good to know.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

Regarding the hang in msg399539, do we need some special handling of the case 
were a RecursionError is being raised and its context is another 
RecursionError?  Like a FatalError?

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

I've started a thread on python-dev.

https://mail.python.org/archives/list/python-...@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/#ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC

--

___
Python tracker 

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



[issue44881] Consider integration of PyObject_GC_UnTrack() with the trashcan C API

2021-08-13 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

> I think in any case we should benchmark this because this will affect *all*
> GC types if I understand correctly and the TS mechanism had shown slowdowns
> before

We definitely need to benchmark. I would guess that adding trashcan protection
to all GC types would not be a performance issue.  We already had the macros
for some performance critical ones (frame, tuple, list, dict).

The performance hit will likely come as a result of adding a branch that
uses _PyType_IS_GC() to the DECREF code path.  It means any time an object hits
zero refcount, we call _PyType_IS_GC() on it.  Previously, we would just call
tp_dealloc. 

Because of PEP 442, _PyType_IS_GC() checks not only a type flag but might also
call tp_is_gc.  So, benchmarks will need to be done.   We might get a small win
because the trashcan logic can be better optimized now that it's in a single
complied unit.

Small correction for my explaination above: if tp_dealloc gets called mutiple
times because of the trashcan, it is the code before the BEGIN macro that gets
called mutiple times.

--

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2021-08-13 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

It seems like the documentation is lacking and perhaps misleading in regard to 
attributes.

- anything hashable can be used as a key in an obj.__dict__: an int, a tuple, 
etc. According to __dict__ docs, all of those are attributes. There's no 
warning that this isn't recommended. Various tooling may break, for example 
dir() will break if keys are not comparable. inspect.getmembers() will break 
because it relies on dir(). Probably other tooling will break in some way -- 
this is just the two first things I tried.

Is the reason for allowing that, - only performance (obviously that's a strong 
enough reason in this case)? Or can this be useful in some other corner cases?

- setattr() requires a string but a string can be '1 2', '(1,2)', etc. The docs 
for setattr strongly imply that it's the same as dotted notation, but it's not. 
The non-identifier string attrs don't break dir() or anything in inspect module 
AFAICT. Should the docs discourage this usage? Should they suggest some use 
cases where this is useful?

In addition to just being confusing, I think this can create an impression for 
users that setattr() allows you to set 'private' or 'hidden' attrs, and setting 
attrs via __dict__ allows you to set even more 'private', 'top secret' attrs.

Since attributes are such a core concept in Python, it might be good to have a 
section that lays out all of these corner cases and reasons for them, so that 
it can be linked from docs for setattr(), __dict__, dir(), 
inspect.getmembers(), etc.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44910] Floating point issue

2021-08-13 Thread A wilson


New submission from A wilson :

0.01 + 273.15 should equal 273.16 but in python 3.9.5 or earlier report as 
273.159997.

--
messages: 399550
nosy: afw2alan
priority: normal
severity: normal
status: open
title: Floating point issue
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-13 Thread Gautam Chaudhuri


Change by Gautam Chaudhuri :


--
keywords: +patch
pull_requests: +26238
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27762

___
Python tracker 

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



[issue42649] RecursionError when parsing unwieldy expression (regression from 2.7 -> 3.x)

2021-08-13 Thread Jack DeVries


Jack DeVries  added the comment:

I spent some time experimenting with making the expression bigger and the 
recursion limit lower in python2. It seems like in python2, the depth that the 
compiler will recurse is unrelated to sys.recursionlimit.

Then, I lowered resource limits on stack and heap by ~1000x and increased the 
size of the expression by 10,000x, which caused a segmentation fault. Not only 
that, but the interpreter won't even respond to KeyboardInterrupt while it is 
doing the compiling. I believe that the recursion depth of the 2.x compiler is 
simply unbound, which seems like a bug to me.

As I tinkered with these things, I build out a reproduction script, which I've 
attached.

I think that documenting this change is more pragmatic than thinking about 
"fixing" it (not sure it can truly be fixed, as that would mean 
re-incorporating a bug). I don't know where such a note would belong, though. 
This document is the closed I can find, but it's too high-level for a detail 
like this to belong::

https://docs.python.org/3/howto/pyporting.html

--
nosy: +jack__d
Added file: https://bugs.python.org/file50215/repro.py

___
Python tracker 

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



[issue42649] RecursionError when parsing unwieldy expression (regression from 2.7 -> 3.x)

2021-08-13 Thread Jack DeVries


Jack DeVries  added the comment:

edit; typo:

**This document is the **closest** I can find

--

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-13 Thread Gautam Chaudhuri


Gautam Chaudhuri  added the comment:

I've submitted a PR making the changes suggested by Terry. Any
feedback/suggestions on the PR would be highly appreciated.

--

Gautam Chaudhuri

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> Maybe it's a very precise threshold which triggers the issue. Between Linux 
> and macOS, the site module executes different code paths which produce 
> different GC counters.
> Sometimes, the GC must happen in a very precise line, one line later is too 
> late.

How does this explain it not being non-deterministic on, say, macOS since the 
same lines of code will be executing each time? Is there a way to force things 
to happen in a deterministic fashion? (I interpreted the responses to mean that 
it's non-deterministic even when run on the same machine, so I'm not talking 
about, say, the differences from running macOS on different machines.)

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

"How does this explain it not being non-deterministic on" -> "How does this 
explain it not being deterministic on"

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

For instance, if memory addresses of objects are different, so objects sort 
differently in different runs on the same system.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Last question: might trying different values of PYTHONHASHSEED help?

--

___
Python tracker 

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



[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2021-08-13 Thread Toby Thurston

Toby Thurston  added the comment:

Hey!  thanks for letting me know, glad it got there in the end.  T.

On Fri, 13 Aug 2021, at 12:33, Łukasz Langa wrote:
> 
> Łukasz Langa  added the comment:
> 
> Thanks for reporting and the initial patch, Toby. And thanks for 
> pushing this across the finish line, Yussuf! ✨ 🍰 ✨
> 
> --
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
> versions: +Python 3.11 -Python 3.8
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object

2021-08-13 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Berker:
> My understanding is that their usages is a bit different:
> one is for performance reasons (and it can configurable by users) and the 
> other is to keep track of statements inside a connection.
>
> I'm not fully sure that the both use cases can be combined.

Only unique statements are added to the weak ref list (and the LRU cache).

Case 1: len(unique statements) <= 128
Both the LRU cache and the weak ref list will be equal sets of statements.

Case 2: len(unique statements) > 128 <= 200
If more than 128 unique statements are created, they "fall off" of the LRU 
cache and are collected by the GC. The weak ref list will contain all the 128 
cached statements, and up to 72 "lost" statements which have been reaped by the 
GC.
The LRU cache and the _alive_ objects in weak ref list will be equal sets of 
statements.

Case 3: len(unique statements) > 200
_pysqlite_drop_unused_statement_references() will remove the lost 72 refs and 
create a new weak ref list that will be equal to the 128 statements in the LRU 
cache.

Fun fact: After the number of unique statements pass 200, the weak ref list is 
reset to the remaining 128 "active" statements, and 
sqlite3.Connection.created_statements is reset to 0. Thus, when we pass the 
"200 limit" again, the weak ref list will contain 329 elements, not 200 
elements.

Any statement that "falls off" of the LRU cache is reaped by the GC which 
implies that sqlite3_finalize() is called on it, and it's thus removed from the 
SQLite connection. This implies that the set of statements available through 
sqlite3_next_stmt() is equal to the set of statements in the LRU cache and the 
set of _alive_ statements in the weak ref list.

This implies that if we want to finalise all connection statements in 
sqlite3.Connection.close(), all we need to do is to clear the LRU cache; the GC 
will invoke stmt_dealloc(), which will finalise the SQLite statement objects. 
If we want to reset all connection statements (pysqlite_do_all_statements()), 
we can iterate through them using sqlite3_next_stmt().

However, there is a corner case for when the sqlite3.Connection.statements list 
can contain statements that are not in the LRU cache: if we've got more than 
128 active cursors, all of them with unique statements, we can end up with 
statements that are _only_ owned by a cursor. However, sqlite3_next_stmt() will 
still find them if we need to reset them in pysqlite_do_all_statements(). On 
connection close, all cursors are destroyed anyway, so we will end up 
finalising all statements, weak ref list or not.

Can we merge PR-25998 now?

Prove me wrong :)

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

If someone can reproduce more or less reliably, it would be great to know where 
are the leaked objects. For that, compile CPython with "-with-trace-refs", 
surround the suspicious test in a loop (test_no_hang_on_context_chain_cycle2 
for example) of a 1000 or more iterations and run the test with the 
PYTHONDUMPREFS=1 environment variable. You will see the leaked objects at 
shutdown hopefully.

Hopefully the leaked objects would be a gigantic set by then so we the number 
of references will be noticeable.

--

___
Python tracker 

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



[issue44910] Floating point issue

2021-08-13 Thread Eric V. Smith


Eric V. Smith  added the comment:

This a limitation of the floating point type that python uses. See 
https://docs.python.org/3/tutorial/floatingpoint.html

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44892] configparser fails when the file contains a "%" inside a commentary

2021-08-13 Thread Diego Ramirez


Diego Ramirez  added the comment:

Lukasz Langa, I would like to know your opinion, as you are recognized as the 
"configparser" developer.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-08-13 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl

___
Python tracker 

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



[issue44906] Crash on deep call stack under Windows

2021-08-13 Thread Steve Dower


Steve Dower  added the comment:

I guess we've got a new path through the interpreter loop that takes more stack 
space than before and isn't part of our existing recursion tests.

It's probably somewhere in the vector call changes. Capturing the stack at 
overflow point should show us - I'll see if I can get it easily from the repro.

--
components: +Interpreter Core

___
Python tracker 

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



[issue44910] Floating point issue

2021-08-13 Thread A wilson


A wilson  added the comment:

Eric,

I was unaware of this document and its implementation in python.

where
0.01+0.15 = 0.16 but 0.01+273.15=273.159997

the latter which should be 273.16 which is triple point temperature of water in 
Kelvin.

This floating point variance explains some if the conditional test failures I 
have encountered.

regards

Alan

Get Outlook for Android


From: report=bugs.python@roundup.psfhosted.org 
 on behalf of Eric V. Smith 

Sent: Friday, 13 August 2021, 21:52
To: afw2a...@outlook.com
Subject: [issue44910] Floating point issue

Eric V. Smith  added the comment:

This a limitation of the floating point type that python uses. See 
https://docs.python.org/3/tutorial/floatingpoint.html

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___

--

___
Python tracker 

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



[issue44906] Crash on deep call stack under Windows

2021-08-13 Thread Steve Dower


Steve Dower  added the comment:

I get stack overflows all the way back to 3.7, so it's probably not anything 
new. But our stack overflow detection is clearly not going to catch this case. 
It's really only set up for a direct call within Python code, but this is going 
through many more steps.

Best thing you can do as a user is run it with "python -X faulthandler ..." to 
see the error. Perhaps we can handle the stack overflow ourselves and print a 
message suggesting that option, but unfortunately this problem doesn't have a 
generic solution :( The assumption is that you have a known recursion limit for 
your application, and as a scripting engine, we don't. Decoupling from the C 
stack is the best hope.

--

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2021-08-13 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

In the last message I've said that according to __dict__ docs, anything in 
__dict__ is an attribute of respective obj. That's a bit too-strongly worded, 
the docs can be understood in the sense that anything that ends up in __dict__ 
via other mechanisms, such as dotted notation or setattr(), is an attribute.

Since direct manipulation of __dict__ is not prohibited, and no limits are set, 
AFAIK, on keys that can be used for __dict__, the more natural reading of the 
docs is that anything that can be directly set in __dict__ is also an attribute.

The only thing that would make a user doubt this reading is if he or she finds 
that getattr() cannot get non-string attrs, and going by its name, user would 
assume you can get any valid attrs using getattr().

--

___
Python tracker 

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



[issue44862] [docs] make "Deprecated since version {deprecated}, will be removed in version {removed}" translation available

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This tracker is for patching the english Python docs and CPython interpreter.  
Questions about using python should be asked elsewhere.

The translated docs are the responsibility of a separate translation team and 
specific language teams.  Either they chose not to translate that sentence, or 
it was added after their last translation update.  see
https://devguide.python.org/documenting/#translating

--
nosy: +terry.reedy
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44863] Allow TypedDict to inherit from Generics

2021-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +gvanrossum, kj

___
Python tracker 

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



[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-13 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Jérémie, what does the doc say about translation?  This will likely determine 
whether the is a bug report or a future-version-only enhancement request.

The PR changes the two lines as indicated above and the CLA is signed.  A blurb 
will be needed if this is to me merged.  (Not my decision.)

--
nosy: +terry.reedy
type: behavior -> 
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue44865] [argparse] Missing translations

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Same comment as for #44964, plus note that 3.8 and before only get security 
patches.  Also, 3.9,3.10 only get bug fixes and I don't know if this qualifies.

--
nosy: +terry.reedy
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue44894] HTTP request handler: check sys.stderr != None before logging

2021-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: HTTP request handler should check sys.stderr for None before use for 
logging -> HTTP request handler: check sys.stderr != None before logging

___
Python tracker 

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



[issue44896] Issue with unparse in ast module

2021-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +BTaskaya, Mark.Shannon, benjamin.peterson, brett.cannon, pablogsal, 
yselivanov

___
Python tracker 

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



[issue44896] AttributeError in ast.unparse

2021-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: Issue with unparse in ast module -> AttributeError in ast.unparse

___
Python tracker 

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



[issue44898] Path.read_bytes() failed when path contains chinese character

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If there is no file or directory by the name you give, then the exception is 
correct and there is no bug in CPython.  A failing example should look like 
Steven's, with the filename in a string that is use to both create and access 
the file.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Example here is in 
https://docs.python.org/3/tutorial/controlflow.html#default-argument-values
2 more in PR in
https://docs.python.org/3/tutorial/controlflow.html#function-examples

I confirmed that message is same in 3.10 and 3.11.

--
nosy: +terry.reedy
type:  -> behavior
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26240
pull_request: https://github.com/python/cpython/pull/27764

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset ed524b4569b1e4a166886c880018418d46284378 by meowmeowmeowcat in 
branch 'main':
bpo-44907: Update error messages in tutorial examples (GH-27755)
https://github.com/python/cpython/commit/ed524b4569b1e4a166886c880018418d46284378


--

___
Python tracker 

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



[issue44907] examples code output do not match the current version 3.9

2021-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +26239
pull_request: https://github.com/python/cpython/pull/27763

___
Python tracker 

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



  1   2   >