[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2020-03-14 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 3a8c56295d6272ad2177d2de8af4c3f824f3ef92 by Inada Naoki in branch 
'master':
Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer()" (GH-18985)
https://github.com/python/cpython/commit/3a8c56295d6272ad2177d2de8af4c3f824f3ef92


--

___
Python tracker 

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



[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2020-03-14 Thread Inada Naoki


Change by Inada Naoki :


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



[issue39963] Subclassing slice objects

2020-03-14 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue39915] await_args_list in AsyncMock always refers to the last awaited call object

2020-03-14 Thread Chris Withers


Chris Withers  added the comment:


New changeset f6bdac1bf718eab0cc5b6554f363f21252d245ce by Miss Islington (bot) 
in branch '3.8':
bpo-39915: Ensure await_args_list is updated according to the order in which 
coroutines were awaited (GH-18927)
https://github.com/python/cpython/commit/f6bdac1bf718eab0cc5b6554f363f21252d245ce


--

___
Python tracker 

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



[issue39915] await_args_list in AsyncMock always refers to the last awaited call object

2020-03-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Mads Sejersen for the report. Closing this as fixed as it's merged to 
3.9 and 3.8.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-14 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +18334
pull_request: https://github.com/python/cpython/pull/18986

___
Python tracker 

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



[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

2020-03-14 Thread Jens Reidel


Change by Jens Reidel :


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

___
Python tracker 

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



[issue39956] Numeric Literals vs string "1_1" on input int() or float() or literal_eval

2020-03-14 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Raymond]

> I prefer what we have now.  The language is consistent [...]

Agreed. I don't see value in having two different sets of rules, one for 
numeric literals and one for explicit str-to-int conversions. And if we *were* 
to adopt a different set of rules for str-to-int conversions, what would those 
rules be? There are a lot of fairly arbitrary choices to make (whitespace 
before/after/between sign and digits, digit sets, leading zeros, characters 
permitted as signs, permissible digit separators).
The decision would be easier if there were a widespread standard that could 
help us choose a particular ruleset, but I'm not aware of any such standard.

Much cleaner and simpler to have the rules for str-to-int match those for 
numeric literal parsing. (And similarly for floats.)

[zd nex]
> I would suggest that it would be possible to strictly check strings [...]

As Serhiy pointed out, it already is possible, in a variety of ways. If you're 
arguing for something like `int("+123", strict=True)`, you'd need to say 
exactly what "strict=True" should mean, make a case that your particular choice 
is sufficiently standard and useful to others to make it worth adding to core 
Python, consider how it would interact with the "base" argument, and a whole 
lot more. If you want to take that forward, I think that's something you'd need 
to bring up on the python-ideas mailing list for further discussion. I'll close 
here.

--
nosy: +mark.dickinson
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 5208b4b37953a406db0ed6a9db545c2948dde989 by Zackery Spytz in 
branch 'master':
bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806)
https://github.com/python/cpython/commit/5208b4b37953a406db0ed6a9db545c2948dde989


--

___
Python tracker 

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



