[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-09-03 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 524b8de630036a29ca340bc2ae6fd6dc7dda8f40 by Victor Stinner in 
branch '3.5':
bpo-39603: Prevent header injection in http methods (GH-18485) (#21946)
https://github.com/python/cpython/commit/524b8de630036a29ca340bc2ae6fd6dc7dda8f40


--
nosy: +larry

___
Python tracker 

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



[issue41678] File-level, optionally external sorting

2020-09-03 Thread Platon workaccount


Platon workaccount  added the comment:

Why is shutil.make_archive suitable for a standard library but the file sorter 
not?

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Guido van Rossum


Change by Guido van Rossum :


--
stage: resolved -> 

___
Python tracker 

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



[issue41678] File-level, optionally external sorting

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am of the same opinion as Raymond

--

___
Python tracker 

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



[issue41678] File-level, optionally external sorting

2020-09-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This doesn't seem like something that should be in the standard library.  It is 
more of an application than a building block for writing code.  It is a good 
candidate for an external package on PyPI rather than the standard library.

--
nosy: +rhettinger

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

For the case of returning a list of non-tuples, all of my code assumes bytes, 
so I think changing the docs to say bytes is good. "bytes-like" might be 
overkill. Unfortunately, I don't know enough to say what encoding is returned: 
I just assume utf-8, although everything I'm using is probably ascii.

My code doesn't handle any case where a list of tuples is returned, so I can't 
really comment on that.

--

___
Python tracker 

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



[issue41411] Improve and consolidate f-strings docs

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

@ezio.melotti: What is this waiting for at this point? There was some good 
energy here but progress seems halted, waiting for some kind of decision.

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

That's true. Is a bit sad because a considerable amount of problems we 
experienced with the new parser were due to invalid casts from these structures 
:(

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, I don't believe that will work -- each node type (e.g. `expr_ty`,
`mod_ty`) has its own enum for `kind` (e.g. `_expr_kind`, `_mod_kind`) and
some don't have a `kind` field at all (e.g. `keyword_ty`). So you'd have to
add an extra field to each node type and initialize that with yet another
enum that can be used to distinguish between node *types*. (There are other
options, but they all sound like a lot of work.)

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Given that using asdl_seq currently means casting from void*, we could maybe 
have a set of macros like asdl_seq_GET that are type specialized (there aren't 
many of them) and in debug mode they can check that the ->kind attribute is 
consistent with the specific type that the macro represents. For instance 
asdl_seq_GET_EXPR will check that the ->kind attribute is consistent with a 
valid EXPR. It will not catch all problems but it will catch almost all the 
typical ones in simple sequences.

--

___
Python tracker 

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



[issue41705] os.makedirs fails on long-path UNC-paths if it is the first sub-folder

2020-09-03 Thread Eryk Sun


Eryk Sun  added the comment:

This behavior is due to issue 37609, i.e. ntpath.splitdrive fails for "UNC" 
device paths.

>>> ntpath.splitdrive('//?/UNC/server/share')
('//?/UNC', '/server/share')

The result should be "//?/UNC/server/share". A path on the "UNC" device 
requires a share component, on which is mounted a local or remote filesystem 
directory. It's functionally part of the 'drive' path. Using just the root path 
or a server path on the "UNC" device is malformed in the context of a normal 
file API open. The former fails as ERROR_INVALID_NAME (123), and the latter 
fails as ERROR_BAD_PATHNAME (161). 

The incorrect splitdrive result in turn makes ntpath.split misbehave:

>>> ntpath.split('//?/UNC/server/share')
('//?/UNC/server', 'share')
>>> ntpath.split('//?/UNC/server')
('//?/UNC/', 'server')

The correct result should be ('//?/UNC/server/share', '').

--
nosy: +eryksun
type: crash -> behavior

___
Python tracker 

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



[issue41708] request make uninstall target

2020-09-03 Thread Jeff Scheibly


New submission from Jeff Scheibly :

I went through and ran the make altinstall from the Python3.8.3.tar.gz and 
after running the .configure --enable-optimizations, I ran make altinstall, 
which was successful.

Would it be possible to get a uninstall target added so that in the case you 
may need a different version the uninstall would be super quick.

--
components: Installation
messages: 376325
nosy: jeffs
priority: normal
severity: normal
status: open
title: request make uninstall target
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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

FWIW the bug was a classic type error -- in a decent language the asdl_seq
type would have been generic and this would have been caught without an
ASAN builder...

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Brad Larsen


Brad Larsen  added the comment:

Nice work with the quick fix!  I'm also happy to see the addition of the Linux 
ASAN builder -- that should help detect memory errors earlier on in the future.

--

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 40e2444c364eede59f193979df5a02ed958f56e9 by Miss Islington (bot) 
in branch '3.8':
bpo-39010: Improve test shutdown (GH-22066) (#22083)
https://github.com/python/cpython/commit/40e2444c364eede59f193979df5a02ed958f56e9


--

___
Python tracker 

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



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

2020-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

I can reproduce the issue with:

$ LC_ALL=xxx ./python -m test test_c_locale_coercion -m 
test_PYTHONCOERCECLOCALE_set_to_one -v
(...)
==
ERROR: test_PYTHONCOERCECLOCALE_set_to_one 
(test.test_c_locale_coercion.LocaleCoercionTests)
--
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/test/test_c_locale_coercion.py", line 
410, in test_PYTHONCOERCECLOCALE_set_to_one
loc = locale.setlocale(locale.LC_CTYPE, "")
  File "/home/vstinner/python/master/Lib/locale.py", line 610, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
(...)

--

___
Python tracker 

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



[issue41696] asyncio.run interacts surprisingly with debug mode

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset a2680058ee1f43cab282e9f4c2b35fd89464ebb6 by Miss Islington (bot) 
in branch '3.9':
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071)
https://github.com/python/cpython/commit/a2680058ee1f43cab282e9f4c2b35fd89464ebb6


--

___
Python tracker 

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



[issue41696] asyncio.run interacts surprisingly with debug mode

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 1f5f12737755f246fee83a54c600779ad76934a4 by Miss Islington (bot) 
in branch '3.8':
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)
https://github.com/python/cpython/commit/1f5f12737755f246fee83a54c600779ad76934a4


--

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 8d68e59f11267ded765d4af6d71a49784a12fad5 by Miss Islington (bot) 
in branch '3.9':
bpo-39010: Improve test shutdown (GH-22066) (#22082)
https://github.com/python/cpython/commit/8d68e59f11267ded765d4af6d71a49784a12fad5


--

___
Python tracker 

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



[issue41707] Builtins like int() and float() should not blindly treat buffer protocol bytes as string characters.

2020-09-03 Thread Alex Mohr


New submission from Alex Mohr :

Instead they should request and take into consideration the buffer object's 
data format.  For example, surely we don't want to treat floating point binary 
representations as string characters:

>>> from array import array
>>> a = array('f', [1.2, 2.3, 3.4])
>>> int(a)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid literal for int() with base 10: 
b'\x9a\x99\x99?33\x13@\x9a\x99Y@'

It's even a little dangerous, since you can get "lucky" with certain binary 
representations:

>>> a = array('I', [875770417, 875770420])
>>> int(a)
12344234

--
components: Interpreter Core
messages: 376317
nosy: amohr
priority: normal
severity: normal
status: open
title: Builtins like int() and float() should not blindly treat buffer protocol 
bytes as string characters.
type: behavior

___
Python tracker 

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



[issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly

2020-09-03 Thread William Chargin


Change by William Chargin :


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

___
Python tracker 

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



[issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly

2020-09-03 Thread William Chargin

New submission from William Chargin :

The operator override dunder methods, like `__add__`, are described in
the “Data model” docs here:


Those docs say:

> For instance, to evaluate the expression `x + y`, where `x` is an
> instance of a class that has an `__add__()` method, `x.__add__(y)` is
> called.

But this is not correct: `x + y` always uses `type(x).__add__`, which
may be different from `x.__add__` if `__add__` has been set directly on
the instance.

Demonstration:

```
class C:
def __add__(self, other):
return "from class"


c = C()
print(c + c)  # prints "from class"

c.__add__ = lambda other: "from instance"
print(c.__add__(c))  # prints "from instance"
print(type(c).__add__(c, c))  # prints "from class"

print(c + c)  # prints "from class"!
```

The same issue appears in the reversed operator dunder (`__radd__`,
et al.) docs below.

I have a patch that I can submit as a PR; just need a bpo number.

--
assignee: docs@python
components: Documentation
messages: 376316
nosy: docs@python, wchargin
priority: normal
severity: normal
status: open
title: docs: operator dunder (`__add__`, et al.) invocations described 
incorrectly
type: enhancement
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



[issue41705] os.makedirs fails on long-path UNC-paths if it is the first sub-folder

2020-09-03 Thread Safihre


Change by Safihre :


--
title: os.makedirs fails long-path UNC-paths if it is the first sub-folder -> 
os.makedirs fails on long-path UNC-paths if it is the first sub-folder
type:  -> crash

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21169
pull_request: https://github.com/python/cpython/pull/22083

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21168
pull_request: https://github.com/python/cpython/pull/22082

___
Python tracker 

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



[issue41702] Inconsistent behaviour in strftime

2020-09-03 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

3.8.2 (on Alpine Linux under WSL) produces '0020-10-05', just like your 3.6 
example. Not seeing anything obvious in commit history that would break it for 
3.7. That said, 3.7 is in security fix only mode at this point (see 
https://devguide.python.org/#status-of-python-branches ); as this works on the 
latest release, I'm thinking this won't be fixed for 3.7.

--
nosy: +josh.r
title: Inconcistent behaviour in strftime -> Inconsistent behaviour in strftime

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset a986b061a3cd4661eb9f857e2936291f1847bd15 by Miss Islington (bot) 
in branch '3.8':
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)
https://github.com/python/cpython/commit/a986b061a3cd4661eb9f857e2936291f1847bd15


--

___
Python tracker 

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



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-09-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 49571c0b0e57e20d85727c738d9a0fe342dd2938 by Miss Islington (bot) 
in branch '3.9':
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034)
https://github.com/python/cpython/commit/49571c0b0e57e20d85727c738d9a0fe342dd2938


--

___
Python tracker 

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



[issue41705] os.makedirs fails long-path UNC-paths if it is the first sub-folder

2020-09-03 Thread Safihre


New submission from Safihre :

It consistently fails on the first directory in a long-path UNC notation 
server-folder.

>>> os.makedirs(r"\\?\UNC\DiskStation\already_exists", exist_ok=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 223, in makedirs
mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is 
incorrect: '?\\UNC\\'

>>> os.makedirs(r"\\?\UNC\DiskStation\already_exists")
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 223, in makedirs
mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is 
incorrect: '?\\UNC\\'


The second level directory is working correctly as expected:

>>> os.makedirs(r"\\?\UNC\DiskStation\already_exists\new")

>>> os.makedirs(r"\\?\UNC\DiskStation\already_exists\new")
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", 
line 223, in makedirs
mkdir(name, mode)
FileExistsError: [WinError 183] Cannot create a file when that file already 
exists: '?\\UNC\\DiskStation\\test_get2\\test2'


Inspecting the code, I think the problem is in the os.path.exists function that 
is called from within os.makedirs, the line in os.makedirs says:
if head and tail and not path.exists(head):

But:
>>> head, tail = path.split(r"\\?\UNC\DiskStation\already_exists")
('?\\UNC\\DiskStation', 'already_exists')

>>> os.path.exists(r'\\?\UNC\DiskStation')
False
>>> os.path.exists(r'\\DiskStation')
False

So it wrongly goes ahead and tries to create \\?\UNC\DiskStation

--
components: Windows
messages: 376312
nosy: Safihre, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.makedirs fails long-path UNC-paths if it is the first sub-folder
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



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

2020-09-03 Thread Vinay Sajip


Vinay Sajip  added the comment:

> if any author of any module that you use changes the global logger 
> configuration

This is an anti-pattern - any library module which does this should have a bug 
report raised about it. Only applications should change the logging 
configuration. Can you share which libraries are causing this type of problem 
for you?

I'm not sure emitting a message using the logging machinery itself would work 
as expected, as under the changed configuration the dispatch of logging 
messages might not work as you expect.

Why does setting breakpoints on logging.basicConfig, logging.config.fileConfig 
and logging.config.dictConfig not work for your use case?

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for the report Brad, and thanks for the quick fix Pablo!

--

___
Python tracker 

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



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

2020-09-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



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

2020-09-03 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
nosy: +corona10
nosy_count: 2.0 -> 3.0
pull_requests: +21167
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22081

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset be17295280c89771c80f317da072f6c0d016cc60 by Pablo Galindo in 
branch '3.9':
[3.9] bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in 
the parser (GH-22077) (GH-22079)
https://github.com/python/cpython/commit/be17295280c89771c80f317da072f6c0d016cc60


--

___
Python tracker 

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



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

2020-09-03 Thread Jack Jansen


New submission from Jack Jansen :

The logging module and its API make it easy to modify the behaviour of all 
loggers used in any package in your program.

Unfortunately the downside of this is that if any author of any module that you 
use changes the global logger configuration you get in a situation where all 
your logger calls are not behaving as expected. Moreover, it is very difficult 
to debug this and to find the culprit.

If the logger module had a global "debug logger usage" flag which would make it 
emit a log message whenever a call changed the global configuration this would 
help, especially if the messages were vectored through a single function or 
method that you could then set a breakpoint on.

--
components: Library (Lib)
messages: 376308
nosy: jackjansen
priority: normal
severity: normal
status: open
title: logging module needs some form of introspection or debugging support
type: enhancement
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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue39883] Use BSD0 license for code in docs

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 9fef7c54a0adfade5ec94259d97f22e05fe9e3e3 by Miss Islington (bot) 
in branch '3.8':
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074)
https://github.com/python/cpython/commit/9fef7c54a0adfade5ec94259d97f22e05fe9e3e3


--

___
Python tracker 

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



[issue39883] Use BSD0 license for code in docs

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

Todd, you have a PR for the pydotorg repo as well, right? Can you link it here?

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



[issue39883] Use BSD0 license for code in docs

2020-09-03 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset a5d0232b0d2cbcbdeb0d89ea3d8826241a53a7c7 by Miss Islington (bot) 
in branch '3.9':
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073)
https://github.com/python/cpython/commit/a5d0232b0d2cbcbdeb0d89ea3d8826241a53a7c7


--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21166
pull_request: https://github.com/python/cpython/pull/22079

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-03 Thread Dong-hee Na


Dong-hee Na  added the comment:

@eric

What do you think about?

--
nosy: +corona10, eric.smith

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 315a61f7a9418d904e0eea14b1f054fac3a90e9f by Pablo Galindo in 
branch 'master':
bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the 
parser (GH-22077)
https://github.com/python/cpython/commit/315a61f7a9418d904e0eea14b1f054fac3a90e9f


--

___
Python tracker 

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



[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-09-03 Thread Dong-hee Na


Dong-hee Na  added the comment:

+1

--

___
Python tracker 

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



[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-09-03 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> return _Py_Call(_PyPegen_dummy_name(p), args, keywords, EXTRA_EXPR(first, 
> last->element));

Actually, this is not enough because last->element may be a keyword_ty.

I have updated PR 22077 to receive the EXTRA macro in the call because that 
simplifies the code and allows us to not need to distinguish between keywords 
and expr_ty elements.

--

___
Python tracker 

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



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2020-09-03 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +EWDurbin

___
Python tracker 

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



[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2020-09-03 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 5.0 -> 6.0
pull_requests: +21165
pull_request: https://github.com/python/cpython/pull/22078

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have added a new builbot builder to detect these problems in the future more 
immediately:

https://buildbot.python.org/all/#/builders/582

For example, building the current master:

https://buildbot.python.org/all/#/builders/582/builds/1

And with PR 22077:

https://buildbot.python.org/all/#/builders/581/builds/1

--

___
Python tracker 

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



[issue39727] cgi.parse() fatally attempts str.decode when handling multipart/form-data

2020-09-03 Thread Robert


Robert  added the comment:

Would this patch already solve? :

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

There seems to be another bug: The strange 'latin-1' default encoding of 
cgi.parse(), which only has effect in non-mulitpart:

if hasattr(fp,'encoding'):
encoding = fp.encoding
else:
encoding = 'latin-1'


( cgi.FieldStorage and the other functions in cgi and urllib.parse use a 
'utf-8' default correctly - and do not try fp.encoding, which is usually not 
present and not reasonable in form handling WSGI. And 
'application/x-www-form-urlencoded' implies  utf-8. )

=> that default should possibly become utf-8. Optionally cgi.parse() could take 
an extra parameter encoding=None  .

--
nosy: +kxroberto2

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-03 Thread Matthieu Dartiailh


New submission from Matthieu Dartiailh :

A number of bytecodes have been added removed in Python 3.9 as documented in 
https://docs.python.org/3.9/library/dis.html. However only the addition of 
LOAD_ASSERTION_ERROR is currently documented in What's New. The relevant bpo 
issues are:
- https://bugs.python.org/issue33387
- https://bugs.python.org/issue39320

--
messages: 376298
nosy: mdartiailh
priority: normal
severity: normal
status: open
title: Most bytecode changes are absent from Python 3.9 What's new

___
Python tracker 

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



[issue41191] PyType_FromModuleAndSpec is not mentioned in 3.9 What's new

2020-09-03 Thread Matthieu Dartiailh


Change by Matthieu Dartiailh :


--
resolution:  -> fixed

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The reason this does not manifest itself without the address sanitizer is 
because that information is thrown away later, and the line and col numbers for 
the Call node end being correct.

--

___
Python tracker 

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



[issue41702] Inconcistent behaviour in strftime

2020-09-03 Thread Valdemar Rolfsen


New submission from Valdemar Rolfsen :

Inconsistency in strftime between python 3.6 and 3.7 when parsing first-century 
dates.

Python 3.6
>>> datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")
'0020-10-05'

Python 3.7
>>> datetime.datetime.strptime("0020-10-05", "%Y-%m-%d").strftime("%Y-%m-%d")
'20-10-05'

This means that the following would work for 3.6 but raise a ValueError for 3.7:

>>> d = "0020-10-05"
>>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")
>>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d")

--
components: Library (Lib)
messages: 376296
nosy: belopolsky, p-ganssle, valdemarrolfsen
priority: normal
severity: normal
status: open
title: Inconcistent behaviour in strftime
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-03 Thread Vinay Sajip


Vinay Sajip  added the comment:

See also bpo-8200, which relates to the way the code is currently.

--

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue41697] Heap buffer overflow in the parser

2020-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think I have the problem. The problem is that the asdl_seq that is b is 
filled with KeywordOrStarred* not with expr_ty.

We need to do:

KeywordOrStarred* last = asdl_seq_GET(b, asdl_seq_LEN(b)-1);

return _Py_Call(_PyPegen_dummy_name(p), args, keywords, EXTRA_EXPR(first, 
last->element));

--

___
Python tracker 

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



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2020-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal, zach.ware

___
Python tracker 

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



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2020-09-03 Thread STINNER Victor


New submission from STINNER Victor :

Since the buildbot server migrated to a new machine, the web page losts is 
connection and the whole web page is reloaded every minute. Try for example:

https://buildbot.python.org/all/#/release_status

The new buildbot.python.org machine is now behind a load balancer.

TCP connections closed after 1 minute already affected clients: see bpo-41642. 
It seems like HTTPS connections (tcp/443) are also affected.

--
components: Tests
messages: 376293
nosy: vstinner
priority: normal
severity: normal
status: open
title: Buildbot web page: connection lost after 1 minute, then display 
"Connection restored" popup
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



[issue40941] Merge generator.gi_running and frame executing flag into single frame state

2020-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

The change introduced compiler warnings on Windows:

c:\vstinner\python\master\python\ceval.c(1448): warning C4244: '=': conversion  
from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui 
ld\pythoncore.vcxproj]
c:\vstinner\python\master\python\ceval.c(2254): warning C4244: '=': conversion  
from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui 
ld\pythoncore.vcxproj]
c:\vstinner\python\master\python\ceval.c(2271): warning C4244: '=': conversion  
from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui 
ld\pythoncore.vcxproj]

