[issue45883] reuse_address mistakenly removed from loop.create_server

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +29642 pull_request: https://github.com/python/cpython/pull/31515 ___ Python tracker ___

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
miss-islington added the comment: New changeset 87cebb1e69758aa8b79f8e15187b976d62cba36a by Miss Islington (bot) in branch '3.9': bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487) https://github.com/python/cpython/commit/87cebb1e69758aa8b79f8e15187b976d62cba36a --

[issue46831] Outdated comment for __build_class__ in compile.c

2022-02-22 Thread Shantanu
New submission from Shantanu : https://github.com/python/cpython/blob/cf345e945f48f54785799390c2e92c5310847bd4/Python/compile.c#L2537 ``` /* ultimately generate code for: = __build_class__(, , *, **) where: is a function/closure created from the class body;

Re: One-liner to merge lists?

2022-02-22 Thread Dan Stromberg
On Tue, Feb 22, 2022 at 7:46 AM David Raymond wrote: > > Is there a simpler way? > > >>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} > >>> [a for b in d.values() for a in b] > ['aaa', 'bbb', 'ccc', 'fff', 'ggg'] > >>> > I like that way best. But I'd still: 1) use a little more

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-02-22 Thread Alex Waygood
Alex Waygood added the comment: I'd dearly like better introspection tools for functions decorated with @overload, but I'd rather have a solution where: - inspect.signature doesn't have to import typing. That doesn't feel worth it for users who aren't using typing.overload, but

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: pmp-p: > There's some side effects with "buffer.h" inclusion in Panda3D when building > againt 3.11a5, project manager concerns are here > https://github.com/python/cpython/pull/29991#issuecomment-1031731100 Thanks for the report. It has been fixed. I close

[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, that's how asyncio works: it never switches to another task if `await ...` doesn't need to wait for something actually. Adding `await asyncio.sleep(0)` to every call decreases performance. -- resolution: -> wont fix stage: patch review ->

[issue46765] Replace Locally Cached Strings with Statically Initialized Objects

2022-02-22 Thread Eric Snow
Eric Snow added the comment: New changeset 1f455361ecfb1892e375bdbee813cdf095b6cfb8 by Eric Snow in branch 'main': bpo-46765: Replace Locally Cached Strings with Statically Initialized Objects (gh-31366) https://github.com/python/cpython/commit/1f455361ecfb1892e375bdbee813cdf095b6cfb8

[issue46771] Add some form of cancel scopes

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: If some code is used together with timeout() and this code calls `.cancel()` but forgot about `.uncancel()` in try/except/finally -- timeout() never raises TimeoutError. Should we care? The missing `.uncancel()` call is hard to detect by the runtime and

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
> > > Since you have to deal with things that you do not control changing > after you check what is the point in checking? You have to write the code > to recover anyway. > Well foe my usecase, the operation running is not in months or a really long time. As Avi mentionned above, that would be

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 288af845a32fd2a92e3b49738faf8f2de6a7bf7c by Eric V. Smith in branch 'main': bpo-46757: Add a test to verify dataclass's __post_init__ isn't being automatically added. (GH-31523)

[issue31327] [doc] Add example of platform-specific support for negative timestamps to the time doc

2022-02-22 Thread Vidhya
Vidhya added the comment: [Entry level contributor seeking guidance]If this is not yet fixed, I can work on this. Please let me know. -- nosy: +vidhya ___ Python tracker ___

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Deprecation is a good answer. Let's not forget to apply it to 3.11 then. -- ___ Python tracker ___

[issue44078] Output relative path when using PurePath.relative_to

2022-02-22 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +29638 pull_request: https://github.com/python/cpython/pull/31511 ___ Python tracker ___

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

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

[issue46771] Add some form of cancel scopes

2022-02-22 Thread Tin Tvrtković
Change by Tin Tvrtković : -- pull_requests: +29640 pull_request: https://github.com/python/cpython/pull/31513 ___ Python tracker ___

[issue40358] pathlib's relative_to should behave like os.path.relpath

2022-02-22 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 9b12b1b803d7b73640ab637a74a6f35f3fe9db21 by Thomas Grainger in branch 'main': bpo-46522: fix concurrent.futures and io AttributeError messages (GH-30887) https://github.com/python/cpython/commit/9b12b1b803d7b73640ab637a74a6f35f3fe9db21

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: -Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: Add a async variant of lru_cache for coroutines. -> Add an async variant of lru_cache for coroutines. ___ Python tracker ___

[issue36595] IDLE: Add search to textview.ViewWindow

2022-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: #46830 is a duplicate request. -- versions: +Python 3.11 -Python 3.8, Python 3.9 ___ Python tracker ___

[issue46830] Add Find functionality to Squeezed Text viewer

2022-02-22 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Add search to textview.ViewWindow ___ Python tracker

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +29650 pull_request: https://github.com/python/cpython/pull/31523 ___ Python tracker ___

[issue42234] pathlib relative_to behaviour change

2022-02-22 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44337] Port LOAD_ATTR to adaptive interpreter