[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I though there are at least 3-4 use cases in the core and stdlib.

--

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +18336
pull_request: https://github.com/python/cpython/pull/18989

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +18337
pull_request: https://github.com/python/cpython/pull/18990

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset e634a8ac1f8a2904a2241b83fc5e4c9f40d5c7ca by Mark Dickinson in 
branch '3.8':
[3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder 
(GH-18806) (GH-18989)
https://github.com/python/cpython/commit/e634a8ac1f8a2904a2241b83fc5e4c9f40d5c7ca


--

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think we should distinguish minimal supported C standard for compiling 
CPython itself and for compiling extensions. We can use all C99 features 
supported by main compilers in the code of CPython, but C99 is not even 
compatible with C++, and it may be not compatible with extensions written in 
other languages (D, Rust, Go, etc), so I think we should use more restricted 
version in headers.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 4dcfe5f2e4bad8e03990de75d8d4ec20e8aa23b3 by Mark Dickinson in 
branch '3.7':
[3.7] bpo-39871: Fix possible SystemError in atan2, copysign and remainder 
(GH-18806) (GH-18990)
https://github.com/python/cpython/commit/4dcfe5f2e4bad8e03990de75d8d4ec20e8aa23b3


--

___
Python tracker 

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



[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-03-14 Thread Mark Dickinson


Mark Dickinson  added the comment:

Zackery: Thanks for the fix! Now merged and backported to 3.8 and 3.7.

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



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is the problem with the current code?

--

___
Python tracker 

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



[issue39962] Wrong file.tell() function results (Windows 10/Python 64 3.8.2/3.7 - no bug in PyPy3.6/Python2.7)

2020-03-14 Thread Cezary Wagner


Cezary Wagner  added the comment:

> The I/O stack in Python 3 does not use C FILE streams, and this issue is not 
> related to Windows. TextIOWrapper.tell returns a "cookie" based on the 
> decoder state:

That can big problem when I use serialization if f.tell() is "cookie".

When I serialize it and run program again f.seek() will not works.

I will test it but I think that can be big problem since this behavior is very 
unclear and non standard (comparing to C++/C#/Java ...).

Maybe it should some method to get right position not "opaque position".

--

___
Python tracker 

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



[issue39962] Wrong file.tell() function results (Windows 10/Python 64 3.8.2/3.7 - no bug in PyPy3.6/Python2.7)

2020-03-14 Thread Cezary Wagner


Cezary Wagner  added the comment:

I tested is and it is not "state cookie" but it is "absolute position" and it 
is "stateless".

> The I/O stack in Python 3 does not use C FILE streams, and this issue is not 
> related to Windows. TextIOWrapper.tell returns a "cookie" based on the 
> decoder state:

I will study: 
https://github.com/python/cpython/blob/3.8/Modules/_io/textio.c#L2589 - Thank 
you for reference.

See this test code (wrong seek is good - decoder has not state before - first 
line of program).
You can swap this two fragments and it still works.

print('seek 18446744073709554618')
with open('../s01_parser_eval/data/out-6976.txt') as pgn:
pgn.seek(18446744073709554618)
while pgn.tell() != 3003:
pgn.readline()
print(pgn.tell())

print()
print('seek 0')
with open('../s01_parser_eval/data/out-6976.txt') as pgn:
pgn.seek(0)
while pgn.tell() != 18446744073709554618:
pgn.readline()
print(pgn.tell())
pgn.readline()
print('next', pgn.tell())

print('seek 18446744073709554618')
with open('../s01_parser_eval/data/out-6976.txt') as pgn:
pgn.seek(18446744073709554618)
while pgn.tell() != 3003:
pgn.readline()
print(pgn.tell()))

--

___
Python tracker 

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



[issue39962] Wrong file.tell() function results (Windows 10/Python 64 3.8.2/3.7 - no bug in PyPy3.6/Python2.7)

2020-03-14 Thread Cezary Wagner


Cezary Wagner  added the comment:

C:\root\Python\Python38\python.exe "C:/Users/Cezary 
Wagner/PycharmProjects/chess-lichess-eval-parse/sandbox/s03_create_tree/s03_python_bug.py"
seek 18446744073709554618
3003

seek 0
75
114
145
165
181
205
227
246
265
290
315
328
365
387
411
413
18446744073709554618
next 3003
seek 18446744073709554618
3003

Process finished with exit code 0

--

___
Python tracker 

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



[issue38938] Possible performance improvement for heaqq.merge()

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a large change. And making heaqq.merge a class looks unrelated to the 
declared goal. I afraid it may add significant overhead.

Since this is an optimization, could you please provide any benchmarks which we 
can use to check the performance boost?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39585] Delete a pending item in _warning.c

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 57c781048915e45d15eaa348c51ec01b12cc170a by Hai Shi in branch 
'master':
bpo-39585: Delete a pending comment in _warning.c (GH-18414)
https://github.com/python/cpython/commit/57c781048915e45d15eaa348c51ec01b12cc170a


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39585] Delete a pending item in _warning.c

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The C code is equivalent to the Python code. No special handling is needed.

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :


New changeset b81f40f0adae3b1d1e57f9a89940ba827b9ede70 by David CARLIER in 
branch 'master':
bpo-39582: ossaudiodev module update helpers signature for ioctl calls. 
(GH-18412)
https://github.com/python/cpython/commit/b81f40f0adae3b1d1e57f9a89940ba827b9ede70


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +18338
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18991

___
Python tracker 

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18339
pull_request: https://github.com/python/cpython/pull/18992

___
Python tracker 

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



[issue39962] Wrong file.tell() function results (Windows 10/Python 64 3.8.2/3.7 - no bug in PyPy3.6/Python2.7)

2020-03-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

> That can big problem when I use serialization if f.tell() is "cookie".

I'm sorry, but that's the way it is with text files. You'll need to find some 
other way to accomplish what you're trying to achieve.

Since this isn't a bug, I'm closing this issue. You might want to try 
stackoverflow or python-list if you'd like some additional help.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

RFC 8297
RFC 8470

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

RFC8297
RFC8470

--

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

RFC 8297: https://tools.ietf.org/html/rfc8297
RFC 8470: https://tools.ietf.org/html/rfc8470

--

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset da52be47690da0d9f78d0dce9ee5c3e4dbef49e1 by Dong-hee Na in branch 
'master':
bpo-39509: Update HTTP status code to follow IANA (GH-18294)
https://github.com/python/cpython/commit/da52be47690da0d9f78d0dce9ee5c3e4dbef49e1


--

___
Python tracker 

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



[issue39509] Update HTTP status code to follow IANA

2020-03-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18341
pull_request: https://github.com/python/cpython/pull/18994

___
Python tracker 

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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6672c16b1d7f83789bf3a2016bd19edfd3568e71 by Taine Zhao in branch 
'master':
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 
3.6+ (GC-18550)
https://github.com/python/cpython/commit/6672c16b1d7f83789bf3a2016bd19edfd3568e71


--

___
Python tracker 

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



[issue39954] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x

2020-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

> @Victor Can tests be skipped on the basis of required dependencies failing to 
> load/run?

No idea how to detect such issue. For me, such installation issue is uncommon 
and it's easier to fix your system rather than trying to skip the test.

--
status: pending -> open

___
Python tracker 

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 148786a2cd56f71a87bdcf4dd4e5c4ca00f3630e by Miss Islington (bot) 
in branch '3.7':
bpo-39582: ossaudiodev module update helpers signature for ioctl calls. 
(GH-18412)
https://github.com/python/cpython/commit/148786a2cd56f71a87bdcf4dd4e5c4ca00f3630e


--

___
Python tracker 

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 9644702936a5758b99bd951446a5b0ef05ec022a by Miss Islington (bot) 
in branch '3.8':
bpo-39582: ossaudiodev module update helpers signature for ioctl calls. 
(GH-18412)
https://github.com/python/cpython/commit/9644702936a5758b99bd951446a5b0ef05ec022a


--

___
Python tracker 

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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 725cbce25084a67ad7ff48b75cca3e240ef57606 by Miss Islington (bot) 
in branch '3.7':
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 
3.6+ (GC-18550)
https://github.com/python/cpython/commit/725cbce25084a67ad7ff48b75cca3e240ef57606


--

___
Python tracker 

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



[issue39585] Delete a pending item in _warning.c

2020-03-14 Thread hai shi


hai shi  added the comment:

Thanks, serhiy.

--

___
Python tracker 

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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset a927e91186727b5184d774d1d99c70b9ff5497f5 by Miss Islington (bot) 
in branch '3.8':
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 
3.6+ (GC-18550)
https://github.com/python/cpython/commit/a927e91186727b5184d774d1d99c70b9ff5497f5


--

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Ashwin Ramaswami


Change by Ashwin Ramaswami :


--
keywords: +patch
nosy: +epicfaace
nosy_count: 10.0 -> 11.0
pull_requests: +18342
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18995

___
Python tracker 

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



[issue39677] 3.6+ documentation for MAKE_FUNCTION

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Sorry for the delay with review and thank you for your contribution.

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

___
Python tracker 

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



[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-03-14 Thread Thomas Krennwallner


Change by Thomas Krennwallner :


--
keywords: +patch
nosy: +tkren
nosy_count: 3.0 -> 4.0
pull_requests: +18343
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18996

___
Python tracker 

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



[issue39582] ossaudiodev update helpers signature

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am not sure that it fixes a real bug, I did not check it on different 
platforms, but just for the case I backported it to 3.7 and 3.8.

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Arkadiusz Miśkiewicz

Arkadiusz Miśkiewicz  added the comment:

Bisecting led to this commit and reverting it on 3.8 branch makes the hang go 
away.

7c994549dcffd0d9d3bb37475e6374f356e7240e is the first bad commit
commit 7c994549dcffd0d9d3bb37475e6374f356e7240e
Author: Pablo Galindo 
Date:   Sat Mar 16 22:34:24 2019 +

bpo-35493: Use Process.sentinel instead of sleeping for polling worker 
status in multiprocessing.Pool (#11488)

* bpo-35493: Use Process.sentinel instead of sleeping for polling worker 
status in multiprocessing.Pool

* Use self-pipe pattern to avoid polling for changes

* Refactor some variable names and add comments

* Restore timeout and poll

* Use reader object only on wait()

* Recompute worker sentinels every time

* Remove timeout and use change notifier

* Refactor some methods to be overloaded by the ThreadPool, document the 
cache class and fix typos

 Lib/multiprocessing/pool.py| 88 +++---
 .../2019-01-09-23-43-08.bpo-35493.kEcRGE.rst   |  3 +
 2 files changed, 80 insertions(+), 11 deletions(-)
 create mode 100644 
Misc/NEWS.d/next/Library/2019-01-09-23-43-08.bpo-35493.kEcRGE.rst

--

___
Python tracker 

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



[issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit

2020-03-14 Thread Arkadiusz Miśkiewicz

Arkadiusz Miśkiewicz  added the comment:

And also https://bugs.python.org/issue38744 on Linux and FreeBSD

--
nosy: +arekm

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-14 Thread hai shi


hai shi  added the comment:

> How about calling `encodings.normalize_encoding() in 
> codecs.normalizestring()` to keep same behavior?(I create PR18845)

I have try this idea, but it make the testcase of test_io.py failed because 
some object will call `codecs.Lookup()` in `__del__()`.-->extension module will 
be cleaned before calling `__del__().`

> I would prefer that codecs.lookup() and encodings.normalize_encoding() behave 
> the same. Either always ignore or always copy.

I try to add a `_Py_normalize_unicode_encoding()` in unicodeobject.c to support 
non-ASCII encoding names' normalization(PR18987), but this PR caused many 
testcases failed.

For example:

In master:
python3.9 -c "print('a\xac\u1234\u20ac\u8000\U0010'.encode('iso-8859-15', 
'namereplace'))"
result:
b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\xa4\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010'

after PR18987:
./python -c "print('a\xac\u1234\u20ac\u8000\U0010'.encode('iso-8859-15', 
'namereplace'))"
result:
b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}\\N{CJK UNIFIED 
IDEOGRAPH-8000}\\U0010'

