[issue40952] GCC overflow warnings (format-overflow, stringop-overflow)

2020-06-12 Thread Christian Heimes

New submission from Christian Heimes :

I'm getting a couple of compiler warnings with gcc-10.1.1 (Fedora 32) with an 
asan and ubsan build:

Parser/string_parser.c: In function ‘decode_unicode_with_escapes’:
Parser/string_parser.c:100:17: warning: null destination pointer 
[-Wformat-overflow=]
  100 | sprintf(p, "\\U%08x", chr);
  | ^~
Parser/string_parser.c:100:17: warning: null destination pointer 
[-Wformat-overflow=]
Parser/string_parser.c:100:17: warning: null destination pointer 
[-Wformat-overflow=]

Objects/unicodeobject.c: In function ‘xmlcharrefreplace’:
Objects/unicodeobject.c:849:16: warning: null destination pointer 
[-Wformat-overflow=]
  849 | str += sprintf(str, "&#%d;", PyUnicode_READ(kind, data, i));
  |^~~~
Objects/unicodeobject.c:849:16: warning: null destination pointer 
[-Wformat-overflow=]
Objects/unicodeobject.c:849:16: warning: null destination pointer 
[-Wformat-overflow=]

In function ‘assemble_lnotab’,
inlined from ‘assemble_emit’ at Python/compile.c:5697:25,
inlined from ‘assemble’ at Python/compile.c:6036:18:
Python/compile.c:5651:19: warning: writing 1 byte into a region of size 0 
[-Wstringop-overflow=]
 5651 | *lnotab++ = k;
  | ~~^~~

--
components: Build
messages: 371335
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: GCC overflow warnings (format-overflow, stringop-overflow)
type: compile error
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40953] _PyWideStringList_Copy breaks asan builds

2020-06-12 Thread Christian Heimes


New submission from Christian Heimes :

It's not possible to build Python with address sanitizer and memory leak 
checker asan.

$ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer
$ make
...
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi

=
==1585722==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x9ab398 in _PyWideStringList_Copy Python/initconfig.c:315
#2 0x9b48bd in _PyConfig_Copy Python/initconfig.c:857
#3 0xa20b4c in _PyInterpreterState_SetConfig Python/pystate.c:1834
#4 0xa07a14 in pycore_create_interpreter Python/pylifecycle.c:554
#5 0xa07a14 in pyinit_config Python/pylifecycle.c:759
#6 0xa07a14 in pyinit_core Python/pylifecycle.c:926
#7 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136
#8 0x4766c2 in pymain_init Modules/main.c:66
#9 0x47bd12 in pymain_main Modules/main.c:653
#10 0x47bd12 in Py_BytesMain Modules/main.c:686
#11 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041)

Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x9ab398 in _PyWideStringList_Copy Python/initconfig.c:315
#2 0x9b8ee8 in PyConfig_Read Python/initconfig.c:2506
#3 0xa07282 in pyinit_core Python/pylifecycle.c:920
#4 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136
#5 0x4766c2 in pymain_init Modules/main.c:66
#6 0x47bd12 in pymain_main Modules/main.c:653
#7 0x47bd12 in Py_BytesMain Modules/main.c:686
#8 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041)

Indirect leak of 200 byte(s) in 6 object(s) allocated from:
#0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x63351c in PyMem_RawMalloc Objects/obmalloc.c:572
#2 0x63351c in _PyMem_RawWcsdup Objects/obmalloc.c:644
#3 0x9ab457 in _PyWideStringList_Copy Python/initconfig.c:321
#4 0x9b48bd in _PyConfig_Copy Python/initconfig.c:857
#5 0xa20b4c in _PyInterpreterState_SetConfig Python/pystate.c:1834
#6 0xa07a14 in pycore_create_interpreter Python/pylifecycle.c:554
#7 0xa07a14 in pyinit_config Python/pylifecycle.c:759
#8 0xa07a14 in pyinit_core Python/pylifecycle.c:926
#9 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136
#10 0x4766c2 in pymain_init Modules/main.c:66
#11 0x47bd12 in pymain_main Modules/main.c:653
#12 0x47bd12 in Py_BytesMain Modules/main.c:686
#13 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041)

Indirect leak of 200 byte(s) in 6 object(s) allocated from:
#0 0x7fa404ea9667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x63351c in PyMem_RawMalloc Objects/obmalloc.c:572
#2 0x63351c in _PyMem_RawWcsdup Objects/obmalloc.c:644
#3 0x9ab457 in _PyWideStringList_Copy Python/initconfig.c:321
#4 0x9b8ee8 in PyConfig_Read Python/initconfig.c:2506
#5 0xa07282 in pyinit_core Python/pylifecycle.c:920
#6 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136
#7 0x4766c2 in pymain_init Modules/main.c:66
#8 0x47bd12 in pymain_main Modules/main.c:653
#9 0x47bd12 in Py_BytesMain Modules/main.c:686
#10 0x7fa404173041 in __libc_start_main (/lib64/libc.so.6+0x27041)


Workaround:

$ cat Misc/asan-suppression.txt 
leak:_PyWideStringList_Copy
$ LSAN_OPTIONS="suppressions=Misc/asan-suppression.txt" make

--
components: Build
messages: 371336
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: _PyWideStringList_Copy breaks asan builds
type: compile error
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2020-06-12 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Would it be better to have a dictview.mapping() method rather than an 
attribute, since it constructs a new object of a different type and since 
that's what keys(), values(), and items() are?

--

___
Python tracker 

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



[issue36225] [subinterpreters] Lingering subinterpreters should be implicitly cleared on shutdown

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

I note this is marked as a 3.7regression and still open. Since the cutoff for 
the final 3.7 bugfix mode release is in a few days, I'm assuming this means 
that 3.7 users will have to live with this regression.  If you feel that is a 
problem, speak up now.

--

___
Python tracker 

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



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

I note this is marked as a 3.7regression and still open. Since the cutoff for 
the final 3.7 bugfix mode release is in a few days, I'm assuming this means 
that 3.7 users will have to live with this regression.  If you feel that is a 
problem, speak up now.

--
nosy: +ned.deily

___
Python tracker 

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



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

I note this is marked as a 3.7regression and still open. Since the cutoff for 
the final 3.7 bugfix mode release is in a few days, I'm assuming this means 
that 3.7 users will have to live with this regression.  If you feel that is a 
problem, speak up now.

--
nosy: +ned.deily

___
Python tracker 

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



[issue36403] AsyncIterator on 3.7: __aiter__ no longer honors finally blocks

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

I note this is marked as a 3.7regression and still open. Since the cutoff for 
the final 3.7 bugfix mode release is in a few days, I'm assuming this means 
that 3.7 users will have to live with this regression.  If you feel that is a 
problem, speak up now.

