[issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8

2020-08-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Bisection tells me this was introduced with commit 
b1e4d1b6032d4c82b549233fa08a2c7cfe7e818b in issue26967

--
nosy: +xtreak

___
Python tracker 

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



[issue40782] AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Futrue

2020-08-13 Thread James Barrett


Change by James Barrett :


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

___
Python tracker 

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



[issue41536] pathlib's Path("NUL:").resolve() throws an error on windows

2020-08-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eryksun

___
Python tracker 

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



[issue40782] AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Future

2020-08-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: AbstactEventLoop.run_in_executor is listed as an async method, but 
should actually return a Futrue -> AbstactEventLoop.run_in_executor is listed 
as an async method, but should actually return a Future

___
Python tracker 

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



[issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8

2020-08-13 Thread Ned Deily


Change by Ned Deily :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Tony Reix


Tony Reix  added the comment:

Hi Pablo,
I'm only surprised that the maximum size generated in the test is always lower 
than the PY_SSIZE_T_MAX. And this appears both on AIX and on Linux, which both 
compute the same values.

On AIX, it appears (I've just discovered this now) that malloc() does not 
ALWAYS check that there is enough memory to allocate before starting to claim 
memory (and thus paging space). This appears when Data Segment size is 
unlimited.

On Linux/Fedora, I had no limit too. But it behaves differently and malloc() 
always checks that the size is correct.

--

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:

> The commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25 introduces a change in 
> environment. (...)

Right. It's fixed by PR 21848.

--

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Tony Reix


Tony Reix  added the comment:

Is it a 64bit AIX ? Yes, AIX is 64bit by default and only since ages, but it 
manages 32bit applications as well as 64bit applications.

The experiments were done with 64bit Python executables on both AIX and Linux.

The AIX machine has 16GB Memory and 16GB Paging Space.

The Linux Fdora32/x86_64 machine has 16GB Memory and 8269820 Paging Space 
(swapon -s).

Yes, I agree that the behavior of AIX malloc() under "ulimit -d unlimited" 
is... surprising. And the manual of malloc() does not talk about this.

Anyway, does the test:   if (size > (size_t)PY_SSIZE_T_MAX)  was aimed to 
prevent calling malloc() with such a huge size? If yes, that does not work.

--

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py [ SIGWINCH ]

2020-08-13 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

Closing because registering SIGWINCH handler from within library function is 
impractical.

--

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py [ SIGWINCH ]

2020-08-13 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


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



[issue40860] Exception in multiprocessing/context.py under load

2020-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

I agree that it would be better not to lock join, and instead manage each 
process from one thread. 

I think this ticket can be closed as a duplicate of issue40815.

--

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

We need more information.

Is this 64-bit AIX?

How much physical memory does the machine have?

Linux also has over-allocation and the default for ulimit is unlimited.
But it does not attempt to over-allocate such an outrageous amount of
memory.

Neither do FreeBSD, Windows, etc.

--
nosy: +skrah

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

Also, perhaps build Python with -bmaxdata?

https://www.enterprisedb.com/edb-docs/d/postgresql/reference/manual/11.1/installation-platform-notes.html

--

___
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-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e087f7cd43dfa4223c55a8ecd71f4a7d685178e4 by Mohamed Koubaa in 
branch 'master':
bpo-1635741: Port _winapi ext to multi-stage init (GH-21371)
https://github.com/python/cpython/commit/e087f7cd43dfa4223c55a8ecd71f4a7d685178e4


--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20984
pull_request: https://github.com/python/cpython/pull/21857

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Tony Reix


Tony Reix  added the comment:

Some more explanations.

On AIX, the memory is controlled by the ulimit command.
"Global memory" comprises the physical memory and the paging space, associated 
with the Data Segment.

By default, both Memory and Data Segment are limited:
# ulimit -a
data seg size   (kbytes, -d) 131072
max memory size (kbytes, -m) 32768
...

However, it is possible to remove the limit, like:
# ulimit -d unlimited

Now, when the "data seg size" is limited, the malloc() routine checks if enough 
memory/paging-space are available, and it immediately returns a NULL pointer.

But, when the "data seg size" is unlimited, the malloc() routine first tries to 
allocate and quickly consumes the paging space, which is much slower than 
acquiring memory since it consumes disk space. And it nearly hangs the OS. 
Thus, in that case, it does NOT check if enough memory of data segments are 
available. Bad.

So, this issue appears on AIX only if we have:
# ulimit -d unlimited

Anyway, the test:
if (size > (size_t)PY_SSIZE_T_MAX)
in:
Objects/obmalloc.c: PyMem_RawMalloc()
seems weird to me since the max of size is always lower than PY_SSIZE_T_MAX .

--
nosy:  -facundobatista, mark.dickinson, pablogsal, rhettinger, skrah

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Sanket Rathi


Change by Sanket Rathi :


--
nosy: +sanket

___
Python tracker 

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



[issue14905] zipimport needs to support namespace packages when no 'directory' entry exists

2020-08-13 Thread Phil Connell


Phil Connell  added the comment:

One version of the bug described here (and fixed in the old implementation 
under issue17633) exists in the Python implementation of zipimport:

$ unzip -l namespace1.zip
Archive:  namespace1.zip
  Length  DateTimeName
-  -- -   
0  08-13-2020 06:30   one/
0  08-13-2020 06:30   one/two/
0  08-13-2020 06:30   one/two/three.py
- ---
0 3 files
$ unzip -l namespace2.zip
Archive:  namespace2.zip
  Length  DateTimeName
-  -- -   
0  08-13-2020 06:37   alpha/beta/gamma.py
- ---
0 1 file
$ PYTHONPATH=namespace1.zip:namespace2.zip ./python
Python 3.10.0a0 (heads/master:c51db0ea40, Aug 13 2020, 06:41:20)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import one
>>> import alpha
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: No module named 'alpha'
>>>

In short, imports where there's no separate entry for directories in the zip 
file don't work.

Any opinions on whether this *is* the problem this issue is trying to track?

--

___
Python tracker 

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



[issue41537] {Save, Save As, Save Copy As} not Working from version 3.8.3

2020-08-13 Thread E. Paine


E. Paine  added the comment:

Would you mind please checking if #41373 is the problem you describe? 
(apologies about this issue, we are having relatively lots of reports about it 
but the fix won't be distributed until 3.9.0/3.8.6)

--
nosy: +epaine

___
Python tracker 

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



[issue41538] Allow customizing python interpreter in venv.EnvBuilder

2020-08-13 Thread Albert Cervin


New submission from Albert Cervin :

When creating a virtualenv using venv.EnvBuilder, it always uses 
sys._base_executable. However, in some embedded cases (Blender being one 
example), it is not set to a valid Python executable. The proposal is to add a 
keyword parameter to the EnvBuilder constructor for specifying which python 
interpreter to use, much like the -p flag in virtualenv.

--
components: Library (Lib)
messages: 375293
nosy: abbec
priority: normal
severity: normal
status: open
title: Allow customizing python interpreter in venv.EnvBuilder
type: enhancement
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



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

2020-08-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@hroncok said on Twitter it was reported at 
https://github.com/Storyyeller/enjarify/issues/17

--

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-08-13 Thread Martin


New submission from Martin :

I experience a problem with multiprocessing and print.

I tried to make a minimal working example, please see the attached file.

WITHOUT the offending print statement in the queue filler thread, everything 
works:
- pytest experiments/mp_problem.py
- pytest experiments/mp_problem.py -s
- python experiments/mp_problem.py

WITH the offending print statement, not so much:
- pytest experiments/mp_problem.py WORKS (Probably because pytest captures fd 1)
- pytest experiments/mp_problem.py -s FAILS eventually (after a couple of 
workers have been started)
- python experiments/mp_problem.py FAILS eventually (same).

WITH the offending print statement AND PYTHONUNBUFFERED=1, everything works 
again:
- pytest experiments/mp_problem.py
- pytest experiments/mp_problem.py -s
- python experiments/mp_problem.py

Environment:
Ubuntu 18.04.5 LTS
python 3.8.5 (hcff3b4d_1) on conda 4.8.3

--
files: mp_problem.py
messages: 375298
nosy: moi90
priority: normal
severity: normal
status: open
title: print blocks with multiprocessing and buffered output
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49385/mp_problem.py

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-08-13 Thread Martin


Martin  added the comment:

python experiments/mp_problem.py also fails for:
- 3.8.3, 3.8.2, 3.8.1, 3.8.0
- 3.7.7
- 3.6.10

--

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

The commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25 introduces a change in 
environment. I haven't checked the other PR though to see if this is fixed.

./python.exe -m test --fail-env-changed test_codeop -m test_warning
0:00:00 load avg: 2.30 Run tests sequentially
0:00:00 load avg: 2.30 [1/1] test_codeop
Warning -- warnings.filters was modified by test_codeop
  Before: (4331716096, [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)], [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)])
  After:  (4331716096, [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)], [('error', None, , None, 
0), ('default', None, , '__main__', 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 
0)])
test_codeop failed (env changed)

== Tests result: ENV CHANGED ==

1 test altered the execution environment:
test_codeop

Total duration: 38 ms
Tests result: ENV CHANGED


On an unrelated note the test passes with verbose mode though fail-env-changed 
flag is passed.

./python.exe -m test --fail-env-changed test_codeop -m test_warning -vvv
== CPython 3.10.0a0 (heads/master:c51db0ea40d, Aug 13 2020, 15:47:27) [Clang 
10.0.1 (clang-1001.0.46.4)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== cwd: /Users/kasingar/stuff/python/cpython/build/test_python_29945æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.53 Run tests sequentially
0:00:00 load avg: 1.53 [1/1] test_codeop
test_warning (test.test_codeop.CodeopTests) ... ok

--

Ran 1 test in 0.001s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 58 ms
Tests result: SUCCESS

--
nosy: +xtreak

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Tony Reix


New submission from Tony Reix :

Python master of 2020/08/11

Test test_maxcontext_exact_arith (test.test_decimal.CWhitebox) checks that 
Python correctly handles a case where an object of size 421052631578947376 is 
created.

maxcontext = Context(prec=C.MAX_PREC, Emin=C.MIN_EMIN, Emax=C.MAX_EMAX)

Both on Linux and AIX, we have:
Context(prec=99,
rounding=ROUND_HALF_EVEN,
Emin=-99,
 Emax=99, capitals=1, clamp=0, flags=[], 
traps=[InvalidOperation, DivisionByZero, Overflow])

The test appears in:
  Lib/test/test_decimal.py
5665 def test_maxcontext_exact_arith(self):
and the issue (on AIX) exactly appears at:
self.assertEqual(Decimal(4) / 2, 2)

The issue is due to code in: Objects/obmalloc.c :
void *
PyMem_RawMalloc(size_t size)
{
/*
 * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
 * Most python internals blindly use a signed Py_ssize_t to track
 * things without checking for overflows or negatives.
 * As size_t is unsigned, checking for size < 0 is not required.
 */
if (size > (size_t)PY_SSIZE_T_MAX)
return NULL;
return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);

Both on Fedora/x86_64 and AIX, we have:
 size:421052631578947376
 PY_SSIZE_T_MAX: 9223372036854775807
thus: size < PY_SSIZE_T_MAX and _PyMem_Raw.malloc() is called.

However, on Linux, the malloc() returns a NULL pointer in that case, and then 
Python handles this and correctly runs the test.
However, on AIX, the malloc() tries to allocate the requested memory, and the 
OS gets stucked till the Python process is killed by the OS.

Either size is too small, or PY_SSIZE_T_MAX is not correctly computed:
./Include/pyport.h :
  /* Largest positive value of type Py_ssize_t. */
  #define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))

Anyway, the following code added in PyMem_RawMalloc() before the call to 
_PyMem_Raw.malloc() , which in turns calls malloc() :
if (size == 421052631578947376)
{
printf("TONY: 421052631578947376: --> PY_SSIZE_T_MAX: %ld \n", 
PY_SSIZE_T_MAX);
return NULL;
}
does fix the issue on AIX.
However, it is simply a way to show where the issue can be fixed.
Another solution (fix size < PY_SSIZE_T_MAX) is needed.

--
components: C API
messages: 375302
nosy: T.Rex
priority: normal
severity: normal
status: open
title: Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX
type: crash
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



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

2020-08-13 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +20983
pull_request: https://github.com/python/cpython/pull/21856

___
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-08-13 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +20982
pull_request: https://github.com/python/cpython/pull/21855

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Could be a duplicate/related to the problem described in 
https://bugs.python.org/issue39576

--
nosy: +pablogsal

___
Python tracker 

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



[issue24783] Import Error (undefined symbol: PyFloat_Type) when Importing math Module on Shared Build

2020-08-13 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

Try putting a lock on the print statement. See this: 
https://stackoverflow.com/questions/40356200/python-printing-in-multiple-threads/

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41538] Allow customizing python interpreter in venv.EnvBuilder

2020-08-13 Thread Albert Cervin


Change by Albert Cervin :


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

___
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-08-13 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset c51db0ea40ddabaf5f771ea633b37fcf4c90a495 by Pablo Galindo in 
branch 'master':
bpo-41531: Fix compilation of dict literals with more than 0x elements 
(GH-21850)
https://github.com/python/cpython/commit/c51db0ea40ddabaf5f771ea633b37fcf4c90a495


--

___
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-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 9.0 -> 10.0
pull_requests: +20980
pull_request: https://github.com/python/cpython/pull/21853

___
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-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

@hroncok,

How did you discover this issue?

I'd like to clean up the code for creating dictionary literals and it might be 
helpful to know where such huge dictionary literals exist.
I'm guessing that they are used as lookup tables for things like Unicode 
code-point tables, and that they would only include constants.

--

___
Python tracker 

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



[issue41538] Allow customizing python interpreter in venv.EnvBuilder

2020-08-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip
versions:  -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, I do not understand why you conclude that the problem is in 
PyMem_RawMalloc. That code seems correct. Could you provide evidence that the 
value of PY_SSIZE_T_MAX is miscalculated in AIX? Alternatively, could you 
elaborate on what makes you believe that the problem is in PyMem_RawMalloc?

--

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +facundobatista, mark.dickinson, rhettinger

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +skrah

___
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-08-13 Thread STINNER Victor


STINNER Victor  added the comment:

> About https://bugs.python.org/issue40275#msg369214, shall we continue to 
> improve the libregretest?

If someone wants to continue the effort in libregrtest, I suggest to open a new 
issue. This one already has a long list of commits and messages about 
test.support.

See test.libregrtest.runtest_mp module for the "multiprocessing" implementation 
which uses subprocess. It's used when you run tests using -jN option. Almost 
all buildbots use -jN: see make buildbottest.

--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20985
pull_request: https://github.com/python/cpython/pull/21858

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 43577c01a2ab49122db696e9eaec6cb31d11cc81 by Victor Stinner in 
branch 'master':
bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)
https://github.com/python/cpython/commit/43577c01a2ab49122db696e9eaec6cb31d11cc81