--

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-14 Thread hai shi


Change by hai shi :


--
pull_requests: +18344
pull_request: https://github.com/python/cpython/pull/18987

___
Python tracker 

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



[issue33136] Harden ssl module against CVE-2018-8970

2020-03-14 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

Can this be closed now?

--
nosy: +epicfaace

___
Python tracker 

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Arkadiusz Miśkiewicz

Arkadiusz Miśkiewicz  added the comment:

bpo-35493

--

___
Python tracker 

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Check out https://bugs.python.org/issue39360 foe more context on this issue.

--

___
Python tracker 

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, notice that writing

Pool().map(sleep, [0.01] * 10)

is out of contact as the Pool object can
be collected immediately and there is no
proper termination and cleanup. The correct
way is to use the context manager:

with Pool() as pool:
pool.map(sleep, [0.01] * 10)

--

___
Python tracker 

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



[issue33689] Blank lines in .pth file cause a duplicate sys.path entry

2020-03-14 Thread Malcolm Smith


Malcolm Smith  added the comment:

It's definitely a bug and not a documentation lapse. There's no reason why 
blank lines should have that effect, and no indication in the code that this 
was intentional.

--

___
Python tracker 

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2020-03-14 Thread Ryan Tu


Ryan Tu  added the comment:

#Maybe not a good solution
I do not know the should we delete the code in cgitb.py or adjust the 
configration of apache httpd. My solution is deleting some code as follows:
```
return '''
 -->
 --> -->
  
   '''
```
Then it works very well, and it has good view.Anyone know what is the situation 
in ngix?

