[issue39298] add BLAKE3 to hashlib

2022-02-17 Thread Larry Hastings
Larry Hastings added the comment: I thought someone volunteered to do it--if that's not happening, I could take a look at it next week. Shouldn't be too hard... unless I have to touch autoconf, which I only barely understand. -- ___ Python

[issue46779] Add ssl.CERT_REQUIRED_NO_VERIFY as possible value for ssl.SSLContext.verify_mode

2022-02-17 Thread Adrian Freund
New submission from Adrian Freund : Some networked applications might require connecting to client with invalid certificates but still requiring the client to send a certificate. ssl.SSLContext.verify_mode currently supports the following options: ssl.CERT_NONE: Don't require the client to

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Alex Grönholm
Alex Grönholm added the comment: @Guido you asked for the AnyIO implementation of Happy Eyeballs; here it is: https://github.com/agronholm/anyio/blob/ac3e7c619913bd0ddf9c36b6e633b278d07405b7/src/anyio/_core/_sockets.py#L85 (I didn't paste the actual code here because it's way too long)

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Adrian Freund added the comment: I also need this feature for something I'm working on, so I looked into it a bit and pushed a small proof of concept implementation to GitHub (See PR 31391). I'm not sure if I'll have enough time to finish and clean up this implementation, but at least there

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
New submission from Lee Newberg : For example, a string such as "0.167" could be rounded from anything in [0.1665, 0.1675). Within that interval, the fraction with the lowest numerator and denominator is 1/6. Here it is proposed that we add a new flag to the Fractions constructor, perhaps

[issue46778] Enable parallel compilation on Windows builds

2022-02-17 Thread Jeremy Kloth
Change by Jeremy Kloth : -- keywords: +patch pull_requests: +29535 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31390 ___ Python tracker ___

[issue39298] add BLAKE3 to hashlib

2022-02-17 Thread Jack O'Connor
Jack O'Connor added the comment: What's the best way for me to help with the next steps of this? -- ___ Python tracker ___ ___

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: I support Alex Grönholm: TaskGroup is not affected by cancellation races because it doesn't convert the exception or swallows it. The code is safe from my understanding. -- ___ Python tracker

[issue44834] contextvars.Context.run w/ coroutines gives inconsistent behavior

2022-02-17 Thread Sebastián Ramírez
Change by Sebastián Ramírez : -- nosy: +tiangolo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46730] Please consider mentioning property without setter when an attribute can't be set

2022-02-17 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 4.0 -> 5.0 pull_requests: +29534 pull_request: https://github.com/python/cpython/pull/31389 ___ Python tracker

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Tin Tvrtković
Tin Tvrtković added the comment: Hello Andrew, here's some followup. About the names: the move_on_after and fail_after names are from Trio. I don't have strong feeling about them at all, whatever most people like. About move_on_after vs loop.call_at and loop.call_later: move_on_after is much

[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2022-02-17 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2022-02-17 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46778] Enable parallel compilation on Windows builds

2022-02-17 Thread Jeremy Kloth
New submission from Jeremy Kloth : While the current build does enable building of projects in parallel (msbuild -m), the compilation of each project's source files is done sequentially. For large projects like pythoncore or _freeze_module this can take quite some time. This simple PR

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- keywords: +patch pull_requests: +29536 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31391 ___ Python tracker

[issue42752] multiprocessing Queue leaks a file descriptor associated with the pipe writer (#33081 still a problem)

2022-02-17 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46776] RecursionError when using property() inside classes

2022-02-17 Thread chen-y0y0
New submission from chen-y0y0 : A simple class definition: class Foo: bar = property(lambda self: self.bar) And get the value of Foo.bar, it returns correctly, . And get the value of Foo().bar, it raises RecursionError: Traceback (most recent call last): File "", line 1, in File "", line

[issue46776] RecursionError when using property() inside classes

2022-02-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: Maybe you expected to do this: class C: def __init__(self): self._value = 999 @property def bar(self): return self._value obj = C() obj.bar # returns 999 -- ___ Python tracker

[issue41086] Exception for uninstantiated interpolation (configparser)

2022-02-17 Thread Łukasz Langa
Łukasz Langa added the comment: It's a behavioral change that tightens acceptable objects passed to `interpolation=`. In the past any object that provided the same interface as `Interpolation` instances would be accepted. No longer. I think this is an acceptable compromise but it's

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Tin Tvrtković
Tin Tvrtković added the comment: @Guido @Chris Instead of using the message for the nonce we could have a dedicated field for it. I have a proposal though. It's about putting a little logic into the cancellation nonce handling. Let's define the nonce as a float. If you just call