--

___
Python tracker 

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



[issue41521] Replace whitelist/blacklist with allowlist/denylist

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 20ae565bd2d79425d5567c001ed8f89848d7d907 by Victor Stinner in 
branch 'master':
bpo-41521: Replace denylist with blocklist is http.cookiejar doc (GH-21826)
https://github.com/python/cpython/commit/20ae565bd2d79425d5567c001ed8f89848d7d907


--

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20989
pull_request: https://github.com/python/cpython/pull/21862

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

The test (size > (size_t)PY_SSIZE_T_MAX)) has nothing to do with it. Within 
Python, most sizes are ssize_t, so a value larger than SSIZE_MAX is suspicious.


AIX is an unsupported platform.

Realistically, if people want AIX to be supported, someone has to give core 
devs full ssh access to an AIX system.

Perhaps I'll just skip this test on AIX.

--
components: +Extension Modules -C API
nosy: +David.Edelsohn
priority: normal -> low
type: crash -> behavior

___
Python tracker 

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



[issue41537] {Save, Save As, Save Copy As} not Working from version 3.8.3

2020-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A copy of what I wrote elsewhere.

There are two possible reasons in 3.8.4 and 3.9.0b4 - non-ascii
characters and files created outside of IDLE.  Non-ascii chars was fixed
in 3.8.5 and 3.9.0b5.  Files created outside of IDLE work in 3.8.6, due
in September and 3.9.0rc1, released today.  If you do not need 3rd party
modules, use the latter.  If you do, create new files within IDLE with
File=> New.

