[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-12-23 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, it seems reasonable to have a protocol for this. -- ___ Python tracker ___ ___

[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2019-12-23 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I guess the TimeoutError exception needs to be imported from asyncio.exceptions and not from asyncio.futures that causes AttributeError while instantiating a connection with happy eyeballs. ./python.exe -m asyncio asyncio REPL 3.9.0a2+

[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2019-12-23 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Created from https://github.com/aio-libs/aiohttp/issues/4451 . happy_eyeballs_delay and interleave are not documented in the signature at [0] though the parameters were explained below . Andrew, feel free to update if there is any additional

[issue39127] _Py_HashPointer's void * argument should be const

2019-12-23 Thread Andy Lester
Change by Andy Lester : -- keywords: +patch pull_requests: +17145 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17690 ___ Python tracker ___

[issue39127] _Py_HashPointer's void * argument should be const

2019-12-23 Thread Andy Lester
New submission from Andy Lester : _Py_HashPointer in Python/pyhash.c takes a pointer argument that can be made const. This will let compiler and static analyzers know that the pointer's target is not modified. You can also change calls to _Py_HashPointer that are down-casting pointers.

[issue39126] Non-bmp (astral) unicode characters confuse the editor

2019-12-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am aware of this. Before the recent (Oct 4) fix for #13153, pasting an astral character into an edit line or window crashed IDLE. After the fix, the character appears (and printing such chars also works reliably). But astral chars confuse the tk text

[issue37340] remove free_list for bound method objects

2019-12-23 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11986] Min/max not symmetric in presence of NaN

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: marco@buzz:~$ python3.9 Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal as Dec, BasicContext as Bctx >>> a

[issue39126] Some characters confuse the editor

2019-12-23 Thread dmaxime
New submission from dmaxime : >>> b'\xf0\x9f\x98\x86'.decode('utf8') '' >>> ''.encode('utf8') b'\xf0\x9f\x98\x86' ...now if you write ''.encode() then you move the cursor between the brackets and type "'utf8'" you will have this result while the cursor remains in the brackets: >>>

[issue36095] Better NaN sorting.

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, ignore my previous post. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36095] Better NaN sorting.

2019-12-23 Thread Marco Sulla
Marco Sulla added the comment: marco@buzz:~$ python3.9 Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) [GCC 9.2.1 20190909] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal as Dec, BasicContext as Bctx >>> a

[issue37093] http.client aborts header parsing upon encountering non-ASCII header names

2019-12-23 Thread Tim Burke
Tim Burke added the comment: Note that because http.server uses http.client to parse headers [0], this can pose a request-smuggling vector depending on how you've designed your system. For example, you might have a storage system with a user-facing HTTP server that is in charge of *

[issue39115] Clarify Python MIME type

2019-12-23 Thread Josh de Kock
Josh de Kock added the comment: I just wanted the intended MIME type for sending python over various mediums to be written down somewhere other than the source code, but I'm not sure where it should go. Though if you don't think it is necessary then that is fine too, I mostly just wanted

[issue39011] ElementTree attributes replace "\r" with "\n"

2019-12-23 Thread Stefan Behnel
Stefan Behnel added the comment: I think we did it wrong in issue 17582. Parser behaviour is not a reason why the *serialisation* should modify the content. Luckily, fixing this does not impact the C14N serialisation (which aims to guarantee byte identical serialisation), but it changes the

[issue31711] ssl.SSLSocket.send(b"") fails