[issue41086] Exception for uninstantiated interpolation (configparser)

2022-02-17 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45413] Add install scheme for virtual environments

2022-02-17 Thread Miro Hrončok
Miro Hrončok added the comment: I've adapted the PR. See the latest commit (Instead of *venv* scheme, have *posix_venv* and *nt_venv*). -- ___ Python tracker ___

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 6. The loop parameter of Task() was documented as both removed and required (if there is no current event loop) in 3.10. -- ___ Python tracker

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Zachary Ware
Zachary Ware added the comment: This sounds interesting, but also rather similar to what the `limit_denominator` method can get you. Can you provide examples that can't be handled nicely by `limit_denominator` to strengthen your case? -- nosy: +mark.dickinson, rhettinger, zach.ware

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would return 1/7 for "0.1" and 1/4 for "0.2". Is it what you expected? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Christian Heimes
Christian Heimes added the comment: Unfortunately a generic and future-proof verify callback is much more work. We need to expose and wrap X509_STORE_CTX, X509_STORE, X509 (include STACK_OF(X509)), and probably several other OpenSSL structures. We also need to expose error codes.

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
New submission from Matthias Urlichs : When tracing/profiling, the "return" event reports the value returned by the exiting function. However, this does not work for C functions. The profiler's "c_return" hook is called with the same C function object as "c_call". This unnecessarily

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: > the constructed Fraction first computes the range of the values that the > input string could have been rounded from There's too much magic and guesswork here for my liking; I don't really see this as feasible. Moreover, depending on which rounding mode

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Christian Heimes
Christian Heimes added the comment: bpo-28747 was an older ticket for implementing a callback. -- assignee: christian.heimes -> ___ Python tracker ___

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: > in which case the interval we need is [0.095, 0.15] Whoops, sorry; brain fail. If we're rounding to two sig figs, the next representable value up from 0.01 is 0.011, while the next one down is 0.099, so the interval we'd be interested in would be [0.0995,

[issue46782] Docs error for 3.10

2022-02-17 Thread sjndlnv brjkbn
New submission from sjndlnv brjkbn : Document for 3.10 version seems auto convert 0o777 to 511. And it's correct for 3.9 (May be due to new version of Sphinx? Seems source code for docs are correct.) [img]https://i.imgur.com/ByWSJ6A.png[/img] [img]https://i.imgur.com/rK0romC.png[/img]

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: Sigh: > the next representable value up from 0.01 is 0.011 should say: > the next representable value up from 0.10 is 0.11 I think I'll duck out and give my brain a rest before commenting further. -- ___ Python

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are some issues with formatting added or removed parameters in the asyncio module. 1. "deprecated-removed" directives were used for already removed directives. It should be used for deprecated features with known term of removal. For removed

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: The discussion is hot, I see several interleaved threads. Let me put my answers on all of them in order of appearance. 1. quattro cancellation scopes are implemented after async-timeout. As the author of async-timeout I am happy to know it. The module is

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +29533 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31388 ___ Python tracker

[issue46776] RecursionError when using property() inside classes

2022-02-17 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, Python is working correctly here. The interpreter is doing exactly what you told it to do, and then raising a RecursionError before you can crash the system. You have a property instance.bar which returns instance.bar, which returns

[issue46774] Importlib.metadata.version picks first distribution not latest

2022-02-17 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46783] Add a new feature to enumerate(iterable, start=0) built-in function

2022-02-17 Thread Hossein
New submission from Hossein : Hi everyone. I have an idea which is add a new feature to enumerate(iterable, start=0) built-in function. I mean, "start" is ascending by default, we can add a feature to this function to change start in descending order. for example: enumerate(iterable,

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > For another problematic example, suppose the string supplied is "0.10" We would treat "0.1", "0.10", "0.100", etc. all differently. In all cases we would assume rounding to compute the last digit. Similarly for "3e-10", "3.0e-10" == "30e-11", "3.00e-11",

[issue46783] Add a new feature to enumerate(iterable, start=0) built-in function

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the suggestion, but we will decline. We looked at this before and decided not to go down this path, preferring instead to the keep the builtin function simple and focused on its core task of enumeration. To cover the rarer cases, it is a

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d85121660ea50bbe8fbd31797aa6e4afe0850388 by Guido van Rossum in branch 'main': bpo-46752: Slight improvements to TaskGroup API (GH-31398) https://github.com/python/cpython/commit/d85121660ea50bbe8fbd31797aa6e4afe0850388 --

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-17 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +29541 pull_request: https://github.com/python/cpython/pull/31398 ___ Python tracker ___

[issue46784] Duplicated symbols when linking embedded Python with libexpat

2022-02-17 Thread Ned Deily
Change by Ned Deily : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46784] Duplicated symbols when linking embedded Python with libexpat

2022-02-17 Thread Yilei Yang
New submission from Yilei Yang : The libexpat 2.4.1 upgrade from https://bugs.python.org/issue44394 introduced the following new exported symbols: testingAccountingGetCountBytesDirect testingAccountingGetCountBytesIndirect unsignedCharToPrintable

[issue46784] Duplicated symbols when linking embedded Python with libexpat

2022-02-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46784] Duplicated symbols when linking embedded Python with libexpat

2022-02-17 Thread Yilei Yang
Change by Yilei Yang : -- keywords: +patch pull_requests: +29540 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31397 ___ Python tracker ___

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Yury Selivanov
Yury Selivanov added the comment: Couple thoughts: I'm +1 for adding TaskGroup.cancel() method. I'd be -1 on abusing `Task.cancel()` to signal something with a nonce. Whatever problem we are trying to solve here, it should be solvable without resorting to hacks like this. It should be

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Nor will it achieve world peace. Please watch the tone. It is borderline abusive and dismissive. > we can invoke the attached as best_fraction(Fraction("0.001"), > Fraction("0.0005"), Fraction("0.0015")) to get the output > Fraction(1, 1000). -1 I am

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +29542 pull_request: https://github.com/python/cpython/pull/31398 ___ Python tracker ___

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: +1 on both aspects of the plan. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46783] Add a new feature to enumerate(iterable, start=0) built-in function

2022-02-17 Thread Zachary Ware
Change by Zachary Ware : -- assignee: docs@python -> components: +Library (Lib) -Build, Demos and Tools, Documentation, Interpreter Core nosy: -docs@python, lys.nikolaou versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: The example of "16e2" would yield the interval [1550, 1650). The smallest denominator possible is 1. The smallest numerator that works with that denominator is 1550, but I don't like 1550/1 as the answer. To cover these edge cases, I'd modify the

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > What about for an input of "0.001"? Your current specification would give > 1/667, but I'm betting that you'd actually prefer 1/1000. You would win that bet. -- ___ Python tracker

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Matthias Urlichs added the comment: Likewise for c_exception, which should report the exception thruple -- and even has an XXX comment reminding us to fix that (ceval.c 4542). -- ___ Python tracker

[issue29418] inspect.isroutine does not return True for some bound builtin methods

2022-02-17 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 02815d939362d4093a95da650e7fbddabf147eb0 by Hakan Çelik in branch 'main': bpo-29418: Add inspect.ismethodwrapper to whatsnew (GH-31377) https://github.com/python/cpython/commit/02815d939362d4093a95da650e7fbddabf147eb0 -- nosy:

[issue45356] Calling `help` executes @classmethod @property decorated methods

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: See also: https://bugs.python.org/issue46764 -- ___ Python tracker ___ ___ Python-bugs-list

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Matthias Urlichs added the comment: Added a github PR. Unfortunately it breaks the cprofile testcase, which apparently relies on the old argument value (for no good reason IMHO). I don't know how the profiler works internally. If somebody who does could have a look at it and/or its testcase

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.11 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2022-02-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b1bc04df817ecb3fb9fdbefa3782efea54488e6f by Miss Islington (bot) in branch '3.8': bpo-44949: Fix test_readline auto history tests (GH-27813) (GH-31118) https://github.com/python/cpython/commit/b1bc04df817ecb3fb9fdbefa3782efea54488e6f --

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29531 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31383 ___ Python tracker ___

[issue46634] [sqlite3] speed up cursor.execute*()

2022-02-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: The change proposed in GH-31127 was included in GH-31351. Closing this. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- nosy: +freundTech ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46783] Add a new feature to enumerate(iterable, start=0) built-in function

2022-02-17 Thread Larry Hastings
Change by Larry Hastings : -- components: -Argument Clinic nosy: -larry ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: >This sounds interesting, but also rather similar to what the >`limit_denominator` method can get you. `Fractions("0.17").limit_denominator()` and `Fractions("0.17").limit_denominator(n)` for n > 28 do not give 1/6. So, I'd have to guess at n until I get

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > depending on which rounding mode was used (round-ties-to-even, > round-ties-to-away), the interval may be half-open, open or closed. I think we will get the majority of the use cases if we pick one rounding strategy and stick with it. In later version we

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > You may be interested in the "simplefractions" module on PyPI, which solves > the exact task "find the simplest fraction in a given interval". I haven't seen that code and I am interested; I will take a look. Perhaps code from there can be imported /

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: >It would return 1/7 for "0.1" and 1/4 for "0.2". Is it what you expected? Yes. Or putting it another way, if that's not the right answer then whoever rounded the number should have retained more digits. -- ___

[issue46778] Enable parallel compilation on Windows builds

2022-02-17 Thread Steve Dower
Steve Dower added the comment: New changeset 98dd0aec2d0cb8971fb5363532c25041a5ba6fdc by Jeremy Kloth in branch 'main': bpo-46778: Enable multiprocess compilation for source files when building on Windows (GH-31390)

[issue46778] Enable parallel compilation on Windows builds

2022-02-17 Thread Steve Dower
Steve Dower added the comment: Easy, and thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46770] ConfigParser(dict_type=) not behaving as expected

2022-02-17 Thread Mark Lonnemann
Mark Lonnemann added the comment: I know, thanks though. I just thought there was a way to do it via dict_type=. I've read it can be done, but is complex. I've yet to see any examples of how. -- ___ Python tracker

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: The PR is pretty empty, it has a scaffolding for `asyncio.timeouts` module and its test only. I'll try to add something real tomorrow. My plan is: - solve 'easy' questions with Tin during PR's discussion/reviews - make something that we are both agree on if

[issue46783] Add a new feature to enumerate(iterable, start=0) built-in function

2022-02-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This has nothing to do with the parser so I'm removing the label. Please, next time make sure you select the appropriate categories when opening an issue -- components: -Parser ___ Python tracker

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-02-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 4c48cac1c44fbbfe3f5fd0c623b7768e2a709da8 by Miss Islington (bot) in branch '3.8': bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30344) https://github.com/python/cpython/commit/4c48cac1c44fbbfe3f5fd0c623b7768e2a709da8

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: Lots of food for thought! There seem to be mostly two discussions: API design for the new asyncio cancel scopes (do we make it more like Trio or more like async-timeout?); and cancel semantics in edge cases. I'll pass on the API design for now: I

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Change by Matthias Urlichs : -- keywords: +patch pull_requests: +29537 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31393 ___ Python tracker

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: One more example: what interval is implied by an input string of "1600"? Is it (1550, 1650)? Or (1595, 1605)? Or even (1599.5, 1600.5). Sorry, I just don't see this working - there are two many arbitrary choices involved in guessing what interval the user

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: >It would return 1/7 for "0.1" and 1/4 for "0.2". Is it what you expected? I answered "yes" before, but I am now thinking "no". In the case of "0.1", the smallest numerator achievable is 1, but there are multiple denominators that would give a value within

[issue46730] Please consider mentioning property without setter when an attribute can't be set

2022-02-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 9e06d03672547041239812efe4901c06da6cbd2f by Christian Heimes in branch 'main': bpo-46730: Fix refleak and tighten NULL checks (GH-31389) https://github.com/python/cpython/commit/9e06d03672547041239812efe4901c06da6cbd2f --

[issue46770] ConfigParser(dict_type=) not behaving as expected

2022-02-17 Thread Cyril Jouve
Cyril Jouve added the comment: you need to pass `strict=False` to ConfigParser : When `strict` is True, the parser won't allow for any section or option duplicates while reading from a single source (file, string or dictionary). Default is True. -- nosy:

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think the standard library should go down this path. Mark's disinclinations all make sense to me, but I'm also concerned that the API would be almost unusable in practical situations. Users would tend to know their input fraction and that they

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Also note for the music example that the notion of "near enough" isn't equidistant about the "simple fraction". The sense of nearness is logarithmic and is measured in "cents" which are hundredths of an equal-tempered semitone (i.e a one octave consists

[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have a feeling that we need a low-level API section that describes *supported* API that is intended to task extenders only (guys who want to provide an alternative task factory for example). I love to contribute but not sure when I can find time for this

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > One more example: what interval is implied by an input string of "1600"? Is > it (1550, 1650)? Or (1595, 1605)? Or even (1599.5, 1600.5). The rule would be to look at the last digit supplied and assume that the rounding is there. So "1600" gives [1599.5,

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd modify the optimization to be that we continue to seek the smallest > denominator, but in the case that multiple numerators would give ratios > within the computed interval then we choose the numerator among these that > gives the ratio closest to the

[issue46764] Wrapping a bound method with a @classmethod no longer works

2022-02-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like a reasonable fix. I'll wait a bit so that others can comment as well. FWIW, we looking a potentially reverting the whole line of development starting with that commit. It has caused a number of problems and no longer looks tenable.

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +29539 pull_request: https://github.com/python/cpython/pull/31394 ___ Python tracker ___

[issue46400] Please update bundled libexpat to 2.4.4 with security fixes (CVE-2021-45960)

2022-02-17 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset e7828904f39588dad438c5d341a31e72e9cb1775 by Miss Islington (bot) in branch '3.9': bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31295) https://github.com/python/cpython/commit/e7828904f39588dad438c5d341a31e72e9cb1775 --

[issue46400] Please update bundled libexpat to 2.4.4 with security fixes (CVE-2021-45960)

2022-02-17 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset cb7551d5663f35c6993f3c6d8e361bc73f1c43d4 by Dong-hee Na in branch '3.10': bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296) https://github.com/python/cpython/commit/cb7551d5663f35c6993f3c6d8e361bc73f1c43d4 --

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Lee Newberg
Lee Newberg added the comment: > The 12 semitones in an octave are separated ... Right, this functionality would not solve the semitones / cents problem. Nor will it achieve world peace. But if it solves enough use cases then it is worth discussing, yes? I haven't written the string

[issue46771] Add some form of cancel scopes

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: https://github.com/python/cpython/pull/31394 is created for collaboration , Tin Tvrtković is invited. Core devs should have the write access already. Non-core devs, please ask for github invite if you want to collaborate. --

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have a pull request for the issue. It doesn't use `Future.set_exception()` but creates a new CancelledError() with propagated message. The result is the same, except raised exceptions are not comparable by `is` check. As a benefit, `_cancelled_exc` works

[issue41086] Exception for uninstantiated interpolation (configparser)

2022-02-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset fc115c9bde52a58b4fb9be2b80c3d6be8a4d2454 by Brian Faherty in branch 'main': bpo-41086: Add exception for uninstantiated interpolation (configparser) (GH-21062) https://github.com/python/cpython/commit/fc115c9bde52a58b4fb9be2b80c3d6be8a4d2454

[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: User code should not create Task objects explicitly. Please use `asyncio.create_task()` (or shiny new TaskGroup.create_task()) instead. They doesn't have 'loop' argument. -- ___ Python tracker

[issue46745] Typo in new PositionsIterator

2022-02-17 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26469] Bug in ConfigParser when setting new values in extended interpolation

2022-02-17 Thread Łukasz Langa
Łukasz Langa added the comment: Note: the problem here was due to passing `ExtendedInterpolation` (the class) instead of `ExtendedInterpolation()` (the object). This is now fixed through BPO-41086. -- nosy: +lukasz.langa ___ Python tracker

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Marco Pagliaricci
Marco Pagliaricci added the comment: Andrew, many thanks for your time, solving this issue. I think your solution is the best to fix this little problem and I agree with you on backporting. My Best Regards, and thanks again. Marco On Thu, Feb 17, 2022 at 10:29 AM Andrew Svetlov wrote: > >

[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-02-17 Thread jack1142
jack1142 added the comment: I'm aware, I'm reporting this because as long as the instantiation of a Task is documented, the documentation should still contain accurate up-to-date information. -- ___ Python tracker

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2022-02-17 Thread Walter Doekes
Change by Walter Doekes : -- nosy: +wdoekes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45098] asyncio.CancelledError should contain more information on cancellations

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: After TaskGroup merging, the second `cancel()` call returns `False` and doesn't initiate the actual cancellation if it was scheduled by the first `cancel()` call. I believe it "fixes" async-timeout: the first canceller wins. --

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: Andrew, the approach I described would I feel be much better. It would result in more concise, less verbose tracebacks, as opposed to more verbose -- not just because the message won't be repeated, but also because it eliminates the unneeded creation of

  1   2   >