--

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 46d10b1237c67ff8347f533eda6a5468d098f7eb by Victor Stinner in 
branch 'master':
bpo-40204: Fix duplicates in the documentation (GH-21857)
https://github.com/python/cpython/commit/46d10b1237c67ff8347f533eda6a5468d098f7eb


--

___
Python tracker 

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



[issue40994] Very confusing documenation for abc.Collections

2020-08-13 Thread Irit Katriel


Irit Katriel  added the comment:

Sydney, is the issue related to how Jupyter notebook displays the documentation?

--

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset f24430f1542ea2768793b48704ae2d4e241892ae by Terry Jan Reedy in 
branch '3.9':
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/f24430f1542ea2768793b48704ae2d4e241892ae


--

___
Python tracker 

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



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread David Edelsohn


David Edelsohn  added the comment:

Core developers have full access to AIX system for the asking.  Back to you, 
Stefan.

--

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset c818b15fa59039de67022c29085d439fa5d3ef95 by Terry Jan Reedy in 
> branch 'master':
> bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/c818b15fa59039de67022c29085d439fa5d3ef95

I confirm that this change fixed the "test altered the execution environment" 
issue.

--

___
Python tracker 

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



[issue40994] Very confusing documenation for abc.Collections

2020-08-13 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

English is my second language and I am familiar with the expression 
“respectively” since it is used very often in high school mathematics.