--

___
Python tracker 

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



[issue40954] freeze.py aborts on macOS

2020-06-12 Thread 小本健司

New submission from 小本健司 :

freeze.py (in cpython/Tools/freeze) fails with the folloing error.

```
$ ~/.pyenv/versions/3.8.0/bin/python freeze.py
Error: needed directory 
/Users/k-omoto/.pyenv/versions/3.8.0/lib/python3.8/config-3.8 not found
Use ``freeze.py -h'' for help
```

--
components: Demos and Tools
messages: 371342
nosy: 小本健司
priority: normal
severity: normal
status: open
title: freeze.py aborts on macOS
versions: Python 3.8

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

Any chance of getting the Windows builds using 1.1.1g for the upcoming 3.7.8?

--

___
Python tracker 

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



[issue28068] Error in freeze.py due to unguarded sys.abiflags usage under Windows

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

This appears to be a duplicate of Issue32217 which was fixed in 3.7.4 and 
3.8.0. If that doesn't solve the problem, please reopen with a current failure.

--
nosy: +ned.deily
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue40954] freeze.py aborts on macOS

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:

Thank you for the report. At first glance, it looks like this might be a 
duplicate of languishing Issue24871 for which a patch exists. Perhaps you could 
try applying the patch there to freeze.py and see whether that helps.  
Unfortunately, freeze.py does not get a lot of attention here.

--
nosy: +ned.deily

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory

2020-06-12 Thread Christian Heimes


New submission from Christian Heimes :

asan has detected a minor memory leak in subprocess_fork_exec:

Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7f008bf19667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x7f007a0bee4a in subprocess_fork_exec 
/home/heimes/dev/python/cpython/Modules/_posixsubprocess.c:774
#2 0xe0305b in cfunction_call Objects/methodobject.c:546
#3 0x4bdd0c in _PyObject_MakeTpCall Objects/call.c:191
#4 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:112
#5 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:99
#6 0x462fd0 in PyObject_Vectorcall Include/cpython/abstract.h:123
#7 0x462fd0 in call_function Python/ceval.c:5110
#8 0x462fd0 in _PyEval_EvalFrameDefault Python/ceval.c:3510
#9 0x8c1c1d in _PyEval_EvalFrame Include/internal/pycore_ceval.h:40
#10 0x8c1c1d in _PyEval_EvalCode Python/ceval.c:4365

--
components: FreeBSD
messages: 371346
nosy: christian.heimes, gregory.p.smith, koobs
priority: normal
severity: normal
status: open
title: subprocess_fork_exec leaks memory
type: resource usage
versions: Python 3.10, 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



[issue40955] subprocess_fork_exec leaks memory

2020-06-12 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue40956] Use Argument Clinic in sqlite3

2020-06-12 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

Use Argument Clinic in sqlite3.

--
components: Library (Lib)
messages: 371347
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: Use Argument Clinic in sqlite3
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



[issue40956] Use Argument Clinic in sqlite3

2020-06-12 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue40498] Holding spacebar on button widget permanently makes it SUNKEN even after release (and wait).

2020-06-12 Thread E. Paine


E. Paine  added the comment:

I agree this is a Windows issue (though I haven't tested on MacOS), but I don't 
think it is a tkinter issue. Running 'wish' on the following, behaves exactly 
the same:

pack [button .button1 -text {click me}]

Thank you for reporting this, but unless this behaviour is shown to be a 
tkinter issue (rather than Tk), I am of the opinion that this issue should be 
closed as 3rd party.

--
nosy: +epaine, gpolo, serhiy.storchaka

___
Python tracker 

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



[issue40957] _Py_fopen_obj leaks reference on audit error

2020-06-12 Thread Christian Heimes


New submission from Christian Heimes :

Direct leak of 50 byte(s) in 1 object(s) allocated from:
#0 0x7f429c681667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x487496 in _PyBytes_FromSize Objects/bytesobject.c:81
#2 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:112
#3 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:97
#4 0x75f140 in unicode_encode_utf8 Objects/unicodeobject.c:5425
#5 0x7f2052 in PyUnicode_EncodeFSDefault Objects/unicodeobject.c:3660
#6 0x7f28a7 in PyUnicode_FSConverter Objects/unicodeobject.c:3947
#7 0xab48ab in _Py_fopen_obj Python/fileutils.c:1459
#8 0x7f428a713cc5 in _ssl__SSLContext_load_dh_params 
/home/heimes/dev/python/cpython/Modules/_ssl.c:4293
#9 0xe03e0c in cfunction_vectorcall_O Objects/methodobject.c:510
#10 0x4c166a in PyVectorcall_Call Objects/call.c:230

--
assignee: christian.heimes
components: Interpreter Core
messages: 371349
nosy: christian.heimes, steve.dower
priority: normal
severity: normal
status: open
title: _Py_fopen_obj leaks reference on audit error
type: resource usage
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



[issue40957] _Py_fopen_obj leaks reference on audit error

2020-06-12 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Niklas Sombert


Niklas Sombert  added the comment:

Since there's the easy workaround of just setting pdict["CONTENT-LENGTH"] I 
personally don't have a problem with this staying the way it is.

But it would be really nice if this were documented somewhere.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Christian Heimes


New submission from Christian Heimes :

ASAN/UBSAN has detected a heap-buffer-overflow in pegen.c

==1625693==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x60626b71 at pc 0x0073574d bp 0x7fff297284f0 sp 0x7fff297284e0
READ of size 1 at 0x60626b71 thread T0
#0 0x73574c in ascii_decode Objects/unicodeobject.c:4941
#1 0x82bd0f in unicode_decode_utf8 Objects/unicodeobject.c:4999
#2 0xf35859 in byte_offset_to_character_offset Parser/pegen.c:148
#3 0xf35859 in _PyPegen_raise_error_known_location Parser/pegen.c:412
#4 0xf36482 in _PyPegen_raise_error Parser/pegen.c:373
#5 0xf39e1d in tokenizer_error Parser/pegen.c:321
#6 0xf39e1d in _PyPegen_fill_token Parser/pegen.c:638
#7 0xf3ca0f in _PyPegen_expect_token Parser/pegen.c:753
#8 0xf4cc7a in _tmp_15_rule Parser/parser.c:16184
#9 0xf3c799 in _PyPegen_lookahead 
(/home/heimes/dev/python/cpython/python+0xf3c799)
#10 0xfafb4a in compound_stmt_rule Parser/parser.c:1860
#11 0xfb7fc2 in statement_rule Parser/parser.c:1224
#12 0xfb7fc2 in _loop1_11_rule Parser/parser.c:15954
#13 0xfb7fc2 in statements_rule Parser/parser.c:1183
#14 0xfbbce7 in file_rule Parser/parser.c:716
#15 0xfbbce7 in _PyPegen_parse Parser/parser.c:24401
#16 0xf3f868 in _PyPegen_run_parser Parser/pegen.c:1077
#17 0xf4044f in _PyPegen_run_parser_from_file_pointer Parser/pegen.c:1137
#18 0xa27f36 in PyRun_FileExFlags Python/pythonrun.c:1057
#19 0xa2826a in PyRun_SimpleFileExFlags Python/pythonrun.c:400
#20 0x479b1b in pymain_run_file Modules/main.c:369
#21 0x479b1b in pymain_run_python Modules/main.c:553
#22 0x47bd59 in Py_RunMain Modules/main.c:632
#23 0x47bd59 in pymain_main Modules/main.c:662
#24 0x47bd59 in Py_BytesMain Modules/main.c:686
#25 0x7f59aa5cd041 in __libc_start_main (/lib64/libc.so.6+0x27041)
#26 0x47643d in _start (/home/heimes/dev/python/cpython/python+0x47643d)

0x60626b71 is located 0 bytes to the right of 49-byte region 
[0x60626b40,0x60626b71)
allocated by thread T0 here:
#0 0x7f59ab303667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x749c7d in PyUnicode_New Objects/unicodeobject.c:1437
#2 0x872f15 in _PyUnicode_Init Objects/unicodeobject.c:15535
#3 0x9fe0ab in pycore_init_types Python/pylifecycle.c:599
#4 0x9fe0ab in pycore_interp_init Python/pylifecycle.c:724
#5 0xa07c69 in pyinit_config Python/pylifecycle.c:765
#6 0xa07c69 in pyinit_core Python/pylifecycle.c:926
#7 0xa09b17 in Py_InitializeFromConfig Python/pylifecycle.c:1136
#8 0x4766c2 in pymain_init Modules/main.c:66
#9 0x47bd12 in pymain_main Modules/main.c:653
#10 0x47bd12 in Py_BytesMain Modules/main.c:686
#11 0x7f59aa5cd041 in __libc_start_main (/lib64/libc.so.6+0x27041)

SUMMARY: AddressSanitizer: heap-buffer-overflow Objects/unicodeobject.c:4941 in 
ascii_decode
Shadow bytes around the buggy address:
  0x0c0c7fffcd10: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
  0x0c0c7fffcd20: 00 00 00 00 00 00 00 07 fa fa fa fa 00 00 00 00
  0x0c0c7fffcd30: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 05
  0x0c0c7fffcd40: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
  0x0c0c7fffcd50: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
=>0x0c0c7fffcd60: 00 00 00 01 fa fa fa fa 00 00 00 00 00 00[01]fa
  0x0c0c7fffcd70: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
  0x0c0c7fffcd80: 00 00 00 00 00 00 05 fa fa fa fa fa 00 00 00 00
  0x0c0c7fffcd90: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c0c7fffcda0: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c7fffcdb0: fd fd fd fd fd fd fd fd fa fa fa fa 00 00 00 00
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
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
  Shadow gap:  cc
==1625693==ABORTING

--
components: Interpreter Core
messages: 371351
nosy: christian.heimes, pablogsal
priority: high
severity: normal
status: open
title: ASAN/UBSAN: heap-buffer-overflow in pegen.c
type: security
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40219] ttk LabeledScale: label covered by hidden element