2019-12-23 Thread Jörn Heissler
Jörn Heissler added the comment: Manpage (openssl 1.1.1d) now states: You should not call SSL_write() with num=0, it will return an error. SSL_write_ex() can be called with num=0, but will not send application data to the peer. SSL_write_ex was added in 1.1.1 So it looks like openssl

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-23 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 59d06b987db34cde8783e265709366d244c9e35b by Ivan Levkivskyi (Bar Harel) in branch '3.7': [3.7] bpo-38878: Fix os.PathLike __subclasshook__ (GH-17336) (GH-17685) https://github.com/python/cpython/commit/59d06b987db34cde8783e265709366d244c9e35b

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 0846e5d4603434c2bbf8a528677cf1ff3fe29b95 by Ivan Levkivskyi (Bar Harel) in branch '3.8': [3.8] bpo-38878: Fix os.PathLike __subclasshook__ (GH-17336) (GH-17684) https://github.com/python/cpython/commit/0846e5d4603434c2bbf8a528677cf1ff3fe29b95

[issue31711] ssl.SSLSocket.send(b"") fails

2019-12-23 Thread César
Change by César : -- pull_requests: +17144 pull_request: https://github.com/python/cpython/pull/17671 ___ Python tracker ___ ___

[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2019-12-23 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39062] ValueError in TarFile.getmembers

2019-12-23 Thread jvoisin
jvoisin added the comment: Raising an except is ok, if it's documented, so I know which ones I should catch to prevent my program to quit when processing untrusted files, without having to catch `Exception`. Reliability is important in my use-case as well, not only exploitable

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-23 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d69cbeb99d5fd0d5464e937202cca6a2024d1bcf by Pablo Galindo in branch 'master': Revert "bpo-38870: Remove dependency on contextlib to avoid performance regression on import (GH-17376)" (GH-17687)

[issue39125] Type signature of @property not shown in help()

2019-12-23 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Currently docstring written for even property.setter is ignored in help as inspect.getdoc only inspects property.fget [0] for docstrings. I feel docs for setter could also be included. The docs also indicate the same at

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +17143 pull_request: https://github.com/python/cpython/pull/17687 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 4b3b1226e86df6cd45e921c8f2ad23c3639c43b2 by Pablo Galindo (Batuhan Taşkaya) in branch 'master': bpo-38870: Refactor delimiting with context managers in ast.unparse (GH-17612)

[issue39124] round Decimal error

2019-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: @adelsonllima: Take a look at the documentation that I linked to for the round function, and in particular this note: "The behavior of round() for floats can be surprising: for example, round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a

[issue39125] Type signature of @property not shown in help()

2019-12-23 Thread Nguyễn Gia Phong
New submission from Nguyễn Gia Phong : Dear Maintainer, I want to request a feature on the generative documentation of type-hinting. As of December 2019, I believe there is no support for generating such information in help(). For demonstration, I have this tiny piece of code class Foo:

[issue39124] round Decimal error

2019-12-23 Thread Mark Dickinson
Change by Mark Dickinson : -- status: open -> closed type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39124] round Decimal error

2019-12-23 Thread Jörn Heissler
Jörn Heissler added the comment: > round(9.925, 2) => 9.93 9.925 is 9.925710542735760100185871124267578125 on my platform. This is larger than 9.925, so the "round-ties-to-even" rule can't be applied. Instead it is rounded up to 9.93

[issue39124] round Decimal error

2019-12-23 Thread Adelson Luiz de Lima
Adelson Luiz de Lima added the comment: Thanks for the quick response. I try the follow code in python 3.7: round(9.925, 2) => 9.93 round(Decimal('9.925'), 2) => Decimal('9.92') I do not understande why behavior of float is diferrent of the Decimal. In python 2.7 I have the same result:

[issue38914] Clarify wording for warning message when checking a package

2019-12-23 Thread miss-islington
miss-islington added the comment: New changeset 9f9dac0a4e58d5c72aa3b644701cb155c009cb2c by Miss Islington (bot) (Jürgen Gmach) in branch 'master': bpo-38914 Do not require email field in setup.py. (GH-17388) https://github.com/python/cpython/commit/9f9dac0a4e58d5c72aa3b644701cb155c009cb2c

[issue39121] gzip header write OS field

2019-12-23 Thread Rob Man
Rob Man added the comment: I do not need it for personaly, but since RFC exists and since linux command line equivalent writes OS information, why should python gzip implementation not include that. The same goes for the FCOMMENT field for wich I also have a patch ready and I they're both nice

