[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

[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: Indeed. The issue can be trivially reproduced with: ``` #include #include #include #include int main() { char buf[255]; printf("Current dir: %s\n", getcwd(buf, 255)); int fd = open("../../tmp/test.txt", O_WRONLY | O_CREAT); if (fd < 0) {

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

[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

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

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

[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

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

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

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

2019-12-17 Thread Manfred Kaiser
Change by Manfred Kaiser : Added file: https://bugs.python.org/file48786/test.py ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2019-12-17 Thread Manfred Kaiser
New submission from Manfred Kaiser : I used email.parser.BytesParser for parsing mails. In one programm I used parse, because the email was stored in a file. In a second programm the email was stored in memory as a bytes object. I created hash values from each parts an compared them, to

[issue39072] Azure Pipelines: git clone failed with: OpenSSL SSL_read: Connection was reset

2019-12-17 Thread STINNER Victor
New submission from STINNER Victor : On https://github.com/python/cpython/pull/17612/ the Windows x86 job failed on git clone: https://github.com/python/cpython/pull/17612/checks?check_run_id=352102371 Logs: 2019-12-17T08:12:13.9180842Z ##[section]Starting: Request a runner to run this job

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread miss-islington
miss-islington added the comment: New changeset 3dbfe0ac93ce031a23342a62edd39506bcdaea0e by Miss Islington (bot) in branch '3.7': bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636)

[issue39067] EOFError in tarfile.open

2019-12-17 Thread jvoisin
jvoisin added the comment: Does it means that the right™ way to process untrusted tar files is to wrap every call to functions from tarfile.py in a `try: … except Exception:` block? -- ___ Python tracker

[issue39048] Reorder the __aenter__ and __aexit__ method checks for the async with statement

2019-12-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread miss-islington
miss-islington added the comment: New changeset 5f2c1345a79f205c680ed6e0a6ed44199546d79e by Miss Islington (bot) in branch '2.7': bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636)

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Ned Deily
Ned Deily added the comment: New changeset 5a9b69732ec19b04de459af890bcc26b83d979c5 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636) (GH-17638)

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Ned Deily
Ned Deily added the comment: For master and 3.9.0a2, equivalent workaround was included in a76ba362c4d86adf5e7f8254398135d12d7afd25 (bpo-39041 / GH-17594). While these changes prevent the specific test failure, they point to more general issues with use of relative paths on macOS

[issue39072] Azure Pipelines: git clone failed with: OpenSSL SSL_read: Connection was reset

2019-12-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +17104 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17636 ___ Python tracker

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread Ned Deily
Ned Deily added the comment: New changeset bf3aa1060a29a05813abbe877193af16e3e7131e by Ned Deily in branch '3.8': bpo-38295: prevent test_relative_path of test_py_compile failure on macOS Catalina (GH-17636) https://github.com/python/cpython/commit/bf3aa1060a29a05813abbe877193af16e3e7131e

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +17105 pull_request: https://github.com/python/cpython/pull/17637 ___ Python tracker ___

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +17107 pull_request: https://github.com/python/cpython/pull/17639 ___ Python tracker ___

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2019-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +17106 pull_request: https://github.com/python/cpython/pull/17638 ___ Python tracker ___

[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

[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

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

[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

[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

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

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

[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

[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

[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

[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

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

[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

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

[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 Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

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

[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

[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() ==

[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

[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

[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? > > -- > > ___

[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

[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

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

[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

[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

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

[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

[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

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

[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

[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

[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

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

[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

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

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

[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

[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

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

[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

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

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

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

[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 "",

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

[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

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

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

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

[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

[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

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

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

[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

[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

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

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

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

[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);

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

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

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

[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

[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

[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

[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

[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

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

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

[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

[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

[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

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

  1   2   >