Re: [Python-Dev] PEP 506 secrets module

2015-10-16 Thread Chris Angelico
On Fri, Oct 16, 2015 at 9:04 PM, Steven D'Aprano wrote: > On Fri, Oct 16, 2015 at 08:57:24AM +0200, Victor Stinner wrote: >> Hi, >> >> I like the PEP. IMHO it's a better solution than using a CPRNG for >> random by default. >> >> I suggest to raise an error if token_bytes(n) if calls with n < 16 >

Re: [Python-Dev] type(obj) vs. obj.__class__

2015-10-18 Thread Chris Angelico
On Mon, Oct 19, 2015 at 11:35 AM, David Mertz wrote: > That's interesting about the `self._full` variable slowing it down, I think > I'm not surprised (but obviously it depends on just how it's used). But one > can also simply define RingBuffer.isfull() using `self.max==len(self.data)` > if you p

Re: [Python-Dev] Generated Bytecode ...

2015-10-22 Thread Chris Angelico
On Fri, Oct 23, 2015 at 3:05 PM, Terry Reedy wrote: > Indeed, whether 'pass' should be compiled to 'NOP' or nothing depends on > one's view of the meaning of pass and whether it must be executed (by going > though the ceval loop once and doing nothing) or not. Hmm. I thought 'pass' was a syntacti

[Python-Dev] Python 3.5.1 plans

2015-11-01 Thread Chris Angelico
PEP 478 [1] doesn't currently have any info on a planned 3.5.1 release (and actually, it has 3.5.0 Final listed as a future release). About when is it likely to happen? The one thing I'm hanging out for is an installer patch on Windows that detects XP and immediately aborts with a convenient error;

Re: [Python-Dev] Python 3.5.1 plans

2015-11-01 Thread Chris Angelico
On Sun, Nov 1, 2015 at 9:55 PM, Phil Thompson wrote: > On 1 Nov 2015, at 10:30 a.m., Chris Angelico wrote: >> >> PEP 478 [1] doesn't currently have any info on a planned 3.5.1 release >> (and actually, it has 3.5.0 Final listed as a future release). About >> when

Re: [Python-Dev] Python 3.5.1 plans

2015-11-01 Thread Chris Angelico
On Mon, Nov 2, 2015 at 5:51 AM, Larry Hastings wrote: > If I didn't have any release blockers, I'd schedule 3.5.1 for sometime > around three weeks from now. And FYI I want to release 3.4.4 about two > weeks after that. > Thanks Larry! That'd be awesome. If there's testing needed on that ticket,

Re: [Python-Dev] Support of UTF-16 and UTF-32 source encodings

2015-11-14 Thread Chris Angelico
On Sun, Nov 15, 2015 at 12:06 PM, Steve Dower wrote: > The native encoding on Windows has been UTF-16 since Windows NT. Obviously > we've survived without Python tokenization support for a long time, but > every API uses it. > > I've hit a few cases where it would have been handy for Python to be

Re: [Python-Dev] Support of UTF-16 and UTF-32 source encodings

2015-11-14 Thread Chris Angelico
On Sun, Nov 15, 2015 at 12:27 PM, Glenn Linderman wrote: > Notepad defaults to ANSI encoding, as I think it always has. UTF-8 is an > option, and it does seem to try to notice the original encoding of the file, > when editing old files, but when creating a new one ANSI. Thanks. Is "ANSI" alw

Re: [Python-Dev] Support of UTF-16 and UTF-32 source encodings

2015-11-14 Thread Chris Angelico
On Sun, Nov 15, 2015 at 12:47 PM, Glenn Linderman wrote: > On 11/14/2015 5:37 PM, Chris Angelico wrote: > > On Sun, Nov 15, 2015 at 12:27 PM, Glenn Linderman > wrote: > > Notepad defaults to ANSI encoding, as I think it always has. UTF-8 is an > option, and it does seem

Re: [Python-Dev] Reading Python source file

2015-11-19 Thread Chris Angelico
On Thu, Nov 19, 2015 at 10:51 PM, Serhiy Storchaka wrote: > http://bugs.python.org/issue20115 Interestingly, the file linked in the last comment on that issue [1] ties in with another part of this thread, regarding binary blobs in Python scripts. It uses open(sys.argv[0],'rb') to find itself, and

Re: [Python-Dev] Help with a book

2015-11-25 Thread Chris Angelico
On Thu, Nov 26, 2015 at 7:31 AM, Jacob Zimmerman wrote: > Anyway, I am currently reading through my initial rough draft and making > corrections for a revised draft. Once I'm done with that, I'd like a few > volunteers to read through it. First, to find spelling, grammatical, or > consistency mist

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-03 Thread Chris Angelico
On Fri, Dec 4, 2015 at 12:25 PM, Steven D'Aprano wrote: > I don't see any good reason for maintaining that there's just one > syntax, "display", which comes in two forms: a comma-separated set of > values, or a for-loop. The only thing they have in common (syntax-wise) > is that they both use [ ]

Re: [Python-Dev] Idea: Dictionary references

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 2:37 PM, Andrew Barnert via Python-Dev wrote: > If __getattribute__ raises an AttributeError (or isn't found, but that only > happens in special cases like somehow calling a method on a type that hasn't > been constructed) Wow. How do you do that? Is it possible with pur

[Python-Dev] Change the repr for datetime.timedelta (was Re: Asynchronous context manager in a typical network server)

2015-12-20 Thread Chris Angelico
On Mon, Dec 21, 2015 at 9:02 AM, Alexander Belopolsky wrote: > On Fri, Dec 18, 2015 at 4:09 PM, Guido van Rossum wrote: >>> >>> >>> It's 11 days. Which is pretty reasonable server uptime. >> >> >> Oops, blame the repr() of datetime.timedelta. I'm sorry I so rashly >> thought I could do better tha

Re: [Python-Dev] Change the repr for datetime.timedelta (was Re: Asynchronous context manager in a typical network server)

2015-12-20 Thread Chris Angelico
On Mon, Dec 21, 2015 at 12:00 PM, Alexander Belopolsky wrote: > On Sun, Dec 20, 2015 at 5:28 PM, Chris Angelico wrote: >> >> > A helpful trivia: a year is approximately π times 10 million seconds. >> >> Sadly doesn't help here, as the timedelta for a

Re: [Python-Dev] Change the repr for datetime.timedelta (was Re: Asynchronous context manager in a typical network server)

2015-12-22 Thread Chris Angelico
On Tue, Dec 22, 2015 at 7:39 PM, Victor Stinner wrote: > Le lundi 21 décembre 2015, Guido van Rossum a écrit : >> >> I still think the repr change to use keywords has a good chance for 3.6. > > repr() with keywords is called a method, no? Like isoformat() > Not keyword arguments - the proposal i

Re: [Python-Dev] New poll about a macro for safe reference replacing

2015-12-23 Thread Chris Angelico
On Thu, Dec 24, 2015 at 1:50 AM, Serhiy Storchaka wrote: > Oh, I'm confused. Should I make a new poll? With new voters Py_MOVEREF can > get more votes than Py_SETREF. I suggest cutting off the bikeshedding. Both of these options have reasonable support. Pick either and run with it, and don't worr

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-18 Thread Chris Angelico
On Mon, Jan 18, 2016 at 10:42 PM, Maciej Szulik wrote: > On Mon, Jan 18, 2016 at 9:59 AM, Larry Hastings wrote: >> >> >> >> On 01/17/2016 11:10 AM, Brett Cannon wrote: >> >> Anyone object if I update PEP 7 to remove the optionality of curly braces >> in PEP 7? >> >> >> I'm -1. I don't like being

Re: [Python-Dev] Update PEP 7 to require curly braces in C

2016-01-18 Thread Chris Angelico
On Mon, Jan 18, 2016 at 11:02 PM, Larry Hastings wrote: > On 01/18/2016 03:57 AM, Chris Angelico wrote: > > Rather than forcing people to use braces, wouldn't it be easier to > just add a linter to the toolchain that will detect those kinds of > problems and reject the c

[Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-22 Thread Chris Angelico
I just had a major crash on the system that hosts the angelico-debian-amd64 buildbot, and as usual, checked it carefully after bringing everything up. It seems now to be timing out after an hour of operation: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/3132/steps/tes

Re: [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-22 Thread Chris Angelico
On Sat, Jan 23, 2016 at 5:39 PM, Zachary Ware wrote: > On Sat, Jan 23, 2016 at 12:03 AM, Chris Angelico wrote: >> By the way, this looks odd: >> >> make buildbottest TESTOPTS= TESTPYTHONOPTS= TESTTIMEOUT=3600 >> in dir /root/buildarea/3.x.angelico-debian-amd

Re: [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 1:37 AM, Victor Stinner wrote: > 3600 seconds is the maximum duration of a single test file. We may reduce it > since a single test file should not take longer than 30 min. Maybe we can do > better and put the timeout on a single test function. I'd be inclined to put some

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Chris Angelico
On Tue, Jan 26, 2016 at 2:32 PM, INADA Naoki wrote: > > I know. > But people compares language speed by simple microbench like fibbonacci. > They doesn't use listcomp or libraries to compare *language* speed. > Well, that's a stupid way to decide on a language. Here, look: Python is faster than C

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-26 Thread Chris Angelico
On Wed, Jan 27, 2016 at 2:28 AM, Ryan Gonzalez wrote: >>rosuav@sikorsky:~$ gcc fib.c && time ./a.out >>1134903170 >> >>real 0m9.104s >>user 0m9.064s >>sys 0m0.000s >>rosuav@sikorsky:~$ cat fib.c >>#include >> >>unsigned long fib(unsigned long n) >>{ >>if (n < 2) return n; >>return fib(n-2

Re: [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-27 Thread Chris Angelico
On Wed, Jan 27, 2016 at 8:39 PM, Victor Stinner wrote: > 2016-01-23 7:03 GMT+01:00 Chris Angelico : >> Running just that test file: >> >> $ ./python Lib/test/test_socket.py >> ... chomp lots of lines ... >> testRecvmsgPeek (__main__.RecvmsgUDP6Test) ... >>

Re: [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-28 Thread Chris Angelico
On Thu, Jan 28, 2016 at 7:35 PM, Martin Panter wrote: > Other things that come to mind are to see if there is anything odd > about the buildbot’s Linux kernel and glibc versions. Maybe run the > Python script under “strace” to see if anything strange is going on. > I did that, and a few other thi

Re: [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?

2016-01-28 Thread Chris Angelico
On Thu, Jan 28, 2016 at 9:41 PM, Chris Angelico wrote: > However, as I was doing so (and I just discarded a draft message where > I'd been typing up notes), my entire system went kerblooie, and I've > spent the last day rebuilding stuff from scratch. When I get around to >

Re: [Python-Dev] Git for Mercurial Users

2016-02-03 Thread Chris Angelico
On Thu, Feb 4, 2016 at 10:38 AM, Nikolaus Rath wrote: > Hello, > > With the upcoming move to Git, I thought people might be interested in some > thoughts that I wrote down when learning Git for the first time as a > long-time Mercurial user: > > http://www.rath.org/mercurial-for-git-users-and-vice

Re: [Python-Dev] Licensing issue (?) for Frozen Python? [was: More optimisation ideas]

2016-02-05 Thread Chris Angelico
On Sat, Feb 6, 2016 at 3:31 PM, Stephen J. Turnbull wrote: > Of course if *you* want to you can GPL Python (I think that's now > possible, at one time there was a issue with the CNRI license IIRC), > and then licensees of *your* distribution (but not you!) are required > to distribute source. And

Re: [Python-Dev] Licensing issue (?) for Frozen Python? [was: More optimisation ideas]

2016-02-05 Thread Chris Angelico
On Sat, Feb 6, 2016 at 4:31 PM, Stephen J. Turnbull wrote: > However, the technical problem remains. For example, you mention > Debian. While Debian keeps its source and binary packages very close > to "in sync" on the server, there are several gotchas. For example, > Debian does not restrict i

Re: [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

2016-02-08 Thread Chris Angelico
On Tue, Feb 9, 2016 at 12:41 PM, MRAB wrote: > On 2016-02-09 00:53, Guido van Rossum wrote: >> >> The warning for 'assert (cond, msg)' was specifically put in because >> this is a nasty trap. It's *always* a mistaken attempt to write >> 'assert cond, msg' -- usually in an attempt to break a long l

Re: [Python-Dev] Windows: Remove support of bytes filenames in theos module?

2016-02-09 Thread Chris Angelico
On Wed, Feb 10, 2016 at 12:37 PM, Steve Dower wrote: > I really don't like the idea of not being able to use bytes in cross > platform code. Unless it's become feasible to use Unicode for lossless > filenames on Linux - last I heard it wasn't. It has, but only in Python 3 - anyone who needs to su

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals

2016-02-11 Thread Chris Angelico
On Thu, Feb 11, 2016 at 7:22 PM, Georg Brandl wrote: > * Allowing underscores in string arguments to the ``Decimal`` constructor. It > could be argued that these are akin to literals, since there is no Decimal > literal available (yet). > > * Allowing underscores in string arguments to ``int(

Re: [Python-Dev] Time for a change of random number generator?

2016-02-11 Thread Chris Angelico
On Fri, Feb 12, 2016 at 3:12 PM, Andrew Barnert via Python-Dev wrote: > On Thursday, February 11, 2016 7:20 PM, Stephen J. Turnbull > wrote: > > > >> I think we should keep it around forever. Even my slowest colleagues >> are learning that they should record their seeds and PRNG algorithms >> f

Re: [Python-Dev] Hash randomization for which types?

2016-02-17 Thread Chris Angelico
On Thu, Feb 18, 2016 at 12:29 AM, Larry Hastings wrote: > int objects have their own hash algorithm, built in to long_hash() in > Objects/longobject.c. The hash of an int is the value of the int, unless > it's -1 or doesn't fit into the native type. Can someone elaborate on this special case, pl

Re: [Python-Dev] Very old git mirror under github user "python-git"

2016-02-28 Thread Chris Angelico
On Mon, Feb 29, 2016 at 4:46 AM, Georg Brandl wrote: > Although I don't see much confusion; there's bound to be > hundreds of forks of CPython, if not already, then definitely once we move to > GitHub. Forks made within the GitHub interface aren't usually confusing. Up the top of this repo, you c

Re: [Python-Dev] Very old git mirror under github user "python-git"

2016-02-28 Thread Chris Angelico
On Mon, Feb 29, 2016 at 5:07 AM, Brett Cannon wrote: > > > On Sun, 28 Feb 2016 at 09:58 Chris Angelico wrote: >> >> On Mon, Feb 29, 2016 at 4:46 AM, Georg Brandl wrote: >> > Although I don't see much confusion; there's bound to be >> > h

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-15 Thread Chris Angelico
On Wed, Mar 16, 2016 at 5:03 PM, Serhiy Storchaka wrote: > On 15.03.16 22:30, Guido van Rossum wrote: >> >> I came across a file that had two different coding cookies -- one on >> the first line and one on the second. CPython uses the first, but mypy >> happens to use the second. I couldn't find a

Re: [Python-Dev] The next major Python version will be Python 8

2016-03-31 Thread Chris Angelico
On Fri, Apr 1, 2016 at 8:44 AM, Victor Stinner wrote: > You should now try Python 8 and try find if a module can still be imported ;-) Okay I can fire up interactive Python and 'import this'. But I can't run 'make'. This will be interesting! ChrisA ___

Re: [Python-Dev] Which version is better? Phyton 27 or Phyton 35?

2016-04-01 Thread Chris Angelico
On Fri, Apr 1, 2016 at 9:42 PM, Roberto Martínez wrote: > I am having a hard time trying to choose one of this two products: > > Phyton 27: > http://www.amazon.com/Phyton-27-Systemic-Bactericide-Fungicide/dp/B00VKPL8FU > Phyton 35: > http://www.amazon.com/Phyton-Bactericide-fungicide-Substitute-Li

Re: [Python-Dev] When should pathlib stop being provisional?

2016-04-05 Thread Chris Angelico
On Wed, Apr 6, 2016 at 9:08 AM, Alexander Walters wrote: > * pathlib should be improved (specifically by making it inherit from str) I'd like to see this specific change settled on in the PEP, actually. There are some arguments on both sides, and some hybrid solutions being proposed, and it looks

Re: [Python-Dev] When should pathlib stop being provisional?

2016-04-05 Thread Chris Angelico
On Wed, Apr 6, 2016 at 9:45 AM, Guido van Rossum wrote: > On Tue, Apr 5, 2016 at 4:13 PM, Chris Angelico wrote: >> On Wed, Apr 6, 2016 at 9:08 AM, Alexander Walters >> wrote: >>> * pathlib should be improved (specifically by making it inherit from str) >> >>

Re: [Python-Dev] When should pathlib stop being provisional?

2016-04-05 Thread Chris Angelico
On Wed, Apr 6, 2016 at 12:51 PM, Steven D'Aprano wrote: > On Wed, Apr 06, 2016 at 10:02:30AM +1000, Chris Angelico wrote: > >> My personal view on the text/bytes debate is that a path is >> fundamentally a human concept, and consists therefore of text. The >> fact tha

Re: [Python-Dev] When should pathlib stop being provisional?

2016-04-05 Thread Chris Angelico
On Wed, Apr 6, 2016 at 3:37 PM, Stephen J. Turnbull wrote: > Chris Angelico writes: > > > Outside of deliberate tests, we don't create files on our disks > > whose names are strings of random bytes; > > Wishful thinking. First, names made of control characters h

Re: [Python-Dev] Defining a path protocol

2016-04-06 Thread Chris Angelico
On Thu, Apr 7, 2016 at 4:54 AM, Ethan Furman wrote: > Maybe __os_path__ then? I would rather be explicit about the type of path > we are dealing with -- who knows if we won't have __url_path__ in the future > (besides Guido, of course ;) > Bikeshedding furiously... I don't like os_path here as i

Re: [Python-Dev] Defining a path protocol

2016-04-07 Thread Chris Angelico
On Thu, Apr 7, 2016 at 9:44 AM, Ethan Furman wrote: > Excellent! Narrowing the field then to: > > __fspath__ > > __os_path__ > > > Step right up! Cast yer votes! +0.9 for __fspath__; I'd prefer a one-word name, but with __path__ out of the running (which I agree with), there's no other obvious

Re: [Python-Dev] summary: a Path protocol

2016-04-08 Thread Chris Angelico
On Fri, Apr 8, 2016 at 4:35 PM, Victor Stinner wrote: > Sorry, I don't have time to read the whole discussion. What is the problem > with adding a __str__ to pathlib? > > Victor Everything else has __str__ too, so you run the risk of open(["Hello", "World"], "w") working and doing something weird

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 12:18 AM, Jon Ribbens wrote: > Anyway the code is at https://github.com/jribbens/unsafe > It requires Python 3.4 or later (it could probably be made to work on > Python 2.7 as well, but it would need some changes). Not being a security expert, I'm not the best one to try to

Re: [Python-Dev] Pathlib enhancments - method name only

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 5:03 AM, Chris Barker wrote: > On Fri, Apr 8, 2016 at 11:34 AM, Koos Zevenhoven wrote: >> >> > >> > __pathstr__ # pathstring >> > >> >> Or perhaps __pathstring__ in case it may be or return byte strings. > > > I'm fine with __pathstring__ , but I thought it was already deci

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-11 Thread Chris Angelico
On Mon, Apr 11, 2016 at 9:04 PM, Isaac Morland wrote: > But I would not use for security purposes a Python sandbox that was not > formally verified to be correct and unbreakable. Of course in order for > this to be possible, there first has to be a formal semantics for Python. > Has anybody made

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-11 Thread Chris Angelico
On Tue, Apr 12, 2016 at 2:53 AM, Jon Ribbens wrote: > On Mon, Apr 11, 2016 at 04:04:21PM +0100, Paul Moore wrote: >> However, it's not at all clear (to me at least) what you *are* trying >> to do. > > I'm trying to see to what extent we can use ast node inspection to > remedy the failures of prior

Re: [Python-Dev] Summary of the pathlib discussion (Re: Maybe, just maybe, pathlib doesn't belong.)

2016-04-11 Thread Chris Angelico
On Tue, Apr 12, 2016 at 7:55 AM, Brett Cannon wrote: > That's pretty much it unless Chris or Ethan disagree. So I think pathlib is > far from being as dead as a parrot. ;) That looks like an accurate summary! ChrisA ___ Python-Dev mailing list Python-D

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-11 Thread Chris Angelico
On Tue, Apr 12, 2016 at 8:43 AM, Jon Ribbens wrote: > On Tue, Apr 12, 2016 at 03:02:54AM +1000, Chris Angelico wrote: >> It all depends on how much functionality you want. If all you need is >> a numeric expression evaluator, that's not too hard - disallow all >> form

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Sat, Apr 9, 2016 at 12:18 AM, Jon Ribbens wrote: > Anyway the code is at https://github.com/jribbens/unsafe > It requires Python 3.4 or later (it could probably be made to work on > Python 2.7 as well, but it would need some changes). Rather annoying point: Your interactive mode allows no edit

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 6:17 PM, Paul Moore wrote: > Well, I'll ask the obvious question, then. In allowing "import" did > you allow "import ctypes"? If so, then I win :-) Or did you explicitly > whitelist certain modules? And if so, which ones are they, and did I > succeed if I manage to import a

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 8:06 PM, Jon Ribbens wrote: > On Tue, Apr 12, 2016 at 06:57:37PM +1000, Chris Angelico wrote: >> The sandbox code assumes that an attacker cannot create files in the >> current directory. > > If the attacker can create such files then the system is

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 9:10 PM, Jon Ribbens wrote: > On Tue, Apr 12, 2016 at 08:27:14PM +1000, Chris Angelico wrote: >> decimal.getcontext is a simple and obvious example of a way that >> global mutable objects can be accessed across the boundary. There is >> no way to math

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 10:42 PM, Jon Ribbens wrote: > On Tue, Apr 12, 2016 at 02:31:19PM +0200, Victor Stinner wrote: >> Oh, I forgot to mention another vulnerability: you block access to >> attributes by replacing getattr and by analyzing the AST. Ok, but one >> more time, it's not enough. If yo

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 10:49 PM, Jon Ribbens wrote: > On Tue, Apr 12, 2016 at 10:45:06PM +1000, Chris Angelico wrote: >> On Tue, Apr 12, 2016 at 10:42 PM, Jon Ribbens >> wrote: >> > That's not a vulnerability, and it's something I already explicitly >> &g

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 11:12 PM, Steven D'Aprano wrote: > To give a concrete example... suppose that the C locale library is > unsafe. Further, let's suppose that the str.isdigit method calls code > from the C locale library, to determine whether or not the string is > made up of locale-specific

Re: [Python-Dev] pathlib - current status of discussions

2016-04-12 Thread Chris Angelico
On Tue, Apr 12, 2016 at 7:58 AM, Ethan Furman wrote: > Sticking points: > --- > > Do we allow bytes to be returned from os.fspath()? If yes, then do we allow > bytes from __fspath__()? > I would say No and No, on the basis that it's *far* easier to widen their scope in 3.7 than to na

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-12 Thread Chris Angelico
On Wed, Apr 13, 2016 at 2:15 AM, Ethan Furman wrote: > On 04/11/2016 04:43 PM, Victor Stinner wrote: >> >> Le 11 avr. 2016 11:11 PM, "Ethan Furman" a écrit : > > >>> So my concern in such a case is what happens if we pass this SE >>> string somewhere else: a UTF-8 file, or over a socket, or into a

Re: [Python-Dev] Most 3.x buildbots are green again, please don't break them and watch them!

2016-04-13 Thread Chris Angelico
On Wed, Apr 13, 2016 at 9:40 PM, Victor Stinner wrote: > Maybe it's time to move more 3.x buildbots to the "stable" category? > http://buildbot.python.org/all/waterfall?category=3.x.stable Move the Bruces into stable, perhaps? The AMD64 Debian Root one. Been fairly consistently green. ChrisA ___

Re: [Python-Dev] pathlib - current status of discussions

2016-04-13 Thread Chris Angelico
On Thu, Apr 14, 2016 at 3:10 AM, Brett Cannon wrote: > https://gist.github.com/brettcannon/b3719f54715787d54a206bc011869aa1 has the > four potential approaches implemented (although it doesn't follow the > "separate functions" approach some are proposing and instead goes with the > allow_bytes app

Re: [Python-Dev] pathlib - current status of discussions

2016-04-13 Thread Chris Angelico
On Thu, Apr 14, 2016 at 5:30 AM, Brett Cannon wrote: > > > On Wed, 13 Apr 2016 at 12:25 Chris Angelico wrote: >> >> On Thu, Apr 14, 2016 at 3:10 AM, Brett Cannon wrote: >> > https://gist.github.com/brettcannon/b3719f54715787d54a206bc011869aa1 has >>

Re: [Python-Dev] pathlib - current status of discussions

2016-04-13 Thread Chris Angelico
On Thu, Apr 14, 2016 at 5:46 AM, Random832 wrote: > On Wed, Apr 13, 2016, at 15:24, Chris Angelico wrote: >> Is that the intention, or should the exception catching be narrower? I >> know it's clunky to write it in Python, but AIUI it's less so in C: > > How i

Re: [Python-Dev] pathlib - current status of discussions

2016-04-14 Thread Chris Angelico
On Thu, Apr 14, 2016 at 11:45 PM, Random832 wrote: > On Thu, Apr 14, 2016, at 09:40, Nick Coghlan wrote: >> That's not a *new* problem though, it already exists if you pass in a >> mix of bytes and str: >> >> There's also already a solution (regardless of whether you want bytes >> or str as the re

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Chris Angelico
On Mon, Apr 18, 2016 at 7:05 AM, Koos Zevenhoven wrote: > On Sun, Apr 17, 2016 at 9:14 PM, Ethan Furman wrote: >> On 04/17/2016 06:58 AM, Koos Zevenhoven wrote: >> >>> So, as a summary: With a str+bytes-polymorphic __fspath__, with the >>> above argumentation and the rough implementation of os.fs

Re: [Python-Dev] [Python-ideas] pep 7 line break suggestion differs from pep 8

2016-04-18 Thread Chris Angelico
On Tue, Apr 19, 2016 at 5:33 AM, Joseph Jevnik wrote: > I saw that there was recently a change to pep 8 to suggest adding a line > break before a binary operator. Pep 7 suggests the opposite: > >> When you break a long expression at a binary operator, the operator goes >> at the end of the previou

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-19 Thread Chris Angelico
On Wed, Apr 20, 2016 at 1:16 PM, Stephen J. Turnbull wrote: > Brett Cannon writes: > > > Now if you can convince me that the use of bytes paths is very > > minimal > > I doubt that I can do that, because all that Python 2 code is > effectively bytes. To the extent that people are just passing i

Re: [Python-Dev] Discussion on fspath: please wait for a PEP

2016-04-20 Thread Chris Angelico
On Wed, Apr 20, 2016 at 11:58 PM, Ethan Furman wrote: > On 04/20/2016 04:52 AM, Victor Stinner wrote: > >> Can you please wait for a PEP? Brett Canon and Ethan Furman are >> working on a PEP. > > > Actually, Brett Canon and Chris Angelico. I thought just Brett; m

Re: [Python-Dev] When the infamous Bier trunk hits ... where is our Python backup?

2016-04-21 Thread Chris Angelico
On Thu, Apr 21, 2016 at 9:41 PM, Burkhard Meier wrote: > Don't be afraid. > > This is just CEO talk. > > Let's imagine Python without a leader. > > All commercial companies...well ... are we free? > I still have no clue what you're talking about. Every project has a leader. If Guido dies, goes in

Re: [Python-Dev] file system path protocol PEP

2016-05-13 Thread Chris Angelico
On Fri, May 13, 2016 at 8:19 PM, Steven D'Aprano wrote: > I feel this is Not Our Problem. Surely the stdlib cannot be held > responsible for all the poor decisions made by third-party libraries? If > a library hard-codes "\\" as their directory separator, because everyone > uses Windows, you'd sim

Re: [Python-Dev] File system path PEP, part 2

2016-05-13 Thread Chris Angelico
On Fri, May 13, 2016 at 9:00 PM, Steven D'Aprano wrote: > Cons: > (3) Polymorphic code that truly doesn't care whether it gets bytes or > str will have a slightly less convenient way of getting it, namely by > calling __fspath__() itself, instead of os.fspath(). I don't like this; it goes against

Re: [Python-Dev] file system path protocol PEP

2016-05-13 Thread Chris Angelico
On Sat, May 14, 2016 at 2:33 AM, Sven R. Kunze wrote: > On 13.05.2016 17:29, Brett Cannon wrote: >> >> Purposeful change. It was what I had in my head after I posted my "groups" >> breakdown email and what Guido suggested as well independently. This helps >> alleviate any perf worries as type chec

Re: [Python-Dev] File system path PEP, part 2

2016-05-13 Thread Chris Angelico
On Sat, May 14, 2016 at 2:34 AM, Ethan Furman wrote: > I would say use `type(x).__fspath__`. I'm not aware of any other __dunder__ > method that doesn't access the attribute from the type instead of the > instance, and I see no point in making this one different. > __reduce__ / __reduce_ex__ in

Re: [Python-Dev] runtime dlls on Windows

2016-05-25 Thread Chris Angelico
On Thu, May 26, 2016 at 6:26 AM, Chris Barker wrote: > the point here is that end users should be able to: > > pip install something > > and if there is a binary wheel for something, it should work without them > having to install something else. (why MS doesn't ship ALL their runtimes > with eh O

Re: [Python-Dev] runtime dlls on Windows

2016-05-26 Thread Chris Angelico
On Fri, May 27, 2016 at 2:42 AM, Chris Barker wrote: > On Wed, May 25, 2016 at 1:40 PM, Chris Angelico wrote: >> >> But why should CPython >> package a runtime that it doesn't use? > > > Because it IS part of the "standard runtime environment" tha

Re: [Python-Dev] runtime dlls on Windows

2016-05-26 Thread Chris Angelico
On Fri, May 27, 2016 at 5:13 AM, Steve Dower wrote: > If they're installed properly into System32/SysWOW64 (using the official > installer), then yes. If you simply drop them into your Python install > directory, then no, unless you drop the right one - it has to match the > python.exe architectur

Re: [Python-Dev] Which direction is UnTransform? / Unicode is different

2013-11-20 Thread Chris Angelico
On Wed, Nov 20, 2013 at 11:03 PM, Steven D'Aprano wrote: >> I *will* get confused over which >> direction is encoding and which is decoding. (Removing .decode() >> from the (unicode) str type in 3 does help a lot, if I have a Python 3 >> interpreter running to check against.) > > It took me a long

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-22 Thread Chris Angelico
On Fri, Nov 22, 2013 at 10:32 PM, Nick Coghlan wrote: > A few folks overreacted in their concern about the community confusion > such a move would inevitably create - *anything* called "Python 2.8" > is going to give the impression that we've changed our mind about 2.7 > being the last feature rel

Re: [Python-Dev] PEP process entry point and ill fated initiatives

2013-11-29 Thread Chris Angelico
On Fri, Nov 29, 2013 at 10:08 PM, anatoly techtonik wrote: > About ill fated initiatives. I don't like when people prematurely close > tickets > without waiting for the mutual agreement that the problem is solved. Perhaps > trackers should have personal "agree/disagree/meh" flags to help other >

Re: [Python-Dev] Running the unit test as root/administrator

2013-12-05 Thread Chris Angelico
On Fri, Dec 6, 2013 at 2:29 AM, "Martin v. Löwis" wrote: > Am 05.12.13 16:21, schrieb Vajrasky Kok: >> On Thu, Dec 5, 2013 at 11:06 PM, "Martin v. Löwis" >> wrote: >>> >>> Can you please phrase your question more explicit? What is it that >>> you want to be done before writing unit tests for the

[Python-Dev] Buildbot running Debian amd64 as root

2013-12-07 Thread Chris Angelico
In another thread it was suggested that a new buildbot running as root would be of value. I've spun up a virtual machine running Debian Wheezy amd64, have installed buildbot from the repository (version 0.8.6p1), and am ready to have it join the farm. How do I go about doing this? I've followed th

Re: [Python-Dev] Backward-incompatible change to random.randrange in 2.7.6

2013-12-18 Thread Chris Angelico
On Wed, Dec 18, 2013 at 8:43 PM, Serhiy Storchaka wrote: > 18.12.13 04:40, Benjamin Peterson написав(ла): > >> Mostly yes, but at least you could tell people to upgrade straight to >> 2.7.7 and skip 2.7.6. > > > It'll make the people to postpone the upgrade to 2.7.6 (which fixes many > security bu

Re: [Python-Dev] thread issues when embedding Python

2013-12-18 Thread Chris Angelico
On Wed, Dec 18, 2013 at 9:26 PM, Daniel Pocock wrote: > b) when each worker thread starts, call > PyThreadState_New(mInterpreterState) and save the result in a thread > local mPyThreadState > > c) use the mPyThreadState with PyEval_RestoreThread and > PyEval_SaveThread before and after calling Py

Re: [Python-Dev] Buildbot running Debian amd64 as root

2013-12-30 Thread Chris Angelico
On Sun, Dec 8, 2013 at 12:35 AM, Chris Angelico wrote: > In another thread it was suggested that a new buildbot running as root > would be of value. I've spun up a virtual machine running Debian > Wheezy amd64, have installed buildbot from the repository (version > 0.8.6p1), and

Re: [Python-Dev] Buildbot running Debian amd64 as root

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 12:05 AM, Chris Angelico wrote: > On Sun, Dec 8, 2013 at 12:35 AM, Chris Angelico wrote: >> In another thread it was suggested that a new buildbot running as root >> would be of value. I've spun up a virtual machine running Debian >> Wheezy amd6

Re: [Python-Dev] Buildbot running Debian amd64 as root

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 5:18 AM, Christian Heimes wrote: > The buildbot is missing some vital header files. Please run: > > # apt-get build-dep python3.3 > > to install all required dependencies. Debian Wheezy doesn't package 3.3 but only 3.2, so I grabbed 3.2's build-deps. They're now installe

[Python-Dev] Buildbot - "slave lost"

2013-12-30 Thread Chris Angelico
Does Buildbot retain a constant TCP socket to its server? I'm seeing this: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.3/builds/0 """ Results: Retry exception slave lost """ I have two internet connections; one is faster, but tends to drop socket connections after a few

Re: [Python-Dev] Buildbot - "slave lost"

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 11:42 AM, Antoine Pitrou wrote: > On Tue, 31 Dec 2013 11:24:26 +1100 > Chris Angelico wrote: >> Does Buildbot retain a constant TCP socket to its server? I'm seeing this: >> >> http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.

Re: [Python-Dev] Buildbot running Debian amd64 as root

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 12:35 PM, Zach Ware wrote: >>Debian Wheezy doesn't package 3.3 but only 3.2, so I grabbed 3.2's >>build-deps. They're now installed, so the next build should have >>everything for that. Does anyone happen to know what (if anything) 3.3 >>needs that 3.2 doesn't? > > You'll n

Re: [Python-Dev] Buildbot - "slave lost"

2014-01-01 Thread Chris Angelico
On Thu, Jan 2, 2014 at 9:17 AM, "Martin v. Löwis" wrote: > So it should be able to handle a failover from one link to > the other, but it's certainly better to bind it to the more > reliable transport. I believe you can somehow configure the > frequency of ping messages so that you network doesn't

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-02 Thread Chris Angelico
On Fri, Jan 3, 2014 at 1:18 PM, Dan Stromberg wrote: > I don't know much (if anything ^_^) about survey methodology. I just > created a 9 question survey and tossed it at a few places that > Pythonistas hang out. Specifically, your methodology was to post the link to python-list and python-dev (

Re: [Python-Dev] Bug? http.client assumes iso-8859-1 encoding of HTTP headers

2014-01-04 Thread Chris Angelico
On Sun, Jan 5, 2014 at 2:36 AM, Hugo G. Fierro wrote: > I am trying to download an HTML document. I get an HTTP 301 (Moved > Permanently) with a UTF-8 encoded Location header and http.client decodes it > as iso-8859-1. When there's a non-ASCII character in the redirect URL then I > can't download

[Python-Dev] Python 2.7 root buildbot showing errors

2014-01-05 Thread Chris Angelico
The first build my new root buildbot did showed errors in the 2.7 test suite, but I thought little of it as quite a few other 2.7 buildbots are showing red, too. But it seems they're showing different errors, so there might be something wrong with the setup. http://buildbot.python.org/all/builders

Re: [Python-Dev] Python 2.7 root buildbot showing errors

2014-01-06 Thread Chris Angelico
On Mon, Jan 6, 2014 at 7:11 PM, Christian Heimes wrote: > On 06.01.2014 08:09, Chris Angelico wrote: >> >> Then further down, several SSL tests attempt: >> >> s.connect_ex(("svn.python.org", 444))) >> >> and get back EAGAIN when they're expe

Re: [Python-Dev] Python 2.7 root buildbot showing errors

2014-01-06 Thread Chris Angelico
On Mon, Jan 6, 2014 at 7:58 PM, Christian Heimes wrote: > Interesting, maybe it's a general NAT issue? So far I have seen the issue on > Windows only. What kind of VM are you using? I'm using virtualbox for my > Windows VMs. It's Oracle VirtualBox v4.2.20 r90963. > Just backport the test fixes.

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-06 Thread Chris Angelico
On Tue, Jan 7, 2014 at 12:44 AM, Antoine Pitrou wrote: > BTW, there's a subtlety here: ``%s`` currently means "insert the result > of calling __str__", but bytes formatting should *not* call __str__. Since it derives from the C printf notation, it means "insert string here". The fact that __str__

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-08 Thread Chris Angelico
On Wed, Jan 8, 2014 at 9:12 PM, Victor Stinner wrote: > IMO some formatting commands must not be implemented. For example, > alignment is used to display something on screen, not in network > protocols or binary file formats. Must not, or need not? I can understand that those sorts of features wo

<    1   2   3   4   5   6   7   8   9   10   >