--
nosy: +thatiparthy

___
Python tracker 

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



[issue41541] Make pty.spawn set window size

2020-08-13 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
title: Make pty.spawn set window size, make code more readable -> Make 
pty.spawn set window size

___
Python tracker 

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



[issue41541] Make pty.spawn set window size

2020-08-13 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
pull_requests: +20988
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21861

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20986
pull_request: https://github.com/python/cpython/pull/21859

___
Python tracker 

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



[issue41537] {Save, Save As, Save Copy As} not Working from version 3.8.3

2020-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The first save fix is in 3.8.5. The second fix is in 3.9.0rc1, released 2 days 
ago.  In the absence of specific information otherwise, I am assuming that this 
is a duplicate of one of the two no-save causes.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE: edit/save files created by Windows Explorer

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c818b15fa59039de67022c29085d439fa5d3ef95 by Terry Jan Reedy in 
branch 'master':
bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/c818b15fa59039de67022c29085d439fa5d3ef95


--

___
Python tracker 

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



[issue41541] Make pty.spawn set window size, make code more readable

2020-08-13 Thread Soumendra Ganguly


New submission from Soumendra Ganguly :

The example in https://docs.python.org/3/library/pty.html that mimics script(1) 
can be used to reproduce the problem: since window size is not set by 
pty.spawn, output of "ls" becomes scattered and hard to visually parse if xterm 
window is not in fullscreen mode.