--
nosy: +Ryan Tu
versions: +Python 3.8 -Python 2.7, Python 3.2, Python 3.3, Python 3.5

___
Python tracker 

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



[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-03-14 Thread Arkadiusz Miśkiewicz

Change by Arkadiusz Miśkiewicz :


--
nosy: +arekm

___
Python tracker 

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



[issue39924] pathlib handles missing `os.link`, `os.symlink` and `os.readlink` inconsistently

2020-03-14 Thread Manjusaka


Change by Manjusaka :


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

___
Python tracker 

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



[issue39927] IDLE.app fails on macOS 10.15 if denied access to Documents

2020-03-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The solution given by Ned above also solved 
https://stackoverflow.com/questions/60648250/cannot-open-idle-on-mac.  So dd's 
situation was not unique.

--

___
Python tracker 

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



[issue39705] Tutorial, 5.6 Looping Techniques, sorted() example

2020-03-14 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


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

___
Python tracker 

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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In pickle.py the name of the first parameter is "s" (it was "str" in 2.7), not 
"data". And in the module docstring it is "string". So we have two options:

1. Make the first parameter positional-only. This is not breaking change 
because the documentation and two implementations had four different names, so 
there was no official way to pass it by keyword.

2. Make it positional-and-keyword parameter officially. All implementations, 
documentation and docstrings should be synchronized.

What is more preferable? Do we need to pass the first argument to 
pickle.loads() by keyword?

After resolving this issue we may want to revise other modules which have the 
loads() function.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-03-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
type:  -> enhancement
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18350
pull_request: https://github.com/python/cpython/pull/19002

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18349
pull_request: https://github.com/python/cpython/pull/19001

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +18348
pull_request: https://github.com/python/cpython/pull/19000

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 9165addc22d05e776a54319a8531ebd0b2fe01ef by Ashwin Ramaswami in 
branch 'master':
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)
https://github.com/python/cpython/commit/9165addc22d05e776a54319a8531ebd0b2fe01ef