2020-06-12 Thread E. Paine


E. Paine  added the comment:

This is indeed a tkinter issue and is caused by the placeholder label. As the 
main label is added to the frame using the place manager, this placeholder is 
required to make the frame the correct height.

I have attached a small diff which lowers this placeholder, fixing the problem 
(raising the main label does the same thing).

--
keywords: +patch
nosy: +epaine
Added file: https://bugs.python.org/file49227/lbscl.diff

___
Python tracker 

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



[issue40959] Remove unused and unneeded function declaration from sqlite3 header files

2020-06-12 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

The following function declarations can safely be removed because they're 
either unused or unneeded.

In Modules/_sqlite/cache.h:
pysqlite_node_init() // unused; no function definition
pysqlite_node_dealloc()  // unneeded; file scope
pysqlite_cache_init()// unneeded; file scope
pysqlite_cache_dealloc() // unneeded; file scope

In Modules/_sqlite/connection.h:
pysqlite_connection_alloc()// unused; no function definition
pysqlite_connection_dealloc()  // unneeded; file scope
pysqlite_connection_cursor()   // unneeded; file scope
pysqlite_connection_close()// unneeded; file scope
pysqlite_connection_rollback() // unneeded; file scope
pysqlite_connection_new()  // unused; no function definition
pysqlite_connection_init() // unneeded; file scope

In Modules/_sqlite/cursor.h:
pysqlite_cursor_execute() // unneeded; file scope
pysqlite_cursor_executemany() // unneeded; file scope
pysqlite_cursor_getiter() // unused; no function definition
pysqlite_cursor_iternext()// unneeded; file scope
pysqlite_cursor_fetchone()// unneeded; file scope
pysqlite_cursor_fetchmany()   // unneeded; file scope
pysqlite_cursor_fetchall()// unneeded; file scope
pysqlite_noop()   // unneeded; file scope
pysqlite_cursor_close()   // unneeded; file scope

In Modules/_sqlite/prepare_protocol.h:
pysqlite_prepare_protocol_init()// unneeded; file scope
pysqlite_prepare_protocol_dealloc() // unneeded; file scope

In Modules/_sqlite/statement.h:
pysqlite_statement_dealloc() // unneeded; file scope

--
components: Library (Lib)
messages: 371353
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: Remove unused and unneeded function declaration from sqlite3 header files
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



[issue40959] Remove unused and unneeded function declaration from sqlite3 header files

2020-06-12 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue40960] Fix the example in hashlib documentarion

2020-06-12 Thread Marcelo


New submission from Marcelo :

The documentation found in https://docs.python.org/2/library/hashlib.html

give us the following example:

```
More condensed:

>>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest()
'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2'
```

Although, we get the error if not encode the string:
```
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Unicode-objects must be encoded before hashing
```

So the example should be (string to bytes):
`hashlib.sha224(b"Nobody inspects the spammish repetition").hexdigest()`

--
assignee: docs@python
components: Documentation
messages: 371354
nosy: docs@python, marcelog...@gmail.com
priority: normal
severity: normal
status: open
title: Fix the example in hashlib documentarion
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue40960] Fix the example in hashlib documentarion

2020-06-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hi Marcelo,