To fix the above issue, this patch makes pty.spawn set window size ( TIOCSWINSZ 
). Also, this patch makes the code of pty.fork() more readable by defining 
_login_pty(); the latter is reused in spawn().

--
components: Library (Lib)
files: pty.diff
keywords: patch
messages: 375326
nosy: soumendra
priority: normal
severity: normal
status: open
title: Make pty.spawn set window size, make code more readable
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49386/pty.diff

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset a3416c13b51af25675e175d4ffe07d8b925e7dbf by Miss Islington (bot) 
in branch '3.8':
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/a3416c13b51af25675e175d4ffe07d8b925e7dbf


--

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-13 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

Adding __init__() to PurePath complicates things and doesn't provide any 
benefit.  A subclass that calls super.__init__() ends up invoking 
object.__init__(), which is perfectly fine.

I was able to find a solution by calling type(self)() instead of 
object.__new__() in most cases.  I am working on a PR.

--

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 0eb9deb4a62e6d9daa82bc2f67d1075864ca8ece by Srinivas Reddy 
Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) in branch 'master':
bpo-41066: Update the comparison section for os vs pathlib (GH-21261)
https://github.com/python/cpython/commit/0eb9deb4a62e6d9daa82bc2f67d1075864ca8ece


--

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 474652fe9346382dbf793f20b671eb74668bebde by Victor Stinner in 
branch 'master':
bpo-40204, doc: Fix syntax of C variables (GH-21846)
https://github.com/python/cpython/commit/474652fe9346382dbf793f20b671eb74668bebde


--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20992
pull_request: https://github.com/python/cpython/pull/21865

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread Steve Dower


Steve Dower  added the comment:

So it'll take a bit more rearranging to get everything to fit - I've attached 
one proposal that shuffles the thanks to Mark Hammond down below the "enable 
long path names" button. (It's grey text in the screenshot, but I've switched 
it to black already.)

Alternatively, we could drop that note completely. It's entirely possible that 
Mark feels he's been thanked enough, and is now just embarrassed that we keep 
it around :) There are certainly enough other people with significant 
contributions on Windows who also deserve thanks.

One final option would be to move the "fix long paths" button to earlier in the 
install, though I'm not doing that during RC. The reason it's not part of the 
regular install is because it always requires Admin, and while it would be 
great to have it enabled by default, we already have enough people getting 
confused about whether admin is required to install or not (it's not, but you 
have to change the default launcher option on the front page).

Anyone have any thoughts?

--
nosy: +mhammond
Added file: https://bugs.python.org/file49387/NewInstallSuccessPage.png

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread Tianrui Luo

New submission from Tianrui Luo :

Fairly easy to reproduce.

`__all__` in a module seems unable to track name with `φ`.
The following minimal reproducing example also fails for function name of `aφ` 
or `φb`.

```python3
Python 3.7.7 (default, May  7 2020, 21:25:33)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tmp import *
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'tmp' has no attribute 'ϕ'
```