2022-02-22 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher nosy_count: 3.0 -> 4.0 pull_requests: +29644 pull_request: https://github.com/python/cpython/pull/31517 ___ Python tracker ___

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +29648 pull_request: https://github.com/python/cpython/pull/31521 ___ Python tracker ___

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 1935e1cc284942bec8006287c939e295e1a7bf13 by Dong-hee Na in branch 'main': bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487) https://github.com/python/cpython/commit/1935e1cc284942bec8006287c939e295e1a7bf13 --

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +29647 pull_request: https://github.com/python/cpython/pull/31520 ___ Python tracker ___

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +29645 pull_request: https://github.com/python/cpython/pull/31518 ___ Python tracker

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +29646 pull_request: https://github.com/python/cpython/pull/31519 ___ Python tracker ___

[issue46828] math.prod can return integers (contradicts doc)

2022-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll add a note that the output type is determined by the input type. -- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low ___ Python tracker

[issue46765] Replace Locally Cached Strings with Statically Initialized Objects

2022-02-22 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.10, Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- assignee: -> asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46771] Add some form of cancel scopes

2022-02-22 Thread Guido van Rossum
Guido van Rossum added the comment: > If some code is used together with timeout() and this code calls > `.cancel()` but forgot about `.uncancel()` in try/except/finally -- > timeout() never raises TimeoutError. Could you show an example? I'm not sure from this description who cancels whom

Re: One-liner to merge lists?

2022-02-22 Thread Chris Angelico
On Wed, 23 Feb 2022 at 15:04, Dan Stromberg wrote: > > On Tue, Feb 22, 2022 at 7:46 AM David Raymond > wrote: > > > > Is there a simpler way? > > > > >>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} > > >>> [a for b in d.values() for a in b] > > ['aaa', 'bbb', 'ccc', 'fff', 'ggg'] > > >>> >

[issue45146] Add a possibility for asyncio.Condition to determine the count of currently waiting consumers

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, your use-case looks not convincing but overcomplicated. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Andrew Svetlov
New submission from Andrew Svetlov : Suppose multiple `task.cancel(msg)` with different messages are called on the same event loop iteration. What message (`cancel_exc.args[0]`) should be sent on the next loop iteration? As of Python 3.10 it is the message from the *last* `task.cancel(msg)`

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 66b3cd7063322a9f5c922a97bbd06fdb9830 by Victor Stinner in branch 'main': bpo-45459: Rename buffer.h to pybuffer.h (#31201) https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06fdb9830 --

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about `CancelledError(*msg_list)` or `CancelledError(*reversed(msg_list))`? It is backward compatible and all messages are uniformely represented. -- nosy: +serhiy.storchaka ___ Python tracker

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +29641 pull_request: https://github.com/python/cpython/pull/31514 ___ Python tracker

[issue45885] Specialize COMPARE_OP

2022-02-22 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher nosy_count: 2.0 -> 3.0 pull_requests: +29643 pull_request: https://github.com/python/cpython/pull/31516 ___ Python tracker ___

[issue40358] pathlib's relative_to should behave like os.path.relpath

2022-02-22 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46830] Add Find functionality to Squeezed Text viewer

