[issue42005] profile/cProfile CLI should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
Change by Zhiming Wang : -- keywords: +patch pull_requests: +21617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22643 ___ Python tracker ___

[issue39828] json.tool should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
Change by Zhiming Wang : -- nosy: +zmwangx nosy_count: 5.0 -> 6.0 pull_requests: +21618 pull_request: https://github.com/python/cpython/pull/22643 ___ Python tracker ___

[issue42005] profile/cProfile CLI should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
New submission from Zhiming Wang : Since profile/cProfile CLI interface prints a sorted list of stats, using head to limit output to the most relevant entries should be a fairly natural thing to do. Unfortunately, BrokenPipeError isn't caught, causing quite a bit of pollution to the output:

[issue42001] Deprecate `typing.io` Wrapper Namespace

2020-10-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-10 Thread Tim Peters
Tim Peters added the comment: Ya, the case for the diff is at best marginal. Note that while it may be theoretically provable that the extra test would make the worst cases slower, that's almost certainly not measurable. The extra test would almost never be executed in the worst cases: in

[issue42003] After changing to list or tuple, will the original parameter change?

2020-10-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug. In Python 2, zip() returns a list, so you can use it over and over again. But in Python 3, zip() returns an iterator, and you can only use iterators once. After you have used the iterator, it is exhausted and there is nothing left. So

[issue42004] Allow uploading files with SimpleHTTPRequestHandler

2020-10-10 Thread Javier Ayres
New submission from Javier Ayres : Hello. I'm a big fan of the http.server module to quickly serve some files in a local network with `python3 -m http.server`. I regularly needed to get some files from other people too, but getting everyone to install/run python3 was not such a simple task.

[issue42003] After changing to list or tuple, will the original parameter change?

2020-10-10 Thread foxpython_2020
New submission from foxpython_2020 : c = dict(zip(['one', 'two', 'three'], [1, 2, 3])) print("1:",c) # right: {'one': 1, 'two': 2, 'three': 3} b= zip(['one', 'two', 'three'], [1, 2, 3]) a= list(b) #Because of this line of code, the result is different print("2:",dict(b)) #wrong: {} b=

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-10 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 0ae216b11644b23511c6287a52e7d28aeb9f by Batuhan Taskaya in branch 'master': bpo-38605: bump the magic number for 'annotations' future (#22630) https://github.com/python/cpython/commit/0ae216b11644b23511c6287a52e7d28aeb9f --

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8, Python 3.9 ___ Python tracker ___

[issue42002] Clean up initialization of the sys module

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21616 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22642 ___ Python tracker

[issue42002] Clean up initialization of the sys module

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42002] Clean up initialization of the sys module

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : _PySys_InitCore() and _PySys_InitMain() in Python/sysmodule.c contains many invocations of macros for setting attributes of the sys module. The proposed PR changes these macros. 1. SET_SYS_FROM_STRING was renamed to just SET_SYS. It is much shorter and

[issue42001] Deprecate `typing.io` Wrapper Namespace

2020-10-10 Thread Sebastian Rittau
Sebastian Rittau added the comment: For reference, this came up in https://github.com/python/typeshed/issues/4639#issuecomment-706596656. `typing.io` has never been in typeshed and we decided not to include it. It looks as if it never gained any traction, especially since the types are

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 98c4433a81a4cd88c7438adbee1f2aa486188ca3 by Serhiy Storchaka in branch 'master': bpo-41991: Remove _PyObject_HasAttrId (GH-22629) https://github.com/python/cpython/commit/98c4433a81a4cd88c7438adbee1f2aa486188ca3 --

[issue42001] Deprecate `typing.io` Wrapper Namespace

2020-10-10 Thread Kaushal Rohit
New submission from Kaushal Rohit : The `typing` module has a wrapper namespace in it called `typing.io` which contain I/O stream types. These types are now a part of the `typing` module itself. While we are at it, should we also deprecate `typing.re`? -- components: Library (Lib)

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread miss-islington
New submission from miss-islington : New changeset 02a1603f918b9862e164e4fd050c505b16bc9f57 by Batuhan Taskaya in branch 'master': bpo-42000: Cleanup the AST related C-code (GH-22641) https://github.com/python/cpython/commit/02a1603f918b9862e164e4fd050c505b16bc9f57 -- nosy:

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +21614 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22641 ___ Python tracker ___

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- components: Interpreter Core nosy: BTaskaya priority: normal severity: normal status: open title: Small cleanups to AST-related code versions: Python 3.10 ___ Python tracker

[issue40213] contextlib.aclosing()

2020-10-10 Thread John Belmonte
Change by John Belmonte : -- keywords: +patch nosy: +jbelmonte nosy_count: 9.0 -> 10.0 pull_requests: +21613 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22640 ___ Python tracker

[issue38792] IDLE calltips may not properly close on KeyboardInterrupt