The `tmp.py` file.
```python
# tmp.py

__all__ = ['ϕ']


def ϕ():
print('"__all__" doesn\'t like me')
return
```

--
components: Unicode
messages: 375330
nosy: ezio.melotti, tianrluo, vstinner
priority: normal
severity: normal
status: open
title: module `__all__` cannot detect function name with `φ`
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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-13 Thread Louis-Vincent Boudreault

Louis-Vincent Boudreault  added the comment:

This is not true, because the classmethod used the library shortcuts the
class mro order, this is to prevent infinite loop inthe __new__. However,
If it was using __init__ before hand, we would
Not have this issue

Le jeu. 13 août 2020 à 15:31, Louis-Vincent Boudreault <
lv.boudreaul...@gmail.com> a écrit :

> This is not true, because the classmethod use the library shortcuts the
> class mro order, to prevent infinite loop inthe __new__. However, it was
> using __init__ before hand, we would
> Not have this issue
>
>
> Le jeu. 13 août 2020 à 15:27, Jeffrey Kintscher 
> a écrit :
>
>>
>> Jeffrey Kintscher  added the comment:
>>
>> Adding __init__() to PurePath complicates things and doesn't provide any
>> benefit.  A subclass that calls super.__init__() ends up invoking
>> object.__init__(), which is perfectly fine.
>>
>> I was able to find a solution by calling type(self)() instead of
>> object.__new__() in most cases.  I am working on a PR.
>>
>> --
>>
>> ___
>> Python tracker 
>> 
>> ___
>>
>

--

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +20991
pull_request: https://github.com/python/cpython/pull/21864

___
Python tracker 

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



[issue40994] Very confusing documenation for abc.Collections

2020-08-13 Thread Sydney Pemberton


Sydney Pemberton  added the comment:

Nothing to do with Jupyter itself.
When I'm reading the documentation I don't necessarily think that a sibling
"node" in the document structure is going to have anything to do with my
current section.
So it was weird to see the section entirely empty.

Also, I'm not saying that all non-native speakers are going to be
unfamiliar with the construction, but it is certainly more widely
understandable if the definitions are kept separate.

On Thu, Aug 13, 2020 at 12:54 PM Irit Katriel 
wrote:

>
> Irit Katriel  added the comment:
>
> Sydney, is the issue related to how Jupyter notebook displays the
> documentation?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

-- 

Sydney Pemberton

Software Engineer

512.740.6591

spember...@auntbertha.com
Aunt Bertha  | The Social Care Network

--

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread Mark Hammond


Mark Hammond  added the comment:

Yes, while I appreciate the gesture, I am somewhat embarrassed these days - as 
you say, many others deserve this more than me these days.

So please remove it.

--

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset 3dd1153b9963cc7fc74ba2fa5bf2be46f154c613 by Miss Islington (bot) 
in branch '3.9':
bpo-41066: Update the comparison section for os vs pathlib (GH-21261)
https://github.com/python/cpython/commit/3dd1153b9963cc7fc74ba2fa5bf2be46f154c613


--

___
Python tracker 

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset 43b3e4c32976bf069241ad8bb174929a816ee7ba by Antoine Pitrou in 
branch '3.8':
[3.8] bpo-41066: Update the comparison section for os vs pathlib (GH-21261) 
(GH-21864)
https://github.com/python/cpython/commit/43b3e4c32976bf069241ad8bb174929a816ee7ba


--

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread Seth Woodworth


Seth Woodworth  added the comment:

I don't think it is worth throwing a warning.  This might be the desired, or at 
least allowed, behavior.  I'm relying on the behavior in a toy library I'm 
working on.

--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:

With PR 21865, there are only two remaining warnings:

Doc/library/string.rst:311: WARNING: duplicate token description of 
sf:format_spec, other instance in library/string
Doc/reference/introduction.rst:96: WARNING: duplicate token description of 
*:name, other instance in reference/expressions

See bpo-35293 for RemovedInSphinx40Warning (which are already prevent with 
Sphinx 2).

--

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Lukasz, please cherry-pick the 3.9 commits for this issue
90eff4ed4445a0fa9d8cdf74c0f86c50ed510dad
f24430f1542ea2768793b48704ae2d4e241892ae
into 3.9.0rc2 before release.
They fix a regression introduced by a bug fix last June.

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



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-08-13 Thread Tom Gringauz


Change by Tom Gringauz :


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

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread Seth Woodworth

Seth Woodworth  added the comment:

As described in PEP3131, unicode identifiers are normalized via NFKC before 
being added to the globals, and presumably __all__ as in your example.

You can see what python _did_ add via unicodedata.normalize('NFKC', 'ϕ') which 
returns 'φ'


[ins] In [8]: bytes('φ', 'utf8')

Out[8]: b'\xcf\x86'

[ins] In [9]: bytes('ϕ', 'utf8')

Out[9]: b'\xcf\x95'

The normalized version of Phi, I _can_ add to my globals: 
globals()['φ'] = 'foo'

--
nosy: +sethwoodworth

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-13 Thread Louis-Vincent Boudreault

Louis-Vincent Boudreault  added the comment:

This is not true, because the classmethod use the library shortcuts the
class mro order, to prevent infinite loop inthe __new__. However, it was
using __init__ before hand, we would
Not have this issue

Le jeu. 13 août 2020 à 15:27, Jeffrey Kintscher  a
écrit :

>
> Jeffrey Kintscher  added the comment:
>
> Adding __init__() to PurePath complicates things and doesn't provide any
> benefit.  A subclass that calls super.__init__() ends up invoking
> object.__init__(), which is perfectly fine.
>
> I was able to find a solution by calling type(self)() instead of
> object.__new__() in most cases.  I am working on a PR.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-08-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d3ded080482beae578faa704b13534a62d066f9f by Victor Stinner in 
branch 'master':
bpo-40204: Add :noindex: in the documentation (GH-21859)
https://github.com/python/cpython/commit/d3ded080482beae578faa704b13534a62d066f9f


--

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread Tianrui Luo


Tianrui Luo  added the comment:

Thanks!

I am closing this bug.

I wonder if it worth prompting warnings when unnormalized unicode characters 
are used.

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



[issue41536] pathlib's Path("NUL:").resolve() throws an error on windows

2020-08-13 Thread Steve Dower


Steve Dower  added the comment:

The trailing colon is unnecessary, and likely to cause more issues, but the 
same thing occurs for Path('NUL').resolve()

This is probably best handled as issue37517, where you'll find more background 
on the error messages.

But I believe that p.resolve(strict=True) should not raise when open(p) will 
succeed, and p.resolve(strict=False) should not raise when open(p)  will 
succeed or raise a *NotFoundError subclass of OSError.

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-08-13 Thread Tom Gringauz


New submission from Tom Gringauz :

`contextlib.nullcontext` cannot be used with async conetext managers, because 
it implements only `__enter__` and `__exit__`, and doesn't implement 
`__aenter__` and `__aexit__`.

--
components: Library (Lib), asyncio
messages: 375346
nosy: asvetlov, tomgrin10, yselivanov
priority: normal
severity: normal
status: open
title: contextlib.nullcontext doesn't work with async context managers
type: enhancement

___
Python tracker 

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



[issue41544] multiprocessing.dummy.Process lacks daemon parameter

2020-08-13 Thread Martin


Change by Martin :


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

___
Python tracker 

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



[issue41544] multiprocessing.dummy.Process lacks daemon parameter

2020-08-13 Thread Martin


New submission from Martin :

Although multiprocessing.Process has a `daemon` parameter, 
multiprocessing.dummy.Process doesn't.

As multiprocessing.dummy is meant to replicate the API of multiprocessing and 
the daemon parameter is readily available in threading.Thread, it should also 
be available in multiprocessing.dummy.Process.

--
messages: 375347
nosy: moi90
priority: normal
severity: normal
status: open
title: multiprocessing.dummy.Process lacks daemon parameter

___
Python tracker 

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



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-08-13 Thread Yury Selivanov


Yury Selivanov  added the comment:

I typically don't like objects that support both `with` and `async with`, but 
in this case I think that's appropriate. Nathaniel, Andrew, what do you think?

--
nosy: +njs

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +20997
pull_request: https://github.com/python/cpython/pull/21872

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6444ca946984c638c67a72aac22fd6d3cc650c16 by Steve Dower in branch 
'master':
bpo-41526: Fixed layout of final page of the installer (GH-21871)
https://github.com/python/cpython/commit/6444ca946984c638c67a72aac22fd6d3cc650c16


--

___
Python tracker 

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



