[issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected

2019-12-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: As per the fspath PEP https://www.python.org/dev/peps/pep-0519/#c-api the below precedence is set. So for the enum inheriting from str the object itself is returned and MyEnum.RED.__str__ is used returning MyEnum.RED. You can remove inheritance fro

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-17 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 ___ Python tracker ___ __

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 75bb07e92baa7267a61056d03d7e6b475588e793 by Inada Naoki (Sebastian Berg) in branch 'master': bpo-39028: Performance enhancement in keyword extraction (GH-17576) https://github.com/python/cpython/commit/75bb07e92baa7267a61056d03d7e6b475588e793 ---

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2019-12-17 Thread Mateusz Bysiek
Change by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for dropping the sort. Also, the repr should be made to round-trip with eval(). -- ___ Python tracker ___ ___

[issue39082] AsyncMock is unable to correctly patch static or class methods

2019-12-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There seems to be a difference in obtaining the attribute out of the __dict__ and getattr. patch uses __dict__ [0] to access the attribute to be patched and falls back to getattr. There is a difference in detecting normal attribute access to be a c

[issue39076] Use types.SimpleNamespace for argparse.Namespace

2019-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: There are some sticking points: * types.SimpleNamespace() sorts attributes, so this would get in the way of issue #39058. * argparse.Namespace() supports a __contains__() method that isn't offered by types.SimpleNamespace(): >>> 'abc' in Namespace(a

[issue39085] Improve docs for await expression

2019-12-17 Thread Kyle Stanley
New submission from Kyle Stanley : For context, I decided to open this issue after receiving a substantial volume of very similar questions and misconceptions from users of asyncio and trio about what `await` does, mostly within a dedicated "async" topical help chat (in the "Python Discord" c

[issue39082] AsyncMock is unable to correctly patch static or class methods

2019-12-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Using patch as a function just returns a patch object. You need to call start method on the patch object to return a Mock. -- nosy: +lisroach, xtreak ___ Python tracker

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-17 Thread Abhilash Raj
Abhilash Raj added the comment: Sure, fixed as per your comments in the PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39079] help() modifies the string module

2019-12-17 Thread Zachary Ware
Zachary Ware added the comment: Since this has been this way for 22 years without a previous report that I can find, +1 to closing as "won't fix"/"not a bug" and so doing. However, I'm also adding the 2.7 release manager to make sure he knows about it and can reopen if he wants. --

[issue39084] string.letters is flipped after setlocale is called

2019-12-17 Thread Zachary Ware
Change by Zachary Ware : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> help() modifies the string module ___ Python tracker __

[issue39084] string.letters is flipped after setlocale is called

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: This is a duplicate of issue 39079. I recommend that we don't "fix" this. It is only an issue with 2.7, and hasn't been a problem for years. -- nosy: +eric.smith ___ Python tracker

[issue39080] Inconsistency with Starred Expression line/col info

2019-12-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39083] Dictionary get(key, default-expression) not short circuit behavior

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: .get() is just a regular function call. And like all python functions, all of the arguments are evaluated before the function is called. There is no mechanism in python to delay the evaluation of a arguments. You might want to look at collections.defaultdict.

[issue39084] string.letters is flipped after setlocale is called

2019-12-17 Thread Manish
Change by Manish : -- keywords: +patch pull_requests: +17117 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17650 ___ Python tracker ___ _

[issue39084] string.letters is flipped after setlocale is called

2019-12-17 Thread Manish
New submission from Manish : Steps to reproduce: >>> import string >>> string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> help(string) .. >>> string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' The help(string) can also be replaced with locale.setl

[issue39080] Inconsistency with Starred Expression line/col info

2019-12-17 Thread miss-islington
miss-islington added the comment: New changeset b1f204471092678dd89117e608fa041a9589d14c by Miss Islington (bot) (Pablo Galindo) in branch '3.8': [3.8] bpo-39080: Starred Expression's column offset fix when inside a CALL (GH-17645) (GH-17649) https://github.com/python/cpython/commit/b1f20447

[issue39083] Dictionary get(key, default-expression) not short circuit behavior