2020-10-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38077] IDLE leaking ARGV into globals() namespace

2020-10-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since I opened the followup issue, yes. Thanks for noticing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41999] imaplib Time2Internaldate crashing with time.struct_time supplied from datetime.timetuple()

2020-10-10 Thread sajicek
New submission from sajicek : Hello first of all, I couldn't find any issue related to this, so sorry if it has been solved before. There seems to be an issue with IMAPLIB in all versions I've checked, when using the Time2Internaldate function with time.struct_time created by

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington
miss-islington added the comment: New changeset ebc5a6b59ece48b490987bdaa2af842c29f5b2f8 by Miss Skeleton (bot) in branch '3.9': bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621)

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington
miss-islington added the comment: New changeset ff6870f199511f09304e9d3ee7e7d8ed3902ffd1 by Miss Skeleton (bot) in branch '3.8': bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621)

[issue38792] IDLE calltips may not properly close on KeyboardInterrupt

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21611 pull_request: https://github.com/python/cpython/pull/22637 ___ Python tracker

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +21612 pull_request: https://github.com/python/cpython/pull/22638 ___ Python tracker ___

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b by Serhiy Storchaka in branch 'master': bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621)

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread STINNER Victor
STINNER Victor added the comment: Python 3.7 defines it in fileobject.h as: #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0306 PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors; #endif #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0307 PyAPI_DATA(int)

[issue41997] Docs Standard Library index page has incorrect version in title

2020-10-10 Thread Patrick Reader

[issue41998] JSON Encoder Injection Using Indent

2020-10-10 Thread Dustin Moriarty
Dustin Moriarty added the comment: Sounds good. If this is the design intent, then we can close the issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It solves the breaking of the C API. Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode were not deprecated, they were just suddenly excluded from the limited API. And seems this change was not intentional, otherwise surrounding #ifdef/#endif (which

[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2020-10-10 Thread Miro Hrončok
Change by Miro Hrončok : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue41998] JSON Encoder Injection Using Indent

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code works as expected. I do not think there is a problem with the json module. If some application accepts user input and use it without validation to control the formatting of sensitive data, it is a vulnerability in this application, not in tools

[issue38077] IDLE leaking ARGV into globals() namespace

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread STINNER Victor
STINNER Victor added the comment: I consider the global configuration variables as deprecated. I would prefer to slowly move towards PyConfig, since almost all Python functions now use PyInterpreterState.config. The problem is that my idea to provide a stable ABI for PyConfig was rejected:

[issue32793] smtplib: duplicated debug message

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: Does this need to be backported to 3.8/3.7? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue37461] email.parser.Parser hang

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41998] JSON Encoder Injection Using Indent