--

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks for the PR Ashwin!

--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 34f85af3229f86c004a954c3f261ceea1f5e9f95 by Miss Islington (bot) 
in branch '3.7':
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)
https://github.com/python/cpython/commit/34f85af3229f86c004a954c3f261ceea1f5e9f95


--

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset ff69c9d12c1b06af58e5eae5db4630cedd94740e by Miss Islington (bot) 
in branch '3.8':
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)
https://github.com/python/cpython/commit/ff69c9d12c1b06af58e5eae5db4630cedd94740e


--

___
Python tracker 

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



[issue39334] python specific index directives in our doc has been deprecated 10 years ago

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Maybe just add the implementation of Python specific index directives in our 
extensions Doc/tools/extensions?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39232] asyncio crashes when tearing down the proactor event loop

2020-03-14 Thread jack1142


Change by jack1142 :


--
nosy: +jack1142

___
Python tracker 

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



[issue36144] Dictionary union. (PEP 584)

2020-03-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

Three other MutableMappings we might want to update:

- shelve.Shelf
- weakref.WeakKeyDictionary
- weakref.WeakValueDictionary

Shelf is up in the air, since it doesn't look like it defines a copy() 
equivalent... I also have no experience with it. Since it's a MutableMapping 
subclass, (not a dict subclass), we could in theory hold off on updating this 
until someone asks for it, without backward compatibility issues.

