[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-12-07 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 00ada2c1d57c5b8b468bad32ff24fa14113ae5c7 by Victor Stinner 
(xdegaye) in branch 'master':
bpo-38852: Set thread stack size to 8 Mb for debug builds on android platforms 
(GH-17337)
https://github.com/python/cpython/commit/00ada2c1d57c5b8b468bad32ff24fa14113ae5c7


--
nosy: +vstinner

___
Python tracker 

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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-07 Thread STINNER Victor


Change by STINNER Victor :


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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-07 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6cac1136665b70f72db291b95876d7affcf1d2db by Victor Stinner in 
branch 'master':
bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)
https://github.com/python/cpython/commit/6cac1136665b70f72db291b95876d7affcf1d2db


--

___
Python tracker 

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



[issue38708] parse_message_id in email module is very buggy / crashy

2019-12-07 Thread Abhilash Raj


Change by Abhilash Raj :


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

___
Python tracker 

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



[issue38698] While parsing email message id: UnboundLocalError

2019-12-07 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +16980
pull_request: https://github.com/python/cpython/pull/17503

___
Python tracker 

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



[issue38987] 3.8.0 on GNU/Linux fails to find shared library

2019-12-07 Thread Ned Deily


Change by Ned Deily :


--
nosy: +doko

___
Python tracker 

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



[issue38995] reverse search (ctrl-r) doest not work

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

