[issue41723] doc: issue in a sentence in py_compile

2020-09-04 Thread Sean Chao


New submission from Sean Chao :

I think in 
https://docs.python.org/3.10/library/py_compile.html#py_compile.compile
the sentence:
> If dfile is specified, it is used as the name of the source file in error 
> messages when instead of file.
should not have the 'when'.

--
assignee: docs@python
components: Documentation
messages: 376424
nosy: SeanChao, docs@python
priority: normal
severity: normal
status: open
title: doc: issue in a sentence in py_compile
type: enhancement
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



[issue41722] multiprocess error on large dataset

2020-09-04 Thread vishal rao


Change by vishal rao :


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



[issue39883] Use BSD0 license for code in docs

2020-09-04 Thread Todd Jennings


Todd Jennings  added the comment:

The pull request is

https://github.com/python/python-docs-theme/pull/36

It doesn't seem to went let me add it to linked pull requests.

--

___
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 Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, the usual approach to the OP's problem is:

>>> [x*0.5 for x in range(10)]
[0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5]

This technique generalizes to other sequences as well:

>>> [x**2 for x in range(10)]
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

As Steven points out, numeric work typically requires something different and a 
bit more sophisticated.  The numpy package may be your best bet for this kind 
of work.

--
nosy: +rhettinger

___
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 Steven D'Aprano


Steven D'Aprano  added the comment:

Generating a range of equally-spaced floats is tricky and the range builtin is 
not the right solution for this.

For numerical work, we often need to specify the number of steps, not the step 
size. For instance, in numeric integration, we often like to double the number 
of steps and avoid re-calculation.

We often need to skip either the start or end point, or both, or neither.

If you specify the step size, as range does, you can have off-by-one errors due 
to float rounding.

See here for a discussion and possible solution:

https://code.activestate.com/recipes/577878

--
nosy: +steven.daprano

___
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 Terry J. Reedy


Terry J. Reedy  added the comment:

On Windows with current master, the baseline for running anything with 1 import 
(">>>  import sys; len(sys.modules)") is 35 imported modules.  Adding "import 
unittest" increases this to 80.  What slightly puzzles me is that running 
---
import unittest
import sys

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

if __name__ == "__main__":
unittest.main()
---
increases the number to 90.  Perhaps unittest has delayed imports.

The current startup number for IDLE is 162, which can result in a cold startup 
of several seconds.  I am thinking of trying to reduce this by delaying imports 
of modules that are not immediately used and might never be used.

For tests, I gather that side-effect issues are more important than startup 
time.

--
nosy: +terry.reedy

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

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

To clarify this, I meant the 32-bit interpreter will install *packages* to a 
different location (when using the user scheme).

--
assignee:  -> steve.dower
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



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

2020-09-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset dd18001c308fb3bb65006c91d95f6639583a3420 by Steve Dower in branch 
'master':
bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098)
https://github.com/python/cpython/commit/dd18001c308fb3bb65006c91d95f6639583a3420


--

___
Python tracker 

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



[issue41218] PyCF_ALLOW_TOP_LEVEL_AWAIT + list comprehension set .CO_COROUTINE falg.

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21193
pull_request: https://github.com/python/cpython/pull/22109

___
Python tracker 

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



[issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter

2020-09-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



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

2020-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The original title was "Why does not range() support decimals?".  In general, 
such questions should be directed to question forums, such as 
https://mail.python.org/mailman/listinfo/python-list or stackoverflow.com.

This question has been answered on both, with alternatives, in particular on
https://stackoverflow.com/questions/477486/how-to-use-a-decimal-range-step-value
https://stackoverflow.com/questions/12403411/range-with-float-step-argument
and other duplicates.

I am leaving this open to add this frequent question to our FAQ, in particular 
at
https://docs.python.org/3/faq/programming.html#sequences-tuples-lists
with 'range' added.

This answer should include how to use range to get what people generally want.

--
assignee:  -> docs@python
components: +Documentation -Argument Clinic
nosy: +docs@python, terry.reedy
stage:  -> needs patch
type: compile error -> 
versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter

2020-09-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d64d78be20ced6ac9de58e91e69eaba184e36e9b by Miss Islington (bot) 
in branch '3.9':
bpo-41531: Fix compilation of dict literals with more than 0x elements 
(GH-21850) (GH-22107)
https://github.com/python/cpython/commit/d64d78be20ced6ac9de58e91e69eaba184e36e9b


--

___
Python tracker 

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



[issue41722] multiprocess error on large dataset

2020-09-04 Thread vishal rao


New submission from vishal rao :

I am processing a large pandas dataframe using pathos framework which 
internally uses Python multiprocess package. I get the following error when i 
run the code with a large dataset. The issue doesn't occur on smaller datasets.
/opt/conda/lib/python3.7/site-packages/pathos/multiprocessing.py in map(self, 
f, *args, **kwds)
135 AbstractWorkerPool._AbstractWorkerPool__map(self, f, *args, 
**kwds)
136 _pool = self._serve()
--> 137 return _pool.map(star(f), zip(*args)) # chunksize
138 map.__doc__ = AbstractWorkerPool.map.__doc__
139 def imap(self, f, *args, **kwds):

/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in map(self, func, 
iterable, chunksize)
266 in a list that is returned.
267 '''
--> 268 return self._map_async(func, iterable, mapstar, chunksize).get()
269 
270 def starmap(self, func, iterable, chunksize=None):

/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, 
timeout)
655 return self._value
656 else:
--> 657 raise self._value
658 
659 def _set(self, i, obj):

/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in 
_handle_tasks(taskqueue, put, outqueue, pool, cache)
429 break
430 try:
--> 431 put(task)
432 except Exception as e:
433 job, idx = task[:2]

/opt/conda/lib/python3.7/site-packages/multiprocess/connection.py in send(self, 
obj)
207 self._check_closed()
208 self._check_writable()
--> 209 self._send_bytes(_ForkingPickler.dumps(obj))
210 
211 def recv_bytes(self, maxlength=None):

/opt/conda/lib/python3.7/site-packages/multiprocess/connection.py in 
_send_bytes(self, buf)
394 n = len(buf)
395 # For wire compatibility with 3.2 and lower
--> 396 header = struct.pack("!i", n)
397 if n > 16384:
398 # The payload is large so Nagle's algorithm won't be 
triggered

error: 'i' format requires -2147483648 <= number <= 2147483647

I ran the code in debug mode, and saw that the value of n was 3140852627.

--
components: Library (Lib)
messages: 376415
nosy: vishalraoanizer
priority: normal
severity: normal
status: open
title: multiprocess error on large dataset
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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset e92219d8f864a1a8eb381d98d5df4f1aa767dacb by Miss Islington (bot) 
in branch '3.9':
bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)
https://github.com/python/cpython/commit/e92219d8f864a1a8eb381d98d5df4f1aa767dacb


--

___
Python tracker 

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



[issue41687] sendfile implementation is not compatible with Solaris

2020-09-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue41671] inspect.getdoc/.cleandoc doesn't always remove trailing blank lines

2020-09-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +yselivanov
stage:  -> needs patch
versions: +Python 3.10 -Python 3.7

___
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 106c1df736d38f5b411a8571b97275d0ecf1d0a9 by Miss Islington (bot) 
in branch '3.9':
closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847)
https://github.com/python/cpython/commit/106c1df736d38f5b411a8571b97275d0ecf1d0a9


--

___
Python tracker 

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



[issue41663] Support Windows pseudoterminals in pty and termios modules

2020-09-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Library (Lib)
stage:  -> test needed
type:  -> enhancement
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



[issue41659] PEG discrepancy on 'if {x} {a}: pass'

2020-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Minimal example
>>> a{ # or
>>> a {
In 3.8, this is immediately flagged as a SyntaxError.  In 3.9 and master, a 
continuation prompt is issued.  This strikes me as a parsing buglet that should 
preferably be fixed, as it implies that something valid *could* follow '{', 
thus misleading beginners.  On the other hand, after scanning my keyboard, '{' 
seems unique in being a legal symbol, unlike `, $, and ?, or combinations like 
+*, that can AFAIK never follow a name.  So it would need special handling.


Side note: for the same reason I dislike the { change, I like the generic 3.9 
change for legal operators without a second operand. 
>>> a *
Both flag as SyntaxError, but in 3.8, the caret is under '*', falsely implying 
that '*' cannot follow a name, while in 3.9, it is under the whitespace 
following, correct implying that the * is legal and that the problem is lack of 
a second expression (on the same line without continuation).

--
nosy: +terry.reedy

___
Python tracker 

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



[issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21192
pull_request: https://github.com/python/cpython/pull/22107

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21191
pull_request: https://github.com/python/cpython/pull/22106

___
Python tracker 

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



[issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21190
pull_request: https://github.com/python/cpython/pull/22105

___
Python tracker 

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



[issue38787] PEP 573: Module State Access from C Extension Methods

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset fbb9ee0a903fb9b7b4b807f85aed1de754da09e6 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-38787: Clarify docs for PyType_GetModule and warn against common 
mistake (GH-20215) (GH-21984)
https://github.com/python/cpython/commit/fbb9ee0a903fb9b7b4b807f85aed1de754da09e6


--

___
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 bd078df28322f840afd363b6ba097b5506ea5098 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-40486: Specify what happens if directory content change diring 
iteration (GH-22025) (GH-22093)
https://github.com/python/cpython/commit/bd078df28322f840afd363b6ba097b5506ea5098


--

___
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


Change by miss-islington :


--
pull_requests: +21189
pull_request: https://github.com/python/cpython/pull/22103

___
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



[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



[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



[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



[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



[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



[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



[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



[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


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



[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



[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



[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



[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



[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



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

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


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(, (long long *)));

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


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


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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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


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



[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



[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



[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



[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


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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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


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



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



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



  1   2   >