I think the other two should be updated, though. I can coordinate PRs for them 
this week.

--

___
Python tracker 

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



[issue36144] Dictionary union. (PEP 584)

2020-03-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

I definitely think we should leave Shelf alone, it's a toy class from a 
different era.

It makes sense to update the weak dicts; hopefully the | and |= operators can 
be implemented in terms of other, more primitive operations, so we will have 
assurance that these classes' essential behavior is preserved.

--

___
Python tracker 

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



[issue39887] Duplicate C object description of vectorcallfunc

2020-03-14 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

I can no longer reproduce this issue. Has it been fixed?

$ make html
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees   -W . build/html 
Running Sphinx v2.2.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 486 source files that are out of date
updating environment: [new config] 486 added, 0 changed, 0 removed
/home/epicfaace/cpython/Doc/venv/lib/python3.6/site-packages/sphinx/util/nodes.py:151:
 FutureWarning:  
   The iterable returned by Node.traverse()
   will become an iterator instead of a list in Docutils > 0.16.
  for classifier in reversed(node.parent.traverse(nodes.classifier)):
reading sources... [100%] whatsnew/index
   
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] whatsnew/index 
   
generating indices...  genindex py-modindexdone
writing additional pages...  download index search opensearchdone
copying images... [100%] using/win_installer.png
   
copying downloadable files... [100%] includes/tzinfo_examples.py
   
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in build/html.

Build finished. The HTML pages are in build/html.

--
nosy: +epicfaace

___
Python tracker 

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



[issue38938] Possible performance improvement for heaqq.merge()

2020-03-14 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

First, as I posted at 
https://github.com/python/cpython/pull/17729#issuecomment-571864662, there is a 
theoretical advantage of fewer comparisons in all cases, and the new algorithm 
would be especially dominant when one iterable keeps winning. (I'm given to 
understand that "lists very often do have exploitable partial order in real 
life" ;-)

> making heaqq.merge a class looks unrelated to the declared goal.

Is there a better way to implement a C accelerator for a Python function that 
returns a generator? I figured it would be better to have the pure-python 
implementation match the C implementation.

As for the timing, I'm running Windows and pyperf gives a "WARNING: unable to 
increase process priority", and a "WARNING: no operation available for your 
platform" when I run "pyperf system tune", but I'm still able to get the 
following results:

.\python.bat -m pyperf timeit -s "from random import random; from heapq import 
merge; from collections import deque; iters = [sorted(random() for j in 
range(10_000)) for i in range(20)]" "deque(merge(*iters), maxlen=0)"

Master: Mean +- std dev: 88.0 ms +- 10.3 ms
This PR: Mean +- std dev: 28.2 ms +- 1.0 ms

The above I'll call "merging 20 of size 10_000." 
For "merging 2 of size 100_000", I get:

Master: Mean +- std dev: 34.4 ms +- 3.2 ms
This PR: Mean +- std dev: 10.6 ms +- 0.7 ms

Merging 10_000 of size 100:

Master: Mean +- std dev: 1.56 sec +- 0.11 sec
This PR: Mean +- std dev: 628 ms +- 22 ms

--

___
Python tracker 

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



[issue39887] Duplicate C object description of vectorcallfunc

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I cannot reproduce it anymore after cleaning and building from zero. Perhaps it 
was a build artefact, vectorcallfunc was defined in Doc/c-api/typeobj.rst 
before 9a13a388f202268dd7b771638adbec132449b98b.

Thank you for checking it Ashwin.

--
resolution:  -> works for me
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



[issue34591] smtplib mixes RFC821 and RFC822 addresses

2020-03-14 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

What do you mean by "it then proceeds to use it as an RFC821 address"?

--
nosy: +epicfaace

___
Python tracker 

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



[issue38938] Possible performance improvement for heaqq.merge()

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Sorry, I did not notice that there is a C implementation in PR 18427. Changes 
in the Python implementations are so larger that I though this is the goal of 
the PR.

Often the most clear and efficient way to implement an iterator in Python is to 
write a generator function. In C you need to write a class with the __next__ 
method, but Python has better way.

I have tested your first example with the Python implementation and got 93.9 
msec on master vs 314 msec with PR 18427 applied. It is expected that the C 
implementation is faster than the Python implementation, but was there a need 
to make the Python implementation 3 times slower?

--

___
Python tracker 

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



[issue39869] Improve Instance Objects tutorial documentation

2020-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 4abe77c725b1d0a2187b7160924258c9810b824c by Miss Islington (bot) 
in branch '3.8':
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889)
https://github.com/python/cpython/commit/4abe77c725b1d0a2187b7160924258c9810b824c