Most likely what is happening is that the two Python instances you are using 
are linked to different versions of the external readline library.  From the 
version information, it's clear that you are using the Python 3.8.0 from the 
python.org macOS installer.  That Python uses the macOS-supplied BSD editline 
(AKA libedit) for readline functionality.  The Python 3.7.3 you have is not 
from python.org and based on the prompt it looks like it was linked with a 
version of GNU readline which probably does bind ^R to the reverse search 
function by default.  As described in the Python Library Reference page for 
readline (https://docs.python.org/3/library/readline.html), both GNU readline 
and BSD editline can be tailored via configuration files; GNU readline uses 
~/.inputrc while BSD editline uses ~/.editrc.

On macOS, the available configuration commands for editline are described in 
the man page for editrc:

man 5 editrc

In particular, you should be able to enable editline's reverse search 
functionality by adding the following line to ~/.editrc:

bind ^R em-inc-search-prev

where ^R is two characters, not the single character CTRL-R.

--
nosy: +ned.deily
resolution:  -> third party
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



[issue38995] reverse search (ctrl-r) doest not work

2019-12-07 Thread sush


New submission from sush :

On my MacOS Mojave 10.14.6 (18G103), after upgrading python to python 3.8, the 
ctrl-r on the python interpreter does not work.

Here is the working python 3.7 version:
```
$ python3.7 --version 
Python 3.7.3
$ python3.7 
Python 3.7.3 (default, Mar 27 2019, 09:23:15) 
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 10
(reverse-i-search)`a': a = 10
``` 
Note that I pressed 'ctrl-r' on my keyboard to bring up the 'reverse-i-search'.

On python3.8, ctrl-r has no response from the interpreter:
```
$ python3.8 --version
Python 3.8.0
$ python3.8  
Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 10
>>> 
```

Interestingly, the ~/.python_history files seems to be updated. Also, when I 
enter the 'UP' key, the older command comes up. Just that ctrl-r doesn't work.

Here is the output showing that python_history files is being written to:
```
$ rm  ~/.python_history  
$ python3.8   
Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 33
>>> ^D
$ cat  ~/.python_history 
_HiStOrY_V2_
a\040=\04033
```

--
components: Interpreter Core
messages: 357991
nosy: sush
priority: normal
severity: normal
status: open
title: reverse search (ctrl-r) doest not work
type: behavior
versions: Python 3.8

___
Python tracker 

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



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

2019-12-07 Thread Kyle Stanley


Kyle Stanley  added the comment:

> Where are we with this?  The deadline for 3.8.1 and 3.7.6 is coming up in a 
> few days.

I believe we're just waiting on review and additional feedback on GH-17311, 
which implements Antoine's proposal. The only remaining component I can think 
of is the "What's New" entry, but I was planning on doing that in a separate PR 
so that we could get the security fix out there first (and simplify the merge 
conflicts for the backports).

--

___
Python tracker 

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



[issue38981] better name for re.error Exception class.

2019-12-07 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


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

___
Python tracker 

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



[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

> I'll elevate the status so that we don't forget before 3.8.1 is too close

Andrew, Yury: ping. 3.8.1 cutoff is approaching.

--
nosy: +ned.deily

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

What is the status of this issue?  Now that Issue38576 has been opened to cover 
the host address part, can this issue be closed or downgraded?  Should 
Issue38576 be a release blocker?

--

___
Python tracker 

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



[issue34776] Postponed annotations break inspection of dataclasses

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

>  I'll elevate the status so that I don't forget before 3.8.1.

Ping, 3.8.1 cutoff is coming up very soon.

--

___
Python tracker 

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



[issue38981] better name for re.error Exception class.

2019-12-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Strictly speaking not all of those _need_ to be touched given the old name is 
always going to exist for backwards compatibility.  But I agree that we should 
update them as part of this regardless.

I'd go forward with a PR.

The only fallout I expect a change like this to have on users is in the very 
odd test scenario where someone has hardcoded the error name in a string.  That 
is rare, especially for an re.error which is generally not an expected 
exception.

--
nosy: +gregory.p.smith

___
Python tracker 

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



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

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

Where are we with this?  The deadline for 3.8.1 and 3.7.6 is coming up in a few 
days.

--

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-12-07 Thread Ned Deily


Ned Deily  added the comment:

It looks like the only thing left to do yet for this issue is to finish the 
review of and merge the PR that actually implements the new parameter.  
Removing the Deferred Blocker status and deselecting releases other than 3.9.

--
priority: deferred blocker -> 
versions:  -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2019-12-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The relevant logic is in the compatible_for_assignment() function on line 3972 
in Objects/typeobject.c.

After checking that the tp_free slots are the same, it proceeds as follows:

/*
 It's tricky to tell if two arbitrary types are sufficiently compatible as
 to be interchangeable; e.g., even if they have the same tp_basicsize, they
 might have totally different struct fields. It's much easier to tell if a
 type and its supertype are compatible; e.g., if they have the same
 tp_basicsize, then that means they have identical fields. So to check
 whether two arbitrary types are compatible, we first find the highest
 supertype that each is compatible with, and then if those supertypes are
 compatible then the original types must also be compatible.
*/

So what is happening is that "class a" and "class b" aren't being directly 
compared to one another.  Instead, they are being compared to their parent 
"dict".   Since *dict* doesn't have __dict__ or __weakref__, "a" and "b" are 
deemed to have incompatible layouts.   See lines 3951 to 3954 in 
same_slots_added() in Objects/typeobject.c.

--
nosy: +benjamin.peterson, pitrou

___
Python tracker 

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



[issue38981] better name for re.error Exception class.

2019-12-07 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Thanks Serhiy, 

Here is a rough idea of how many places would be touched by renaming in the 
`re` module:

https://github.com/Carreau/cpython/commit/59e4c5150c842f849ff3a9ba8a94df1df7a5eb1c
 (50 additions and 42 deletions.). 

I haven't found any places that need changes in the C code, and need to polish 
documentation, rebuild and run the test suite before sending a PR.

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset a197f8aa7493e66bc54c3db8f796d00cef1c3042 by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17500)
https://github.com/python/cpython/commit/a197f8aa7493e66bc54c3db8f796d00cef1c3042


--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 9d3cacd5901f8fbbc4f8b78fc35abad01a0e6546 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17499)
https://github.com/python/cpython/commit/9d3cacd5901f8fbbc4f8b78fc35abad01a0e6546


--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16977
pull_request: https://github.com/python/cpython/pull/17499

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244 by Miss Islington (bot) 
(Christian Heimes) in branch 'master':
bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190)
https://github.com/python/cpython/commit/2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244


--
nosy: +miss-islington

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16978
pull_request: https://github.com/python/cpython/pull/17500

___
Python tracker 

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



[issue38994] Implement __class_getitem__ for PathLike

2019-12-07 Thread Batuhan


Change by Batuhan :


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

___
Python tracker 

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



[issue38994] Implement __class_getitem__ for PathLike

2019-12-07 Thread Batuhan


New submission from Batuhan :

Typeshed already using __class_getitem__ syntax for PathLike
https://github.com/python/typeshed/search?q=PathLike_q=PathLike

--
components: Library (Lib)
messages: 357978
nosy: BTaskaya, asvetlov
priority: normal
severity: normal
status: open
title: Implement __class_getitem__ for PathLike
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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Batuhan


Batuhan  added the comment:

> I think that applying the same to PathLike makes sense as well, but it 
> deserves another issue.

Yes, it looks like they are using that in typeshed. I'm opening another issue 
with a patch. Thanks for reminding that

--

___
Python tracker 

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



[issue29636] Specifying indent in the json.tool command

2019-12-07 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 15fb7fa88187f5841088721a43609bffe64a8dc7 by Inada Naoki (Daniel 
Himmelstein) in branch 'master':
bpo-29636: json.tool: Add document for indentation options. (GH-17482)
https://github.com/python/cpython/commit/15fb7fa88187f5841088721a43609bffe64a8dc7


--

___
Python tracker 

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



[issue25160] Stop using deprecated imp module; imp should now emit a real DeprecationWarning

2019-12-07 Thread Batuhan


Batuhan  added the comment:

@vstinner 

> Tools/importbench/importbench.py:10:import imp
> I think that it's fine to keep imp there. 

Any reason to keep imp there? We can just port it to sole importlib (it already 
uses it in some places)

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38993] cProfile behaviour issue with decorator and math.factorial() lib.

2019-12-07 Thread AVicennA


Change by AVicennA :


--
components: Library (Lib)
files: cProfiling.txt
nosy: AvicennA
priority: normal
severity: normal
status: open
title: cProfile behaviour issue with decorator and math.factorial() lib.
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48764/cProfiling.txt

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Amir Mohamadi


Change by Amir Mohamadi :


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

___
Python tracker 

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



[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 4443450fdaf248427cf4a00a6ee36229e6402ec6 by Miss Islington (bot) 
(Anj-A) in branch 'master':
bpo-38652: Remove provisional note for asyncio.BufferedProtocol (GH-17047)
https://github.com/python/cpython/commit/4443450fdaf248427cf4a00a6ee36229e6402ec6


--
nosy: +miss-islington

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 930cef2770b641f49e69b67840daaa53b65cd0e0 by Andrew Svetlov in 
branch '3.8':
[3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio 
functions (GH-16457) (#17496)
https://github.com/python/cpython/commit/930cef2770b641f49e69b67840daaa53b65cd0e0


--

___
Python tracker 

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



[issue38992] testFsum failure caused by constant folding of a float expression

2019-12-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +lemburg, mark.dickinson, rhettinger, stutzbach

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset a85066df9423d381e6b233469b00db55563a9f80 by Miss Islington (bot) 
in branch '3.7':
bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions 
(GH-16457)
https://github.com/python/cpython/commit/a85066df9423d381e6b233469b00db55563a9f80


--

___
Python tracker 

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



[issue38992] testFsum failure caused by constant folding of a float expression

2019-12-07 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +16974
pull_request: https://github.com/python/cpython/pull/17496

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 892f9e0777f262d366d4747a54c33a1c15a49da6 by Miss Islington (bot) 
(idomic) in branch 'master':
 bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions 
(GH-16457)
https://github.com/python/cpython/commit/892f9e0777f262d366d4747a54c33a1c15a49da6


--
nosy: +miss-islington

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16973
pull_request: https://github.com/python/cpython/pull/17495

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 7fde4f446a3dcfed780a38fbfcd7c0b4d9d73b93 by Miss Islington (bot) 
in branch '3.8':
bpo-38529: Fix asyncio stream warning (GH-17474)
https://github.com/python/cpython/commit/7fde4f446a3dcfed780a38fbfcd7c0b4d9d73b93


--
nosy: +miss-islington

___
Python tracker 

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



[issue38992] testFsum failure caused by constant folding of a float expression

2019-12-07 Thread Xavier de Gaye


Change by Xavier de Gaye :


Added file: https://bugs.python.org/file48763/foo.arm64

___
Python tracker 

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



[issue38992] testFsum failure caused by constant folding of a float expression

2019-12-07 Thread Xavier de Gaye


New submission from Xavier de Gaye :

Title: testFsum failure caused by constant folding of a float expression

Description:

Python (Python 3.9.0a1+ heads/master-dirty:ea9835c5d1) is built on a Linux 
x86_64. This native interpreter is used to cross-compile Python (using the same 
source) to Android API 24. Next the installation is done locally to DESTDIR by 
running 'make install' with the env var DESTDIR set and the standard library 
modules are compiled by the native interpreter during this process.  The 
content of DESTDIR is then copied to an arm64 android device (Huawei FWIW). The 
test_math.MathTests.testFsum test fails on the android device with:

AssertionError: -4.309103330548428e+214 != -1.0

This occurs when testing '([1.7**(i+1)-1.7**i for i in range(1000)] + 
[-1.7**1000], -1.0)' in test_values.

Next the test_math.py file is touched on the android device to force 
recompilation of the module and testFsum becomes surprisingly successful.

Investigation:
--
The hexadecimal representation of 1.7**n on x86_64 and arm64 are:
* different for n in (10, 100, 1000)
* equal for n in [0, 9] or 11

on x86_64:
>>> 1.7**10
201.59939004489993
>>> (1.7**10).hex()
'0x1.9332e34080c95p+7'

on arm64:
>>> 1.7**10
201.59939004489996
>>> (1.7**10).hex()
'0x1.9332e34080c96p+7'

The output of the following foo.py module that has been run on x86_64 and arm64 
are attached to this issue:

###
import math, dis

def test_fsum():
x = [1.7**(i+1)-1.7**i for i in range(10)] + [-1.7**10]
return x

y = test_fsum()
print(y)
print(math.fsum(y))
dis.dis(test_fsum)
###

The only difference between both dissasembly of test_fsum() is at bytecode 16 
that loads the folded constant 1.7**10.

Conclusion:
---
The compilation of the expression '[1.7**(i+1)-1.7**i for i in range(1000)] + 
[-1.7**1000]' on x86_64 folds '1.7**1000' to 2.8113918290273277e+230 When the 
list comprehension (the first term of the expression) is executed on arm64, 
then 1.7**1000 is evaluated as 2.8113918290273273e+230.  On arm64 1.7**1000 - 
2.8113918290273277e+230 = -4.309103330548428e+214, hence the AssertionError 
above.

This is confirmed by changing testFsum to prevent constant folding by replacing 
1000 in the testFsum expression with a variable whose value is 1000.  In that 
case the test_math module compiled on x86_64 is successful on arm64. This could 
be a fix for this issue unless this fix would be hiding another problem such as 
.pyc files portability across different platforms and my knowledge of IEEE 754 
is too superficial to answer that point.

--
components: Tests
files: foo.x86_64
messages: 357969
nosy: tim.peters, vstinner, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: testFsum failure caused by constant folding of a float expression
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file48762/foo.x86_64

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +16972
pull_request: https://github.com/python/cpython/pull/17494

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16971
pull_request: https://github.com/python/cpython/pull/17493

___
Python tracker 

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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2 by Andrew Svetlov in 
branch 'master':
bpo-38529: Fix asyncio stream warning (GH-17474)
https://github.com/python/cpython/commit/7ddcd0caa4c2e6b43265df144f59c5aa508a94f2


--

___
Python tracker 

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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16970
pull_request: https://github.com/python/cpython/pull/17492

___
Python tracker 

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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Done.
I think that applying the same to PathLike makes sense as well, but it deserves 
another issue.

--

___
Python tracker 

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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks, Batuhan!

--

___
Python tracker 

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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread miss-islington

miss-islington  added the comment:


New changeset dec367261e7e2bb4dd42feeb58031abed2ade683 by Miss Islington (bot) 
(Batuhan Taşkaya) in branch 'master':
bpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)
https://github.com/python/cpython/commit/dec367261e7e2bb4dd42feeb58031abed2ade683


--
nosy: +miss-islington

___
Python tracker 

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



[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-07 Thread Batuhan


Change by Batuhan :


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

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I think it should look like the corresponding function from multidict: 
https://github.com/aio-libs/multidict/blob/master/multidict/_multidict.c#L803-L808

Please note, the method definition also should be updated, see 
https://github.com/aio-libs/multidict/blob/master/multidict/_multidict.c#L923-L928
 for inspiration.

--

___
Python tracker 

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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2019-12-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2019-12-07 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue38981] better name for re.error Exception class.

2019-12-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy

___
Python tracker 

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



[issue9529] Make re match object iterable

2019-12-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch -easy
resolution:  -> rejected
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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Amir Mohamadi


Amir Mohamadi  added the comment:

@asvetlov I have a question! Should "contextvar_cls_getitem" function be 
changed? And can you please help me figure out how to change it?

--
nosy: +Amir -DahlitzFlorian, gvanrossum, levkivskyi, yselivanov

___
Python tracker 

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