2020-10-10 Thread Dustin Moriarty
New submission from Dustin Moriarty : It is possible to inject data while encoding json when a string is passed to the indent argument. Here is an example of an injection attack. ```python import json data = {"a": "original data"} indent = '"b": "injected data",\n' json_string =

[issue41997] Docs Standard Library index page has incorrect version in title

2020-10-10 Thread Patrick Reader
New submission from Patrick Reader : The documentation page for the Standard Library, https://docs.python.org/3/library/, still says "Python 3.8.6 documentation" in the title. When visiting https://docs.python.org/3.9/library/ (emphasis on the 3.9) explicitly, the correct title is shown. I

[issue41980] Argparse documentation is slightly misleading

2020-10-10 Thread Yannick Gingras
Yannick Gingras added the comment: Raymond, I would love to submit the PR if we reach a consensus on what the new message should be. I'm a bit out of touch with how things work these days. Is Github the best place to submit the PR? Paul, very good digging! Reading the coding and running

[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: Please change status to closed as well. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list

[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2020-10-10 Thread Miro Hrončok
Change by Miro Hrončok : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40064] py38: document xml.etree.cElementTree will be removed in 3.9

2020-10-10 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi, This ticket should be closed or updated. see disussion https://bugs.python.org/issue36543 -- nosy: +eamanu ___ Python tracker ___

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue41996] Should `make install` still install to /usr/bin/python3?

2020-10-10 Thread Eric V. Smith
Eric V. Smith added the comment: There's a PEP for this: PEP 394. If you want to change this, I suggest discussing it on the python-dev mailing list. If that leads to changes in the PEP, this issue can be re-opened. Personally I don't see this change happening until there are no systems

[issue27141] Fix collections.UserList shallow copy

2020-10-10 Thread Bar Harel
Change by Bar Harel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41992] Unable to install lxml using pip in Python 3.9

2020-10-10 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as third party. -- nosy: +eric.smith resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue41996] Should `make install` still install to /usr/bin/python3?

2020-10-10 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi, There're many people that still use py2, or both. Also python2 (python) is incompatible with python3, so we cannot call python == python3. (There was some discussion on Debian, just if you want take a look

[issue41996] Should `make install` still install to /usr/bin/python3?

2020-10-10 Thread Patrick Reader
New submission from Patrick Reader : Since Python 2 is now finally gone, should the Python executable not be installed to simply `/usr/bin/python` rather than `/usr/bin/python3` when running `make install`? -- components: Installation messages: 378387 nosy: pxeger priority: normal

[issue41992] Unable to install lxml using pip in Python 3.9

2020-10-10 Thread Jürgen Gmach
Jürgen Gmach added the comment: There is no Python 3.9 compatible package on PyPI yet ( https://pypi.org/project/lxml/#files ). I guess you have to wait a bit more until there will be a new release. Also, this is the cpython issue tracker. When you have problems with a specific package, it

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +21610 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22635 ___ Python tracker

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread brightest star
New submission from brightest star : Hello everyone, I have found five Null Pointer Dereference bugs in recent master branch. Although it's impact could be slightly, i think it is better to fix it. Bug 1: In the file ; ./Modules/_tracemalloc.c: static int

[issue41994] Refcount issues in import

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21609 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22632 ___ Python tracker

[issue41994] Refcount issues in import

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is a reference leak in import_add_module(). PyDict_GetItemWithError() returns a borrowed reference, but PyObject_GetItem() return a non-borrowed reference. If sys.modules is not a dict, there is a reference leak. import_add_module() and several

[issue41993] Possible issues when remove not completely initialized module from sys.module

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21608 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22631 ___ Python tracker

[issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41993] Possible issues when remove not completely initialized module from sys.module

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several issues in remove_module() in Python/import.c. 1. PyMapping_HasKey() is used to determine if the module was in sys.modules before removing it. But it can return 0 not only when the key is absent in the mapping, but also when some

[issue26835] Add file-sealing ops to fcntl

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41756] Do not always use exceptions to return result from coroutine

2020-10-10 Thread Mark Shannon
Mark Shannon added the comment: Vladimir, Thanks for adding PyIter_Send(). Don't forget to remove PyGen_Send() :) -- ___ Python tracker ___

[issue36520] Email header folded incorrectly

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +21607 pull_request: https://github.com/python/cpython/pull/22630 ___ Python tracker ___

[issue33972] AttributeError in email.message.iter_attachments()

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41992] Unable to install lxml using pip in Python 3.9

2020-10-10 Thread Aruna Gopalan
New submission from Aruna Gopalan : Installed Python 3.9 from Python.org Tried installing lxml package using the command "pip install lxml" It complains that it is unable to do so without libxml2 (which is not a python package). I do not have the same issue with 3.8.6. -- components:

[issue37840] bytearray_getitem() handles negative index incorrectly

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue38110] Use fdwalk() within os.closerange() impl if available

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_grammar and test_pydoc became failed on my machine until I removed all .pyc files. We need to bump the magic number for .pyc files. -- nosy: +serhiy.storchaka ___ Python tracker

[issue26067] test_shutil fails when gid name is missing

2020-10-10 Thread Irit Katriel
Irit Katriel added the comment: This seems complete, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: I agree that skip could could do 1 better. --- > I don't know whether it "should be" applied I don't think I'm convinced: the second check fixes only the very specific case when s[len(p):].startswith(p). Perturbations of reproducer.py are still very slow

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This function was kept after previous clean because all its usages was in the code which silences all exceptions in any case, so using _PyObject_HasAttrId did not do additional harm. But now it is used also in the new code in Objects/unionobject.c. It is

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21606 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22629 ___ Python tracker

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : _PyObject_HasAttrId() can return -1, 0 or 1. It returns -1 when cannot create a string (most likely due to MemoryError or UnicodeDecodeError), but returns 0 and silences all exceptions raised when look up the attribute (including MemoryError,

[issue41980] Argparse documentation is slightly misleading

2020-10-10 Thread paul j3
paul j3 added the comment: For ArgumentParser, prog is defined as: prog - The name of the program (default: sys.argv[0]) The comment in the `add_subparsers` method is: # prog defaults to the usage message of this parser, skipping # optional arguments and with no "usage:"

[issue41990] venv module clashes with pip --user ... improve coordination.

2020-10-10 Thread Bernd Wechner
New submission from Bernd Wechner : When developing Python software it is highly discouraged to install python modules globally (risking adverse impacts upon the underlying OS where if has Python dependencies). Project by project this typically done with venvs (and the venv module) User by

[issue40814] Update typing module documentation based on PEP 585

2020-10-10 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, let’s document __args__ and __origin__. -- ___ Python tracker ___ ___ Python-bugs-list

[issue33431] Change description about doc in programming, faq.

2020-10-10 Thread lvhuiyang
lvhuiyang added the comment: I has forgotten why I abandon the PR. Sorry I have no time to follow up the issue recently. Would you like go on if you are interest in the issue? -- stage: patch review -> resolved status: open -> closed ___ Python