Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-26 Thread Adrian
How about another str-like type, a sequence of char-or-bytes? Could be called strbytes or stringwithinvalidcharacters. It would support whatever subset of str functionality makes sense / is easy to implement plus a to_escaped_str() method (that does the escaping the PEP talks about) for people who

Re: [Python-Dev] PEP 553 V2 - builtin breakpoint() (was Re: PEP 553: Built-in debug())

2017-09-07 Thread Adrian Petrescu
Would that not be a security concern, if you can get Python to execute arbitrary code just by setting an environment variable? On Thu, Sep 7, 2017 at 10:47 PM, Barry Warsaw wrote: > On Sep 7, 2017, at 19:34, Nick Coghlan wrote: > > > Now that you put it that way, it occurs to me that CI environ

[Python-Dev] Re: PEP 647 (type guards) -- final call for comments

2021-02-14 Thread Adrian Freund
the path for future non-type-annotations, which could be used regardless of whether the code is type-annotated. -- Adrian On February 14, 2021 2:20:14 PM GMT+01:00, Steven D'Aprano wrote: >On Sat, Feb 13, 2021 at 07:48:10PM -, Eric Traut wrote: > >> I think it's

[Python-Dev] Re: Request for comments on final version of PEP 653 (Precise Semantics for Pattern Matching)

2021-03-31 Thread Adrian Freund
ore general type could be chosen instead. I don't have any objections against the other parts of the PEP. Adrian Freund On 3/27/21 2:37 PM, Mark Shannon wrote: > Hi everyone, > > As the 3.10 beta is not so far away, I've cut down PEP 653 down to the > minimum needed for

[Python-Dev] Re: Typing syntax and ecosystem

2021-04-13 Thread Adrian Freund
s slowed, adding a type checker to the standard library might be useful, but in my opinion it would currently do more harm than good. Adrian Freund On April 13, 2021 11:55:05 PM GMT+02:00, Luciano Ramalho wrote: >Hugh was unfortunate in presenting the problem, but I agree that we >sho

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

2021-04-18 Thread Adrian Freund
ouldn't be backported to versions before the typing syntax was relaxed, unless explicitly wrapped in a string, but I would imagine that if we see a relaxed annotation syntax we might see new typing syntax every now and then after that. Adrian Freund On April 18, 2021 6:49:59 PM GMT+02:00,

[Python-Dev] Re: Keeping Python a Duck Typed Language.

2021-04-22 Thread Adrian Freund
ame': g(t[1]) You could statically type t as Union[Tuple[Literal['version'], int], Tuple[Literal['name'], str]], but inferring a Protocol for this would be either very hard or even impossible, especially with even more complex conditions. Adrian Freund On A

[Python-Dev] Re: Keeping Python a Duck Typed Language.

2021-04-22 Thread Adrian Freund
On April 22, 2021 3:15:27 PM GMT+02:00, Paul Moore wrote: >On Thu, 22 Apr 2021 at 13:23, Adrian Freund wrote: >> >> According to PEP 484 all missing annotations in checked functions should be >> handled as Any. Any is compatible with all types. > >Yep, that's

[Python-Dev] Re: Keeping Python a Duck Typed Language.

2021-04-22 Thread Adrian Freund
On 4/22/21 5:00 PM, Paul Moore wrote: > On Thu, 22 Apr 2021 at 15:22, Adrian Freund wrote: >> On April 22, 2021 3:15:27 PM GMT+02:00, Paul Moore >> wrote: >>> but that's *absolutely* as far as I'd want to go. Note in particular >>> that I don't w

[Python-Dev] Re: python3.10rc2 compilation on android/termux/clang12.0.1 fails

2021-09-16 Thread Adrian Freund
or if additional patches and build arguments are needed though. Adrian On 9/15/21 19:06, Sandeep Gupta wrote: I am trying to compile Python3.10rc2 on rather unusual platform (termux on android). The gcc version is listed below: ~ $ g++ -v clang version 12.0.1 Target: aarch64-unknown-linux-andr