--
nosy: +vstinner

___
Python tracker 

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



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

2020-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

The test also fails on PPC64 Fedora 3.x:
https://buildbot.python.org/all/#/builders/237/builds/40

The test pass on PPC64 Fedora 3.8, the latest build still used 
"LANG=en_US.UTF-8":
https://buildbot.python.org/all/#/builders/163/builds/12

The test still passed on PPC64 Fedora 3.9 in build 15 which was using 
LANG=en_US.UTF-8:
https://buildbot.python.org/all/#/builders/34/builds/15

pythoninfo:

pre_config[utf8_mode]: 0
os.environ[LANG]: en_US.UTF-8
sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, 
dev_mode=False, utf8_mode=0)
sys.filesystem_encoding: utf-8/surrogateescape


So the test started to fail when the buildbot worker configured changed to use 
LANG=C.UTF-8.

--

___
Python tracker 

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



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

2020-09-03 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/34/builds/16

pythoninfo:

pre_config[utf8_mode]: 1
os.environ[LANG]: C.UTF-8
sys.filesystem_encoding: utf-8/surrogateescape
sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, 
dev_mode=False, utf8_mode=1)

Tests logs:

0:23:06 load avg: 2.33 Re-running test_c_locale_coercion in verbose mode
skipped 'No C-with-UTF-8 locale available'
test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) ... ok
test_PYTHONCOERCECLOCALE_not_set 
(test.test_c_locale_coercion.LocaleCoercionTests) ... ok
test_PYTHONCOERCECLOCALE_not_zero 
(test.test_c_locale_coercion.LocaleCoercionTests) ... ok
test_PYTHONCOERCECLOCALE_set_to_one 
(test.test_c_locale_coercion.LocaleCoercionTests) ... ERROR
test_PYTHONCOERCECLOCALE_set_to_warn 
(test.test_c_locale_coercion.LocaleCoercionTests) ... ok
test test_c_locale_coercion failed
test_PYTHONCOERCECLOCALE_set_to_zero 
(test.test_c_locale_coercion.LocaleCoercionTests) ... ok