[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-13 Thread Yonatan Goldschmidt


New submission from Yonatan Goldschmidt :

I have a construct in my code where I wrap a function's logic with 
`gc.disable()` to prevent GC from triggering some race condition.

Today this construct got a bit more complicated, and another function had to 
use this "trick". Now there are 2 flows:

foo():
gc.disable()

gc.enable()

bar()

gc.disable()
...
# bar calls foo, which also messes with the gc
foo()
gc.disable()
...
gc.enable()
...
gc.enable()
...

I'd expected the GC to be truly enabled only on the second call to `enable()`, 
but apparently it's enabled on the first call :( Both `gc.enable()` and 
`gc.disable()` just write `1`/`0` to `gcstate->enabled`, respectively.

For the meantime I wrote a simple wrapper class to do this counting (finally 
calling `enable()` only when necessary).

Another option is for the code to check first "is GC enabled?" before 
disabling, and before enabling again, remember whether it really disabled it or 
not.

But I think those manual workarounds are more error prone, and it's easier to 
forget to use it them in all sites (compared to using the "right" API from the 
standard module), so I was considering if we can add an API that encapsulate 
this counting: an enable-disable pair that makes sure GC is only enabled back 
when the number of "enable" calls matches the number of "disable" calls.

--
components: Interpreter Core
messages: 375355
nosy: Yonatan Goldschmidt
priority: normal
severity: normal
status: open
title: gc API requiring matching number of gc.disable - gc.enable calls
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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread miss-islington


miss-islington  added the comment:


New changeset 75c2281762932c4e5f0bd7deae40ef014f704de2 by Miss Islington (bot) 
in branch '3.9':
bpo-41526: Fixed layout of final page of the installer (GH-21871)
https://github.com/python/cpython/commit/75c2281762932c4e5f0bd7deae40ef014f704de2


--

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-08-13 Thread Martin


Martin  added the comment:

While I appreciate your suggestion, it does not help me much.
The problem that people usually have is that the output is scrambled. That is 
not the problem I'm dealing with.

I'm experiencing a deadlock caused by the print statement which seems like a 
python bug to me.

Furthermore, the problem appears in a library that is supposed to be used by 
other people and I have no control over their use of IO.

The particular behavior seems to be specific to using threading and 
multiprocessing together:
- If I use multiprocessing.dummy (multiprocessing API implemented with threads; 
so only a single processes are involved), my example works fine.
- If I use a process instead of a thread to fill the queue (filler = 
multiprocessing.Process(...); so no threads are involved), my example also 
works fine.
- Only if I have two threads in the main process and additional processes, the 
example fails.

--

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Mark. We shall not hold you solely responsible for the port any longer 
;)

--

___
Python tracker 

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



[issue41542] module `__all__` cannot detect function name with `φ`

2020-08-13 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi Seth,

Surely you aren't relying on the behaviour that names in `__all__` *aren't* 
normalised but others are?

Rather than a warning, I think the right solution here is to normalise the 
names in `__all__`.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41526] Python 3.9.0rc1 "setup successful" dialog box overflow

2020-08-13 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue41543] contextlib.nullcontext doesn't work with async context managers

2020-08-13 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

It does seem pretty harmless in this case.

--

___
Python tracker 

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



[issue41546] pprint() gives exception when ran from pythonw

2020-08-13 Thread Luiz


New submission from Luiz :

If you use the pprint function when running on windowed mode (either by using 
the .pyw extension or running the file with pythonw) a "AttributeError" 
exception occurs, saying that "'NoneType' object has no attribute 'write'".

Looking at the source code (Lib/pprint.py), it happens because in this mode 
sys.stdout is set to None, therefore it has no write attribute.

I think intended behavior is to simply ignore any console output when in this 
mode, since many programs have loads of print statements for debugging with a 
console window; it shouldn't crash because of a extension change.

There's two solutions I can think of. One is to check if sys.stdout is None, 
not printing anything in case it is. Another is, when in windowed mode, setting 
sys.stdout to some dummy null file. This has the advantage of automatically 
fixing this in other parts of Python where this error might also occur.

This error is particularly hard to find, since in windowed mode there's no 
console to show the exception - it simply closes. In the attached file, where I 
showcase the error, I have to log to a file to see the problem.

I'm not sure how can this be unnoticed for so much time, it can't possibly be 
intended, or maybe it is and it's print() that actually has a problem, lol.

--
components: Library (Lib)
files: pprint_error_showcase.py
messages: 375358
nosy: luizeldorado
priority: normal
severity: normal
status: open
title: pprint() gives exception when ran from pythonw
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49388/pprint_error_showcase.py

___
Python tracker 

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



[issue41541] Make pty.spawn set window size

2020-08-13 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

OS: Linux 4.19.0-9-amd64 Debian 10 GNU/Linux

--

___
Python tracker 

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



  1   2   >