[Python-Dev] Re: Small lament...

2023-04-03 Thread Damian Shaw
In case people missed it, this Pip PR: https://github.com/pypa/pip/pull/11914 On Mon, Apr 3, 2023 at 8:41 PM Barry Warsaw wrote: > I heard it on reasonably believable authority that the FLUFL took the year > off. Lamentable. > > -Barry > > > On Apr 1, 2023, at 11:19, Skip Montanaro > wrote: >

[Python-Dev] Re: New contribution to Python built-in libraries.

2022-08-28 Thread Damian Shaw
I don't understand the purpose of this function, for example if I run: strangelt("Hello World", 3, "Bye") I get the output: HeByeByeo WorByed What is the common use case for this? And would it not be simpler and faster to implement it with this 1 liner: def strangelt(s,j,m): return

[Python-Dev] Re: Raw strings ending with a backslash

2022-05-28 Thread Damian Shaw
My understanding was that was part of the question being asked, is it possible to know what with the new PEG parser? On Sat, May 28, 2022 at 1:25 PM Serhiy Storchaka wrote: > 28.05.22 14:57, Damian Shaw пише: > > That PR seems to make \' and \" not special in general right? &

[Python-Dev] Re: Raw strings ending with a backslash

2022-05-28 Thread Damian Shaw
That PR seems to make \' and \" not special in general right? I think this is a more limited proposal, to only change the behavior when \ is at the end of a string, so the only behavior difference would never receiving the error "SyntaxError: EOL while scanning string literal" In which case

[Python-Dev] Re: Proposal to deprecate mailcap

2022-04-26 Thread Damian Shaw
I didn't spot anyone else report this to mitmproxy so I raised an issue to make them aware: https://github.com/mitmproxy/mitmproxy/issues/5297 On Tue, Apr 26, 2022 at 3:30 AM Victor Stinner wrote: > On Tue, Apr 26, 2022 at 5:47 AM Brett Cannon wrote: > > After talking about this in the SC

[Python-Dev] Re: Proposal to deprecate mailcap

2022-04-14 Thread Damian Shaw
> I searched grep.app and found no significant usage. Maybe someone wants to inform mitmproxy? It's a very popular tool and it comes up using that tool when searching for "import mailcap" using grep.app: https://grep.app/search?q=import%20mailcap

[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-29 Thread Damian Shaw
I'm probably overly stressing a well understood point here that urllib.parse is incredibly widely used and critical to many foundational libraries in Python. But I just came across this today that: conda is migrating from urllib3 for parsing to urllib.parse:

[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-28 Thread Damian Shaw
> If urllib is removed, I would very much like to preserve at least the functionality of urlparse /somewhere/. Given every alternative library to urllib relies on urllib.parse (and some rely on urllib.request), as well as popular libraries like pip, in this hypothetical it would definitely need

[Python-Dev] Re: [RELEASE] Python 3.10.4 and 3.9.12 are now available out of schedule

2022-03-24 Thread Damian Shaw
I guess the docs aren't updated yet and the changes are listed as "Python Next": https://docs.python.org/3.10/whatsnew/changelog.html#changelog ? Damian(he/him) On Thu, Mar 24, 2022 at 8:13 AM Łukasz Langa wrote: > Did anybody say cursed releases >

[Python-Dev] Re: New PEP website is horrible to read on mobile device

2022-03-15 Thread Damian Shaw
I tried on Pixel 6 Pro with Android 12 with both the latest stable Chrome and Firefox and didn't see the reported issue. One thing I would mention though is people who can reproduce it check if you have any extensions enabled or other tools that can block network traffic. Sometimes privacy based

[Python-Dev] Re: It's now time to deprecate the stdlib urllib module

2022-02-06 Thread Damian Shaw
the proxy functions such as "getproxies" that are currently in urllib.requests. More than once I've had to go down the rabbit hole of seeing where those functions get that info for each platform. Damian (he/him) On Sun, Feb 6, 2022 at 11:10 AM Victor Stinner wrote: > On Sun, Feb 6,

[Python-Dev] Re: It's now time to deprecate the stdlib urllib module

2022-02-06 Thread Damian Shaw
Pip vendors requests for network calls: https://github.com/pypa/pip/tree/main/src/pip/_vendor/requests But still does depend on functions from urllib.parse and urllib.request in many places: https://github.com/pypa/pip/blob/main/src/pip/_internal/utils/urls.py Damian (he/him) On Sun, Feb 6,

[Python-Dev] Re: It's now time to deprecate the stdlib urllib module

2022-02-06 Thread Damian Shaw
Speaking from anecdotal experience, "urllib.parse" is a very popular and highly depended on module, I would be shocked if removing it wouldn't be very disruptive. In fact a quick search of the replacement modules you mention see that they all rely it on it, here is an example from each: *

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-12 Thread Damian Shaw
Yeah, a datapoint I didn't see mentioned is searching on public github repos for import sortedcontainers (which includes from sortedcontainers import). Obviously it's just one datapoint but it shows a very small count compared to other packages mentioned when looking at many of the stats

[Python-Dev] Re: Type annotations, PEP 649 and PEP 563

2021-10-21 Thread Damian Shaw
Sorry for the naive question but why doesn't "TYPE_CHECKING" work under PEP 649? I think I've seen others mention this but as the code object isn't executed until inspected then if you are just using annotations for type hints it should work fine? Is the use case wanting to use annotations for

[Python-Dev] Re: PEP 654 except* formatting

2021-10-04 Thread Damian Shaw
I'm confused, if you can't do that then what is Irit asking? I thought that: > At the moment * is a separate token so both are allowed, but we could change that (e.g., make except* a token), and in any case we need to settle on a convention that we use in documentation, etc. Meant exactly that

[Python-Dev] Re: PEP 649: Deferred Evaluation Of Annotations

2021-08-10 Thread Damian Shaw
> dataclasses need to check for ClassVar Interesting, so the use case we are talking about is: 1) You are using annotations to mean actual types, 2) But you also have to inspect them at runtime, 3) For some of the types the name might not be defined at runtime yet In this example doesn't the

