[issue41709] Idle erases clipboard upon closing

2020-09-04 Thread Kitty Beans


New submission from Kitty Beans :

Idle erases the contents of my clipboard after copying any text from the idle 
window, and then closing idle.

This happens on my Linux Mint 19.3 Laptop and Desktop; Windows 10 Laptop does 
not seem to have this issue (it has never altered my clipboard outside of me 
actually copying text)

Only tested with Idle version 3.6.8

--
assignee: terry.reedy
components: IDLE
messages: 376337
nosy: Spacekiwigames, terry.reedy
priority: normal
severity: normal
status: open
title: Idle erases clipboard upon closing
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue41710] Timeout is affected by jumps in system time

2020-09-04 Thread Jonas Norling

New submission from Jonas Norling :

The timeout for threading.Lock, threading.Condition, etc, is not using a 
monotonic clock — it is affected if the system time (realtime clock) is set.

The attached program can be used to show the problem. It is expected to print 
"Took 2.000 s" repeatedly, but if run with permissions to set the system time, 
it prints:
$ sudo ./time_test.py
Took 2.400 s
Took 1.657 s
Took 2.044 s
Took 2.401 s
...

(the 1.6 s time can be explained by NTP correcting the clock)

There are already a number of closed bugs for this and related issues: bpo 
23428, bpo 31267, bpo 35747.

This happens in Python 3.7.7 (ARM32, Yocto Warrior), Python 3.8.2 (AMD64, 
Ubuntu Linux 20.04) and Python v3.9.0rc1 (AMD64, Ubuntu Linux 20.04).

--
components: Interpreter Core
files: time_test.py
messages: 376338
nosy: wocket
priority: normal
severity: normal
status: open
title: Timeout is affected by jumps in system time
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49440/time_test.py

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 54a66ade2067c373d31003ad260e1b7d14c81564 by Dong-hee Na in branch 
'master':
bpo-41700: Skip test if the locale is not supported (GH-22081)
https://github.com/python/cpython/commit/54a66ade2067c373d31003ad260e1b7d14c81564


--

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21172
pull_request: https://github.com/python/cpython/pull/22086

___
Python tracker 

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



[issue23428] Use the monotonic clock for thread conditions on POSIX platforms

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

See bpo-41710 "Timeout is affected by jumps in system time".

--

___
Python tracker 

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



[issue41710] Timeout is affected by jumps in system time

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-23428 modified the pthread implementation of conditional variable to use 
pthread_condattr_setclock(&ca, CLOCK_MONOTONIC) is available: commit 
001fee14e0f2ba5f41fb733adc69d5965925a094. The change should be part of Python 
3.8.

What is your sys.thread_info value? Example on Fedora 32 with Python 3.8.5:

>>> sys.thread_info
sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.31')

Sadly, the semaphore implementation doesn't use monotonic clock. See glibc 
issues:

* https://sourceware.org/bugzilla/show_bug.cgi?id=14717
* https://bugzilla.kernel.org/show_bug.cgi?id=112521

--
nosy: +inada.naoki, vstinner

___
Python tracker 

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



[issue41711] Socker send method throws a timeout exception

2020-09-04 Thread pig


Change by pig :


--
components: IO
nosy: pppig0921
priority: normal
severity: normal
status: open
title: Socker send method throws a timeout exception
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue41711] Socker send method throws a timeout exception

2020-09-04 Thread pig


Change by pig :


Added file: https://bugs.python.org/file49441/tcpclient.py

___
Python tracker 

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



[issue41711] Socker send method throws a timeout exception

2020-09-04 Thread pig


Change by pig :


Added file: https://bugs.python.org/file49442/tcpserver.py

___
Python tracker 

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



[issue41711] Socker send method throws a timeout exception

2020-09-04 Thread pig


New submission from pig :

