[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: @Ananthakrishnan: Do you know how arrays and pointers work in C? -- ___ Python tracker ___ ___

[issue39704] Disable code coverage

2020-02-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Just to clarify is it about just disabling the automatic comment about code coverage on PRs or the code coverage build itself? -- nosy: +xtreak ___ Python tracker

[issue39704] Disable code coverage

2020-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Ananthakrishnan
Ananthakrishnan added the comment: This is my code for math.gcd: static PyObject * math_gcd(PyObject *module, PyObject *args, Py_ssize_t n) { PyObject *g = 0, *item, *in; Py_ssize_t i; for (i = 0; i < n; i++) { item = args[i]; in = PyNumber_Index(item);

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-20 Thread miss-islington
miss-islington added the comment: New changeset 09db1da63f866afff8a64ae3c60acdcd6bc80501 by Miss Islington (bot) in branch '3.7': bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036) https://github.com/python/cpython/commit/09db1da63f866afff8a64ae3c60acdcd6bc80501

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-20 Thread miss-islington
miss-islington added the comment: New changeset a2075121217e809c9a5511f6ca225c12f340de0c by Miss Islington (bot) in branch '3.8': bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036) https://github.com/python/cpython/commit/a2075121217e809c9a5511f6ca225c12f340de0c

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +17958 pull_request: https://github.com/python/cpython/pull/18588 ___ Python tracker ___

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +17957 pull_request: https://github.com/python/cpython/pull/18587 ___ Python tracker ___

[issue38657] Clarify numeric padding behavior in string formatting

2020-02-20 Thread miss-islington
miss-islington added the comment: New changeset 424e5686d82235e08f8108b8bbe034bc91421689 by Pete Wicken in branch 'master': bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036) https://github.com/python/cpython/commit/424e5686d82235e08f8108b8bbe034bc91421689

[issue39684] PyUnicode_IsIdentifier has two if/thens that can be combined

2020-02-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 933fc53f3f9c64ffa703b1f23a93bec560faea57 by Andy Lester in branch 'master': closes bpo-39684: Combine two if/thens and squash uninit var warning. (GH-18565) https://github.com/python/cpython/commit/933fc53f3f9c64ffa703b1f23a93bec560faea57

[issue39598] ERR_CACHE_MISS