==
ERROR: test_PYTHONCOERCECLOCALE_set_to_one 
(test.test_c_locale_coercion.LocaleCoercionTests)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.9.edelsohn-fedora-ppc64/build/Lib/test/test_c_locale_coercion.py",
 line 410, in test_PYTHONCOERCECLOCALE_set_to_one
loc = locale.setlocale(locale.LC_CTYPE, "")
  File 
"/home/shager/cpython-buildarea/3.9.edelsohn-fedora-ppc64/build/Lib/locale.py", 
line 610, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

--

Ran 6 tests in 3.138s

FAILED (errors=1, skipped=1)
1 test failed again:
test_c_locale_coercion


I guess that the locale.setlocale(locale.LC_CTYPE, "") call should catch the 
locale.Error and skip the test if the locale is not supported.

--
components: Tests
messages: 376290
nosy: ncoghlan, vstinner
priority: normal
severity: normal
status: open
title: test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on 
PPC64 Fedora 3.9
versions: Python 3.9

___
Python tracker 

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



[issue27674] Quote mark breaks http.cookies, Cookie.py processing

2020-09-03 Thread Benoît Brayer

Benoît Brayer  added the comment:

Please find what Django's devs have done to parse cookies: 

https://github.com/django/django/commit/93a135d111c2569d88d65a3f4ad9e6d9ad291452

I hope this might help to find a solution.

--
nosy: +brayer.benoit

___
Python tracker 

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



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

2020-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3 by Mohamed Koubaa in 
branch 'master':
bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)
https://github.com/python/cpython/commit/71d1bd9569c8a497e279f2fea6fe47cd70a87ea3


--

___
Python tracker 

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