When tcpclient.py and tcpserver.py files are run on macOS at the same time, 
custom exceptions will be thrown due to exceeding the given timeout.Timed out: 
Timed out When one or two files are running on window, socker.send throws an 
exception socket.timeout: Timed out.
The description of the send function I saw on the [web 
site](https://docs.python.org/3.7/library/socket.html#socket.socket.send) does 
not seem to throw an exception

--

___
Python tracker 

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



[issue41712] REDoS in purge

2020-09-04 Thread yeting li

New submission from yeting li :

I  find this regex "(\d+\.\d+\.\d+)(\w+\d+)?$" may be stucked by input.
The vulnerable regex is located in
https://github.com/python/cpython/blob/54a66ade2067c373d31003ad260e1b7d14c81564/Tools/msi/purge.py#L15

The ReDOS vulnerability of the regex is mainly due to the sub-pattern \w+\d+
and can be exploited with the following string
"1.1.1"+"1" * 5000 + "!"


I think you can limit the input length or fix this regex.

For example, you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+

Looking forward for your response​!

Best,
Yeting Li

--
components: Library (Lib)
files: purge.py
messages: 376343
nosy: yetingli
priority: normal
severity: normal
status: open
title: REDoS in purge
type: security
versions: Python 3.10
Added file: https://bugs.python.org/file49443/purge.py

___
Python tracker 

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



[issue36094] When using an SMTP SSL connection,, get ValueError.

2020-09-04 Thread Peter Stokes

Peter Stokes  added the comment:

I wanted to enquire as to if/when the proposed PR11998 is likely to be merged?

I also wanted to note the similarity between this issue and issue41470 and to 
suggest that whilst the change proposed in commit e445ccbc of PR11998 [1] would 
be welcome, there may be a case for exposing the value ultimately passed as the 
`server_hostname` parameter to the `SSLContext.wrap_socket(…)` call [2] as a 
parameter to `SMTP.connect(…)` [3]. Doing so would aid potential use cases 
whereby the `host` parameter provided is an address, yet the TLS server 
hostname validation should be based upon another value (i.e. the hostname); 
potentially useful in scenarios where the `host`'s address has been previously 
derived, by the caller, by other means (e.g. a call to `socket.getaddrinfo(…)` 
[4]).

[1] 
https://github.com/python/cpython/pull/11998/commits/e445ccbc483dfde74638dbb694132dc00ced4973
[2] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket
[3] https://docs.python.org/3/library/smtplib.html#smtplib.SMTP.connect
[4] https://docs.python.org/3/library/socket.html#socket.getaddrinfo

--
nosy: +Dadeos

___
Python tracker 

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



[issue41713] test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 Fedora Rawhide Refleaks 3.x:
https://buildbot.python.org/all/#/builders/565/builds/11

test_interpreters leaked [1424, 1422, 1424] references, sum=4270

According to git bisect, the leak was introduced by:

commit 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3
Author: Mohamed Koubaa 
Date:   Thu Sep 3 03:21:06 2020 -0500

bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)

 .../2020-09-01-17-07-20.bpo-1635741.7wSuCc.rst |   1 +
 Modules/signalmodule.c | 168 +++--
 2 files changed, 87 insertions(+), 82 deletions(-)


Example of leak:

$ ./python -m test -R 3:3 test_interpreters -m 
test.test_interpreters.TestInterpreterClose.test_from_current
0:00:00 load avg: 0.72 Run tests sequentially
0:00:00 load avg: 0.72 [1/1] test_interpreters
beginning 6 repetitions
123456
..
test_interpreters leaked [237, 237, 237] references, sum=711
test_interpreters leaked [18, 18, 18] memory blocks, sum=54
test_interpreters failed

== Tests result: FAILURE ==

1 test failed:
test_interpreters

Total duration: 1.1 sec
Tests result: FAILURE

--
components: Interpreter Core
messages: 376345
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_interpreters leaked [1424, 1422, 1424] references
versions: Python 3.10

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 8f13ff959ae43fb6b8217845b2945779fe693b84 by Miss Islington (bot) 
in branch '3.9':
bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22085)
https://github.com/python/cpython/commit/8f13ff959ae43fb6b8217845b2945779fe693b84


--

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 4bcff52447b472bc5c8698d4ab29c09df9e122b4 by Miss Islington (bot) 
in branch '3.8':
bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22086)
https://github.com/python/cpython/commit/4bcff52447b472bc5c8698d4ab29c09df9e122b4


--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_interpreters leaked [1424, 1422, 1424] references -> _signal module 
leak: test_interpreters leaked [1424, 1422, 1424] references

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

The signal module is really special. In Python, only the main thread of the 
main interpreter is supposed to be allowed to run Python signal handlers (but 
the C signal handler can be executed by any thread).

The exec function of the _signal module runs actions each time a new instance 
of the _signal module is created, whereas some actions must only be done 
exactly once:

* modify Handlers[i].tripped
* modify Handlers[i].func
* Set SIGINT signal handler
* Initialize sigint_event event (Windows only): see bpo-41686

For example, calling signal.signal() in a subinterpreter raises 
ValueError("signal only works in main thread of the main interpreter").

--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

About the leak, the following three variables are also initialized multiple 
times by signal_exec():

