[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2021-05-21 Thread Lucas Cimon


Change by Lucas Cimon :


--
nosy: +Lucas Cimon
nosy_count: 7.0 -> 8.0
pull_requests: +24884
pull_request: https://github.com/python/cpython/pull/26278

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon


Lucas Cimon  added the comment:

Sorry, the fix was by Mathias Ettinger:

elif isinstance(argument, _SubParsersAction):
return '{%s}' % ','.join(map(str, argument.choices))

I submitted a PR with this patch and a corresponding unit test:
https://github.com/python/cpython/pull/26278

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon


Lucas Cimon  added the comment:

Reporting a duplicate / superseder with the following bug:

parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(required=True)
subparsers.add_parser('foo')
parser.parse_args()

Raising:

TypeError: sequence item 0: expected str instance, NoneType found

It has already been reported in https://bugs.python.org/issue29298
with an interesting solution by Greg Minshall.

--
nosy: +Lucas Cimon

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Crash related to AST in interpreter_clear() remains me bpo-41796.

Well remembered, Victor!

Bisecting using Pablo's reproducer:
fd957c124c1d9c5eaf61f7af8cf266bafcb1 is the first bad commit
commit fd957c124c1d9c5eaf61f7af8cf266bafcb1
Author: Victor Stinner 
Date:   Tue Nov 3 18:07:15 2020 +0100

bpo-41796: Call _PyAST_Fini() earlier to fix a leak (GH-23131)

--

___
Python tracker 

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



[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x

2021-05-21 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 Arch Linux Asan 3.x:
https://buildbot.python.org/all/#/builders/582/builds/157

See also:

* bpo-37224: [subinterpreters] test__xxsubinterpreters fails randomly 
* bpo-44100: test__xxsubinterpreters: test_one() fails in AMD64 Fedora Stable 
3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame" 

0:37:59 load avg: 1.07 Re-running test__xxsubinterpreters in verbose mode
(...)
test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ... ok
test_main (test.test__xxsubinterpreters.DestroyTests) ... ok
test_one (test.test__xxsubinterpreters.DestroyTests) ... ok
=
==16132==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x608000783694 at pc 0x7f20abecb577 bp 0x7fff392627b0 sp 0x7fff392627a0
READ of size 1 at 0x608000783694 thread T0
#0 0x7f20abecb576 in _PyFrame_IsExecuting Include/cpython/frameobject.h:53
#1 0x7f20abecb576 in _is_running 
/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:1842
#2 0x7f20abecb576 in interp_is_running 
/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2255
#3 0x55a7ff1daa4f in cfunction_call Objects/methodobject.c:539
(...)
#194 0x55a7fed361f4 in Py_BytesMain Modules/main.c:720

0x608000783694 is located 12 bytes to the left of 96-byte region 
[0x6080007836a0,0x608000783700)
allocated by thread T0 here:
#0 0x7f20b27b2459 in __interceptor_malloc 
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x55a7ff035572 in _PyObject_GC_Alloc Modules/gcmodule.c:2250
(...)
#8 0x55a7ff24eedd in builtin___build_class__ Python/bltinmodule.c:225
(...)
#17 0x55a7fef8dd90 in exec_code_in_module Python/import.c:771
(...)
#20 0x55a7fefc33f6 in init_importlib Python/pylifecycle.c:141
#21 0x55a7fefc33f6 in pycore_interp_init Python/pylifecycle.c:811
#22 0x55a7fefccf03 in new_interpreter Python/pylifecycle.c:1916
#23 0x55a7fefccf03 in _Py_NewInterpreter Python/pylifecycle.c:1946
#24 0x7f20abec613c in interp_create 
/buildbot/buildarea/3.x.pablogsal-arch-x86_64.asan/build/Modules/_xxsubinterpretersmodule.c:2022
(...)

(...)
make: *** [Makefile:1255: buildbottest] Error 1

--
components: Tests
messages: 394103
nosy: eric.snow, nanjekyejoannah, vstinner
priority: normal
severity: normal
status: open
title: test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on 
AMD64 Arch Linux Asan 3.x
versions: Python 3.11

___
Python tracker 

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



[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge


Isaac Ge  added the comment:

Or we could integrate the explanation of uncased characters into the footnote 
for cased characters, and append the footnote in "str.istitle()" and 
"str.upper()".

--

___
Python tracker 

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



[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Andre Roberge


Andre Roberge  added the comment:

I believe that this is similar to, but not quite as severe as a similar bug in 
code.interact() https://bugs.python.org/issue43366 which affects IDLE; perhaps 
fixing this might fix the other issue?

--
nosy: +aroberge

___
Python tracker 

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



[issue41843] Reenable sendfile in shutil.copyfile() on Solaris

2021-05-21 Thread Jakub Kulik


Jakub Kulik  added the comment:

Based on the comment https://bugs.python.org/issue43743#msg393429 I think my 
question is answered: #36610 should not be reverted. Attached PR (which merely 
adds Solaris to systems where _USE_CP_SENDFILE is True) should thus be the 
preferred way of reenabling this.

--

___
Python tracker 

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



[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge


Isaac Ge  added the comment:

@ Josh Rosenberg Sorry, I mistook "follow" as "be followed by". Thanks to your 
explication, the document is coherent. I admit that I cannot conjure up any 
better altnernative.

I noticed that "cased character" are explained via the footnote: 
https://docs.python.org/3/library/stdtypes.html?highlight=istitle#id6

So it may be better to add a footnote for "uncased characters" as well, like 
ones in "str.istitle()" and "str.upper()".

By the way, the footnote for "cased character" is a bit confusing because of 
the curt abbreviations "Lu", "Ll", and "Lt". I did not get these until I fount 
out they are related to general category of unicode, so we could add a related 
link pointing to a related Unicode document.

--

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Using Pablo's (or Victor's) reproducer from bpo-44184, I'm getting a crash, 
apparently because _PyThreadState_PushLocals() is called after 
PyThreadState_Clear().

In Python/pystate.c interpreter_clear(), we're first calling 
PyThreadState_Clear() (line 295), and a few lines later (line 326) we're 
running _PyGC_CollectNoFail(). Clearing tstate _after_ the last GC collect 
resolves the issue (see attached patch), but it might introduce other problems; 
I'm not at all familiar with this part of the codebase.


FYI, git HEAD is at b11a951f16f0603d98de24fee5c023df83ea552c on main.


=
==22475==ERROR: AddressSanitizer: heap-use-after-free on address 0x62900220 
at pc 0x00010c985aa8 bp 0x7ffee3bab620 sp 0x7ffee3bab618
WRITE of size 8 at 0x62900220 thread T0
#0 0x10c985aa7 in _PyThreadState_PushLocals pystate.c:2030
#1 0x10c7fc8b6 in _PyEval_Vector ceval.c:5164
#2 0x10c397ebe in _PyFunction_Vectorcall call.c:342
#3 0x10c5591b2 in _PyObject_VectorcallTstate abstract.h:114
#4 0x10c558f6b in PyObject_CallOneArg abstract.h:184
#5 0x10c5586c9 in call_unbound_noarg typeobject.c:1625
#6 0x10c57d578 in slot_tp_finalize typeobject.c:7762
#7 0x10ca2ea0b in finalize_garbage gcmodule.c:982
#8 0x10ca2694d in gc_collect_main gcmodule.c:1287
#9 0x10ca25f9c in _PyGC_CollectNoFail gcmodule.c:2123
#10 0x10c97abed in interpreter_clear pystate.c:326
#11 0x10c97ae81 in _PyInterpreterState_Clear pystate.c:358
#12 0x10c9697d9 in finalize_interp_clear pylifecycle.c:1634
#13 0x10c96925b in Py_FinalizeEx pylifecycle.c:1812
#14 0x10ca1f143 in Py_RunMain main.c:668
#15 0x10ca203e4 in pymain_main main.c:696
#16 0x10ca20694 in Py_BytesMain main.c:720
#17 0x10c055a91 in main python.c:15
#18 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)

0x62900220 is located 32 bytes inside of 16384-byte region 
[0x62900200,0x62904200)
freed by thread T0 here:
#0 0x10d518609 in wrap_free+0xa9 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x48609)
#1 0x10c50a7fc in _PyObject_ArenaFree obmalloc.c:174
#2 0x10c5098e7 in _PyObject_VirtualFree obmalloc.c:564
#3 0x10c9808cf in PyThreadState_Clear pystate.c:904
#4 0x10c97a178 in interpreter_clear pystate.c:295
#5 0x10c97ae81 in _PyInterpreterState_Clear pystate.c:358
#6 0x10c9697d9 in finalize_interp_clear pylifecycle.c:1634
#7 0x10c96925b in Py_FinalizeEx pylifecycle.c:1812
#8 0x10ca1f143 in Py_RunMain main.c:668
#9 0x10ca203e4 in pymain_main main.c:696
#10 0x10ca20694 in Py_BytesMain main.c:720
#11 0x10c055a91 in main python.c:15
#12 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)

previously allocated by thread T0 here:
#0 0x10d5184c0 in wrap_malloc+0xa0 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x484c0)
#1 0x10c50a7d8 in _PyObject_ArenaMalloc obmalloc.c:168
#2 0x10c5098af in _PyObject_VirtualAlloc obmalloc.c:558
#3 0x10c985bb7 in allocate_chunk pystate.c:617
#4 0x10c97d6ee in new_threadstate pystate.c:678
#5 0x10c97cb49 in PyThreadState_New pystate.c:706
#6 0x10c96e26b in pycore_create_interpreter pylifecycle.c:614
#7 0x10c96ca7c in pyinit_config pylifecycle.c:834
#8 0x10c967c3a in pyinit_core pylifecycle.c:1003
#9 0x10c967429 in Py_InitializeFromConfig pylifecycle.c:1188
#10 0x10ca2409f in pymain_init main.c:66
#11 0x10ca201ee in pymain_main main.c:687
#12 0x10ca20694 in Py_BytesMain main.c:720
#13 0x10c055a91 in main python.c:15
#14 0x7fff20582f3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)

SUMMARY: AddressSanitizer: heap-use-after-free pystate.c:2030 in 
_PyThreadState_PushLocals
Shadow bytes around the buggy address:
  0x1c51fff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c52: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c520010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c520020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c520030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c520040: fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd
  0x1c520050: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x1c520060: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x1c520070: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x1c520080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x1c520090: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:   fa
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  

[issue38671] pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist

2021-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset ee51c56c02d8eac28828a116fa35064919433d20 by Barney Gale in branch 
'3.10':
[3.10] bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute 
path. (GH-26184) (GH-26270)
https://github.com/python/cpython/commit/ee51c56c02d8eac28828a116fa35064919433d20


--
nosy: +miss-islington

___
Python tracker 

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



[issue43757] pathlib: move 'resolve()' logic out of path flavour

2021-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset ee51c56c02d8eac28828a116fa35064919433d20 by Barney Gale in branch 
'3.10':
[3.10] bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute 
path. (GH-26184) (GH-26270)
https://github.com/python/cpython/commit/ee51c56c02d8eac28828a116fa35064919433d20


--

___
Python tracker 

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



[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

No, this issue is in the parser while the other is caused by the code module. 
As I mentioned, this case doesn't ask you for tokens until you close the brace, 
it just ask you for one extra token because is doing a lookahead.

If you give any extra token to satisfy the lookahead:

>>> foo[x = 1 $
  File "", line 1
foo[x = 1 $
^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
>>>

It fails immediately even if you didn't close the bracket

--

___
Python tracker 

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



[issue11176] [doc] give more meaningful argument names in argparse documentation

2021-05-21 Thread Bonifacio


Change by Bonifacio :


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

___
Python tracker 

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



[issue44204] socket.connect ignores CTRL+C during timeout on Win

2021-05-21 Thread Arpad Toth


New submission from Arpad Toth :

Steps to Reproduce
from http.client import HTTPConnection
conn = HTTPConnection('192.1.5.2', 80, timeout=50)
conn.request('GET', '/')
conn.getresponse()

Expected Behavior
It should give up waiting when requested and exit immediately.

Actual Behavior
What happens instead.
Keeps doing it's timeout until elapse then exits.

The issue is in socket.connect, not in urllib3.

Environment
OS Windows-10-10.0.18362-SP0
Python 3.6.5
urllib3 1.26.3
!Doesn't happen on linux.

--
components: Library (Lib)
messages: 394111
nosy: mrx23dot
priority: normal
severity: normal
status: open
title: socket.connect ignores CTRL+C during timeout on Win
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Vedran Čačić

Vedran Čačić  added the comment:

May I ask, is this going forward? I installed 3.11-dev, it's not there (though 
__future__ claims it should be). I understand if it isn't done yet, just want 
to know if there's risk it will be postponed again (or even given up).

--
nosy: +veky

___
Python tracker 

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



[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-21 Thread Vinay Sajip


Vinay Sajip  added the comment:

> bar module use logging module of stdlib not bar.logging module in this test 
> case.

Then bar.logging is ambiguous. There's no reason one has to use a stdlib 
package name in one's own package.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-21 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 0593ae84af9e0e8332644e7ed13d7fd8306c4e1a by Senthil Kumaran in 
branch '3.9':
[3.9] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26276)
https://github.com/python/cpython/commit/0593ae84af9e0e8332644e7ed13d7fd8306c4e1a


--

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> May I ask, is this going forward? I installed 3.11-dev, it's not there 
> (though __future__ claims it should be). I understand if it isn't done yet, 
> just want to know if there's risk it will be postponed again (or even given 
> up).


We are still waiting a ruling on PEP 649. If it gets rejected, and no more 
ideas arises (before beta cut for 3.11), I guess we could move on and resolve 
this issue again.

--

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

cc. Pablo, Victor

--
nosy: +pablogsal, vstinner

___
Python tracker 

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



[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will try to see if we can do something about this but the only thing I can 
think of is removing the lookaheads in the invalid comparison rules but then we 
need to solve the false positives (like keyword arguments) and that's going to 
be very hard to do without lookaheads

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-21 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset f14015adf52014c2345522fe32d43f15f001c986 by Senthil Kumaran in 
branch '3.10':
[3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26275)
https://github.com/python/cpython/commit/f14015adf52014c2345522fe32d43f15f001c986


--

___
Python tracker 

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



[issue44164] Document what are resources in importlib.resources

2021-05-21 Thread Filipe Laíns

Change by Filipe Laíns :


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

___
Python tracker 

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



[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x

2021-05-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-21 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset d3cc68900dc99966007112f884779895daefc7db by Jakub Kulík in branch 
'3.9':
[3.9] bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris 
(GH-25096) (GH-25847)
https://github.com/python/cpython/commit/d3cc68900dc99966007112f884779895daefc7db


--

___
Python tracker 

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



[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-21 Thread STINNER Victor


STINNER Victor  added the comment:

Backport to 3.8 may be more complicated. It's up to you to decide if you want 
to backport it or not. I merged your 3.9 backport, it looks very close to the 
change made in the main branch.

--

___
Python tracker 

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



[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-05-21 Thread Chris Burr


New submission from Chris Burr :

When copying files between systems with different limits on the size of the 
extended attributes that can be added to a file shutil.copystat can fail with:

/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2064/stable/linux-64/lib/python3.8/shutil.py
 in copystat(src, dst, follow_symlinks)
377 # We must copy extended attributes before the file is (potentially)
378 # chmod()'ed read-only, otherwise setxattr() will error with 
-EACCES.
--> 379 _copyxattr(src, dst, follow_symlinks=follow)
380 try:
381 lookup("chmod")(dst, mode, follow_symlinks=follow)

/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2064/stable/linux-64/lib/python3.8/shutil.py
 in _copyxattr(src, dst, follow_symlinks)
327 try:
328 value = os.getxattr(src, name, 
follow_symlinks=follow_symlinks)
--> 329 os.setxattr(dst, name, value, 
follow_symlinks=follow_symlinks)
330 except OSError as e:
331 if e.errno not in (errno.EPERM, errno.ENOTSUP, 
errno.ENODATA,

OSError: [Errno 28] No space left on device: '/tmp/lhcb'

This is caused by the destination filesystem having a smaller limit on the size 
of the extended attributes. I think this behaviour is unexpected as other 
failures are silently ignored (e.g. the destination doesn't support extended 
attributes).

--
components: Library (Lib)
messages: 394118
nosy: chrisburr
priority: normal
severity: normal
status: open
title: shutil.copystat can fail when copying to a file system with a smaller 
limit
type: crash
versions: Python 3.10, Python 3.11, 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



[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-05-21 Thread Chris Burr


Change by Chris Burr :


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

___
Python tracker 

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



[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 07dba474c582e61ca455846da7597d4346324e04 by Miss Islington (bot) 
in branch '3.10':
bpo-44180: Report generic syntax errors in the furthest position reached in the 
first parser pass (GH-26253) (GH-26281)
https://github.com/python/cpython/commit/07dba474c582e61ca455846da7597d4346324e04


--

___
Python tracker 

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



[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I'd intended for the changes in 5.1 to make it into CPython, but I've missed 
the deadline, so I've backported the referenced commits to importlib_resources 
5.0.5 in order to sync into CPython.

--
versions: +Python 3.11

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2021-05-21 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Is the test added here:

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

import ast
import builtins
import sys
import os

tree = ast.parse("pass")
x = [tree]
x.append(x)

# Put the cycle somewhere to survive until the *last* GC collection
def callback(*args):
pass
callback.a = x
os.register_at_fork(after_in_child=callback)





If this doesn't work maybe Erlend may help you reproducing this.

--

___
Python tracker 

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



[issue44206] Add a version number to dict keys.

2021-05-21 Thread Mark Shannon


New submission from Mark Shannon :

Add a version number to dict keys.

PEP 509 added a version number to dicts. Unfortunately this is no use for 
optimizing attribute loads and store on instances.
We need to know whether the keys are as expected, not the dict as that is 
likely to be different each time.

We can add a 32 bit version number and actually reduce memory use by taking 
advantage of the redundancy in the rest of the keys object.

--
assignee: Mark.Shannon
messages: 394120
nosy: Mark.Shannon, methane, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a version number to dict keys.
type: performance

___
Python tracker 

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



[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
nosy: +terry.reedy
nosy_count: 2.0 -> 3.0
pull_requests: +24893
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26289

___
Python tracker 

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



[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-05-21 Thread Matthew Barnett


Matthew Barnett  added the comment:

I've only just realised that the test cases don't cover all eventualities: none 
of them test what happens with multiple spaces _between_ the letters, such as:

'  a  b c '.split(maxsplit=1) == ['a', 'b c ']

Comparing that with:

'  a  b c '.split(' ', maxsplit=1)

you see that passing None as the split character does not mean "any whitespace 
character". There's clearly a little more to it than that.

--

___
Python tracker 

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



[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24896
pull_request: https://github.com/python/cpython/pull/26292

___
Python tracker 

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



[issue44197] [request feature] Itertools extended combinations to limited number of repetition

2021-05-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> it seems too obscure and special-purpose to me to even
> qualify as a reasonable candidate for an itertools doc "recipe"

My thoughts are the same.

@latot Thank you for the suggestion but it doesn't make sense for the standard 
library.  We respectfully decline.

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



[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart


Change by William Barnhart :


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

___
Python tracker 

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



[issue24929] _strptime.TimeRE should not enforce range in regex

2021-05-21 Thread Catherine Devlin


Catherine Devlin  added the comment:

Thinking about this a little more...

I suggest that slowing down execution shouldn't be a worry in this case, 
because trying to parse a garbage string into a date shouldn't be something 
code is doing zillions of times, and if it is, being slow isn't a terrible 
thing.  It should be the exception (so to speak) and not the rule, and thus not 
something we should worry about optimizing for.

That said, I can see not wanting to rely on throwing low-level errors that are 
outside Python's direct control.  (In fact, the PR I wrote didn't account for 
the OS-dependent nature of those messages, so if we decide to go ahead after 
all I'll need to make my PR account for that.)  If that is enough reason to 
reject the change, I'm content with that.

One way or the other, I would love to get this out of "Open" status - if we 
want to just close it as-is, I'll be satisfied.

--
nosy: +catherinedevlin

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 12.0 -> 13.0
pull_requests: +24894
pull_request: https://github.com/python/cpython/pull/26290

___
Python tracker 

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



[issue44209] urllib.robotparser fail on Disallow: /? from google.com

2021-05-21 Thread Karl Y. Pradene


New submission from Karl Y. Pradene :

In robotparser.py
On line 222
path = urllib.parse.urlunparse(urllib.parse.urlparse(path))
tranform the entry Disallow: /?
in the google.com/robots.txt
in : Disallow: /
making every can_fetch request return False

--
components: Library (Lib)
messages: 394144
nosy: karl.pradene
priority: normal
severity: normal
status: open
title: urllib.robotparser fail on Disallow: /? from google.com
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue44199] code example index error in tutorial controlflow

2021-05-21 Thread HVoltBb


HVoltBb  added the comment:

right. I just realized that the moment I hit the submit button, and I closed 
this issue right away. Thanks for clearing it up.

--

___
Python tracker 

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



[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread Catherine Devlin


Catherine Devlin  added the comment:

Your PR doesn't include any tests... but I like the idea enough to create the 
tests for you if you prefer.

However, first I'd like to see whether the core devs like the idea.  I could 
see saying either "yes, why not make things easy" or "no, there should be only 
one way to do it".

--
nosy: +catherinedevlin

___
Python tracker 

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



[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I *think* that another bracket pair is needed, changing
"," "/"
to
["," "/"]

--
nosy: +pablogsal, terry.reedy
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-21 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Thanks for tracking this down, Filipe. Agreed it sounds like it's fixed in 
Python 3.10. It's unlikely the fix will be backported to Python 3.9. Instead, 
if this behavior affects your usage, consider using the `importlib_resources` 
backport, which also includes the fix. And please follow-up if there are issues 
not addressed by this approach.

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



[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After mentally reparsing and translating to English, I think you are right.

--

___
Python tracker 

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



[issue44197] [request feature] Itertools extended combinations to limited number of repetition

2021-05-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger
stage: resolved -> 
type:  -> enhancement
versions: +Python 3.11

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Mark Shannon


Mark Shannon  added the comment:

What's the test case, exactly?

ref.py for the other issue doesn't crash if I change "func.py" to "ref.py"
otherwise it just complains that "func.py" doesn't exist.

--

___
Python tracker 

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



[issue44140] WeakKeyDictionary should support lookup by id instead of hash

2021-05-21 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread STINNER Victor


STINNER Victor  added the comment:

Anthony Sottile: I'm surprised that AST nodes survive until the last GC 
collection. It seems like somehow a reference cycle prevent to delete these 
nodes, and this reference cycle is kept alive somehow until the last GC 
collection at Python exit.

It would be interesting to follow references. You may start from 
PyInterpreterState which keeps objects alive until the last GC collection:

* os.register_at_fork() callbacks
* codecs.register() callback
* Python audit hooks
* sys.modules objects
* sys.__dict__

Callbacks keep global variables of a module alive through its __globals__ 
attribute (namespace of the module where it's defined).

--

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, can you check the failure? Otherwise is going to start failing on the 
buildbots when we add the test case for the issue Erlend mentions.

--

___
Python tracker 

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



[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +24897
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26293

___
Python tracker 

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



[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset ae1732d4611ee859c754e7a867b2a4cbb47d0637 by Miss Islington (bot) 
in branch '3.10':
bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)
https://github.com/python/cpython/commit/ae1732d4611ee859c754e7a867b2a4cbb47d0637


--

___
Python tracker 

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



[issue44190] Dictionary assignment shorthand

2021-05-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue44187] Implement infrastructure for quickening and specializing

2021-05-21 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24889
pull_request: https://github.com/python/cpython/pull/26283

___
Python tracker 

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



[issue44069] pathlib.Path.glob's generator is not a real generator

2021-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree that from the outside is seems slightly bizarre to make an internal 
list to implement a function documented as returning an iterator.  However, 
list(scandir) was added by Serhiy in #26032 with the comment that it made 
globbing 1.5-4 times faster.  This is, of course, if one runs the iterator to 
completion, as is the normal use.

For your presented use case, I suggest something like the following:

next(f for f in scandir(path) if os.path.splitext(f)[1] == '.txt')

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

___
Python tracker 

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



[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IOError is a back-compatibility synonym for OSError.  I will eliminate the last 
use from all 3 versions.  The change to the previous example was done by 2 
people who did not backport to 3.9 and I will not bother with that.  Future 
versions are already fixed.

--
stage: patch review -> 
versions: +Python 3.11

___
Python tracker 

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



[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think is correct:

parameter_list ::= defparameter ("," defparameter)* "," "/" ["," 
[parameter_list_no_posonly]] | parameter_list_no_posonly

Says "a parameter_list" is either:

defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] 

or

parameter_list_no_posonly

If you don't use the "/" then is the second option.

Feel free to reopen if I am missing something.

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



[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread miss-islington


miss-islington  added the comment:


New changeset fdb65e399ea4e2d13dd41d65662ba25cafe15f1d by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284) 
(GH-26286)
https://github.com/python/cpython/commit/fdb65e399ea4e2d13dd41d65662ba25cafe15f1d


--

___
Python tracker 

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



[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2021-05-21 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs a test.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Zachery, unless someone steps with an objection, I think you can go forward 
with the PR to implement this signature:

linear_regression(x, y, /) -> LinearRegression(slope, intercept)

--

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread Anthony Sottile


Anthony Sottile  added the comment:

that version of flake8 uses multiprocessing (even for 1 file) -- would the ast 
objects be involved in that way? (pyflakes also makes reference cyles to handle 
"parent" relationships)

--

___
Python tracker 

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



[issue44206] Add a version number to dict keys.

2021-05-21 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44207] Add a version number to Python functions

2021-05-21 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Webb Scales


Webb Scales  added the comment:

I concur -- it is correct as it is:  I wasn't properly interpreting the 
alternation.

Thank you for your attention; sorry for the false alarm!

--

___
Python tracker 

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



[issue29788] [Security] tarfile: Add absolute_path option to tarfile, disabled by default

2021-05-21 Thread Ned Deily


Change by Ned Deily :


--
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue19821] deprecate pydoc.ispackage()

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


--
title: pydoc.ispackage() could be more accurate -> deprecate pydoc.ispackage()
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue43556] fix attr names for ast.expr and ast.stmt

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43556] fix attr names for ast.expr and ast.stmt

2021-05-21 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 96c9961bfe1ab471a6bcd4b6e9255af25865dde2 by Zackery Spytz in 
branch '3.9':
bpo-43556: Fix the attr names for ast.expr and ast.stmt in the docs (GH-24940)
https://github.com/python/cpython/commit/96c9961bfe1ab471a6bcd4b6e9255af25865dde2


--
nosy: +iritkatriel

___
Python tracker 

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



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43124] [security] smtplib multiple CRLF injection

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR!  Can someone from the email team take a look at it, please?

--

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

Since 3.5 has now reached end-of-life, this issue will not be fixed there so it 
looks like it can be closed.

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

___
Python tracker 

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



[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yes, I was exactly working in that :)

--

___
Python tracker 

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



[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

> It is a pretty-targeted optimization, so I don't expect it to speed up the 
> macro benchmarks. Though that shouldn't be a blocker for small, targeted 
> optimizations.

In the past we've rejected optimizations that make the code more complex and 
don't result in any noticeable real-world speedups. I don't think that policy 
has changed.

--

___
Python tracker 

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



[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm also dubious that this would be of value in real code.  Looking at the 
implementation, it seems to throw way too much code at too small of a problem.  
I suspect is is more likely to cause maintenance problems than to produce 
noticeable benefits for users.

Historically, we've avoided folding higher level operations.  Serhiy's 
optimization of str.__mod__ went beyond those limits and shouldn't set a 
precedent that we will regret later.

--
nosy: +rhettinger

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2021-05-21 Thread Irit Katriel


Irit Katriel  added the comment:

The open PR updates the docstrings in Lib/calendar.py but the corresponding 
changes in Doc/ still need to be added.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11 -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



[issue44211] Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 'image/x-ms-bmp'

2021-05-21 Thread Andreas Jansson


New submission from Andreas Jansson :

The mime type of .bmp was changed from image/x-ms-bmp in 
https://github.com/python/cpython/pull/4756.

https://github.com/python/cpython/pull/3062 then re-introduced image/x-ms-bmp 
while keeping the newer image/bmp mapping.

--
components: Library (Lib)
messages: 394157
nosy: andreasjansson
priority: normal
severity: normal
status: open
title: Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 
'image/x-ms-bmp'
type: behavior
versions: Python 3.10, 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



[issue40695] hashlib: OpenSSL hash detection should obey security policy

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

Is there anything more that needs to be done for this issue?

--
nosy: +ned.deily

___
Python tracker 

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



[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart


William Barnhart  added the comment:

I'm glad someone else thinks it's a good idea. If you have some ideas for 
tests, I'd be happy to help write them in order to spare the inconvenience 
(unless the tests are that easy to write then by all means please do). 

I can appreciate why the core developers could be polarized. One side could say 
it's safer to just take better care of our Python scripts and have them in 
wrapper functions. But people don't always do this.

In favor of the idea: This method can be used to spare developers from agony 
when a "_" is changed to a "-" when they aren't informed of the change. As a 
result, this can allow for code to remain usable since most developers are more 
interested in the letters of arguments and not so much special characters. But 
then again, a --help option could be all that's needed to fix this issue.

I think a solution that satisfies both parties would be creating some safe 
guard for adding arguments that are named identically, containing "_" or "-" in 
the middle, and raising an exception when the regexes of the arguments are 
conflicting. Such as if I wrote:
```
parser.add_argument('--please_work')
parser.add_argument('--please-work')
```
then an exception should be raised with an error for conflicting argument names.

--

___
Python tracker 

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



[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

This looks like a duplicate of Issue43223 which has a PR in progress.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> [security] http.server: Open Redirection if the URL path starts 
with //

___
Python tracker 

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



[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns

Change by Filipe Laíns :


--
components: +Library (Lib) -Installation

___
Python tracker 

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



[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns

Change by Filipe Laíns :


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

___
Python tracker 

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



[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

Is there anything more to be done for this issue or can it be closed?

--

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 50b0d148a68072292832eb69bdf1815b8059355f by Miss Islington (bot) 
in branch '3.10':
bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) (GH-26290)
https://github.com/python/cpython/commit/50b0d148a68072292832eb69bdf1815b8059355f


--

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread STINNER Victor


STINNER Victor  added the comment:

Anthony Sottile: "that version of flake8 uses multiprocessing (even for 1 file) 
-- would the ast objects be involved in that way? (pyflakes also makes 
reference cyles to handle "parent" relationships)"

I expect flake8 to use the ast somewhere to analyze source code. But I don't 
have the bandwidth to investigate flake8 creates a reference cycle.

The Python regression is fixed, I closed the issue. Thanks for the bug report 
Anthony!

--
priority: release blocker -> 

___
Python tracker 

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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread STINNER Victor


STINNER Victor  added the comment:

The issue is fixed by:

commit 615069eb08494d089bf24e43547fbc482ed699b8
Author: Victor Stinner 
Date:   Fri May 21 19:19:54 2021 +0200

bpo-44184: Fix subtype_dealloc() for freed type (GH-26274)

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.

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



[issue20749] shutil.unpack_archive(): security concerns not documented

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

The warning from Tarfile.extractall (Doc/library/tarfile.rst -> 
https://docs.python.org/dev/library/tarfile.html#tarfile-objects) can be 
adapted for use here (Doc/library/shutil.rst -> 
https://docs.python.org/dev/library/shutil.html#archiving-operations).

--
keywords: +easy, newcomer friendly
nosy: +ned.deily
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns

New submission from Filipe Laíns :

This protocol is needed to write type hints, so it should be public.

--
components: Installation
messages: 394150
nosy: FFY00, jaraco
priority: normal
severity: normal
status: open
title: Make importlib.metadata._meta.PackageMetadata public
type: enhancement
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> We should check on a real-world benchmark instead of a micro benchmark.

It is a pretty-targeted optimization, so I don't expect it to speed up the 
macro benchmarks. Though that shouldn't be a blocker for small, targeted 
optimizations.

--

___
Python tracker 

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



[issue43167] Add a note to the macOS installer welcome window about customize options

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

As of the 3.9.5 and 3.10.0b1 macOS installers, the following text is displayed 
during installation near the top of the "Read Me" window:

Install Options
---

You can control some aspects of what is installed by this package. To see the 
options, click on the Customize button in the Installation Type step of the 
macOS installer app.  Click on a package name in the list shown to see more 
information about that option,

--
resolution:  -> fixed
stage: needs patch -> 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



[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2021-05-21 Thread Irit Katriel


Change by Irit Katriel :


--
stage: patch review -> test needed
versions: +Python 3.10, Python 3.11 -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



[issue44211] Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 'image/x-ms-bmp'

2021-05-21 Thread Andreas Jansson


Change by Andreas Jansson :


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

___
Python tracker 

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



[issue33213] crypt function not hashing properly on Mac (uses a specific salt)

2021-05-21 Thread Ned Deily


Change by Ned Deily :


--
components: +macOS
versions: +Python 3.11 -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



[issue44184] crash on windows invoking flake8

2021-05-21 Thread Ammar Askar


Ammar Askar  added the comment:

Indeed, it's quite a tricky issue so I'm glad it was caught in the beta.

Thank you for the report Anthony. Thanks for tracing the root cause and the fix 
Victor and thank you to everyone who helped debug.

--

___
Python tracker 

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



[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2021-05-21 Thread Dan Cecile


Change by Dan Cecile :


--
nosy: +dcecile

___
Python tracker 

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



[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2021-05-21 Thread Ned Deily


Ned Deily  added the comment:

Any updates on this or can it be closed?

--
nosy: +ned.deily

___
Python tracker 

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



  1   2   >