--

___
Python tracker 

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



[issue39869] Improve Instance Objects tutorial documentation

2020-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 6b6756f1283a87091c6186e70b544d4789e12c51 by Miss Islington (bot) 
in branch '3.6':
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889) (GH-18898)
https://github.com/python/cpython/commit/6b6756f1283a87091c6186e70b544d4789e12c51


--
nosy: +ned.deily

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-14 Thread Lahfa Samy


Lahfa Samy  added the comment:

Hi, 

I would like to take this issue as my first contribution to Python, I'm 
currently subscribed to the python-core-mentorship list.
I do not know exactly how to submit a patch for an issue.

Kind regards.

--
nosy: +AkechiShiro

___
Python tracker 

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



[issue38938] Possible performance improvement for heaqq.merge()

2020-03-14 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

The existing Python implementation is benefiting from the C accelerators for 
heapify and heapreplace. When forcing pure python using test.support, I get 
these results:

.\python.bat -m pyperf timeit -s "from random import random; from collections 
import deque; from test import support; merge = 
support.import_fresh_module('heapq', blocked=['_heapq']).merge; iters = 
[sorted(random() for j in range(1_000)) for i in range(20)]" 
"deque(merge(*iters), maxlen=0)"

Master: Mean +- std dev: 73.1 ms +- 8.4 ms
PR: Mean +- std dev: 63.7 ms +- 7.8 ms

I think I remember getting similarly slightly-better results out of PyPy, but I 
will double-check.

So while the existing "mixed-c-and-Python" implementation would be deleted, the 
"true pure-Python" implementation would get faster and the pure-c 
implementation would be created much faster. Is that an acceptable trade-off?

Regarding using a generator for the Python implementation, is it okay if 
type(heapq.merge) gives  for the Python implementation but 
 for the c implementation? How much seemingly-irrelevant 
variation like this is acceptable between the APIs?

--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-14 Thread Mariatta


Mariatta  added the comment:

Patch are submitted as pull request on our GitHub repo.
Here's a write-up on how to do it
https://devguide.python.org/pullrequest/#step-by-step-guide

--
nosy: +Mariatta

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 83fc70159b24f5b11a5ef87c9b05c2cf4c7faeba by Miss Islington (bot) 
in branch '3.6':
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995) 
(GH-19002)
https://github.com/python/cpython/commit/83fc70159b24f5b11a5ef87c9b05c2cf4c7faeba


--
nosy: +ned.deily

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

If anyone cares about 2.7, the *final* release is coming up in a few weeks.  
They'll need to figure out what it looks like there and get a 2.7 PR reviewed 
by the release manager.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-14 Thread Lahfa Samy


Change by Lahfa Samy :


--
keywords: +patch
pull_requests: +18351
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19006

___
Python tracker 

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



[issue39073] email incorrect handling of crlf in Address objects.

2020-03-14 Thread Ashwin Ramaswami


Change by Ashwin Ramaswami :