2020-02-20 Thread Gustavo
Gustavo added the comment: If you need more help on this issue, you can try the following guide: https://chromenotopening.com -- nosy: +gustavoxo ___ Python tracker ___

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-20 Thread Zhibin Dong
Zhibin Dong added the comment: Thank you for your investigation, I will also try to see what went wrong. -- ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Vedran Čačić
Vedran Čačić added the comment: Hm... is "exact result" a technical term that's defined somewhere? Because to me it seems that this > "If there exists an exact result at a lower precision, this result should also be returned at MAX_PREC (without MemoryError)". is a mathematical statement,

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: New changeset b6271025c640c228505dc9f194362a0c2ab81c61 by Miss Islington (bot) in branch '3.8': bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) (#18584)

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: New changeset c6f95543b4832c3f0170179da39bcf99b40a7aa8 by Miss Islington (bot) in branch '3.7': bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) (#18585)

[issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError

2020-02-20 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +17956 pull_request: https://github.com/python/cpython/pull/18586 ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +17954 pull_request: https://github.com/python/cpython/pull/18584 ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +17955 pull_request: https://github.com/python/cpython/pull/18585 ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: New changeset 90930e65455f60216f09d175586139242dbba260 by Stefan Krah in branch 'master': bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) https://github.com/python/cpython/commit/90930e65455f60216f09d175586139242dbba260 --

[issue39704] Disable code coverage

2020-02-20 Thread Ammar Askar
Ammar Askar added the comment: Agreed, it's way too noisy. This PR which touches absolutely no code https://github.com/python/cpython/pull/18583#issuecomment-589432937 claims to "increase coverage by 1.01%." This doesn't really add much value and only adds noise in the pull requests.

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > It does seem like a good solution. Great. I'll close this issue then as the proposed solution is actually not as straightforward as it seems. Task names exist specifically to solve this case. -- resolution: -> rejected stage: -> resolved status:

[issue39660] Contextvars: Optional callbacks on state change

2020-02-20 Thread Leonard Lausen
Leonard Lausen added the comment: > No, but there's C API that you can use to get/set contextvars. If a C library > is hard coded to use threadlocals I'm afraid there's nothing we can do about > it except fixing their C code to make state storage pluggable. I agree the C library could check

[issue39699] Some CIs silence potentially useful output from make

2020-02-20 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +17953 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18583 ___ Python tracker ___

[issue39699] Some CIs silence potentially useful output from make

2020-02-20 Thread Ammar Askar
Change by Ammar Askar : -- resolution: not a bug -> stage: resolved -> status: closed -> open title: Ubuntu Github action not fully running build process -> Some CIs silence potentially useful output from make type: behavior -> enhancement ___

[issue39660] Contextvars: Optional callbacks on state change

2020-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Would there be too much overhead if allowing specification of a python > function that contextvars calls on context changes? Potentially yes, especially if we allow more than one context change callback. Allowing just one makes the API inflexible (what

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-20 Thread Maor Kleinberger
Maor Kleinberger added the comment: Oh I just learned that since python3.8 you can name individual tasks. Sorry for the confusion :) It does seem like a good solution. -- ___ Python tracker

[issue39704] Disable code coverage

2020-02-20 Thread Stefan Krah
New submission from Stefan Krah : The automated code coverage on GitHub is quite inaccurate and needlessly flags PRs as red. I'd prefer to make this opt-in. -- messages: 362367 nosy: skrah priority: normal severity: normal status: open title: Disable code coverage

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > I agree, but wouldn't you agree that some information is better than no > information? We do agree with that. Making it work in the way that does not disturb people when a 10mb bytes string is passed is challenging. We could just cut everything after 100

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: BTW, this PR implements the invariant: "If there exists an exact result at a lower precision, this result should also be returned at MAX_PREC (without MemoryError)". So non-integer powers are left out, since _decimal has no notion of exact non-integer powers

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: Fortunately libmpdec raises MemoryError almost instantaneously, so the PR retries the affected operations with estimated upper bounds for exact results without slowing down the common case. The docs still need updating because people will still wonder why 1 /

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-02-20 Thread Andrew Bartlett
Andrew Bartlett added the comment: This breaks Samba's build: https://bugzilla.samba.org/show_bug.cgi?id=14266 While we are of course able to patch new versions of Samba, this will make it harder to bisect back though Samba history. It would be really great if this kind of change could be

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-20 Thread Maor Kleinberger
Maor Kleinberger added the comment: > Not so easy to find a satisfactory generic approach. I agree, but wouldn't you agree that some information is better than no information? >Task has a name exactly for the purpose of distinguishing similar but >different tasks But in case the same task

[issue39699] Ubuntu Github action not fully running build process

2020-02-20 Thread Steve Dower
Steve Dower added the comment: Probably just where I copied it from. PRs welcome! -- ___ Python tracker ___ ___ Python-bugs-list

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Marco Sulla
Marco Sulla added the comment: Ah, well, this is not possible. I was banned from the mailing list. I wrote my "defense" to conduct...@python.org in date 2019-12-29, and I'm still waiting for a response... -- ___ Python tracker

[issue39660] Contextvars: Optional callbacks on state change

2020-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Is there any existing API that can be used to call `lib.set_state` on context > changes? No, but there's C API that you can use to get/set contextvars. If a C library is hard coded to use threadlocals I'm afraid there's nothing we can do about it except

[issue39184] Many command execution functions are not raising auditing events

2020-02-20 Thread miss-islington
miss-islington added the comment: New changeset d0a464e31ac67685ef8ad35ecd993f17dfd6ab35 by Miss Islington (bot) in branch '3.8': bpo-39184: Fix incorrect return value (GH-18580) https://github.com/python/cpython/commit/d0a464e31ac67685ef8ad35ecd993f17dfd6ab35 --

[issue39537] Change line number table format

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39184] Many command execution functions are not raising auditing events

2020-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +17952 pull_request: https://github.com/python/cpython/pull/18582 ___ Python tracker ___

[issue39184] Many command execution functions are not raising auditing events

2020-02-20 Thread miss-islington
miss-islington added the comment: New changeset 6c444d0dab8f06cf304263b34beb299101cef3de by Steve Dower in branch 'master': bpo-39184: Fix incorrect return value (GH-18580) https://github.com/python/cpython/commit/6c444d0dab8f06cf304263b34beb299101cef3de --

[issue39660] Contextvars: Optional callbacks on state change

2020-02-20 Thread Leonard Lausen
Leonard Lausen added the comment: Consider a `lib = ctypes.CDLL(lib_path, ctypes.RTLD_LOCAL)` which provides APIs `lib.compute`, `lib.set_state` and a Python interface wrapping both in `def compute`, `def set_state`. Let's assume `lib.set_state` sets a thread-local state in the library

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-20 Thread Stefan Krah
Change by Stefan Krah : -- keywords: +patch pull_requests: +17951 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18581 ___ Python tracker ___

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Ammar Askar
Ammar Askar added the comment: Sorry about your experience Marco but I think the dev guide is pretty clear on all these steps (including having to redo `make clean`). You can find some discussion on the build system here

[issue39184] Many command execution functions are not raising auditing events

2020-02-20 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +17950 pull_request: https://github.com/python/cpython/pull/18580 ___ Python tracker ___

[issue39699] Ubuntu Github action not fully running build process

2020-02-20 Thread Ammar Askar
Ammar Askar added the comment: Aah sorry. This was my mistake, I didn't notice that we're passing `-s` (silent) to make. It is actually performing the build underneath, just not with the outputs that get produced form other CIs. Steve, is there a reason the Github action and Azure

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-02-20 Thread Matej Cepl
Matej Cepl added the comment: Just to say this is reproducible only on rather old enterprise Linux distributions, where CVE-2016-10739 bug in glibc has not been fixed. I believe it means RHEL-6, SUSE SLE-10, 11, 12 (not sure whether it applies to some old Debian as well). --

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Marco Sulla
Marco Sulla added the comment: Well, the fact is, basically, for the other libraries you have not to re-run `configure`. You have to install only the missing C libraries and redo `make`. This works, for example, for zlib, lzma, ctypes, sqlite3, readline, bzip2. Furthermore, it happened to

[issue39617] max_workers argument to concurrent.futures.ProcessPoolExecutor is not flexible enough

2020-02-20 Thread sds
sds added the comment: On a closer observation, I think you are eminently right. Idle workers take far far far too much RAM. In fact, I would like to be able to specify that the workers are to be spinned up on demand only and terminated immediately when they they are done. --

[issue39557] ThreadPoolExecutor is busy-waiting when idle.

2020-02-20 Thread Maor Kleinberger
Maor Kleinberger added the comment: > If I understand the following code correctly, there seems to be a busy loop > waiting for the SimpleQueue.put to signal that an item was entered to queue. This is not a busywait. Actually, the loop you specified will never repeat more than twice. At the

[issue17005] Add a topological sort algorithm

2020-02-20 Thread wim glenn
Change by wim glenn : -- nosy: +wim.glenn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Marco Sulla
Marco Sulla added the comment: > I recall very many cases in third-party libraries and commercial applications Source? -- ___ Python tracker ___

[issue39623] __str__ and __repr__ for asyncio.Task still omit arg values

2020-02-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: Not so easy to find a satisfactory generic approach. An argument can also be 10 MiB length bytes array, a dictionary with 10,000 elements, HTML page, name it. All these objects are printable but their representation is too verbose. Task can have a dozen of

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-20 Thread Geoffrey Bache
Geoffrey Bache added the comment: @Valentyn Tymofieiev - true, and thanks for the tip, though the symptoms described there are somewhat different from what I'm observing. Also, my problem seems to be dependent on zipping the Python code, which that one isn't. --

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-20 Thread Maor Kleinberger
Maor Kleinberger added the comment: I wrote a small script that checks the behavior of asyncio.sleep when called with small amounts of time (starting from 0). For each amount I checked 500 times whether SleepTest has stopped when interrupted with SIGINT. Below are the results: SLEEP TIME

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > The ship has sailed, this change breaks a lot of existing code without a > strong reason. Yes. It's a common thing to compute asyncio.sleep delay and sometimes it goes negative. The current behavior is part of our API now. -- resolution: -> not

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Steve Dower
Steve Dower added the comment: Looks like the get_externals.py script needs to be made a bit more robust - downloading from GitHub hasn't been very reliable this week. -- components: +Windows nosy: +paul.moore, tim.golden, zach.ware ___ Python

[issue39648] Update math.gcd() to accept "n" arguments.

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: @Ananthakrishnan: Sure, go ahead. Let's make the process a bit more streamlined than last time around: see if you can put together a PR that passes all the CI checks before asking for review. If you get stuck, make a work-in-progress PR and ask for help in

[issue39692] Subprocess using list vs string

2020-02-20 Thread Jonny Weese
Jonny Weese added the comment: > So the command_string provided (the first word or the first quoted > expression) is interpreted as a shell program, and this program is invoked > with the remaining words as its arguments. Correct. > As you say, simply slapping quotes around all the args

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-20 Thread Maor Kleinberger
Maor Kleinberger added the comment: This behaved similarly on my machine, also ubuntu. But it also happened (less often) with small numbers, like sleep(0.01). Also, I tried it on my windows 10 and experienced another unexpected behavior - only when using sleep(0), Ctrl-C

[issue39589] Logging QueueListener should support context manager

2020-02-20 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Stefan Krah
Change by Stefan Krah : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39692] Subprocess using list vs string