Thanks for the report.  The version of the documentation that you linked to is 
for Python 2.  At the top of that page, there is a redirect to the Python 3 
documentation at https://docs.python.org/3/library/hashlib.html.  You'll see 
that the Python 3 documentation does use bytes for that example.

--
nosy: +cheryl.sabella
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



[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

Thanks for confirming that reality aligns with the documentation.

> when doing the same and passing `shell=True` to the POpen() call, there is no 
> such initial folder in the lookup

Correct, because a fully qualified path to cmd.exe is used, and cmd.exe's 
application folder is not Python's.

Ultimately, the above behaviour could have occurred anyway, so all that has 
really happened is that it is now more obvious. This is what always happens 
when you include support for other platforms - you find out which of your 
previous assumptions were incorrect (same principle applies to all of life if 
you think about it).

If someone wants to update subprocess to manually search PATH when just 
provided with a filename, I'm okay with that. It would be a new enhancement 
though.

For earlier versions, updating the docs to clarify that subprocess does not do 
a PATH search but relies on operating system behaviour for relative paths is 
probably the most helpful way to raise awareness.

--
components:  -Library (Lib)
versions: +Python 3.10 -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



[issue33881] dataclasses should use NFKC to find duplicate members

2020-06-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

The pull request that was opened for this has been closed due to inactivity, so 
this issue is available for anyone to work on.

--
nosy: +cheryl.sabella
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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +lys.nikolaou

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Lysandros, could you take a look?

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Christian, what test are you running to get the error?

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

> Lysandros, could you take a look?

Yup, I'm on it.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Note that although we could just exit if the length of the line is smaller than 
the column offset before calling 
https://github.com/python/cpython/blob/master/Parser/pegen.c#L148 (I assume 
that is the problem) is more important to understand how are we reaching that 
situation.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Agreed. For that I'd probably need the input Christian is getting the error 
with. I'm currently trying things out, but haven't gotten the error yet.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Seems that just this (at top level):

>> yield from

is able to produce a situation where the column offset is bigger than the line 
length:

Col offset is 11 and line is 10

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg371364

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

You can get an assert failure without ASAN with this patch:

diff --git a/Parser/pegen.c b/Parser/pegen.c
index e29910bf86..65fa44921f 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -145,6 +145,9 @@ byte_offset_to_character_offset(PyObject *line, int 
col_offset)
 if (!str) {
 return 0;
 }