[issue20905] Adapt heapq push/pop/replace to allow passing a comparator.

2019-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: Michael: if you want to take this further, your best bet would probably be to start a discussion on the python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/). -- nosy: +mark.dickinson

[issue39124] round Decimal error

2019-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: More details on the change here: https://docs.python.org/3/whatsnew/3.0.html#builtins and in the library documentation: https://docs.python.org/3/library/functions.html#round -- ___ Python tracker

[issue39124] round Decimal error

2019-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: In Python 3, the rounding mode is round-ties-to-even. (In Python 2, it's round-ties-to-away.) -- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue39124] round Decimal error

2019-12-23 Thread Adelson Luiz de Lima
New submission from Adelson Luiz de Lima : When I round this: round(Decimal('9.925'), 2), in Python 3.7.5 the result is Decimal('9.92'), but in Python 2.7.17 is 9.93 -- messages: 358814 nosy: adelsonllima priority: normal severity: normal status: open title: round Decimal error type:

[issue39123] PyThread_xxx() not available when using limited API

2019-12-23 Thread Vadim Zeitlin
New submission from Vadim Zeitlin : These functions (e.g. PyThread_allocate_lock() etc) are not declared inside #if !defined(Py_LIMITED_API) in pythread.h, yet they're not exported from python3.lib. IMHO, ideal would be to just provide these functions in the library, as they exist since

[issue39115] Clarify Python MIME type

2019-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: If you are not talking about IANA registration (I doubt if Python needs it) what do you propose? I've missed what do you want to update in Python or its docs to satisfy your needs. -- ___ Python tracker

[issue39115] Clarify Python MIME type

2019-12-23 Thread Josh de Kock
Josh de Kock added the comment: An IANA media type assignment would be even better than a '*/x-*' MIME, of course, but my original intention was just to clarify that the MIMEs in the cpython source can be used as documentation for 'which MIME should you use when sending .py,.pyc,.pyo'.

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-23 Thread Bar Harel
Change by Bar Harel : -- pull_requests: +17142 pull_request: https://github.com/python/cpython/pull/17685 ___ Python tracker ___

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-23 Thread Bar Harel
Change by Bar Harel : -- pull_requests: +17141 pull_request: https://github.com/python/cpython/pull/17684 ___ Python tracker ___

[issue39115] Clarify Python MIME type

2019-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Do you mean adding a record to https://www.iana.org/assignments/media-types/media-types.xhtml? -- nosy: +asvetlov ___ Python tracker ___

[issue39112] Misleading documentation for tuple

2019-12-23 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: FWIW, built-in types page has the class prefix : https://docs.python.org/3/library/stdtypes.html#tuple . Similar difference between range in the two pages. -- nosy: +xtreak ___ Python tracker

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

2019-12-23 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17140 pull_request: https://github.com/python/cpython/pull/17683 ___ Python tracker ___

[issue39122] Environment variable PYTHONUSERBASE is not set during customized Python Installation

2019-12-23 Thread Sara Martínez Giner
New submission from Sara Martínez Giner : Environment variable PYTHONUSERBASE is not set during customized Python Installation. Python installer 3.7.6(x64) / Windows 10 Check 1: Customize the installation to install Python in C:\Python37 for all users. Result: Access Denied using pip

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Inada Naoki
Inada Naoki added the comment: Is this regression is large enough to revive the free_list for bound methods? -- ___ Python tracker ___

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +inada.naoki, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2019-12-23 Thread mattip
mattip added the comment: Is there a ctypes or PEP-3118 core-dev who could review the issue and the PR solution? -- nosy: +mattip ___ Python tracker ___

[issue39121] gzip header write OS field

2019-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The OS field is used in determining end-of-line convention for text files. But since we do not set the FTEXT flag, all files are binary. RFC 1952 Why do you need to set this field? -- nosy: +serhiy.storchaka