2020-02-20 Thread Niklas Smedemark-Margulies
Niklas Smedemark-Margulies added the comment: Good point - the phrasing I suggested there is not accurate, and there is more complicated behavior available than simply specifying a single executable. Here's the bash manual's info about "-c" flag: """ If the -c option is present, then

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: Re-opening this issue, Azure fails too often: https://github.com/python/cpython/pull/18577 https://dev.azure.com/Python/cpython/_build/results?buildId=58220=logs=c83831cd-3752-5cc7-2f01-8276919eb334 -- ___ Python

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Stefan Krah
Stefan Krah added the comment: Closing and reopening the PR helped. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue39660] Contextvars: Optional callbacks on state change

2020-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39692] Subprocess using list vs string

2020-02-20 Thread Jonny Weese
Jonny Weese added the comment: > it seems strange/wrong to invoke an executable via "bash -c executable arg1 > arg2", rather than just "executable arg1 arg2"! I agree it's strange to invoke a single executable that way, but remember that -c allows a string of arbitrary bash code. (It just

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Thanks and apologies for missing the duplicate. Not a problem: much better to have a potential bug reported twice than not at all. -- ___ Python tracker

[issue39703] Floor division operator and floats

2020-02-20 Thread Kostis Gourgoulias
Kostis Gourgoulias added the comment: Aha, I see! Thanks and apologies for missing the duplicate. -- ___ Python tracker ___ ___

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, found the duplicate (or at least one of them): https://bugs.python.org/issue27463 -- components: +Interpreter Core -macOS resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Floor division is not the same as the

[issue39692] Subprocess using list vs string

2020-02-20 Thread Niklas Smedemark-Margulies
Niklas Smedemark-Margulies added the comment: Thanks very much for getting back to me so quickly, and for identifying the reason for the difference in behavior. Sorry to harp on a relatively small behavior, but it cost me a few hours and it might cause confusion for others as well. It

[issue39703] Floor division operator and floats

2020-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Shouldn't the two approaches provide the same answer? In a word, no. :-) math.floor(1/0.01) involves *two* operations, and there's an intermediate rounding step which happens to round the true mathematical result of 1/0.01 up to 100.0. Taking the floor

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Akos Kiss
Akos Kiss added the comment: I couldn't find any discussion in the language reference about fundamental differences between calls to built-in functions and user-defined functions. (I tried to read Sections 6.3.4. "Calls" and 8.6. "Function definitions" carefully.) Until now I had the

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39703] Floor division operator and floats

2020-02-20 Thread Kostis Gourgoulias
New submission from Kostis Gourgoulias : This was brought to my attention by a colleague, Albert B. When considering the floor division // operator, 1//0.01 should return 100.0, but instead returns 99.0. My understanding is that this is because 0.01 is represented by

[issue37196] Allowing arbitrary expressions in the @expression syntax

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher resolution: -> duplicate status: open -> closed superseder: -> PEP 614: Relaxing Grammar Restrictions On Decorators ___ Python tracker

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PEP 614: Relaxing Grammar Restrictions On Decorators ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-20 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: @gjb1002: see also https://bugs.python.org/issue38884, which demonstrates that concurrent imports are not thread-safe on Python 3. -- ___ Python tracker

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +17949 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18570 ___ Python tracker ___

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-02-20 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR implements PEP 614's revised grammar for decorators, with tests. In short: decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE becomes decorator: '@' namedexpr_test NEWLINE I'm marking it as DO-NOT-MERGE until the PEP is accepted,

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm with Eric and don't see this as a problem in practice. Also, the kwarg handling for functions is fundamentally different because all arguments need to be matched. In contrast, the kwargs for format() are only used on-demand: >>>

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Eric V. Smith
Eric V. Smith added the comment: Okay, then I agree with Serhiy on the change. And I agree that .format(**locals()) is an anti-pattern, and should use .format_map(locals()) instead. Not that it's related directly to this issue, I just like to point it out where I can. --

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Stefan Krah
New submission from Stefan Krah : There is no status report, no details link and manually committing is prohibited: https://github.com/python/cpython/pull/18569 -- ___ Python tracker

[issue39701] Azure Pipelines PR broken

2020-02-20 Thread Stefan Krah
Change by Stefan Krah : -- nosy: skrah priority: normal severity: normal status: open title: Azure Pipelines PR broken ___ Python tracker ___

[issue1294959] Problems with /usr/lib64 builds.

2020-02-20 Thread Petr Viktorin
Petr Viktorin added the comment: Why "sys.python_libdir"? Isn't that too public? A lot of similar path-related info is in sysconfig; why shouldn't it be there? How does "sys.python_libdir" work on other platforms? -- ___ Python tracker

[issue39692] Subprocess using list vs string

2020-02-20 Thread Jonny Weese
Jonny Weese added the comment: I believe this behavior is expected (at least in posix-land). Lib/subprocess.py L1702 shows that whenever shell=True, the args that are constructed are [unix_shell, "-c"] + args. And so we can reproduce your behavior just using a regular shell. (This is

[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-20 Thread David
Change by David : -- keywords: +patch Added file: https://bugs.python.org/file48900/log-peername-and-sockname-errors.patch ___ Python tracker ___

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Akos Kiss
Akos Kiss added the comment: Re: Eric I had a code where `'sometemplate'.format()` got a dictionary from outside (as a parameter, not from `locals()`), and that dictionary had `None` as a key. Actually, I wasn't even aware of that `None` key until I tried to execute the same code in PyPy

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: The ship has sailed, this change breaks a lot of existing code without a strong reason. I recall very many cases in third-party libraries and commercial applications where a negative argument for asyncio.sleep() is processed as asyncio.sleep(0) without

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See similar issue for SimpleNamespace: https://bugs.python.org/issue31655. We should add a similar check in str.format(). Accepting a non-string keys is an implementation detail. There is no guarantee that it works in other implementations. It should not

[issue39699] Ubuntu Github action not fully running build process

2020-02-20 Thread Steve Dower
Steve Dower added the comment: 46s seems okay to me, especially since the 23s for autoconf is separate. Try introducing a warning/error into the source code and see if it breaks. -- ___ Python tracker

[issue39694] Incorrect dictionary unpacking when calling str.format

2020-02-20 Thread Eric V. Smith
Eric V. Smith added the comment: Is this causing some practical problem? I can't think of any way to reference non-string kwargs in a format string, but maybe I'm not being creative enough. And if there is such a way, then changing this wouldn't be backward compatible. --

[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-20 Thread David
New submission from David : `sock.getpeername` can fail for multiple reasons (see https://pubs.opengroup.org/onlinepubs/7908799/xns/getpeername.html) but in `asyncio.selector_events._SelectorTransport` it's try/excepted without any logging of the error: ``` if 'peername' not in

[issue39699] Ubuntu Github action not fully running build process

2020-02-20 Thread Ammar Askar
New submission from Ammar Askar : I think the Github action for building CPython on Ubuntu is accidentally caching the built Python files. If we take a look at: https://github.com/python/cpython/runs/455936632#step:7:1 and

[issue39697] Failed to build with --with-cxx-main=g++-9.2.0

2020-02-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue23644 -- nosy: +vstinner, xtreak ___ Python tracker ___

[issue39698] asyncio.sleep() does not adhere to time.sleep() behavior for negative numbers

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : Python 3.9.0a3+ (heads/master-dirty:f2ee21d858, Feb 19 2020, 23:19:22) [GCC 9.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.sleep(-1) Traceback (most recent call last): File "", line 1, in

[issue39697] Failed to build with --with-cxx-main=g++-9.2.0

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : I tried to compile Python 3.9 with: CC=gcc-9.2.0 ./configure --enable-optimizations --with-lto --with-cxx-main=g++-9.2.0 make -j 2 I got this error: g++-9.2.0 -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -flto -fuse-linker-plugin

[issue39696] Failed to build _ssl module, but libraries was installed

2020-02-20 Thread Ammar Askar
Ammar Askar added the comment: As pointed out in your other issue: https://devguide.python.org/setup/#unix > If you decide to Install dependencies, you will need to re-run both configure > and make. -- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open ->

[issue39696] Failed to build _ssl module, but libraries was installed

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : Similarly to enhancement request #39695, I missed to install the debian package with the include files for SSL, before compiling Python 3.9. After installed it, `make` continued to not find the libraries and skipped the creation of module _ssl. Searching on

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Ammar Askar
Ammar Askar added the comment: Is this still a problem after you run configure again? As pointed out in https://devguide.python.org/setup/#unix > If you decide to Install dependencies, you will need to re-run both configure > and make. -- nosy: +ammar2

[issue39695] Failed to build _uuid module, but libraries was installed

2020-02-20 Thread Marco Sulla
New submission from Marco Sulla : When I first done `make` to compile Python 3.9, I did not installed some debian development packages, like `uuid-dev`. So `_uuid` module was not built. After installed the debian package I re-run `make`, but it failed to build `_uuid` module. I had to edit

[issue31542] pth files in site-packages of venvs are executed twice

2020-02-20 Thread sinoroc
sinoroc added the comment: https://stackoverflow.com/a/60169657/11138259 -- nosy: +sinoroc ___ Python tracker ___ ___

  1   2   >