[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support to load from paths to json.load ___ Python tracker

[issue37609] support "UNC" device paths in ntpath.splitdrive

2019-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to create a PR Eryk? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-18 Thread Varun Agrawal
Change by Varun Agrawal : -- pull_requests: +14624 pull_request: https://github.com/python/cpython/pull/14832 ___ Python tracker ___

[issue37616] [3.10 prep] zip path incorrect

2019-07-18 Thread Anthony Sottile
New submission from Anthony Sottile : In an effort to try and fix some of the ecosystem before python3.10 (or 4.0) is a thing, I figured I'd set up a build where the version is bumped and see what's broken. If you're interested in reproducing my findings, I've included a build that's

[issue37617] [3.10 prep] site.py uses `sys.version[:3]`

2019-07-18 Thread Anthony Sottile
New submission from Anthony Sottile : In an effort to try and fix some of the ecosystem before python3.10 (or 4.0) is a thing, I figured I'd set up a build where the version is bumped and see what's broken. If you're interested in reproducing my findings, I've included a build that's

[issue37617] [3.10 prep] site.py uses `sys.version[:3]`

2019-07-18 Thread Anthony Sottile
Anthony Sottile added the comment: disregard, this appears to be due to debian's patching -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not always linkat() can be used instead of link(). But on Windows (where there is no linkat()) os.link() creates a new link to the symbolic link itself. This is yet one argument for making follow_symlinks=False by default and changing the default behavior

[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +cjw296, mariocj89, michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37618] Docs: Code example locations in stdtypes

2019-07-18 Thread Kyle Stanley
New submission from Kyle Stanley : In the docs for the module stdtypes, the code example for several commonly used functions are in the bytearray section instead of the str section, where new users are far more likely to look. The new users are much more likely to benefit from seeing

[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-18 Thread Elizabeth Uselton
Elizabeth Uselton added the comment: Just added a fix for the tests I added in the last commit showing the order sensitivity in assertEqual when dealing with ANY and _Call or _CallList objects. _Call and _CallList currently depend on ordering to correctly process that an object being

[issue37618] Docs: Code example locations in stdtypes

2019-07-18 Thread Kyle Stanley
Kyle Stanley added the comment: Clarification on option 1: The last sentence should be "A link to the bytearray equivalent..." Clarification on option 2: As a part of this option, a link to the str equivalent could optionally be provided. -- ___

[issue34621] uuid.UUID objects can't be unpickled in older Python versions (<3.7)

2019-07-18 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +14625 pull_request: https://github.com/python/cpython/pull/14834 ___ Python tracker ___

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +14626 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14835 ___ Python tracker ___

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2019-07-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: * there were many small issues with the patch, improved as good as possible the FixString to catch ```import as```, ```from string import *``` and ```import string``` * did not include the FixStringImports as it's not a necessity to work in Python3 *

[issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type

2019-07-18 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : >>> class S(str): ... __eq__ = int.__eq__ >>> S() == S() True The expectation is that this raises an exception because int.__eq__() is called on S instances. -- components: Interpreter Core messages: 348108 nosy: jdemeyer priority: normal

[issue33944] Deprecate and remove pth files

2019-07-18 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type

2019-07-18 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14836 ___ Python tracker ___

[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2019-07-18 Thread Paul Hege
Paul Hege added the comment: I had also received the same warnings when running make: "INFO: Could not locate ffi libs and/or headers" and "Failed to build these modules: _ctypes". Although Python could still be installed, the pip command was not installed, and installing it using get_pip.py

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Eryk Sun
Eryk Sun added the comment: > on Windows (where there is no linkat()) os.link() creates a new link > to the symbolic link itself. Yes, CreateHardLinkW opens the source file by calling NtOpenFile with the option FILE_OPEN_REPARSE_POINT. So the behavior is follow_symlinks=False. Note,

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Jo Henke
Jo Henke added the comment: The problem that POSIX does not define the behavior of link() regarding symlinks (and that Unix implementations differ indeed), is independent from Python's os.link() defaults. Since it makes no sense to call link(), when linkat() is available, I propose this

[issue34697] ctypes: Crash if manually-created CField instance is used

2019-07-18 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14628 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14837 ___ Python tracker ___

[issue37587] JSON loads performance improvement for long strings

2019-07-18 Thread Inada Naoki
Inada Naoki added the comment: > 1. remove the mov entirely. It is not needed inside the loop and it is only > needed later, outside the loop to access the variable How can we lazy "movDWORD PTR [rsp+0x44],eax"? -- nosy: +inada.naoki ___

[issue34697] ctypes: Crash if manually-created CField instance is used

2019-07-18 Thread hai shi
hai shi added the comment: I have try to cancel this PyCField_new function, but i am not sure I haven't break the code structure. -- nosy: +shihai1991 ___ Python tracker ___

[issue37587] JSON loads performance improvement for long strings

2019-07-18 Thread Inada Naoki
Inada Naoki added the comment: Some compilers produce inefficient code for PR-14752. I wrote another patch which is friendly to more compilers. $ perf record ./python -m pyperf timeit -s "import json; x = json.dumps({'k': '1' * 2 ** 20})" "json.loads(x)" # PR-14752 gcc-7 (Ubuntu

[issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615

2019-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +14629 pull_request: https://github.com/python/cpython/pull/14839 ___ Python tracker ___

[issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615

2019-07-18 Thread Paul Ganssle
Paul Ganssle added the comment: New changeset 9cd39b16e2655f748f7aa8d20bca4812da00ba70 by Paul Ganssle (Paul Monson) in branch 'master': bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (#14460)

[issue37620] str.split(sep=None, maxsplit=-1,any=False)

2019-07-18 Thread Harry Coin
New submission from Harry Coin : When first I read the str.split documentation I parsed it to mean 'ab\t cd ef'.split(sep=' \t') --> ['ab','cd','ef'] Especially as the given example in the docs with the <> would have led to the given result read the way I read it. I suggest adding a parameter

[issue37621] Line continuation of blank line emits NEWLINE

2019-07-18 Thread Dominik Miedziński
New submission from Dominik Miedziński : Both C and Python tokenizers emit NEWLINE tokens on continued blank lines. Because of this it is possible to emit repeated NEWLINEs, which some tools don't expect to happen. I've attached example source file which is tokenized into 3 NEWLINE tokens in

[issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615

2019-07-18 Thread miss-islington
miss-islington added the comment: New changeset 652b667b13fc6176a565538b35ec11174cc9dacf by Miss Islington (bot) in branch '3.8': bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH-14460)

[issue37621] Line continuation of blank line emits NEWLINE

2019-07-18 Thread Dominik Miedziński
Change by Dominik Miedziński : -- keywords: +patch pull_requests: +14630 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14840 ___ Python tracker

[issue37609] support "UNC" device paths in ntpath.splitdrive

2019-07-18 Thread Ngalim Siregar
Change by Ngalim Siregar : -- keywords: +patch pull_requests: +14632 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14841 ___ Python tracker

[issue36833] Add tests for Datetime C API Macros

2019-07-18 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37622] Signature of SHA256 HMAC digest not matching with the signature of jwt library

2019-07-18 Thread Dodain
New submission from Dodain : The signature (SHA256 of HMAC Digest) calculated using hmac library doesn't match the signature calculated using jwt library. The singature calculated using JWT is the right signature. The signature with JWT library is VXG8L0SEY3wo5hdAznbvxWXDbhNtuOd7PaZOhzZn_HQ

[issue36833] Add tests for Datetime C API Macros

2019-07-18 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch pull_requests: +14633 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14842 ___ Python tracker

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Jo Henke
Change by Jo Henke : -- keywords: +patch pull_requests: +14634 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14843 ___ Python tracker ___

[issue16970] argparse: bad nargs value raises misleading message

2019-07-18 Thread sushma
sushma added the comment: Hello! I added the patch and submitted the PR and ran the test, could you please take a look? Also, I see this 3.6 Thanks -- message_count: 8.0 -> 9.0 nosy: +syadlapalli nosy_count: 4.0 -> 5.0 pull_requests: +14635 stage: needs patch -> patch review

[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-18 Thread Elizabeth Uselton
Elizabeth Uselton added the comment: Giving this a reread with fresh eyes this morning, I realized I wasn't explicit enough in saying that I see that this fix is about the same as the one you mentioned, Karthikeyan, but said you were concerned might cause more subtle bugs. I hear that, and

[issue13819] _warnings settings are process-wide

2019-07-18 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-07-18 Thread Jake Tesler
Change by Jake Tesler : -- pull_requests: +14636 pull_request: https://github.com/python/cpython/pull/14845 ___ Python tracker ___

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-07-18 Thread Tim Froehlich
Tim Froehlich added the comment: Is it possible to amend the documentation (https://docs.python.org/3.5/library/asyncio-subprocess.html, etc) to include a note that the loop parameter doesn't work? I'm impacted by this bug and lost a few hours to it. -- nosy: +Tim Froehlich

[issue37616] [3.10 prep] zip path incorrect

2019-07-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37617] [3.10 prep] site.py uses `sys.version[:3]`

2019-07-18 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> third party ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34443] enum repr should use __qualname__

2019-07-18 Thread Ethan Furman
Ethan Furman added the comment: New changeset 323842c2792a81e87917790506ec3457832c84b3 by Ethan Furman (Walter Dörwald) in branch 'master': bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-18 Thread Andrew Yurisich
New submission from Andrew Yurisich : I wanted to return a namedtuple from a concrete implementation of an importlib.abc.Loader base class, and wasn't able to provide a __spec__ property on the underlying class behind the namedtuple. All return values from importlib.abc.Loader#create_module

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +14637 pull_request: https://github.com/python/cpython/pull/14846 ___ Python tracker ___

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e0a1f8fb5c60886dbddf1a3ccb5d47576bdd43e2 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +14638 pull_request: https://github.com/python/cpython/pull/14847 ___ Python tracker ___

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-18 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +14639 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14848 ___ Python tracker ___

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-18 Thread miss-islington
miss-islington added the comment: New changeset db2957c8ebbe1c4609b3fc730c6e682cb8ccfeb0 by Miss Islington (bot) in branch '3.7': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)

[issue33610] IDLE: Make multiple improvements to CodeContext

2019-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 86eb5daaf31860da479e034d69e9a6d4f47a8eb6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) (#14846)

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Ted Whalen
New submission from Ted Whalen : The behavior of random.choices when negative weights are provided is unexpected. While giving a negative weight for one value is probably bad, it's really unfortunate that providing a negative weight for one value affects the probability of selecting an

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-07-18 Thread Michael Blahay
Michael Blahay added the comment: Ryan, I like option A as well, but it is a breaking change. Unlike in a compiled language where we could output a warning, making the proposed change could bring some software to a grinding halt. For now I'm going to make the documentation change and this

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-18 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> rhettinger nosy: +eric.smith, rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Daniel
New submission from Daniel : Not sure if this is the desired behavior but wanted to bring it up anyways. When you have a class and have a variable in like: class TestClass(object): variable = [] then you run it through a loop like: for num in range(10): test = TestClass()

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Dominik Miedziński
Dominik Miedziński added the comment: This is expected, because list is created during class definition, not initialization. You should initialize `variable` in __init__. class TestClass(object): def __init__(self): self.variable = [] for num in range(10): test = TestClass()

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14640 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14849 ___ Python tracker

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +14641 pull_request: https://github.com/python/cpython/pull/14850 ___ Python tracker ___

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Because variable belongs to the class, and not any instance of the class, you can duplicate this behavior without creating any instances at all: >>> class TestClass(object): ... variable = [] ... >>> TestClass.variable.append(1) >>> TestClass.variable [1]

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread miss-islington
miss-islington added the comment: New changeset 8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7 by Miss Islington (bot) (aldwinaldwin) in branch 'master': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +14642 pull_request: https://github.com/python/cpython/pull/14851 ___ Python tracker ___

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +14643 pull_request: https://github.com/python/cpython/pull/14852 ___ Python tracker ___

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Mariatta
Mariatta added the comment: Thanks for the PR! There's conflict to the 2.7 branch, but I'm not motivated enough to fix it there. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread miss-islington
miss-islington added the comment: New changeset 87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 by Miss Islington (bot) in branch '3.7': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 --

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Also, you might want to search for "python class and instance variables". This one looks decent, although I didn't read it exhaustively: https://howchoo.com/g/nzy0mthhyzl/understanding-class-vs-instance-variables-in-python-3 --

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread miss-islington
miss-islington added the comment: New changeset 840352455dfbb6acb3b69ea88a19c01b7358e801 by Miss Islington (bot) in branch '3.8': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/840352455dfbb6acb3b69ea88a19c01b7358e801 --

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: just guessing ... in 2.7 unix.rst has '\ No newline at end of file' it's your enhancement/call, but indeed no need to put energy in 2.7 doc anymore. case closed -- ___ Python tracker

[issue37496] Support annotations in signature strings.

2019-07-18 Thread Giovanni Cappellotto
Giovanni Cappellotto added the comment: I'd like to work on this, but I'm kind of new to the codebase. Do you think I should leave this task to someone more expert on the matter? I took a look at the function you mentioned and I was able to support simple annotations, for instance `x: int`,

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: This is what happens with your weights: >>> list(itertools.accumulate(weights)) [1, 2, 1, 2, 3, 3, 4] using bisect.bisect certain amount of times, will distribute on this: a<1 ___

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14854 ___ Python tracker

[issue37626] Documentation:conflict between docs

2019-07-18 Thread 徐靖
Change by 徐靖 : -- assignee: docs@python components: Documentation nosy: docs@python, shiyuchong priority: normal severity: normal status: open title: Documentation:conflict between docs versions: Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue37626] Documentation:conflict between docs

2019-07-18 Thread 徐靖
New submission from 徐靖 : In https://docs.python.org/3/whatsnew/3.4.html#api-and-feature-removals,It is said "inspect.Signature: positional-only parameters are now required to have a valid name." But in https://docs.python.org/3/library/inspect.html?highlight=3.4#inspect.Signature, the

[issue37626] Documentation:conflict between docs

2019-07-18 Thread SilentGhost
Change by SilentGhost : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37587] JSON loads performance improvement for long strings

2019-07-18 Thread Inada Naoki
Change by Inada Naoki : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list