[Python-Dev] Re: python3.10rc2 compilation on android/termux/clang12.0.1 fails

2021-09-17 Thread Adrian Freund
 TERMUX_PKG_SUGGESTS="python-tkinter" Finally just run "./build-package.sh -i -f python" and send "output/python*.deb" to your phone, where you can install it using dpkg -i. Adrian On 9/16/21 14:27, Adrian Freund wrote: As you are using termux it might be worth

Re: [Python-Dev] Enumeration items: `type(EnumClass.item) is EnumClass` ?

2013-04-29 Thread Adrian Sampson
ion seems natural to me, so I wrote an enumeration library some time ago that uses a simple metaclass to achieve "type(Season.spring) is Season": https://github.com/sampsyo/beets/blob/master/beets/util/enumeration.py The module has other warts but perhaps it ca

[Python-Dev] Re: Python 3.9.11

2022-03-16 Thread Adrian Freund
e website soon. 3.9.10 was released approximately one day after the commit was made. Regards, Adrian Freund On 3/15/22 18:43, Prasad, PCRaghavendra wrote: Hi Team, Can someone please let us know the release date of Python 3.9.11 ( with libexpat 2.4.8 security issues fixed ) In the python.org

Re: [Python-Dev] Mercurial conversion repositories

2011-02-25 Thread Adrian Buehlmann
On 2011-02-25 17:12, Barry Warsaw wrote: > On Feb 25, 2011, at 01:50 AM, Raymond Hettinger wrote: > >> >> On Feb 25, 2011, at 12:09 AM, Martin v. Löwis wrote: >> >>> I think I would have liked the strategy of the PEP better (i.e. >>> create clones for feature branches, rather than putting all >>>

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Adrian Buehlmann
On 2011-02-26 22:06, Barry Warsaw wrote: > On Feb 26, 2011, at 02:05 PM, R. David Murray wrote: > >> On Sat, 26 Feb 2011 13:08:47 -0500, Barry Warsaw wrote: >>> $ cd py27 # now I want to synchronize >>> $ hg pull -u ssh://h...@hg.python.org/cpython >>> >>> but I'm not going to remember that url e

Re: [Python-Dev] hg extensions was Mercurial conversion repositories

2011-02-26 Thread Adrian Buehlmann
On 2011-02-27 00:13, Dj Gilcrease wrote: > Branch Management > bookmarks > http://mercurial.selenic.com/wiki/BookmarksExtension Bookmarks will be in Mercurial core for Mercurial 1.8, which will be released in a few days (March 1st). So, with 1.8 it's no longer needed to enable this ext

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Adrian Buehlmann
On 2011-02-27 01:50, Barry Warsaw wrote: > On Feb 26, 2011, at 11:45 PM, Adrian Buehlmann wrote: > >> You'd have to take this up with Mercurial's BDFL Matt. He is a strong >> advocate for teaching users to learn edit their .hg/hgrc files. > > Well, I guess it&#

Re: [Python-Dev] of branches and heads

2011-02-27 Thread Adrian Buehlmann
On 2011-02-26 23:26, Greg Ewing wrote: > From: Antoine Pitrou >> - a "branch" usually means a "named branch": a set of changesets >> bearing the same label (e.g. "default"); that label is freely chosen >> by the committer at any point, and enforces no topological >> characteristic > > There

Re: [Python-Dev] devguide (hg_transition): Advertise hg import over patch.

2011-02-27 Thread Adrian Buehlmann
On 2011-02-27 16:35, Scott Dial wrote: > On 2/27/2011 10:18 AM, Antoine Pitrou wrote: >> Well, chances are TortoiseHG comes with an UI to apply patches >> (TortoiseSVN had one), so the command-line instructions may be of >> little use to them. > > I don't believe TortoiseHG has such a feature (or

Re: [Python-Dev] devguide (hg_transition): Advertise hg import over patch.

2011-02-27 Thread Adrian Buehlmann
On 2011-02-27 23:21, Neil Hodgson wrote: > Adrian Buehlmann: > >> FWIW, we are very close to releasing TortoiseHg 2.0 (due March 1st), >> which ported the current Gtk based TortoiseHg to Qt (although, it was >> more like a rewrite :-). > >I hope this is going to

Re: [Python-Dev] hg pull failed

2011-03-06 Thread Adrian Buehlmann
On 2011-03-06 20:09, "Martin v. Löwis" wrote: >>> So, when I cloned, I should have done something like this: >>> >>> hg clone http://hg.python.org/cpython >>> hg clone cpython 3.2 >>> hg clone 3.2 3.1 >>> hg clone cpython 2.7 >>> hg clone 2.7 2.6 >>> hg clone 2.6 2.5 >

Re: [Python-Dev] hg diff

2011-03-08 Thread Adrian Buehlmann
On 2011-03-08 09:38, "Martin v. Löwis" wrote: >> However, as Michael points out, you can have your tools generate the >> patch. For example, it shouldn't be too hard to add a dynamic patch >> generator to Roundup (although I haven't thought about the UI or the >> CPU burden). > > For Mercurial, t