--
keywords: +patch
nosy: +epicfaace
nosy_count: 3.0 -> 4.0
pull_requests: +18352
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19007

___
Python tracker 

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



[issue39948] Python 3.8 unconditionally uses functions not available on OS X 10.4 and 10.5

2020-03-14 Thread dgelessus


Change by dgelessus :


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

___
Python tracker 

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



[issue39728] Instantiating enum with invalid value results in ValueError twice

2020-03-14 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

I can't reproduce this on the latest python (3.9) from master. Can you?

--
nosy: +epicfaace

___
Python tracker 

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



[issue39728] Instantiating enum with invalid value results in ValueError twice

2020-03-14 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

Never mind, I was able to reproduce it.

--

___
Python tracker 

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am mentoring @BTaskaya and I asked to take a look a this. After some 
debugging, we found that the problem is the following:

When the pull is not used via the context manager or terminate() is called, 
there is a system in multiprocessing.util that handles finalization of all 
pools via an atexit handler (the Finalize) class. This class registers the 
_terminate_pool handler in the registry of finalizers of the module, and that 
registry is called on interpreter exit via _exit_function. 

The problem is that the "happy" path with the context manager or manual call to 
finalize() does some extra steps that _terminate_pool does not:

def terminate(self):
util.debug('terminating pool')
self._state = TERMINATE
self._worker_handler._state = TERMINATE
self._change_notifier.put(None)
self._terminate()

In this code self._terminate() calls _terminate_pool. The step that is not 
executed when the atexit() handler calls _terminate_pool is pinging the 
_change_notifier queue to unblock the maintenance threads.

The fix is moving the "self._change_notifier.put(None)" to the _terminate_pool 
function.

--

___
Python tracker 

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



[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

BTaskaya will create a PR to fix this soon.

--

___
Python tracker 

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



[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-03-14 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch
nosy: +BTaskaya
nosy_count: 4.0 -> 5.0
pull_requests: +18354
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19009

___
Python tracker 

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



[issue39964] adding a string to a list works differently with x+='' compared to x=x+''

2020-03-14 Thread Richard King


New submission from Richard King :

x = ['a']

x += ' ' results in ['a',' ']

x = x + ' ' results in an exception:
Traceback (most recent call last):
  File "", line 1, in 
TypeError: can only concatenate list (not "str") to list

It behaves the same in 2.7.15 and 3.7.2.

--
components: Windows
messages: 364213
nosy: paul.moore, rickbking, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: adding a string to a list works differently with x+='' compared to x=x+''
type: behavior
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue39964] adding a string to a list works differently with x+='' compared to x=x+''

2020-03-14 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

That's not a bug. The in-place addition `+=` for lists is equivalent to the 
extend method. See the documentation:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

and the tutorial:

https://docs.python.org/3/tutorial/datastructures.html

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39360] python3.8 regression - ThreadPool join via __del__ hangs forever

2020-03-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Check out also https://bugs.python.org/issue38744

--

___
Python tracker 

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



[issue39965] await is valid in non async functions if PyCF_ALLOW_TOP_LEVEL_AWAIT is set

2020-03-14 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

If PyCF_ALLOW_TOP_LEVEL_AWAIT is set this code is valid:

def f():
   await foo

And this should raise a "SyntaxError: 'await' outside async function". The 
reason is that the PyCF_ALLOW_TOP_LEVEL_AWAIT is global in the compiler and 
affects everything without checking if the current code being compiled is 
actually in the TOP level or not.

--
components: asyncio
messages: 364216
nosy: asvetlov, pablogsal, yselivanov
priority: normal
severity: normal
status: open
title: await is valid in non async functions if PyCF_ALLOW_TOP_LEVEL_AWAIT is 
set
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 5.0 -> 6.0
pull_requests: +18355
pull_request: https://github.com/python/cpython/pull/19010

___
Python tracker 

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



[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +18357
pull_request: https://github.com/python/cpython/pull/19010

___
Python tracker 

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



  1   2   >