[Python-Dev] Re: PEP 649: Deferred Evaluation Of Annotations

2021-08-10 Thread Damian Shaw
> In this case PEP 649 doesn't help. Sorry for the naive question but why doesn't PEP 649 help here? Is there something fundamental about the dataclass that needs to inspect the type of C.a to create the dataclass? - Damian (he/him) On Tue, Aug 10, 2021 at 1:10 PM Łukasz Langa wrote: > > > On

[Python-Dev] Re: PEP 563 and 649: The Great Compromise

2021-04-18 Thread Damian Shaw
Hi Larry, all, I was thinking also of a compromise but a slightly different approach: Store annotations as a subclass of string but with the required frames attached to evaluate them as though they were in their local context. Then have a function "get_annotation_values" that knows how to

[Python-Dev] Re: Boundaries between numbers and identifiers

2021-04-15 Thread Damian Shaw
This isn't a "professional" or probably even "valid" use case for Python but one area this behavior is heavily used is code golf. For those not familiar with code golf is a type of puzzle where the objective is to complete a set of requirements in the least number of source code characters as

[Python-Dev] Re: Steering Council update for February

2021-03-10 Thread Damian Shaw
It is NOT a general convention. It is a push by Microsoft (owners of GitHub). Outside of GitHub, the git command still uses "master" as the default name. > I agree, not yet. But I think the writing is on the wall that this will be the new convention. FYI for accuracy the git installer includes

[Python-Dev] Re: Steering Council update for February

2021-03-09 Thread Damian Shaw
> Does 'master' confuse people? There's a general movement to replace language from common programming practises that derive from, or are associated with, the dehumanization of people. Such as master and slave, as well as whitelist and blacklist. Github has decided on "main" being a suitable

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-23 Thread Damian Shaw
t people > who need it will be able to do it quite easily. I'm more worried about > people assuming that they need it when they don't. > > Irit > > > On Tue, Feb 23, 2021 at 8:00 PM Damian Shaw > wrote: > >> Hi Irit, >> >> Catching exceptions like th

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-23 Thread Damian Shaw
, would be extremely helpful. Damian On Tue, Feb 23, 2021 at 2:35 PM Irit Katriel wrote: > On Tue, Feb 23, 2021 at 3:49 PM Damian Shaw > wrote: > >> >> Firstly, if I have a library which supports multiple versions of Python >> and I need to catch all standard exc

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-23 Thread Damian Shaw
Apologies I'm not a core dev so this might be the wrong place to ask but I have 2 small clarifying questions about the PEP. Firstly, if I have a library which supports multiple versions of Python and I need to catch all standard exceptions, what is considered the best practise after this PEP is

Re: [Python-Dev] Fuzzing the Python standard library

2018-07-17 Thread Damian Shaw
I'm not a core Python Dev, but quick question, why would you expect " fractions.Fraction("1.64E664644")" not to take 100s of megabytes and hours to run? Simply evaluating: 164 * 10**66464 will take hundreds of megabytes by definition. Regards Damian On Tue, Jul 17, 2018, 12:54 Jussi