+assert(col_offset <= PyUnicode_GET_LENGTH(line) + 1);
 PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace");
 if (!text) {
 return 0;

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Correcting my previous post (deleted):

You can get an assert failure without ASAN with this patch:

diff --git a/Parser/pegen.c b/Parser/pegen.c
index e29910bf86..65fa44921f 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -145,6 +145,9 @@ byte_offset_to_character_offset(PyObject *line, int 
col_offset)
 if (!str) {
 return 0;
 }
+assert(col_offset <= PyUnicode_GET_LENGTH(line));
 PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace");
 if (!text) {
 return 0;

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

I theorize that this happens when the error points to the end of the line. I 
assume that the difference between col_offset and PyUnicode_GET_LENGTH(line) 
may be still bigger than 1 if the line contains some Unicode stuff like with:

>> "Ṕýţĥòñ" +

but I think that would be the same situation.

--

___
Python tracker 

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



[issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7

2020-06-12 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

I will spend time on this on 12-June or 13-June, 2020.
At the very least, if no changes are required, I will document this for 3.7 and 
higher versions.

--
assignee: docs@python -> orsenthil

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Christian Heimes


Christian Heimes  added the comment:

I'm using an ASAN UBSAN build of Python:

$ make clean
$ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer
$ cat > asan-suppression.txt << EOF
# Python/initconfig.c
leak:_PyWideStringList_Copy
EOF
$ LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0"  make
$ LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" 
./python -m test test_eof

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

I cannot reproduce this on my Ubuntu 20.04:

➜  cpython git:(master) ✗ 
LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python 
-m test -v test_eof
Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places 
cannot be represented in type 'int'
== CPython 3.10.0a0 (heads/master:e2fb8a2c42, Jun 12 2020, 16:59:27) [GCC 9.3.0]
== Linux-5.4.0-33-generic-x86_64-with-glibc2.31 little-endian
== cwd: /home/lysnikolaou/repos/cpython/build/test_python_71258
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.11 Run tests sequentially
0:00:00 load avg: 2.11 [1/1] test_eof
test_EOFC (test.test_eof.EOFTestCase) ... ok
test_EOFS (test.test_eof.EOFTestCase) ... ok
test_eof_with_line_continuation (test.test_eof.EOFTestCase) ... ok
test_line_continuation_EOF (test.test_eof.EOFTestCase)
A continuation at the end of input must be an error; bpo2180. ... ok
test_line_continuation_EOF_from_file_bpo2180 (test.test_eof.EOFTestCase)
Ensure tok_nextc() does not add too many ending newlines. ... 
Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places 
cannot be represented in type 'int'
ok

--

Ran 5 tests in 0.413s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 654 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

Running Pablo's examples in the REPL does not reproduce the errors either:

➜  cpython git:(master) ✗ 
LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python  
  
Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 places 
cannot be represented in type 'int'
Python 3.10.0a0 (heads/master:e2fb8a2c42, Jun 12 2020, 16:59:27) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> "Ṕýţĥòñ" +
  File "", line 1
"Ṕýţĥòñ" +
  ^
SyntaxError: invalid syntax
>>> yield from
  File "", line 1
yield from
  ^
SyntaxError: invalid syntax
>>> ^D
➜  cpython git:(master) ✗

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Christian Heimes


Christian Heimes  added the comment:

Did you clean and compile with asan/ubsan?

Older compilers may not detect the issue. My system has GCC 10:
libubsan-10.1.1-1.fc32.x86_64
gcc-10.1.1-1.fc32.x86_64
libasan-10.1.1-1.fc32.x86_64

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Lysandros, are you using a debug build? The assert() won't trigger if you don't 
have run configure with --with-pydebug. I would recommend to:

make distclean && ./configure --with-pydebug && make

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Let me try that. I'm currently using gcc 9.3.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I now configured Python with ./configure --with-pydebug 
--with-address-sanitizer --with-undefined-behavior-sanitizer.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

> Lysandros, are you using a debug build? The assert() won't trigger if you 
> don't have run configure with --with-pydebug.

BTW I'm not talking about the assert not triggering. I'm only saying that 
ASAN/UBSAN do not report an error when running `yield from` in the REPL.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Oh, I was confused by this:

> Running Pablo's examples in the REPL does not reproduce the errors either:


I thought you meant that you could not reproduce the crash also with my patch. 
For the ASAN, you may need the newer gcc and other stuff. I was not able to 
reproduce this on my work macOS but will try on my Arch Linux today at night 
that has the same versions as Christian

--

___
Python tracker 

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



[issue40961] os.putenv should be documented as not affecting os.getenv's return value

2020-06-12 Thread Daniel Martin

New submission from Daniel Martin :

I find this behavior extremely surprising:

$ ABC=def python
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getenv('ABC')
'def'
>>> os.putenv('ABC', 'xyz')
>>> os.getenv('ABC')
'def'

Although the documentation for the os module does say in the documentation for 
putenv that

> "When putenv() is supported, assignments to items in os.environ
> are automatically translated into corresponding calls to putenv();
> however, calls to putenv() don’t update os.environ, so it is
> actually preferable to assign to items of os.environ"

, there is absolutely nothing in the documentation to give the impression that 
os.putenv WILL NOT affect the result of os.getenv in the same process, as it is 
completely undocumented that os.getenv is a wrapper around os.environ.get().

The documentation for os.environ is careful to note that the copy of the 
environment stored in os.environ is read only once at startup, and has a note 
specifically about putenv; however, given this care the lack of any similar 
language in the os.getenv documentation gives the impression that os.getenv 
behaves differently.

Ideally, the documentation of both os.getenv and os.putenv would be modified. 
The getenv documentation should note that it pulls from a mapping captured at 
first import and does not, as the name may imply, result in a call to the C 
function getenv. The putenv documentation should note that calls to putenv 
don’t update os.environ, and therefore do not affect the result of os.getenv.

Possibly, given the thread safety issues, direct calls to os.getenv and 
os.putenv should be deprecated in favor of os.environ use.

--
assignee: docs@python
components: Documentation
messages: 371377
nosy: Daniel Martin, docs@python
priority: normal
severity: normal
status: open
title: os.putenv should be documented as not affecting os.getenv's return value
type: behavior
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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Is the only way to get gcc-10.1 to build from source? Because currently my 
internet connection is too slow to get all of gcc downloaded and `apt install 
gcc-10` installs 10.0.1, which I'm getting totally unrelated erros with.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Is the only way to get gcc-10.1 to build from source? Because currently my 
> internet connection is too slow to get all of gcc downloaded and `apt install 
> gcc-10` installs 10.0.1, which I'm getting totally unrelated erros with.

If your package manager does not have one package or you cannot find a PPA, you 
would need to do it from source or maybe use Docker with s distribution that 
has GCC 10 like Arch.

--

___
Python tracker 

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



[issue39035] Travis CI fail on backports: pyvenv not installed

2020-06-12 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset f88b578949a034f511dd1b4c1c161351b3ee0db8 by Inada Naoki in branch 
'3.5':
bpo-39035: travis: Update image to xenial (#17623)
https://github.com/python/cpython/commit/f88b578949a034f511dd1b4c1c161351b3ee0db8


--
nosy: +larry

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: subprocess_fork_exec leaks memory -> subprocess_fork_exec leaks memory 
when extra_groups are supplied

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

> Note that although we could just exit if the length of the line is smaller 
> than the column offset before calling 
> https://github.com/python/cpython/blob/master/Parser/pegen.c#L148 (I assume 
> that is the problem) is more important to understand how are we reaching that 
> situation.

That's because of 
https://github.com/python/cpython/blob/e2fb8a2c42ee60c72a40d93da69e9efc4e359023/Parser/pegen.c#L404,
 which decreases the size of the string to be decoded by 1 if the last 
character is a newline (or, equivalently, if the error offset points past the 
end of the line). Thus, PyUnicode_DecodeUTF8 returns an object that is one 
character shorter than the col_offset and that's how we get to the situation 
you mentioned.

--

___
Python tracker 

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



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-06-12 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 6.0 -> 7.0
pull_requests: +20024
pull_request: https://github.com/python/cpython/pull/20830

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

>  returns an object that is one character shorter than the col_offset and 
> that's how we get to the situation you mentioned.

What happens with:

>>> "Ṕýţĥòñ" +

--

___
Python tracker 

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



[issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent

2020-06-12 Thread Ben Li-Sauerwine


Ben Li-Sauerwine  added the comment:

Thanks for clarifying.  Using Tk.geometry() instead of Tk.winfo_geometry() does 
indeed resolve the issue on Linux.

Weird that using Tk.winfo_geometry() is idempotent under Windows, though.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

> What happens with:

>>> "Ṕýţĥòñ" +

Exact same thing. The offset is 16 at the start and gets decreased to 15 in the 
line I linked to in my previous post. And then col_offset gets converted to 
col_number which is 9, which seems correct.

Although it is correct, it feels correct by accident, since the if-branch on 
https://github.com/python/cpython/blob/e2fb8a2c42ee60c72a40d93da69e9efc4e359023/Parser/pegen.c#L154
 only evaluates to false due to the decrease of size and I don't know if that 
was intended.

--

___
Python tracker 

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



[issue40935] Links to Python3 docs for some libs return 404

2020-06-12 Thread Edison Abahurire


Edison Abahurire  added the comment:

@Ned, I'm going to search through the docs for any links that may need 
redirecting, and provide their python3 alternatives.

--

___
Python tracker 

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



[issue39073] [security] email module incorrect handling of CR and LF newline characters in Address objects.

2020-06-12 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset f91a0b6df14d6c5133fe3d5889fad7d84fc0c046 by Victor Stinner in 
branch '3.5':
bpo-39073: validate Address parts to disallow CRLF (#19007) (#20450)
https://github.com/python/cpython/commit/f91a0b6df14d6c5133fe3d5889fad7d84fc0c046


--
nosy: +larry

___
Python tracker 

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



[issue40962] Add documentation for asyncio._set_running_loop()

2020-06-12 Thread Eugene Huang


New submission from Eugene Huang :

In the pull request

https://github.com/python/asyncio/pull/452#issue-92245081

the linked comment says that `asyncio._set_running_loop()` is part of the 
public asyncio API and will be documented, but I couldn't find any references 
to this function in

https://docs.python.org/3/library/asyncio-eventloop.html

or anywhere else (tried quick searching for it) in the docs.

--
assignee: docs@python
components: Documentation
messages: 371387
nosy: docs@python, eugenhu
priority: normal
severity: normal
status: open
title: Add documentation for asyncio._set_running_loop()
versions: Python 3.10, 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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Well, I think the solution here is to clip the col_offset to the line length 
and maybe adding assert that the difference is not bigger than 1.

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I'm guessing that some parts of the conversion code were only there to 
circumvent issues in displaying the error messages that weren't pegen's fault. 
These were fixed by Guido in GH-20072, so I think we can delete some of them. 
For example, this patch works just fine for me.

diff --git a/Parser/pegen.c b/Parser/pegen.c
index e29910bf86..2c348178fb 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -150,10 +150,6 @@ byte_offset_to_character_offset(PyObject *line, int 
col_offset)
 return 0;
 }
 Py_ssize_t size = PyUnicode_GET_LENGTH(text);
-str = PyUnicode_AsUTF8(text);
-if (str != NULL && (int)strlen(str) == col_offset) {
-size = strlen(str);
-}
 Py_DECREF(text);
 return size;
 }
@@ -400,9 +396,6 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject 
*errtype,

 if (!error_line) {
 Py_ssize_t size = p->tok->inp - p->tok->buf;
-if (size && p->tok->buf[size-1] == '\n') {
-size--;
-}
 error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace");
 if (!error_line) {
 goto error;

--

___
Python tracker 

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



[issue40219] ttk LabeledScale: label covered by hidden element

2020-06-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Right.  LabelScale is a tkinter.ttk extension, like OptionMenu.  If I do the 
PR, I would call the placeholder 'dummy' since it is permanent (not removed 
after initialization).  I'd like to see what happens without it and expand the 
comment to a line like
# Dummy needed to ... .

--

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Can you run the test suite before/after of pyflakes to make sure we don't 
introduce any regression to double check? If everything looks fine, open a PR :)

--

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread miss-islington


miss-islington  added the comment:


New changeset 0d3350daa8123a3e16d4a534b6e873eb12c10d7c by Christian Heimes in 
branch 'master':
bpo-40955: Fix memory leak in subprocess module (GH-20825)
https://github.com/python/cpython/commit/0d3350daa8123a3e16d4a534b6e873eb12c10d7c


--
nosy: +miss-islington

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20025
pull_request: https://github.com/python/cpython/pull/20831

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20026
pull_request: https://github.com/python/cpython/pull/20832

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20027
pull_request: https://github.com/python/cpython/pull/20833

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

> Can you run the test suite before/after of pyflakes to make sure we don't 
> introduce any regression to double check? If everything looks fine, open a PR 
> :)

The exact same errors before and after! I'll wait on the PR though till someone 
has checked if this indeed solves the heap-buffer-overflow. I'm not at all 
confident that is does and I can't test.

--

___
Python tracker 

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



[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2020-06-12 Thread E. Paine


E. Paine  added the comment:

Is this a problem exclusive to tkinter? I ran the following code, and it 
appears to be an issue with the builtin 'float' method:

>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'de_DE.utf8')
'de_DE.utf8'
>>> float("1,2")
ValueError: could not convert string to float: '1,2'

I have somehow managed to corrupt my locales so I would appreciate if you could 
try on your machine as well (is it just me?!).

--
nosy: +epaine

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Ok, I was able to reproduce:

❯ gcc --version
gcc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

make distclean
./configure --with-address-sanitizer --with-undefined-behavior-sanitizer
LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0"  make -j

❯ LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" 
./python -m test test_eof
0:00:00 load avg: 1.82 Run tests sequentially
0:00:00 load avg: 1.82 [1/1] test_eof
test test_eof failed -- Traceback (most recent call last):
  File "/home/pablogsal/github/python/master/Lib/test/test_eof.py", line 54, in 
test_line_continuation_EOF_from_file_bpo2180
self.assertIn(b'unexpected EOF while parsing', err)
AssertionError: b'unexpected EOF while parsing' not found in 
b'Parser/tokenizer.c:978:50: runtime error: pointer index expression with base 
0x62516900 overflowed to 0xbebebebebebee6be\n=
\n==27549==ERROR: AddressSanitizer: 
heap-buffer-overflow on address 0x60627c51 at pc 0x5612210ca7d4 bp 
0x7fffe6e9ff70 sp 0x7fffe6e9ff60\nREAD of size 1 at 0x60600
0027c51 thread T0\n#0 0x5612210ca7d3 in ascii_decode 
Objects/unicodeobject.c:4941\n#1 0x5612211c9f4a in unicode_decode_utf8 
Objects/unicodeobject.c:4999\n#2 0x5612219201bd in byte_offset_to_characte
r_offset Parser/pegen.c:148\n#3 0x5612219201bd in 
_PyPegen_raise_error_known_location Parser/pegen.c:412\n#4 0x561221920e4d 
in _PyPegen_raise_error Parser/pegen.c:373\n#5 0x561221924981 in tokenizer
_error Parser/pegen.c:321\n#6 0x561221924981 in _PyPegen_fill_token 
Parser/pegen.c:638\n#7 0x56122192777f in _PyPegen_expect_token 
Parser/pegen.c:753\n#8 0x56122193817a in _tmp_15_rule Parser/parser
.c:16184\n#9 0x5612219274f9 in _PyPegen_lookahead 
(/home/pablogsal/github/python/master/python+0x1c344f9)\n#10 0x56122199de2c 
in compound_stmt_rule Parser/parser.c:1860\n#11 0x5612219a65c2 in statem
ent_rule Parser/parser.c:1224\n#12 0x5612219a65c2 in _loop1_11_rule 
Parser/parser.c:15954\n#13 0x5612219a65c2 in statements_rule 
Parser/parser.c:1183\n#14 0x5612219aa4b7 in file_rule Parser/parser.c
:716\n#15 0x5612219aa4b7 in _PyPegen_parse Parser/parser.c:24401\n#16 
0x56122192a768 in _PyPegen_run_parser Parser/pegen.c:1077\n#17 
0x56122192b3ef in _PyPegen_run_parser_from_file_pointer Parser/pe
gen.c:1137\n#18 0x5612213da3c6 in PyRun_FileExFlags 
Python/pythonrun.c:1057\n#19 0x5612213da72c in PyRun_SimpleFileExFlags 
Python/pythonrun.c:400\n#20 0x561220df0dbb in pymain_run_file Modules/main.
c:369\n#21 0x561220df0dbb in pymain_run_python Modules/main.c:553\n#22 
0x561220df3154 in Py_RunMain Modules/main.c:632\n#23 0x561220df3154 in 
pymain_main Modules/main.c:662\n#24 0x561220df3154 i
n Py_BytesMain Modules/main.c:686\n#25 0x7f981bf9a001 in __libc_start_main 
(/usr/lib/libc.so.6+0x27001)\n#26 0x561220ded48d in _start 
(/home/pablogsal/github/python/master/python+0x10fa48d)\n\n0x606
27c51 is located 0 bytes to the right of 49-byte region 
[0x60627c20,0x60627c51)\nallocated by thread T0 here:\n#0 
0x7f981ccce459 in __interceptor_malloc 
/build/gcc/src/gcc/libsanitizer/asan/asan_mal
loc_linux.cpp:145\n#1 0x5612210dfa1d in PyUnicode_New 
Objects/unicodeobject.c:1437\n#2 0x56122121324b in _PyUnicode_Init 
Objects/unicodeobject.c:15535\n#3 0x5612213ae5c3 in pycore_init_types 
Python/
pylifecycle.c:599\n#4 0x5612213ae5c3 in pycore_interp_init 
Python/pylifecycle.c:724\n#5 0x5612213b8b4b in pyinit_config 
Python/pylifecycle.c:765\n#6 0x5612213b8b4b in pyinit_core 
Python/pylifecycle.
c:926\n#7 0x5612213bab6c in Py_InitializeFromConfig 
Python/pylifecycle.c:1136\n#8 0x561220ded752 in pymain_init 
Modules/main.c:66\n#9 0x561220df310a in pymain_main Modules/main.c:653\n
#10 0x5612
20df310a in Py_BytesMain Modules/main.c:686\n#11 0x7f981bf9a001 in 
__libc_start_main (/usr/lib/libc.so.6+0x27001)\n\nSUMMARY: AddressSanitizer: 
heap-buffer-overflow Objects/unicodeobject.c:4941 in ascii_dec
ode\nShadow bytes around the buggy address:\n  0x0c0c7fffcf30: 00 00 00 00 00 
00 00 00 fa fa fa fa 00 00 00 00\n  0x0c0c7fffcf40: 00 00 00 07 fa fa fa fa 00 
00 00 00 00 00 00 00\n  0x0c0c7fffcf50: fa fa fa fa 0
0 00 00 00 00 00 00 05 fa fa fa fa\n  0x0c0c7fffcf60: 00 00 00 00 00 00 00 00 
fa fa fa fa 00 00 00 00\n  0x0c0c7fffcf70: 00 00 00 00 fa fa fa fa 00 00 00 00 
00 00 00 01\n=>0x0c0c7fffcf80: fa fa fa fa 00 00 00 0
0 00 00[01]fa fa fa fa fa\n  0x0c0c7fffcf90: 00 00 00 00 00 00 00 00 fa fa fa 
fa 00 00 00 00\n  0x0c0c7fffcfa0: 00 00 05 fa fa fa fa fa 00 00 00 00 00 00 00 
fa\n  0x0c0c7fffcfb0: fa fa fa fa 00 00 00 00 00 00 0
0 00 fa fa fa fa\n  0x0c0c7fffcfc0: fd fd fd fd

[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread miss-islington


miss-islington  added the comment:


New changeset ee3f7fee94915ab4f34c92d6c89b211de476660d by Miss Islington (bot) 
in branch '3.9':
bpo-40955: Fix memory leak in subprocess module (GH-20825)
https://github.com/python/cpython/commit/ee3f7fee94915ab4f34c92d6c89b211de476660d


--

___
Python tracker 

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



[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread Christian Heimes


Christian Heimes  added the comment:

3.8 and 3.7 don't have the code path and are not affected.

--
components: +Extension Modules -FreeBSD
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -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



[issue40890] Dict views should be introspectable

2020-06-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 3ee0e48b0376a710c08eec6f30e4181563b192a2 by Dennis Sweeney in 
branch 'master':
bpo-40890: Add `mapping` property to dict views (GH-20749)
https://github.com/python/cpython/commit/3ee0e48b0376a710c08eec6f30e4181563b192a2


--

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2020-06-12 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

> +Py_ssize_t linesize = PyUnicode_GET_LENGTH(line);

This line is wrong though, since PyUnicode_GET_LENGTH returns the length in 
code points and PyUnicode_DecodeUTF8 expects the number of bytes. For non-ascii 
input this would push the caret further to the left. For example:

$ ./python.exe
Python 3.10.0a0 (heads/master-dirty:e2fb8a2c42, Jun 12 2020, 20:22:52)
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> "Ṕýţĥòñ" +
  File "", line 1
"Ṕýţĥòñ" +
 ^
SyntaxError: invalid syntax

--

___
Python tracker 

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



[issue40963] distutils make_zipfile uses random order

2020-06-12 Thread ghost43


New submission from ghost43 :

I am trying to generate .zip sdists for a project in a reproducible manner, 
using setuptoools.
The generated zips differ in the order of packed files.

The root cause of the non-determinicity is using os.walk() in make_zipfile here:
https://github.com/python/cpython/blob/0d3350daa8123a3e16d4a534b6e873eb12c10d7c/Lib/distutils/archive_util.py#L174

For a potential fix, see 
https://github.com/pypa/setuptools/commit/29688821b381268a0d59c0d26317d88ad518f966

I guess https://bugs.python.org/issue30693 is sort of related. The change made 
there is necessary, and was sufficient to make the tars reproducible but not 
the zips.

(sidenote: Is it acceptable to sign the PSF CLA with a pseudonym?)

--
components: Distutils
messages: 371400
nosy: dstufft, eric.araujo, ghost43
priority: normal
severity: normal
status: open
title: distutils make_zipfile uses random order
type: behavior
versions: Python 3.10, 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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

Yeah, I'll get onto it now.

--

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

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

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


--
nosy: +thatiparthy
nosy_count: 9.0 -> 10.0
pull_requests: +20028
pull_request: https://github.com/python/cpython/pull/20834

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

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

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

Steve,
  I have done it. And I  didn't see your reply.

--

___
Python tracker 

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



[issue40855] statistics.stdev ignore xbar argument

2020-06-12 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Christian Heimes


New submission from Christian Heimes :

All buildbots and tests are currently failing because connections 
cyrus.andrew.cmu.edu:143 (IMAP) and cyrus.andrew.cmu.edu:993 (IMAPS) are 
hanging.

--
components: Tests
messages: 371403
nosy: christian.heimes, lukasz.langa, ned.deily
priority: release blocker
severity: normal
status: open
title: Connection to IMAP server cyrus.andrew.cmu.edu hangs
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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Christian Heimes


Change by Christian Heimes :


--
assignee:  -> christian.heimes

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

Thanks. Your PR will start to work once I've done the updated build, so don't 
worry about the failure right now.

OpenSSL updates require build manager involvement, so it's blocked on me :)

--

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue33881] dataclasses should use NFKC to find duplicate members

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

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


--
nosy: +thatiparthy
nosy_count: 4.0 -> 5.0
pull_requests: +20031
pull_request: https://github.com/python/cpython/pull/20837

___
Python tracker 

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



[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> This line is wrong though, since PyUnicode_GET_LENGTH returns the length in 
> code points

Whoops! Thanks for pointing that out. In any case, the patch still shows that 
the ASAN error goes away by limiting the access to the string so I suppose that 
we could transform it into a proper patch.

--

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset 08b1bbab6bfa1ff726db13a9fc3885329f73dca4 by Christian Heimes in 
branch 'master':
bpo-40964: disable remote IMAP tests (GH-20836)
https://github.com/python/cpython/commit/08b1bbab6bfa1ff726db13a9fc3885329f73dca4


--

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Christian Heimes


Christian Heimes  added the comment:

The remote server is having intermittent issues. Sometimes all three servers 
behind the host are gone, sometimes they block all packages.

# nmap -vv cyrus.andrew.cmu.edu
Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-12 20:52 CEST
Warning: Hostname cyrus.andrew.cmu.edu resolves to 3 IPs. Using 128.2.157.16.
Initiating Ping Scan at 20:52
Scanning cyrus.andrew.cmu.edu (128.2.157.16) [4 ports]
Completed Ping Scan at 20:52, 0.13s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 20:52
Completed Parallel DNS resolution of 1 host. at 20:52, 0.12s elapsed
Initiating SYN Stealth Scan at 20:52
Scanning cyrus.andrew.cmu.edu (128.2.157.16) [1000 ports]
Completed SYN Stealth Scan at 20:52, 2.88s elapsed (1000 total ports)
Nmap scan report for cyrus.andrew.cmu.edu (128.2.157.16)
Host is up, received reset ttl 239 (0.11s latency).
Other addresses for cyrus.andrew.cmu.edu (not scanned): 128.2.157.15 
128.2.157.14
rDNS record for 128.2.157.16: CYRUS.ANDREW.CMU.EDU
Scanned at 2020-06-12 20:52:35 CEST for 3s
Not shown: 979 closed ports
Reason: 979 resets
PORT STATESERVICE   REASON
23/tcp   filtered telnetno-response
110/tcp  filtered pop3  no-response
135/tcp  filtered msrpc no-response
139/tcp  filtered netbios-ssn   no-response
143/tcp  filtered imap  no-response
445/tcp  filtered microsoft-ds  no-response
515/tcp  filtered printer   no-response
631/tcp  filtered ipp   no-response
993/tcp  filtered imaps no-response
995/tcp  filtered pop3s no-response
1433/tcp filtered ms-sql-s  no-response
2000/tcp filtered cisco-sccpno-response
2003/tcp filtered fingerno-response
2967/tcp filtered symantec-av   no-response
3389/tcp filtered ms-wbt-server no-response
/tcp filtered freeciv   no-response
5900/tcp filtered vnc   no-response
5901/tcp filtered vnc-1 no-response
5902/tcp filtered vnc-2 no-response
5903/tcp filtered vnc-3 no-response
9100/tcp filtered jetdirect no-response

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 3.42 seconds
   Raw packets sent: 1025 (45.076KB) | Rcvd: 980 (39.200KB)

# nmap -vv 128.2.157.16 128.2.157.14 128.2.157.15
Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-12 20:54 CEST
Initiating Ping Scan at 20:54
Scanning 3 hosts [4 ports/host]
Completed Ping Scan at 20:55, 5.03s elapsed (3 total hosts)
Nmap scan report for 128.2.157.16 [host down, received no-response]
Nmap scan report for 128.2.157.14 [host down, received no-response]
Nmap scan report for 128.2.157.15 [host down, received no-response]
Read data files from: /usr/bin/../share/nmap
Nmap done: 3 IP addresses (0 hosts up) scanned in 5.10 seconds
   Raw packets sent: 24 (912B) | Rcvd: 0 (0B)

--

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

... equally happy without an explicit test in anything that's only prerelease 
right now.

--

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

You could test this by getting the event and CloseHandle-ing it. A function to 
do this could be added to _testcapimodule. It'd have to run in its own process, 
but we have (a few) helpers around for this.

Given the concerns, I don't think we should change this in any maintenance 
releases, so I removed 3.7 and 3.8 from the versions list. I'd be equally happy 
without an explicit test in

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Christian Heimes


Change by Christian Heimes :


--
type:  -> behavior

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset f91917908749cb595113f8d8428ae1d6241f0392 by Ned Deily (Christian 
Heimes) in branch '3.9':
bpo-40964: disable remote IMAP tests (GH-20836)
https://github.com/python/cpython/commit/f91917908749cb595113f8d8428ae1d6241f0392


--

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset adce133378be75bcac4d61fd62a151852555000f by Ned Deily (Christian 
Heimes) in branch '3.8':
bpo-40964: disable remote IMAP tests (GH-20836)
https://github.com/python/cpython/commit/adce133378be75bcac4d61fd62a151852555000f


--

___
Python tracker 

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



[issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs

2020-06-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset 0abb70ec93bfc6724199b7dd6c89294ce7d83072 by Ned Deily (Christian 
Heimes) in branch '3.7':
bpo-40964: disable remote IMAP tests (GH-20836)
https://github.com/python/cpython/commit/0abb70ec93bfc6724199b7dd6c89294ce7d83072


--

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-12 Thread Eryk Sun


Eryk Sun  added the comment:

If WaitForSingleObjectEx fails, do you think the system error code should be 
raised as an OSError? Probably an invalid-handle or access-denied error is too 
cryptic here. It may be better to raise something like 
RuntimeError('time.sleep(): invalid SIGINT event handle'). 

> You could test this by getting the event and CloseHandle-ing it. 

Yes, that's a simpler approach. It should work in a child process that's well 
controlled. 

I was thinking of a less controlled environment, in which there's a chance that 
another waitable object will reuse the handle, such as a file object. The test 
would be reliable regardless of process context (but only in the main thread, 
of course) if there were a _PyOS_SetSigintEvent function -- or if sigint_event 
were directly accessible in _testcapimodule. It could just temporarily set a 
duplicate handle with no access. For example:

>>> h1 = CreateEvent(None, True, True, None)
>>> WaitForSingleObject(h1, 0)
0
>>> hp = GetCurrentProcess()
>>> h2 = DuplicateHandle(hp, h1, hp, 0, False, 0)
>>> WaitForSingleObject(h2, 0)
Traceback (most recent call last):
  File "", line 1, in 
pywintypes.error: (5, 'WaitForSingleObject', 'Access is denied.')

--

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g

2020-06-12 Thread Steve Dower


Steve Dower  added the comment:

Okay, new sources and build are up, so I retriggered the PR. If it's all good, 
I'll merge and backport.

--

___
Python tracker 

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



[issue37910] argparse wrapping fails with metavar="" (no metavar)

2020-06-12 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
versions: +Python 3.10 -Python 2.7, 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



[issue37910] argparse wrapping fails with metavar="" (no metavar)

2020-06-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Paul, what do you think about the PR?

--
nosy: +rhettinger

___
Python tracker 

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



  1   2   >