2019-12-17 Thread Martin Meo
New submission from Martin Meo : """ Unexpected behavior report Dictionary get(key, default-expression) not short circuit behavior MacOS 10.14.6 sys.version_info(major=3, minor=6, micro=5, releaselevel='final', serial=0) BACKGROUND A python dictionary is a data structure that associates a set

[issue39082] AsyncMock is unable to correctly patch static or class methods

2019-12-17 Thread Aniket Panse
New submission from Aniket Panse : Currently, patch is unable to correctly patch coroutinefunctions decorated with `@staticmethod` or `@classmethod`. Example: ``` [*] aniketpanse [~/git/cpython] -> ./python

[issue39080] Inconsistency with Starred Expression line/col info

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

[issue39080] Inconsistency with Starred Expression line/col info

2019-12-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 50d4f12958bf806a4e1a1021d70cfd5d448c5cba by Pablo Galindo (Lysandros Nikolaou) in branch 'master': bpo-39080: Starred Expression's column offset fix when inside a CALL (GH-17645) https://github.com/python/cpython/commit/50d4f12958bf806a4e

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that a quick glance in the rear view mirror shows that the design isn't awesome. But I just don't see how we can change it at this point. It is what it is. And it's no surprise that int and float have the same behavior: they share the same code in Py

[issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected

2019-12-17 Thread Andrew Ni
New submission from Andrew Ni : import os import pathlib import enum class MyEnum(str, enum.Enum): RED = 'red' # this resolves to: '/Users/niandrew/MyEnum.RED' # EXPECTED: '/Users/niandrew/red' str(pathlib.Path.home() / MyEnum.RED) # this resolves to: '/Users/niandrew/red' os.path.join(pa

[issue39074] Threading memory leak in _shutdown_locks for non-daemon threads

2019-12-17 Thread Adam
Adam added the comment: Looks like this issue might be a duplicate of https://bugs.python.org/issue37788 -- ___ Python tracker ___

[issue39074] Threading memory leak in _shutdown_locks for non-daemon threads

2019-12-17 Thread Adam
Change by Adam : -- type: resource usage -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue39079] help() modifies the string module

2019-12-17 Thread Zectbumo
Zectbumo added the comment: @eric.smith It actually caused a problem and then turned into a curiosity. At the beginning I wanted to remind myself about the string module so I did a help(string). Then right after that I wrote a program that generated filenames from string.letters. I closed th

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Michael Amrhein
Michael Amrhein added the comment: > > ... Has anyone checked what C does? > #include int main() { int i = -12345; double f = -12345.0; printf("%-020d\n", i); printf("%020d\n", i); printf("%20d\n", i); printf("%-020f\n", f); printf("%020f\n", f); printf("%20f\n

[issue39079] help() modifies the string module

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: There's no reasonable way I can see to fix this. The reassignment of those string attributes is clearly intentional (it's even documented) and there's probably code somewhere that relies on it. I think the best we can do is close as "won't fix" though "not a

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17115 pull_request: https://github.com/python/cpython/pull/17647 ___ Python tracker ___ __

[issue13601] sys.stderr should be line-buffered when stderr is not a TTY

2019-12-17 Thread Jendrik Seipp
Jendrik Seipp added the comment: I took the liberty of increasing the target version. It would be great if someone could review my patch for this issue at https://github.com/python/cpython/pull/17646 . -- nosy: +jendrik versions: +Python 3.9 -Python 3.7 _

[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-12-17 Thread Steve Dower
Steve Dower added the comment: New changeset a9d0a6a1b932752873e04714c5dda707729078e4 by Steve Dower in branch 'master': bpo-36500: Simplify PCbuild/build.bat and prevent path separator changing in comments (GH-17644) https://github.com/python/cpython/commit/a9d0a6a1b932752873e04714c5dda7077

[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-12-17 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___

[issue13601] sys.stderr should be line-buffered when stderr is not a TTY

2019-12-17 Thread Jendrik Seipp
Change by Jendrik Seipp : -- keywords: +patch pull_requests: +17114 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17646 ___ Python tracker ___

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread paul j3
paul j3 added the comment: This patch changes the super class, _AttributeHolder. ArgumentParser and Actions also inherit from this, though they have their own _get_kwargs methods, and so aren't affected by the sort and its removal. I just had occasion on stackoverflow to discuss the order i

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: [Eric] > Is that the "0" here: [...] Yes, sorry; that could have been clearer. > In particular, what if you specify a different alignment type with the > pre-width 0? Right, that's the critical question here. For floats and ints, an explicitly-specified a

[issue39079] help() modifies the string module

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: For completeness, here's the path leading to the reassignment (after hacking in a raise to the appropriate place in _localemodule.c). It's a side-effect of calling `locale.getpreferredencoding`. >>> help(int) Traceback (most recent call last): File "", lin

[issue39079] help() modifies the string module

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: @Zectbumo: is this causing you any practical problem? Or is it just a curiosity? -- ___ Python tracker ___ ___

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you mean by the "pre-width 0". Is that the "0" here: format_spec ::= [[fill]align][sign][#][0][width][grouping_option][.precision][type] ? And now that I write out the question, I'm sure that's what you mean. PEP 3101 says "If the width f

[issue39080] Inconsistency with Starred Expression line/col info

2019-12-17 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- keywords: +patch pull_requests: +17113 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17645 ___ Python tracker _

[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-12-17 Thread Steve Dower
Steve Dower added the comment: Adding just a couple of minor touch-ups in PR 17644, but otherwise thanks Anthony! -- ___ Python tracker ___ __

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-17 Thread Bluebird
Bluebird added the comment: Ok, I'll close my request if you do not think of any value in it. Py is such an elegant solution, I wish something as simple would also address this problem. Virtual environement do have the downside of not coming directly with Python. In my work environment, ex

[issue39076] Use types.SimpleNamespace for argparse.Namespace

2019-12-17 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-12-17 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +17112 pull_request: https://github.com/python/cpython/pull/17644 ___ Python tracker ___ _

[issue39080] Inconsistency with Starred Expression line/col info

2019-12-17 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : When a starred expression like *[0, 1] is parsed, the following AST gets generated: Module( body=[ Expr( value=Starred( value=List( elts=[ Constant(

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: > Regarding cases 3-7 I'd like to suggest a slightly different resolution: Hmm, yes. I was concentrating on the Decimal results, but I agree that these int/float results are disturbing: >>> format(12345, "<020") '12345000' >>> format(12345.0, "<0

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Michael Amrhein
Michael Amrhein added the comment: Mark, to answer your question regarding the two implementations of Decimals: No, in the cases I stated above there are no differences in their behaviour. In order to dig a bit deeper, I wrote a little test: d = cdec.Decimal("1234567890.1234") p = pydec.Decim

[issue39079] help() modifies the string module

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: > But given that there's only 2 weeks of support left for 2.7, I don't see this > getting changed. Agreed: I can't reproduce on Python 3, and it looks as though the offending code is gone from the codebase in Python 3, so this is pretty much just a historic

[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-12-17 Thread Steve Dower
Steve Dower added the comment: New changeset 9e36589d49c1d6b06c0239fa69e8274d7e89e375 by Steve Dower (Anthony Shaw) in branch 'master': bpo-36500: Add --regen option to PCbuild/build.bat so Windows users can regen grammar, opcodes, tokens and symbols (GH-12654) https://github.com/python/cpyt

[issue39079] help() modifies the string module

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Here's where `string.letters` is reassigned: https://github.com/python/cpython/blob/5f2c1345a79f205c680ed6e0a6ed44199546d79e/Modules/_localemodule.c#L136-L147 That code looks like it's exercised whenever setlocale is (or possibly just when LC_CTYPE is change

[issue39079] help() modifies the string module

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: With 2.7.16 on cygwin, I get: >>> import string >>> string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> help(int) >>> string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' But given that there's only 2 weeks of support lef

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Michael Amrhein
Michael Amrhein added the comment: Mark, I mostly agree with your classifications / proposals. Regarding cases 3-7 I'd like to suggest a slightly different resolution: Following my interpretation of the spec ("use zeropad *only* if no align is given"), "<020", ">020", "^020" and "=020" would b

[issue39079] help() modifies the string module

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: I *can* reproduce, on macOS 10.14.6, Python 2.7.17 (from macports). Python 2.7.17 (default, Oct 20 2019, 14:46:50) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: I guess I could make the default value something like _CALLABLE(dict), but I'm not sure that would do you any good. But at least you could tell from the repr what it is. -- ___ Python tracker

[issue39079] help() modifies the string module

2019-12-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: I am unable to reproduce this. Can you double check that this occurs in the plain Python interpreter or IDLE, and provide a minimum reproducible example? (No third-party IDEs or interpreters, such as Jupyter.) These guidelines may help: https://en.wikiped

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-17 Thread R. David Murray
R. David Murray added the comment: One more tweak to the test and we'll be good to go. -- ___ Python tracker ___ ___ Python-bugs-li

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

2019-12-17 Thread R. David Murray
R. David Murray added the comment: Hmm. Yes, \r\n should be disallowed in the arguments to Address. I thought it already was, so that's a bug. That bug produces the other apparent bug as well: because the X: was treated as a separate line, the previous header did not need double quotes so

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread R. David Murray
R. David Murray added the comment: All of which isn't to discount that you might have a found a bug, by the way, if you want to investigate further :) -- ___ Python tracker _

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread R. David Murray
R. David Murray added the comment: The problem is that you are starting with different inputs. unicode strings and bytes are different things, and so parsing them can produce different results. The fact of that matter is that email messages are defined to be bytes, so parsing a unicode str

[issue39070] Uninstalling 3.8.0 fails but it says it succeeds..

2019-12-17 Thread Steve Dower
Steve Dower added the comment: Hi tuijatuulia In your %TEMP% directory there should be a few sets of log files for Python. Would you be able to zip them up and attach them to this issue? That will help us figure out what hasn't worked for you. -- ___

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2019-12-17 Thread Eric V. Smith
Eric V. Smith added the comment: The problem is that __init__ has to have a sentinel to know whether or not to call the default value. If the default were just "dict", should it call it, or is the passed in value really dict, in which case it doesn't get called? dataclass() class Test: a

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. I think most of this is a documentation issue: we either need to make clear that the formatting documentation applies only to the float type and that Decimal follows its own rules (usually for good reason, namely that it's required to

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Change by Mark Dickinson : -- Removed message: https://bugs.python.org/msg358567 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread Manfred Kaiser
Manfred Kaiser added the comment: I think, the best way is to fix the documentation. The reason is, when a developer rely to the behavior of the function but the behavior is changed, a program may work incorrect. Just think about forensic stuff. If a hash value will be created with the "par

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. I think most of this is a documentation issue: we either need to make clear that the formatting documentation applies only to the float type and that Decimal follows its own rules (usually for good reason, namely that it's required to

[issue39079] help() modifies the string module

2019-12-17 Thread Alfred Morgan
New submission from Alfred Morgan : import string a = string.letters help(int) b = string.letters a == b # False -- components: Library (Lib) messages: 358564 nosy: Zectbumo priority: normal severity: normal status: open title: help() modifies the string module versions: Python 2.7 ___

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not iterate all attributes, and dir() always sort attribute names. -- nosy: +rhettinger, serhiy.storchaka, yselivanov ___ Python tracker

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2019-12-17 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2019-12-17 Thread Veith Röthlingshöfer
New submission from Veith Röthlingshöfer : When creating a dataclass with a default that is a field with a default factory, the factory is not correctly resolved in cls.__init__.__defaults__. It evaluates to the __repr__ of dataclasses._HAS_DEFAULT_FACTORY_CLASS, which is "". The expected beh

[issue39077] Numeric formatting inconsistent between int, float and Decimal

2019-12-17 Thread Michael Amrhein
New submission from Michael Amrhein : The __format__ methods of int, float and Decimal (C and Python implementation) do not interpret the Format Specification Mini-Language in the same way: >>> import decimal as cdec ... cdec.__file__ ... '/usr/lib64/python3.6/decimal.py' >>> import _pydecimal

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9707e8e22d80ca97bf7a9812816701cecde6d226 by Victor Stinner in branch 'master': bpo-38546: multiprocessing tests stop the resource tracker (GH-17641) https://github.com/python/cpython/commit/9707e8e22d80ca97bf7a9812816701cecde6d226 --

[issue38904] "signal only works in main thread" in main thread

2019-12-17 Thread Richard Warfield
Richard Warfield added the comment: I think so, yes. On Wed, Dec 18, 2019 at 1:10 AM Eric Snow wrote: > > Eric Snow added the comment: > > So resolving issue39042 would be enough, particularly if we backported > the change to 3.8? > > -- > > ___ >

[issue38904] "signal only works in main thread" in main thread

2019-12-17 Thread Eric Snow
Eric Snow added the comment: So resolving issue39042 would be enough, particularly if we backported the change to 3.8? -- ___ Python tracker ___ __

[issue39042] Use the runtime's main thread ID in the threading module.

2019-12-17 Thread Eric Snow
Eric Snow added the comment: Hmm, I wonder if this should be considered a regression in 3.8. As demonstrated in issue38904, the following code changed behavior as of 3.8, under certain conditions: import signal import threading def int_handler(): ... if threading.current_thread() == th

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39076] Use types.SimpleNamespace for argparse.Namespace

2019-12-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread Eric Snow
Eric Snow added the comment: FWIW, I've also opened issue #39076 about subclassing types.SimpleNamespace. -- ___ Python tracker ___ ___

[issue39076] Use types.SimpleNamespace for argparse.Namespace

2019-12-17 Thread Eric Snow
New submission from Eric Snow : types.SimpleNamespace does pretty much exactly the same thing as argparse.Namespace. We should have the latter subclass the former. I expect the only reason that wasn't done before is because SimpleNamespace is newer. The only thing argparse.Namespace does di

[issue39033] zipimport raises NameError: name '_boostrap_external' is not defined

2019-12-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +17111 pull_request: https://github.com/python/cpython/pull/17642 ___ Python tracker ___

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Eric Snow
Change by Eric Snow : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-17 Thread Eric Snow
Eric Snow added the comment: > Currently, Namespace() objects sort the attributes in the __repr__. This is > annoying because argument > order matters and because everywhere else in the module we preserve order > (i.e. users see help in the > order that arguments are added). Hmm, I was goin

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Eric Snow
New submission from Eric Snow : types.SimpleNamespace was added in 3.3 (for use in sys.implementation; see PEP 421), which predates the change to preserving insertion order in dict. At the time we chose to sort the attributes in the repr, both for ease of reading and for a consistent output.

[issue39074] Threading memory leak in _shutdown_locks for non-daemon threads

2019-12-17 Thread Adam
New submission from Adam : When running 3.7, we noticed a memory leak in threading._shutdown_locks when non-deamon threads are started but "join()" or "is_alive()" is never called. Here's a test to illustrate the growth: = import threading import time import tracemalloc def test_leak

[issue37224] test__xxsubinterpreters fails randomly

2019-12-17 Thread Eric Snow
Eric Snow added the comment: On Fri, Dec 13, 2019 at 8:08 PM Kyle Stanley wrote: > Yeah, I named it "_PyInterpreterIsFinalizing" and it's within > Include/cpython. Definitely open > to suggestions on the name though, it's basically just a private getter for > interp->finalizing. For a struc

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Bo Anderson
Bo Anderson added the comment: > You don't even need a C program to reproduce Indeed, touch is built upon the POSIX file API (unless Apple modified it). The idea for the Apple bug report was to show it happening at a low level and not specific to a given tool. > And the "cd" is optional, I

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the issue with the following match file: test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest.test_no_stale_references test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest.test_ressources_gced_in_workers test.tes

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
STINNER Victor added the comment: Example of failure, with additional debug prints: 0:01:02 load avg: 42.13 [ 38/1] test_concurrent_

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
STINNER Victor added the comment: I managed to reproduce the issue on the RHEL8 worker using: * terminal 1: ./python -u -m test --fail-env-changed test_concurrent_futures -v -m ProcessPoolSpawnProcessPoolExecutorTest -F -j 15 * terminal 2: ./python -m test -j4 -u all -F -r I can still reprod

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: You don't even need a C program to reproduce: $ cd /private/tmp $ touch ../../foo.txt touch: ../../tmp/foo.txt: No such file or directory And the "cd" is optional, I get the same error from my home directory (/Users/ronald). All of this on macOS 10.15.2

[issue37421] Some tests leak temporary files

2019-12-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17110 pull_request: https://github.com/python/cpython/pull/17641 ___ Python tracker ___ __

[issue39059] Getting incorrect results in rounding procedures

2019-12-17 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17109 pull_request: https://github.com/python/cpython/pull/17641 ___ Python tracker ___ __

[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-17 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17640 ___ Python tracker ___ _

[issue39073] email regression in 3.8: folding

2019-12-17 Thread Jasper Spaans
Jasper Spaans added the comment: As can be seen above, 3.5 wraps the realname in a double quote, but 3.8 fails to do so. Note that 3.5 also does not add a whitespace in front of the line starting with "X:", so it is also not merged with the previous line when parsing. I guess we'll have to

[issue39073] email regression in 3.8: folding

2019-12-17 Thread Jasper Spaans
New submission from Jasper Spaans : big-bob:t spaans$ cat fak.py import sys from email.message import EmailMessage from email.policy import SMTP from email.headerregistry import Address msg = EmailMessage(policy=SMTP) a = Address(display_name='Extra Extra Read All About It This Line Does Not

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 630c8df5cf126594f8c1c4579c1888ca80a29d59 by Victor Stinner in branch 'master': bpo-38858: Small integer per interpreter (GH-17315) https://github.com/python/cpython/commit/630c8df5cf126594f8c1c4579c1888ca80a29d59 -- __

[issue38671] pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist

2019-12-17 Thread Riccardo Polignieri
Change by Riccardo Polignieri : -- nosy: +ricpol ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue39059] Getting incorrect results in rounding procedures

2019-12-17 Thread AVicennA
AVicennA added the comment: @mark.dickinson: You asked some questions, then, I also asked you about solving this problem. It seems to me you just love to talk.. I just answered to your questions. If "this isn't the right forum for that discussion" as you mean, it concerns you too. When you

  1   2   >