2022-02-22 Thread Jeff Cagle
New submission from Jeff Cagle : Squeezed text output currently opens in a viewer whose only functionality is scrolling. Adding the Find widget a la IDLE would make the viewer much more useful. -- assignee: terry.reedy components: IDLE messages: 413761 nosy: Jeff.Cagle, terry.reedy

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-02-22 Thread miss-islington
miss-islington added the comment: New changeset 4955a9ed14c681ed835bc8902a9db0bcc728bdee by Miss Islington (bot) in branch '3.10': bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487) https://github.com/python/cpython/commit/4955a9ed14c681ed835bc8902a9db0bcc728bdee --

[issue46831] Outdated comment for __build_class__ in compile.c

2022-02-22 Thread Shantanu
Change by Shantanu : -- keywords: +patch pull_requests: +29649 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31522 ___ Python tracker ___

[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Guido van Rossum
Guido van Rossum added the comment: I would like to go on record (again) as preferring to get rid of the cancel-message parameter altogether. Let's deprecate it. When we initially designed things without a cancel message we did it on purpose -- "cancellation" is a single flag, not a

[issue46622] Add a async variant of lru_cache for coroutines.

2022-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: If this goes forward, my strong preference is to have a separate async_lru() function just like the referenced external project. For non-async uses, overloading the current lru_cache makes it confusing to reason about. It becomes harder to describe

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: I'm adding a test that mimic's Raymond's example of the proposed addition being a breaking change. This way, if we ever decide to actually add this feature, we'll break this test. If we do decide to continue and make the change anyway, at least we'll do so

[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-22 Thread aklajnert
aklajnert added the comment: I agree that adding a package directory to PYTHONPATH is not a good idea, however, I've stumbled on it in two completely independent companies' codebases. So it makes me suspect that this is may not be that rare case. In the previous company we got bitten by

[issue45459] Limited API support for Py_buffer

2022-02-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: clang doesn't like the typedef forward-decl: In file included from ../cpython/Modules/_ctypes/_ctypes.c:108: In file included from ../cpython/Include/Python.h:43: ../cpython/Include/object.h:109:3: warning: redefinition of typedef 'PyObject' is a C11

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Neil Girdhar
Neil Girdhar added the comment: @eric Good thinking. Would it make sense to add to the documentation as well that the __post_init__ methods aren't collected, and you should call super's __post_init__ if there is one using something like if hasattr(super(), "__post_init__"):

Re: One-liner to merge lists?

2022-02-22 Thread Frank Millman
On 2022-02-22 5:45 PM, David Raymond wrote: Is there a simpler way? d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} [a for b in d.values() for a in b] ['aaa', 'bbb', 'ccc', 'fff', 'ggg'] Now that's what I was looking for. I am not saying that I will use it, but as an academic

Re: One-liner to merge lists?

2022-02-22 Thread Avi Gross via Python-list
I had to think about it too, David. Renaming it lets it make a bit more sense: [item for sublist in d.values() for item in sublist] This spells it out for me that you are taking one list within the main list at a time and then taking one item at a time from the list. Since the nesting is

Re: Best way to check if there is internet?

2022-02-22 Thread Dennis Lee Bieber
On Wed, 23 Feb 2022 07:08:27 +0300, Abdur-Rahmaan Janhangeer declaimed the following: >The upcoming operation is short enough and >though we cannot assume that it will be the case >when we are running the operation, we sensibly >assume it will still be the case. > >This is more an extra check

[issue46832] unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found

2022-02-22 Thread Artyom Polkovnikov
New submission from Artyom Polkovnikov : 1) Downloaded https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tar.xz 2) Compiled under MSVC 2019 with define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 3) Got compilation error of file Objects/unicodeobject.c at line 15931, about undefined variable

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Chris Jerdonek
Chris Jerdonek added the comment: I don't really understand all the hate around the idea of a cancel message. One reason it's useful is that it provides a simple way to say *why* something is being cancelled or *what* is cancelling it. It provides additional context to the exception, in the

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29626 pull_request: https://github.com/python/cpython/pull/31496 ___ Python tracker ___