Re: [Python-Dev] hg diff

2011-03-08 Thread Adrian Buehlmann
On 2011-03-08 10:53, Adrian Buehlmann wrote: > On 2011-03-08 09:38, "Martin v. Löwis" wrote: >>> However, as Michael points out, you can have your tools generate the >>> patch. For example, it shouldn't be too hard to add a dynamic patch >>> generator

Re: [Python-Dev] I am now lost - committed, pulled, merged, what is "collapse"?

2011-03-21 Thread Adrian Buehlmann
On 2011-03-21 14:40, R. David Murray wrote: > On Mon, 21 Mar 2011 18:33:00 +0900, "Stephen J. Turnbull" > wrote: >> R. David Murray writes: >> > On Mon, 21 Mar 2011 14:07:46 +0900, "Stephen J. Turnbull" >> wrote: >> > > No, at best the DVCS workflow forces the developer on a branch to >> > >

Re: [Python-Dev] Hg: inter-branch workflow

2011-03-22 Thread Adrian Buehlmann
On 2011-03-22 11:19, John Arbash Meinel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 3/21/2011 9:19 PM, Barry Warsaw wrote: >> On Mar 21, 2011, at 11:56 AM, Daniel Stutzbach wrote: >> >>> Keeping the repository clean makes it easier to use a bisection search to >>> hunt down the

[Python-Dev] running/stepping python backwards

2011-05-02 Thread Adrian Johnston
This may seem like an odd question, but I’m intrigued by the idea of using Python as a data definition language with “undo” support. If I were to try and instrument the Python interpreter to be able to step backwards, would that be an unduly difficult or inefficient thing to do? (Please reply

[Python-Dev] file open in python interpreter

2008-11-02 Thread adrian golding
to take a hash measurement of the .py file just before i open it to run the script. is the above file the right place to call for the measurement before the file open function? thank you - adrian ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] file open in python interpreter

2008-11-04 Thread adrian golding
rmission denied error is not because of i'm unable to write on my 'measurereq' file, but its because i'm unable to measure (read) the python file. any clues? how can i go around this? thanks - adrian On Mon, Nov 3, 2008 at 9:57 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: &

[Python-Dev] Re: Move support of legacy platforms/architectures outside Python

2021-02-22 Thread John Paul Adrian Glaubitz
even speed up m68k. > */ > #if !defined(__m68k__) > (...) > > Such issue is hard to guess when you write code and usually only spot > it while actually running the code on such architecture. This is the only such place in the code where there is an extra section for m68k

[Python-Dev] Re: Move support of legacy platforms/architectures outside Python

2021-02-24 Thread John Paul Adrian Glaubitz
ing points. I have already verified that these changes don't break on 32-bit PowerPC, 64-bit SPARC and, of course, M68k. Thanks, Adrian > [1] https://github.com/python/cpython/pull/24624 -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.o