static PyObject *DefaultHandler;
static PyObject *IgnoreHandler;
static PyObject *IntHandler;

--

___
Python tracker 

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



[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie


New submission from Richard Purdie :

We're having some problems with multiprocessing.Queue where the parent process 
ends up hanging with zombie children. The code is part of bitbake, the task 
execution engine behind OpenEmbedded/Yocto Project.

I've cut down our code to the pieces in question in the attached file. It 
doesn't give a runnable test case unfortunately but does at least show what 
we're doing. Basically, we have a set of items to parse, we create a set of 
multiprocessing.Process() processes to handle the parsing in parallel. Jobs are 
queued in one queue and results are fed back to the parent via another. There 
is a quit queue that takes sentinels to cause the subprocesses to quit.

If something fails to parse, shutdown with clean=False is called, the sentinels 
are sent. the Parser() process calls results.cancel_join_thread() on the 
results queue. We do this since we don't care about the results any more, we 
just want to ensure everyting exits cleanly. This is where things go wrong. The 
Parser processes and their queues all turn into zombies. The parent process 
ends up stuck in self.result_queue.get(timeout=0.25) inside shutdown().

strace shows its acquired the locks and is doing a read() on the os.pipe() it 
created. Unfortunately since the parent still has a write channel open to the 
same pipe, it hangs indefinitely.

If I change the code to do:

self.result_queue._writer.close()
while True:
try:
   self.result_queue.get(timeout=0.25)
except (queue.Empty, EOFError):
break

i.e. close the writer side of the pipe by poking at the queue internals, we 
don't see the hang. The .close() method would close both sides.

We create our own process pool since this code dates from python 2.x days and 
multiprocessing pools had issues back when we started using this. I'm sure it 
would be much better now but we're reluctant to change what has basically been 
working. We drain the queues since in some cases we have clean shutdowns where 
cancel_join_thread() hasn't been used and we don't want those cases to block.

My question is whether this is a known issue and whether there is some kind of 
API to close just the write side of the Queue to avoid problems like this?

--
components: Library (Lib)
files: simplified.py
messages: 376350
nosy: rpurdie
priority: normal
severity: normal
status: open
title: multiprocessing.Queue deadlock
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file49444/simplified.py

___
Python tracker 

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



[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie


Richard Purdie  added the comment:

I should also add that if we don't use cancel_join_thread() in the parser 
processes, things all work out ok. There is therefore seemingly something odd 
about the state that is leaving things in.
This issue doesn't occur every time, its maybe 1 in 40 runs where we throw 
parsing errors but I can brute force reproduce it.

--

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions: +Python 3.10, Python 3.8

___
Python tracker 

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



[issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9

2020-09-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

This issue is fixed.
Thanks for the report and review Victor!

--
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



[issue41709] Tkinter erases clipboard upon closing

2020-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a duplicate of an existing tkinter and Linux issue we don't know how to 
fix. #40452

--
components: +Tkinter -IDLE
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Tkinter/IDLE: preserve clipboard on closure
title: Idle erases clipboard upon closing -> Tkinter erases clipboard upon 
closing

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I closed duplicate issue #41709,  Linux Mint 19.3, python  3.6.8

--
versions:  -Python 3.7

___
Python tracker 

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



[issue41715] REDoS inc_analyzer

2020-09-04 Thread yeting li

New submission from yeting li :

Hi,

I find this regex "^([a-zA-Z]|_\w*[a-zA-Z]\w*|[a-zA-Z]\w*)$" may be stucked by 
input.
The vulnerable regex is located in
https://github.com/python/cpython/blob/54a66ade2067c373d31003ad260e1b7d14c81564/Tools/c-analyzer/c_analyzer/common/info.py#L12

The ReDOS vulnerability of the regex is mainly due to the sub-pattern 
\w*[a-zA-Z]\w*
and can be exploited with the following string
"_" + "a" * 5000 + "!"


I think you can limit the input length or fix this regex.


Looking forward for your response​!

Best,
Yeting Li

--
files: info.py
messages: 376355
nosy: yetingli
priority: normal
severity: normal
status: open
title: REDoS inc_analyzer
Added file: https://bugs.python.org/file49445/info.py

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread yeting li


Change by yeting li :


--
title: REDoS inc_analyzer -> REDoS in c_analyzer

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread yeting li


Change by yeting li :


--
components: +Library (Lib)
type:  -> security
versions: +Python 3.10

___
Python tracker 

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



[issue41712] REDoS in purge

2020-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your report yeting li. The pattern modification looks good to me. 
Do you mind to create a pull request?

--
keywords: +easy
nosy: +serhiy.storchaka
stage:  -> needs patch
versions: +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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +eric.snow, serhiy.storchaka

___
Python tracker 

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



[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie


Richard Purdie  added the comment:

Even my hack to call _writer.close() doesn't seem to be enough, it makes the 
problem rarer but there is still an issue. 
Basically, if you call cancel_join_thread() in one process, the queue is 
potentially totally broken in all other processes that may be using it. If for 
example another has called join_thread() as it was exiting and has queued data 
at the same time as another process exits using cancel_join_thread() and exits 
holding the write lock, you'll deadlock on the processes now stuck in 
join_thread() waiting for a lock they'll never get.
I suspect the answer is "don't use cancel_join_thread()" but perhaps the docs 
need a note to point out that if anything is already potentially exiting, it 
can deadlock? I'm not sure you can actually use the API safely unless you stop 
all users from exiting and synchronise that by other means?

--

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I would use

   NAME_RE = re.compile(r'(?![_\d]+\Z)(?!\d)\w+', re.ASCII)

or

   NAME_RE = re.compile(r'(?=.*[A-Za-z])(?!\d)\w+', re.ASCII)

and NAME_RE.fullmatch() instead of NAME_RE.match().

But why identifiers not containing letters are disabled at first place? Is _123 
an invalid identifier in C?

--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

Another problem: PyOS_FiniInterrupts() is a public function of the C API which 
access global variables like IntHandler, DefaultHandler and IgnoreHandler.

--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)

This change is causing new issues: bpo-41713 "_signal module leak: 
test_interpreters leaked [1424, 1422, 1424] references". So I partially 
reverted it: PR 22087.

--

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-09-04 Thread mattip


Change by mattip :


--
keywords: +patch
nosy: +mattip
nosy_count: 8.0 -> 9.0
pull_requests: +21174
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22088

___
Python tracker 

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



[issue41716] SyntaxError: EOL while scanning string literal

2020-09-04 Thread chen-y0y0

New submission from chen-y0y0 :

# I try to run:
import os
os.system(r"start C:\Windows\System32\")
# But I get an Exception:
SyntaxError: EOL while scanning string literal
# A string after “r” means the string's original meaning. But……

--
components: Argument Clinic
messages: 376361
nosy: larry, prasechen
priority: normal
severity: normal
status: open
title: SyntaxError: EOL while scanning string literal
type: compile error
versions: Python 3.8

___
Python tracker 

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



[issue41716] SyntaxError: EOL while scanning string literal

2020-09-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

You can't end a string with a bare backslash, not even an raw string.

--
nosy: +steven.daprano
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



[issue41716] SyntaxError: EOL while scanning string literal

2020-09-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

See the FAQ:

https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash

Also documented here:

https://docs.python.org/dev/reference/lexical_analysis.html#string-and-bytes-literals

Previous issues: #1271 and #31136

--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4b8032e5a4994a7902076efa72fca1e2c85d8b7f by Victor Stinner in 
branch 'master':
bpo-41713: _signal doesn't use multi-phase init (GH-22087)
https://github.com/python/cpython/commit/4b8032e5a4994a7902076efa72fca1e2c85d8b7f


--

___
Python tracker 

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



[issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared

2020-09-04 Thread Mark Dickinson


Change by Mark Dickinson :


--
status: open -> closed

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread yeting li


yeting li  added the comment:

I think we can replace \w*[a-zA-Z]\w* with (_\d*)+([a-zA-Z]([_\d])*)+

This is an equivalent fix and the fixed regex is safe.

Does that sound right to you?

--

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread yeting li


yeting li  added the comment:

You can use the dk.brics.automaton library to verify whether two regexes are 
equivalent.

--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-04 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue26214] textwrap should minimize number of breaks in extra long words

2020-09-04 Thread Irit Katriel


Irit Katriel  added the comment:

You can do this already with the break_long_words arg of testwrap:

>>> import itertools, textwrap
>>> wr = textwrap.wrap
>>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567", width=5, 
>>> break_long_words=False
['123', '123', '12345', '67']

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread yeting li


yeting li  added the comment:

I'm sorry there was a typo just now.


replace _\w*[a-zA-Z]\w* with (_\d*)+([a-zA-Z]([_\d])*)+

--

___
Python tracker 

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



[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2020-09-04 Thread af


af  added the comment:

Any updates on this?

--
nosy: +af

___
Python tracker 

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



[issue41717] [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on POWER6 AIX 3.9

2020-09-04 Thread STINNER Victor

New submission from STINNER Victor :

'@test_6488748_tmpæ' is likely TESTFN_NONASCII which is exposed as 
test.support.os_helper.TESTFN, but test_io has many many tests using TESTFN.

https://buildbot.python.org/all/#/builders/330/builds/20

0:06:47 [130/425/1] test_io failed (env changed) (1 min 8 sec) -- running: 
test_concurrent_futures (31.1 sec)
(...)
Warning -- files was modified by test_io
  Before: []
  After:  ['@test_6488748_tmpæ']

Since build 1, 19 days ago:
https://buildbot.python.org/all/#/builders/330/builds/1


If someone is able to reproduce the issue, please attempt to identify which 
test method leaks the temporary file using the command:

./python -m test.bisect_cmd test_io --fail-env-changed -v

After 10-20 minutes, the command should give the name of a single method which 
creates the temporary file.

--
components: Tests
messages: 376371
nosy: BTaskaya, David.Edelsohn, vstinner
priority: normal
severity: normal
status: open
title: [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on 
POWER6 AIX 3.9
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



[issue41654] Segfault when raising MemoryError

2020-09-04 Thread STINNER Victor

STINNER Victor  added the comment:

"AMD64 Arch Linux Asan 3.8" buildbot logs a compiler warning:
https://buildbot.python.org/all/#builders/580/builds/4

Objects/exceptions.c: In function ‘MemoryError_dealloc’:
Objects/exceptions.c:2298:23: warning: comparison of distinct pointer types 
lacks a cast
 2298 | if (Py_TYPE(self) != PyExc_MemoryError) {
  |   ^~

--

___
Python tracker 

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



[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Any updates on this?

So far, nobody proposed a pull request. So no, there is no update.

Someone has to step in, dig into the issue, propose a fix, then someone else 
has to review the PR, and finally the PR should be merged.

--

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


New submission from STINNER Victor :

Follow-up of bpo-40275.

While investigating a crash on AIX (bpo-40068), I noticed that test_threading 
crashed because the test imports the logging module, and the logging has a bug 
on AIX on fork. I created an issue to reduce the number of imports made by 
"import test.support":

https://bugs.python.org/issue40275
I would prefer to better isolate tests: test_threading should only test the 
threading module, not the logging module.

Thanks to the hard work of Hai Shi, "import test.support" now imports only 37 
modules instead of 171! He split the 3200 lines of Lib/test/support/__init__.py 
into new helper submodules: bytecode, import, threading, socket, etc. For 
example, TESTFN now comes from test.support.os_helper.
Sadly, test.regrtest.save_env still imports asyncio and multiprocessing, and so 
in practice, running any test using "python -m test (...)" still imports around 
233 modules :-(

I measured the number of imports done in practice using the following file, 
Lib/test/test_sys_modules.py:

import unittest
from test import support
import sys

class Tests(unittest.TestCase):
def test_bug(self):
modules = sorted(sys.modules)
print("sys.modules:")
print("")
import pprint
pprint.pprint(modules)
print("")
print("len(sys.modules):", len(modules))

def test_main():
support.run_unittest(Tests)

if __name__ == "__main__":
test_main()


master:

* ./python -m test test_sys_modules: 233 modules (multiprocessing, asyncio, 
etc.)
* ./python Lib/test/test_sys_modules.py: 95 modules

3.9:

* ./python -m test test_sys_modules: 232
* ./python Lib/test/test_sys_modules.py: 117

3.5:

* ./python -m test test_sys_modules: 167
* ./python Lib/test/test_sys_modules.py: 151

2.7:

* ./python -m test test_sys_modules: 170
* ./python Lib/test/test_sys_modules.py: 122

--
components: Tests
messages: 376374
nosy: shihai1991, vstinner
priority: normal
severity: normal
status: open
title: test.regrtest has way too many imports
versions: Python 3.10

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, the work done on this issue is useless until test.regrtest imports less 
modules as well.

So I created bpo-41718 follow-up issue: "test.regrtest has way too many 
imports".

I consider that the work is done on test.support, so I close this issue.

--
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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

If I hack test.libregrtest.runtest to not import test.libregrtest.save_env, 
test_sys_modules imports only 148 instead of 233 modules.

--

___
Python tracker 

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



[issue41712] REDoS in purge

2020-09-04 Thread Zachary Ware


Zachary Ware  added the comment:

Does it matter?  This is not a library, it is a script used occasionally by a 
release manager, called manually, and the only input to the regex is provided 
via a command-line argument in that manual call.  I don't think Steve plans to 
REDoS himself :)

--
components: +Installation, Windows -Library (Lib)
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
type: security -> behavior

___
Python tracker 

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



[issue41719] Why does not range() support decimals?

2020-09-04 Thread chen-y0y0


New submission from chen-y0y0 :

# I try:
>>> range(0,5,0.5)
# I hope it will (0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5). But...
Traceback (most recent call last):
  File "", line 1, in 
range(0,5,0.5)
TypeError: 'float' object cannot be interpreted as an integer

--
components: Argument Clinic
messages: 376378
nosy: larry, prasechen
priority: normal
severity: normal
status: open
title: Why does not range() support decimals?
type: compile error
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

With PR 22089, test_sys_modules.py of msg376374 imports 152 imports rather than 
233. It's better than Python 2.7 which imports 170 modules!

--

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal, zach.ware

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

In general, it's nice to have the following 4 checks:

* multiprocessing.process._dangling
* asyncio.events._event_loop_policy
* urllib.requests._url_tempfiles
* urllib.requests._opener

The problem is that because of these checks, **any** unit test file of the 424 
Python test files import asyncio, multiprocessing and urllib. As a result, 
**any** unit test starts with around 233 imported modules. We are far from an 
"unit" test, since many modules have side effects.

I wrote PR 22089 to remove these checks. "import test.libregrtest" is reduces 
from 233 to only 149 imports (on Linux), which is way better.

--

___
Python tracker 

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



[issue41717] [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on POWER6 AIX 3.9

2020-09-04 Thread David Edelsohn


David Edelsohn  added the comment:

Bisection failed after 101 iterations and 0:20:29

--

___
Python tracker 

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



[issue41717] [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on POWER6 AIX 3.9

2020-09-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Bisection failed after 101 iterations and 0:20:29

Oh :-( Does "./python -m test test_io --fail-env-changed -v" fail?

--

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2020-09-04 Thread Georges


Change by Georges :


--
nosy: +sim0n
nosy_count: 4.0 -> 5.0
pull_requests: +21176
pull_request: https://github.com/python/cpython/pull/22090

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2020-09-04 Thread Georges


Georges  added the comment:

As I think it is still important to have this fixed and considering the 
original PR was closed, I have created a new PR based on the original one while 
implementing the requested changes.

https://github.com/python/cpython/pull/22090

--
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue41712] REDoS in purge

2020-09-04 Thread Steve Dower


Steve Dower  added the comment:

I've considered DoSing myself a few times, but then change my mind and just 
publish the release :)

A PR to change it to "(\d+\.\d+\.\d+)([a-zA-Z]+\d+)?$" would be fine, but is 
not urgent. It certainly doesn't need to be backported, as this is only ever 
used from master these days.

Personally I'd be just as happy closing the issue. I know that the current 
script works, and there's nothing worse than breaking a release because someone 
has changed the release scripts without testing them properly.

--
versions:  -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



[issue41717] [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on POWER6 AIX 3.9

2020-09-04 Thread David Edelsohn


David Edelsohn  added the comment:

It's the same system. It doesn't fail alone. Didn't we both previously see 
issues with the interaction of tests due to the other of tests, that previous 
tests left things in the environment that affected later tests?

--

___
Python tracker 

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



[issue26214] textwrap should minimize number of breaks in extra long words

2020-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The code with nested wraps is awesome. But it does not work well.

>>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", width=5, 
>>> break_long_words=False
['123', '123', '12345', '67', '12']

It is expected that '67' and '12' should be in the same line: '67 12'.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26214] textwrap should minimize number of breaks in extra long words

2020-09-04 Thread Irit Katriel


Irit Katriel  added the comment:

One more wrap: 

>>> wr(' '.join(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", 
>>> width=5, break_long_words=False, 5)
['123', '123', '12345', '67 12']

--

___
Python tracker 

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



[issue41715] REDoS in c_analyzer

2020-09-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

2020-09-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Vec2D.__rmul__() misses "return NotImplemented" and therefore implicitly 
returns None for arguments which are not int or float.

>>> import turtle
>>> print(object() * turtle.Vec2D(1, 2))
None

--
components: Library (Lib)
messages: 376389
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Missed "return NotImplemented" in Vec2D.__rmul__
type: behavior
versions: 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



[issue41282] Deprecate and remove distutils

2020-09-04 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

I noticed that a new PEP draft [1] about deprecating distutils is uploaded. The 
current version [2] proposes to deprecate distutils in 3.10 and 3.11 and remove 
distutils in 3.12.

[1] https://www.python.org/dev/peps/pep-0632/
[2] 
https://github.com/python/peps/commit/5d5c68517cf9087e104673f7f8322311e31a4e0a

--

___
Python tracker 

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



[issue41678] File-level, optionally external sorting

2020-09-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for the suggestion, but Pablo and I agree that this isn't within scope 
for the standard library.  Marking as closed.

If you want to discuss further, please post to the Python ideas list.

--
resolution:  -> rejected
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



[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

2020-09-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 81715808716198471fbca0a3db42ac408468dbc5 by Serhiy Storchaka in 
branch 'master':
bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
https://github.com/python/cpython/commit/81715808716198471fbca0a3db42ac408468dbc5


--

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64 by Serhiy Storchaka in 
branch 'master':
bpo-40486: Specify what happens if directory content change diring iteration 
(GH-22025)
https://github.com/python/cpython/commit/306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64


--

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21181
pull_request: https://github.com/python/cpython/pull/22094

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41710] Timeout is affected by jumps in system time

2020-09-04 Thread Jonas Norling


Jonas Norling  added the comment:

sys.thread_info = sys.thread_info(name='pthread', lock='semaphore', 
version='NPTL 2.31') on my system. Looking at the source I think the semaphore 
implementation will be used on all modern Linux systems.

In my tests it works as expected on a Macintosh (3.8.5 with lock='mutex+cond') 
and also if I force a Linux build to use the mutex+cond implementation by 
defining HAVE_BROKEN_POSIX_SEMAPHORES.

Doesn't look like those glibc and Linux bug reports will get any attention 
anytime soon. I will find a workaround instead :-/

--

___
Python tracker 

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



[issue26214] textwrap should minimize number of breaks in extra long words

2020-09-04 Thread Irit Katriel


Irit Katriel  added the comment:

To clarify, this solution is a linear-time greedy one, with three passes:
- the first pass puts each long word on its own line. 
- the second pass chops them up into words of at most width characters.
- the third pass wraps them, when there are no more long words.

This minimizes the number of breaks within words. It doesn't minimize the 
number of output lines (you'd need a dynamic programming programming algo for 
that - O(n^2)). So for this input:

wr("123 12 123456 1234", 5)

you will get 
['123', '12', '12345', '6', '1234']

where you may (or may not) have preferred:

['123', '12 1', '23456', '1234']

--

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +21182
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22095

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Change by Stefan Krah :


--
nosy: David.Edelsohn, skrah
priority: normal
severity: normal
status: open
title: xlc: add -qalias=noansi -qmaxmem=-1

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Change by Stefan Krah :


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

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


New submission from Stefan Krah :

At least the xlc version on AIX 7.1 has aggressive optimizations even
with -O:

 
#include 
#include 


static int
f(long *a, long long *b)
{
 int t = *a;
 *b = 0;  // cannot change *a
 return *a - t;   // can be folded to zero
}

int
main(void)
{
long a = 10;

printf("%d\n", f(&a, (long long *)&a));

return 0;
}




$ xlc -O -o alias alias.c
$ ./alias
0
$ 
$ xlc -O -qalias=noansi -o alias alias.c
$ ./alias
-10

--
components: +Build
type:  -> behavior
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

We would also need -fwrapv to be safe, but I cannot find an equivalent
option for xlc.

The Intel compiler had a similar failure to #40244 that was resolved
by -fwrapv (see #40223).

--

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

-qmaxmem=-1 is added to disable verbose remarks.

--

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 84a7917b4c9afec07575065cffa143b91fe98c14 by Stefan Krah in branch 
'master':
bpo-41721: Add xlc options (GH-22096)
https://github.com/python/cpython/commit/84a7917b4c9afec07575065cffa143b91fe98c14


--

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +21184
pull_request: https://github.com/python/cpython/pull/22097

___
Python tracker 

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



[issue41704] logging module needs some form of introspection or debugging support

2020-09-04 Thread Jack Jansen


Jack Jansen  added the comment:

@vinay, absolutely right on this being an anti-pattern:-)

And also right on the statement that I can set a breakpoint on all three of 
logging.basicConfig, logging.config.fileConfig and logging.config.dictConfig, I 
had overlooked that (was looking for a single place to put the breakpoint).

I'll close this.

--
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



[issue41627] Relocate user site packages on Windows 32-bit

2020-09-04 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue41627] Relocate user site packages on Windows 32-bit

2020-09-04 Thread Steve Dower


Steve Dower  added the comment:

> If it is otherwise possible to user-only install both 32 and 64 bit versions, 
> then using the same site-packages strikes me a bug

It's very easy to install both 32 and 64-bit runtimes (and it doesn't matter if 
they're user or system installs).

But when you're installing packages in the nt_user scheme (--user with pip), 
you can only use one or the other. If you install with 32-bit runtime first, 
then you'll get 32-bit binaries installed and the 64-bit runtime won't try and 
install the package again (or it'll delete it and replace it with one that only 
works with the 64-bit runtime).

With the change in PR 22098, the 32-bit interpreter will install to a different 
location.

--

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

The code example is for 64-bit Linux with sizeof(long) == sizeof(long long).

It also works on 32-bit xlc with int/long.

--

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset 51b84f8e96a441c498210f827c1297ee4973525f by Zackery Spytz in 
branch 'master':
bpo-38585: Remove references to defusedexpat (GH-22095)
https://github.com/python/cpython/commit/51b84f8e96a441c498210f827c1297ee4973525f


--
nosy: +miss-islington

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21186
pull_request: https://github.com/python/cpython/pull/22099

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21187
pull_request: https://github.com/python/cpython/pull/22100

___
Python tracker 

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



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset fb050d0d60f38dc9b6c30df1864020a92981be5b by Miss Islington (bot) 
in branch '3.9':
bpo-41721: Add xlc options (GH-22097)
https://github.com/python/cpython/commit/fb050d0d60f38dc9b6c30df1864020a92981be5b


--

___
Python tracker 

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



[issue35228] Index search in CHM help crashes viewer

2020-09-04 Thread Steve Dower


Steve Dower  added the comment:

So I found the "owner" of the HTML Help component in Windows (I put owner in 
quotes because this tool is _very_ maintenance mode, so nothing short of a 
critical vulnerability is going to be touched) and he helped me do some 
debugging.

In short, the index file is either corrupt, or it is not parsed correctly. I 
can reliably reproduce the crash with the following steps:

1. Open the Python docs
2. Switch to the Index tab
3. Double-click on any second-level (indented) entry
4. Modify the text in the Index search box

We haven't yet gone deep enough to be able to tell whether the help compiler is 
at fault, or the loader.

If anyone has the time and inclination, testing with older versions (if you can 
find them) of the HTML Help compiler may find a version that works. 
Unfortunately, the older copies we used to use were on the Subversion server, 
which is long gone now.

Alternatively, if anyone knows of a similar tool that we can redistribute 
easily with CPython (i.e. it's not as big as Zeal) and is significantly better 
than just using the user's default browser, I'd be interested to hear about it 
(as would the rest of the developer world, I'm sure - this is a fairly popular 
format!).

--

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset 6386e86becc2096206e16d7f5fabb5752bdd9b37 by Miss Islington (bot) 
in branch '3.9':
bpo-38585: Remove references to defusedexpat (GH-22095)
https://github.com/python/cpython/commit/6386e86becc2096206e16d7f5fabb5752bdd9b37


--

___
Python tracker 

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



[issue38585] defusedexpat not supported past python 3.3/3.4

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset 1470c9189c8b099e0be94b4d89842f5345b776ec by Miss Islington (bot) 
in branch '3.8':
bpo-38585: Remove references to defusedexpat (GH-22095)
https://github.com/python/cpython/commit/1470c9189c8b099e0be94b4d89842f5345b776ec


--

___
Python tracker 

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



[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset e52f5bc898c9a11fb1d57a42a1f9ec60b424d576 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-40486: Specify what happens if directory content change diring 
iteration (GH-22025) (GH-22094)
https://github.com/python/cpython/commit/e52f5bc898c9a11fb1d57a42a1f9ec60b424d576


--

___
Python tracker 

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



[issue41533] Bugfix: va_build_stack leaks the stack if do_mkstack fails

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset 66e9c2aee4af846ab1b77faa8a46fe3a9373d943 by Miss Islington (bot) 
in branch '3.8':
[3.8] closes bpo-41533: Fix a potential memory leak when allocating a stack 
(GH-21847) (GH-22015)
https://github.com/python/cpython/commit/66e9c2aee4af846ab1b77faa8a46fe3a9373d943


--

___
Python tracker 

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



[issue41654] Segfault when raising MemoryError

2020-09-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21188
pull_request: https://github.com/python/cpython/pull/22102

___
Python tracker 

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



  1   2   >