[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: What happened is that the new grammar using the PEG parser used the equivalent of starred_testlist instead of testlist for the iterable list of for statements. The only extra thing allowed is starred elements, that are interpreted as if you are

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
A front end eng sent me this for how to check for the internet in JS https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-online But it also says: "This attribute is inherently unreliable. A computer can be connected to a network without having Internet access." As discussed

Re: One-liner to merge lists?

2022-02-22 Thread Frank Millman
On 2022-02-22 11:30 AM, Chris Angelico wrote: On Tue, 22 Feb 2022 at 20:24, Frank Millman wrote: Hi all I think this should be a simple one-liner, but I cannot figure it out. I have a dictionary with a number of keys, where each value is a single list - >>> d = {1: ['aaa', 'bbb', 'ccc'],

Re: Best way to check if there is internet?

2022-02-22 Thread Abdur-Rahmaan Janhangeer
Thanks for the function but i think having the function as described won't return True all time Me: dipping my foot in hot water, yes we can go ... In the sprit of "practicality beats purity", devs needs a function XD Kind Regards, Abdur-Rahmaan Janhangeer about

Aw: Re: Best way to check if there is internet?

2022-02-22 Thread Karsten Hilbert
> Is there any value whatsoever in a lie? Do we _know_ it's a lie ? Does a lie become a Falsed Truth once it becomes known ? Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: One-liner to merge lists?

2022-02-22 Thread Chris Angelico
On Tue, 22 Feb 2022 at 20:46, Frank Millman wrote: > > On 2022-02-22 11:30 AM, Chris Angelico wrote: > > On Tue, 22 Feb 2022 at 20:24, Frank Millman wrote: > >> > >> Hi all > >> > >> I think this should be a simple one-liner, but I cannot figure it out. > >> > >> I have a dictionary with a

[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f20ac2ed076df63a77f65ff2660148af9f1a9b3c by Miss Islington (bot) in branch '3.10': bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" (GH-31479) (GH-31493)

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Could you provide more context for the proposed change? -- ___ Python tracker ___ ___

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer wrote: > > As discussed here but, it would have been nevertheless great to have this > tiny function instead of > nothing > Here's a function that determines whether or not you have an internet connection. It's almost as reliable as some of

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-22 Thread Tzu-ping Chung
Change by Tzu-ping Chung : -- pull_requests: +29625 pull_request: https://github.com/python/cpython/pull/31495 ___ Python tracker ___

One-liner to merge lists?

2022-02-22 Thread Frank Millman
Hi all I think this should be a simple one-liner, but I cannot figure it out. I have a dictionary with a number of keys, where each value is a single list - >>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} I want to combine all values into a single list - >>> ans = ['aaa', 'bbb',

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

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +29627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31497 ___ Python tracker ___

[issue46825] slow matching on regular expression

2022-02-22 Thread Heran Yang
New submission from Heran Yang : I'm using `re.fullmatch` to match a string that only contains 0 and 1. The regular expression is: (0+|1(01*0)*1)+ It runs rather slow with Python 3.7, but when I try using regex in C++, with std::regex_constants::__polynomial, it works well. Would someone

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Tue, 22 Feb 2022 at 19:40, Chris Angelico wrote: > > On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer > wrote: > > > > As discussed here but, it would have been nevertheless great to have this > > tiny function instead of > > nothing > > > > Here's a function that determines whether or

Re: One-liner to merge lists?

2022-02-22 Thread Chris Angelico
On Tue, 22 Feb 2022 at 20:24, Frank Millman wrote: > > Hi all > > I think this should be a simple one-liner, but I cannot figure it out. > > I have a dictionary with a number of keys, where each value is a single > list - > > >>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} > > I want to

[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What exactly was happened? What rule was changed? Can it cause other changes which allow ambiguous code or change semantic? -- nosy: +serhiy.storchaka ___ Python tracker

[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29624 pull_request: https://github.com/python/cpython/pull/31494 ___ Python tracker ___

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
New submission from Thomas Grainger : now that the getaddrinfo lock has been removed on all platforms the numeric only host resolve in asyncio could be moved back into BaseEventLoop.getaddrinfo -- components: asyncio messages: 413699 nosy: asvetlov, graingert, yselivanov priority:

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Thomas Grainger added the comment: hello, it's actually a bit of a round about context, but it was brought up on a tornado issue where I was attempting to port the asyncio optimization to tornado: https://github.com/tornadoweb/tornado/issues/3113#issuecomment-1041019287 I think it would be

[issue46826] prefixes argument to site.getsitepackages() missing documentation

2022-02-22 Thread Addison Snelling
New submission from Addison Snelling : The documentation for site.getsitepackages() makes no mention of the "prefixes" argument, introduced in v3.3. I'll put together a pull request in the next day or so to add this to the docs. -- assignee: docs@python components: Documentation

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-22 Thread Stefan Behnel
Stefan Behnel added the comment: The question here is simply, which is considered more important: the default provided by the document, or the default provided by Python. I don't think it's a clear choice, but the way it is now does not seem unreasonable. Changing it would mean deliberate

Re: Best way to check if there is internet?

2022-02-22 Thread Antoon Pardon
Op 22/02/2022 om 09:40 schreef Chris Angelico: On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer wrote: As discussed here but, it would have been nevertheless great to have this tiny function instead of nothing Here's a function that determines whether or not you have an internet

Re: Python

2022-02-22 Thread Mats Wichmann
On 2/21/22 23:17, SASI KANTH REDDY GUJJULA wrote: > Pip files are not installing after the python 3.10.2 version installing in my > devise. Please solve this for me. Please ask a clearer question. Can you tell us what "are not installing" means? Are you getting permission errors? Are you

[issue46818] Proper way to inherit from collections.abc.Coroutine

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: > Are you suggesting that I need to just inherit from Awaitable? Yes. Awaitable is a very base protocol, Coroutine is an implementation. `__await__` returns a generator that is used by Python internals as if `yield from awaitable.__await__()` was called.

[issue46622] Support decorating a coroutine with functools.lru_cache

2022-02-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- title: Support decorating a coroutine with functools.cached_property -> Support decorating a coroutine with functools.lru_cache ___ Python tracker

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-22 Thread Stefan Behnel
Stefan Behnel added the comment: Makes sense. That list hasn't been updated in 10 years. -- versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue45100] Improve help() by making typing.overload() information accessible at runtime

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

[issue46825] slow matching on regular expression

2022-02-22 Thread Matthew Barnett
Matthew Barnett added the comment: The expression is a repeated alternative where the first alternative is a repeat. Repeated repeats can result in a lot of attempts and backtracking and should be avoided. Try this instead: (0|1(01*0)*1)+ --

[issue40059] Provide a toml module in the standard library

2022-02-22 Thread Taneli Hukkinen
Change by Taneli Hukkinen : -- keywords: +patch nosy: +hukkinj1 nosy_count: 15.0 -> 16.0 pull_requests: +29628 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31498 ___ Python tracker

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Wed, 23 Feb 2022 at 01:06, Antoon Pardon wrote: > > > Op 22/02/2022 om 09:40 schreef Chris Angelico: > > On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer > > wrote: > >> As discussed here but, it would have been nevertheless great to have this > >> tiny function instead of > >> nothing

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this issue. As Raymond says, it's a breaking change, and the workaround is easy enough. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Best way to check if there is internet?

2022-02-22 Thread Chris Angelico
On Wed, 23 Feb 2022 at 02:33, Chris Green wrote: > > Chris Angelico wrote: > > On Tue, 22 Feb 2022 at 19:33, Abdur-Rahmaan Janhangeer > > wrote: > > > > > > As discussed here but, it would have been nevertheless great to have this > > > tiny function instead of > > > nothing > > > > > > >

Re: Best way to check if there is internet?

2022-02-22 Thread 2QdxY4RzWzUUiLuE
On 2022-02-09 at 11:15:34 +0400, Abdur-Rahmaan Janhangeer wrote: > I think for me having the internet means ability to request urls You can always ask. The real question is what will the response be? ;-) This entire exercise is a race condition, just like checking for that a file exists

[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-22 Thread Eric Snow
Eric Snow added the comment: I'm leaving this "pending" in case there may be some improvement we can make to the documentation to address this. -- components: +Interpreter Core nosy: +docs@python status: open -> pending ___ Python tracker

[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower
Steve Dower added the comment: New changeset 77f31a91d55df2df79ac767690738081f27ad476 by Steve Dower in branch 'main': bpo-46822: Increase timeout for test_create_server_ssl_over_ssl to match underlying timeouts (GH-31502)

[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Thomas Grainger
New submission from Thomas Grainger : the following code: import socket import asyncio async def amain(): with socket.socket(family=socket.AF_INET, proto=socket.IPPROTO_UDP, type=socket.SOCK_DGRAM) as sock: sock.setblocking(False) await

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-02-22 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >