Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Eric Smith
Ben Finney wrote: "Benjamin Peterson" <[EMAIL PROTECTED]> writes: On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <[EMAIL PROTECTED]> wrote: The `unittest` module will gain the following attribute, to set the default metaclass for classes in the module and thus make all classes in the module part

[Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case (like 'E' and 'G')? Compatibility with %-formatting is the only reason I can think of to keep up, but I get the sense we've given up on an automatic conver

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Mark Dickinson wrote: On Wed, Jul 16, 2008 at 3:35 PM, Eric Smith <[EMAIL PROTECTED]> wrote: Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case What exponent? Isn't th

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Guido van Rossum wrote: On Wed, Jul 16, 2008 at 7:35 AM, Eric Smith <[EMAIL PROTECTED]> wrote: Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case (like 'E' and 

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Guido van Rossum wrote: It shares code with %-formatting. Change that, too? I couldn't find any occurrences of %F in the stdlib. Not that that's the entire universe, of course. The change is slightly less elegant if I don't change %-formatting, but still doable, especially if the betas don't

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Mark Dickinson wrote: On Wed, Jul 16, 2008 at 4:15 PM, Eric Smith <[EMAIL PROTECTED]> wrote: There's no exponent until the number gets large. I haven't looked up how big the number has to get. On my Mac, it's somewhere between 1e50 and 1e60. I think it's around 1e

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-17 Thread Eric Smith
Eric Smith wrote: Guido van Rossum wrote: It shares code with %-formatting. Change that, too? I couldn't find any occurrences of %F in the stdlib. Not that that's the entire universe, of course. The change is slightly less elegant if I don't change %-formatting, b

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-17 Thread Eric Smith
Thomas Heller wrote: Guido van Rossum schrieb: On Thu, Jul 17, 2008 at 9:25 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: From: "Eric Smith" <[EMAIL PROTECTED]> I have this ready for checkin (with docs and tests). I'd like to get it in for this beta, sin

Re: [Python-Dev] [Python-checkins] r65099 - python/trunk/Doc/library/string.rst

2008-07-18 Thread Eric Smith
georg.brandl wrote: Author: georg.brandl Date: Fri Jul 18 13:15:06 2008 New Revision: 65099 Log: Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. Thanks for doing this. But see this output: http://www.python.org/dev/buildbot/al

Re: [Python-Dev] optimization required: .format() is much slower than %

2008-08-18 Thread Eric Smith
Eric Smith wrote: Eric Smith wrote: Eric Smith wrote: Nick Coghlan wrote: Secondly, the string % operator appears to have an explicit optimisation for the 'just return str(self)' case. This optimisation is missing from the new string format method. I'll see if I can opt

Re: [Python-Dev] [Pydotorg] Should we help pythonmac.org?

2008-08-21 Thread Joe Smith
"Jesse Noller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Tue, Aug 19, 2008 at 1:28 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > My understanding is that if there is a system Python, you shouldn't > change it. Ever. Huge, big, honkin' +1 from me on that. Besides, for a

Re: [Python-Dev] Add python.exe to PATH environment variable

2008-09-03 Thread Eric Smith
M.-A. Lemburg wrote: On 2008-09-03 04:12, Greg Ewing wrote: M.-A. Lemburg wrote: The problem is: how to undo those changes without accidentally undoing an explicit change made by the user ? Is that really much of an issue? If the PATH contains an entry corresponding to the Python installation

Re: [Python-Dev] Update to httplib.py

2008-09-25 Thread Eric Smith
Eldon Ziegler wrote: I updated httplib.py, python 2.4, to be able to bind to a specific IP address when connecting to a remote site. Would there be any interest in making this available to others? If so, are there instructions on how to post an update? Create an issue at http://bugs.python.org/

Re: [Python-Dev] PyCon 2009 Call for Proposals

2008-09-27 Thread Eric Smith
Brett Cannon wrote: I am thinking of organizing a panel this year for python-dev (much like the one I organized in 2007). Who would be willing to be on the panel with me if I did this? If you're looking for the perspective of someone who's relatively new to Python core programming, I'll do it.

Re: [Python-Dev] for __future__ import planning

2008-10-03 Thread Eric Smith
Brett Cannon wrote: Christian rightly points out that with four active trees, we're going to a pretty big challenge on our hands. How do other large open source projects handle similar situations? Beats me. Are that many projects crazy enough to have that many active branches? Is it really

Re: [Python-Dev] if-syntax for regular for-loops

2008-10-04 Thread Eric Smith
Steven D'Aprano wrote: On Sat, 4 Oct 2008 12:26:30 pm Nick Coghlan wrote: (Tangent: the above two try/except examples are perfectly legal Py3k code. Do we really need the "pass" statement anymore?) I can't imagine why you would think we don't need the pass statement. I often use it: * For

Re: [Python-Dev] My patches

2008-10-30 Thread Eric Smith
Ulrich Eckhardt wrote: On Thursday 30 October 2008, Victor Stinner wrote: One of the reasons why I'm very keen on us moving to a distributed version control system is to help break the logjam on core developers. Yeah, exactly :-) Does anyone already maintain a distributed tree? Mercurial, GIT,

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-10-30 Thread Eric Smith
Guido van Rossum wrote: No offense taken. The V8 experience makes me feel much more optimistic that they might actually pull this off. (I'm still skeptical about support for extension modules, withougt which CPython is pretty lame.) The need to modify all extension modules is the usual non-star

Re: [Python-Dev] hg branch gone?

2008-10-31 Thread Eric Smith
Georg Brandl wrote: Brett Cannon schrieb: I just tried to update my 3.0 branch in hg from http://code.python.org/hg/branches/py3k/ and hg is telling me it's a 404. Anyone else having trouble? 404 here too. Since http://code.python.org/ serves the loggerhead Bazaar view, I suppose the problem

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-02 Thread Eric Smith
Giovanni Bajo wrote: [[ my 0.2: it would be a great loss if we lose reference-counting semantic (eg: objects deallocated as soon as they exit the scope). I would bargain that for a noticable speed increase of course, but my own experience with standard GCs from other languages has been less tha

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-02 Thread Eric Smith
[EMAIL PROTECTED] wrote: Eric> I consider it a bug to rely on reference counting to close files, We can mostly have our cake and eat it too using the "with" statement. In most cases it should be sufficient I would think. True, and I meant to mention that. But unfortunately, my work projec

Re: [Python-Dev] SSH key for work

2008-11-18 Thread Eric Smith
Brett Cannon wrote: On Tue, Nov 18, 2008 at 13:23, Benjamin Peterson <[EMAIL PROTECTED]> wrote: On Tue, Nov 18, 2008 at 3:17 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: Can someone please add the attached SSH 2 DSA key for me? I want to be able to help out with the rc tomorrow while I am at wor

Re: [Python-Dev] format specification mini-language docs...

2008-11-21 Thread Eric Smith
Dino Viehland wrote: Ok, now I'm implementing __format__ support for IronPython. The format spec mini-language docs say that a presentation type of None is the same as 'g' for floating point / decimal values. Awesome! Thanks for doing this. >But these two formats seem to differ based upon ho

Re: [Python-Dev] format specification mini-language docs...

2008-11-25 Thread Eric Smith
Dino Viehland wrote: Finally providing any sign character seems to cause +1.0#INF and friends to be returned instead of inf as is documented: 10e667.__format__('+') '+1.0#INF' 10e667.__format__('') 'inf' Are these just doc bugs? The inf issue is the only one that seems particularly we

Re: [Python-Dev] format specification mini-language docs...

2008-12-01 Thread Eric Smith
ke care of it. Eric. -Original Message----- From: Eric Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 4:38 AM To: Dino Viehland Cc: python-dev@python.org dev Subject: Re: [Python-Dev] format specification mini-language docs... Dino Viehland wrote: Finally providing any sign char

Re: [Python-Dev] Merging flow

2008-12-04 Thread Eric Smith
Christian Heimes wrote: Several people have asked about the patch and merge flow. Now that Python 3.0 is out it's a bit more complicated. Flow diagram trunk ---> release26-maint \-> py3k ---> release30-maint Patches for all versions of Python should land in the

Re: [Python-Dev] Merging flow

2008-12-11 Thread Eric Smith
Nick Coghlan wrote: Martin v. Löwis wrote: I believe that's difficult when you previously merged from the trunk to the py3k branch - the merged change to the svnmerge related properties on the root directory gets in the way when svnmerge attempts to update them on the maintenance branch. That's

Re: [Python-Dev] Py3k: magical dir()

2008-12-19 Thread Eric Smith
Christian Heimes wrote: Dmitry Vasiliev schrieb: Hello! I think it's a strange behavior: Python 3.1a0 (py3k:67851, Dec 19 2008, 16:50:32) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. hash(range(10)) Traceback (most recen

Re: [Python-Dev] Call PyType_Ready on builtin types during interpreter startup?

2008-12-28 Thread Eric Smith
Nick Coghlan wrote: Nick Coghlan wrote: Rather than playing whack-a-mole with this, does anyone have any ideas on how to systematically find types which are defined in the core, but are missing an explicit PyType_Ready call? (I guess one way would be to remove all the implicit calls in a local b

Re: [Python-Dev] floatformat vs float_format

2009-01-01 Thread Eric Smith
David Cournapeau wrote: Hi, In python 2.6, there have been some effort to make float formatting more consistent between platforms, which is nice. Unfortunately, there is still one corner case, for example on windows: print a -> print 'inf' print '%f' % a -> print '1.#INF' The difference being

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Eric Smith
Kristján Valur Jónsson wrote: Aha, thanks, since my wireshark wasn't working. I boiled a few pints of water (thanks, Google) and came up with this: http://support.microsoft.com/kb/175523 Here is the summary: Note that with other implementations of TCP, such as those commonly found in many UNIX

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-22 Thread Eric Smith
Terry Reedy wrote: Cameron Simpson wrote: Back at uni we had to implement a small language in our compilers class and the lecturer had specified a proper generic while loop, thus: loop: suite while invariant suite endloop In Python, that is spelled while True: suite if not

Re: [Python-Dev] ac_sys_system == Monterey*?

2009-01-24 Thread Eric Smith
s...@pobox.com wrote: From configure.in: # The current (beta) Monterey compiler dies with optimizations # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? case $ac_sys_system in Monterey*) OPT="" ;; esac What is Monterey? C

Re: [Python-Dev] pprint(iterator)

2009-01-29 Thread Eric Smith
Terry Reedy wrote: Ron Adam wrote: Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled __str__ ? Not really. If it were as simple as calling str(obj), there would be no need for the pprint module. I agree. And when I want to use pprint,

Re: [Python-Dev] pprint(iterator)

2009-01-30 Thread Eric Smith
Steven D'Aprano wrote: Eric Smith wrote: Terry Reedy wrote: Ron Adam wrote: Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled __str__ ? Not really. If it were as simple as calling str(obj), there would be no need f

Re: [Python-Dev] Issue 4285 Review

2009-02-03 Thread Eric Smith
Aahz wrote: On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a request like this, it's u

Re: [Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Eric Smith
Calvin Spealman wrote: I would favor this not being constrained. I don't want every use of ** to cause a pattern match to verify each key. I would even be fine without the check for being strings. Define what it should be, but let the implementation be lax. It is no different from any other place

Re: [Python-Dev] Issue 4285 Review

2009-02-05 Thread Eric Smith
Eric Smith wrote: Aahz wrote: On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a

[Python-Dev] regrtest hangs on test_tk_guionly

2009-02-06 Thread Eric Smith
In the trunk, test_tk_guionly hangs if I run it through regrtest. This is on a Fedora Core 6 box, without X installed. If I run test_tk_guionly directly, it exits saying there's no DISPLAY set, which is what I'd expect: --8<-- [trunk]$ ./python Lib/test/test_ttk_guionly.py

Re: [Python-Dev] regrtest hangs on test_tk_guionly

2009-02-06 Thread Eric Smith
Guilherme Polo wrote: On Fri, Feb 6, 2009 at 1:14 PM, Eric Smith wrote: In the trunk, test_tk_guionly test_ttk_guionly, right ? Right, sorry. hangs if I run it through regrtest. This is on a Fedora Core 6 box, without X installed. Does it hang if you run it alone through regrtest, or

[Python-Dev] Fwd: [Python-checkins] devguide: Add Sandro to the list of core developers

2011-08-02 Thread Eric Smith
Speaking of developers.rst, could whoever added Jason Coombs also update developers.rst? I've added Jason to the committers mailing list. Thanks. Eric. Original Message Subject: [Python-checkins] devguide: Add Sandro to the list of core developers Date: Tue, 02 Aug 2011 14:58:38

[Python-Dev] reading multiline output

2011-12-22 Thread Mac Smith
Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and not terminated with \n so i am not able to read it using readline() while the HandBrakeCLI is running. kindly suggest some alternative. i have attached the output in a file. output Description: Binary dat

Re: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py

2012-04-24 Thread Eric Smith
> On Thu, Apr 19, 2012 at 18:56, eric.smith wrote: > >> +Note that an ImportError will no longer be raised for a directory >> +lacking an ``__init__.py`` file. Such a directory will now be imported >> +as a namespace package, whereas in prior Python versions an >> +ImportError would be raised. > >

Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-03 Thread Marcus Smith
> The pip integration is basically to allow pip to find wheels on PyPI > or any local indexes you have, and to install them via the "pip > install" command. it also offers "pip wheel" for building wheels (using bdist_wheel) locally for your requirements, since wheels wouldn't be pervasive on PyPI

Re: [Python-Dev] bdist_* to stdlib?

2006-02-14 Thread Joe Smith
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In private email, Phillip Eby suggested to add these things to the > 2.5. standard library: > > bdist_deb, bdist_msi, and friends > > He explained them as follows: > > """ > bdist_deb makes .deb files (packages for D

Re: [Python-Dev] conditional expressions - add parens?

2006-03-06 Thread Joe Smith
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jim Jewett wrote: >> I think that adding parentheses would help, by at least signalling that >> the logic is longer than just the next (single) expression. >> >> level = (0 if "absolute_import" in self.futures else -

Re: [Python-Dev] conditional expressions - add parens?

2006-03-11 Thread Joe Smith
"Greg Ewing" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jeremy Hylton wrote: >> Perhaps the solution >> is to require parens around all expressions, a simple consistent rule. > > I actually designed a language with that feature once. > It was an exercise in minimality, with har

Re: [Python-Dev] Dropping __init__.py requirement for subpackages

2006-04-26 Thread Joe Smith
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (Context: There's a large crowd with pitchforks and other sharp pointy > farm implements just outside the door of my office at Google. They are > making an unbelievable racket. It appears they are Google engineers >

Re: [Python-Dev] PEP 3102: Keyword-only arguments

2006-04-30 Thread Joe Smith
"Talin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Abstract > > This PEP proposes a change to the way that function arguments are > assigned to named parameter slots. In particular, it enables the > declaration of "keyword-only" arguments: arguments that can only >

Re: [Python-Dev] PEP 3101 Update

2006-05-07 Thread Joe Smith
"Edward Loper" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Talin wrote: >> Braces can be escaped using a backslash: >> >> "My name is {0} :-\{\}".format('Fred') >> >> Which would produce: >> >> "My name is Fred :-{}" > > Do backslashes also need to be

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-07 Thread Chris Smith
> "Guido" == Guido van Rossum <[EMAIL PROTECTED]> writes: Guido> Guido> In a different thread I mentioned a design principle for Guido> which I have no catchy name, but which has often helped me Guido> design better APIs. One way to state it is to say that Guido> instead

Re: [Python-Dev] SourceForge Download Page, Subversion Home Page

2006-01-28 Thread Joe Smith
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You may be aware that Tim Parkin's work on our "next-generation" web > presence has borne fruit in the shape of beta.python.org. While there's > still a lot to be done Tim has given us a great start by creating a > frame

Re: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator

2014-06-26 Thread Gregory P. Smith
+1 on getting this in for 3.5. If the only objection people are having is the stupid paint color of the name I don't care what it's called! scandir matches the libc API of the same name. iterdir also makes sense to anyone reading it. Whoever checks this in can pick one and be done with it. We

Re: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator

2014-06-27 Thread Gregory P. Smith
On Fri, Jun 27, 2014 at 2:58 PM, Nick Coghlan wrote: > > * -1 on including Windows specific globbing support in the API > * -0 on including cross platform globbing support in the initial iteration > of the API (that could be done later as a separate RFE instead) > Agreed. Globbing or filtering s

Re: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator

2014-06-28 Thread Gregory P. Smith
On Jun 28, 2014 12:49 PM, "Ben Hoyt" wrote: > > >> But the underlying system calls -- ``FindFirstFile`` / > >> ``FindNextFile`` on Windows and ``readdir`` on Linux and OS X -- > > > > What about FreeBSD, OpenBSD, NetBSD, Solaris, etc. They don't provide readdir? > > I guess it'd be better to say "

Re: [Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator

2014-06-30 Thread Eric V. Smith
On 6/30/2014 10:17 PM, Nick Coghlan wrote: > > On 30 Jun 2014 19:13, "Glenn Linderman" > wrote: >> >> >> If it is, use ensure_lstat=False, and use the proposed (by me) > .refresh() API to update the data for those that need it. > > I'm -1 on a refresh API for DirE

Re: [Python-Dev] Sad status of Python 3.x buildbots

2014-09-08 Thread Gregory P. Smith
On Wed, Sep 3, 2014 at 2:52 PM, Victor Stinner wrote: > > > ARMv7 3.x: "Read-only file system", Mercurial fails... > > I sent an email to Gregory P. Smith (owner). > For mine, its a case of me not having any monitoring for it. Sending me an email worked. In this ca

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-08 Thread Gregory P. Smith
On Wed, Sep 3, 2014 at 3:48 PM, Stephen J. Turnbull wrote: > Guido van Rossum writes: > > > lot: five years ago (when I worked at Google!) it was common to find > > internal services that required SSL but had a misconfigured certificate, > > and the only way to access those services was to ove

Re: [Python-Dev] bytes & bytearray

2015-01-19 Thread Eric V. Smith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/19/2015 11:36 AM, Ethan Furman wrote: > I was checking the documentation [1] to see where to put the new > information about bytes and bytearray %-formatting, and noticed > that /every/ operation that could modify a bytearray object in > place (e.

Re: [Python-Dev] [Python-checkins] cpython (3.4): Remove the unimplemented but ignored without='-E' parameters being passed to

2015-01-22 Thread Gregory P. Smith
g> wrote: > https://hg.python.org/cpython/rev/7b833bd1f509 > changeset: 94249:7b833bd1f509 > branch: 3.4 > parent: 94247:7f3ac2ce24ed > user:Gregory P. Smith > date:Thu Jan 22 22:04:16 2015 -0800 > summary: > Remove the unimplemented but igno

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Gregory P. Smith
On Fri Jan 23 2015 at 11:20:02 AM M.-A. Lemburg wrote: > On 23.01.2015 19:48, Matthias Klose wrote: > > On 01/23/2015 06:30 PM, Cyd Haselton wrote: > >> Related to my earlier question regarding building Python on Android > >> and an undefined reference to dlopen error...I have the following > >>

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-24 Thread Gregory P. Smith
Why doesn't our Makefile supply that flag with the make parallelism level in the sharedmods step? On Sat Jan 24 2015 at 2:25:45 PM Antoine Pitrou wrote: > On Sat, 24 Jan 2015 21:53:06 +0100 > "M.-A. Lemburg" wrote: > > > > BTW: Parallel execution, cross compilation can be added > > to setup.py.

[Python-Dev] is a new buildbot gps-debian-profile-opt possible?

2015-01-26 Thread Gregory P. Smith
I want this buildbot to run "make profile-opt" instead of "make all" and it'd be best if it could _not_ have --with-pydebug on the ./configure command line. I've got a small VM at the moment with one CPU and 600mb ram so just give it a make -j2 at most to start with. If that is possible, please a

Re: [Python-Dev] PEP 468 (Ordered kwargs)

2015-01-27 Thread Gregory P. Smith
On Tue Jan 27 2015 at 2:13:08 PM Armin Rigo wrote: > Hi all, > > On 24 January 2015 at 11:50, Maciej Fijalkowski wrote: > > I would like to point out that we implemented rhettingers idea in PyPy > > that makes all the dicts ordered by default and we don't have any > > adverse performance effects

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-30 Thread Gregory P. Smith
On Sun Jan 25 2015 at 7:08:53 AM Antoine Pitrou wrote: > On Sun, 25 Jan 2015 05:22:48 + > "Gregory P. Smith" wrote: > > Why doesn't our Makefile supply that flag with the make parallelism level > > in the sharedmods step? > > If I run "mak

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-05 Thread Gregory P. Smith
On Thu Feb 05 2015 at 4:36:30 PM Francis Giraldeau < francis.girald...@gmail.com> wrote: > I need to access frame members from within a signal handler for tracing > purpose. My first attempt to access co_filename was like this (omitting > error checking): > > PyFrameObject *frame = PyEval_GetFram

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-07 Thread Gregory P. Smith
To get at the Python thread state from a signal handler (using 2.7 as a reference here; but i don't believe 3.4 has changed this part much) you need to modify the interpreter to expose pystate.c's "autoTLSkey" and thread.c's "struct key" as well as "keyhead" and "keymutex". >From there, in your si

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-08 Thread Gregory P. Smith
On Sun Feb 08 2015 at 12:21:36 AM Victor Stinner wrote: > > Le 8 févr. 2015 05:39, "Gregory P. Smith" a écrit : > > From there, in your signal handler you must try to acquire the newly > exposed keymutex and (...) > > Stop! Acquiring a lock in a signal handler

Re: [Python-Dev] PEP 471 (scandir): Add a new DirEntry.inode() method?

2015-02-14 Thread Gregory P. Smith
On Sat Feb 14 2015 at 3:17:51 AM Victor Stinner wrote: > 2015-02-14 11:57 GMT+01:00 Victor Stinner : > > I propose something else: a DirEntry.inode read-only property (...) > > Full DirEntry API: > > - name (str) attribute > - path (str) read-only property, created at the first call > - inode (in

Re: [Python-Dev] PEP 471 (scandir): Add a new DirEntry.inode() method?

2015-02-14 Thread Gregory P. Smith
That suggests the .inode() method approach makes more sense then. On Sat, Feb 14, 2015, 12:44 PM Antoine Pitrou wrote: > On Sat, 14 Feb 2015 15:32:07 -0500 > Ben Hoyt wrote: > > > +1 we need to provide the inode (we shouldn't be throwing anything > from the > > > underlying directory entry away

Re: [Python-Dev] TypeError messages

2015-02-20 Thread Eric V. Smith
On 02/20/2015 09:05 AM, Brett Cannon wrote: > Some messages (only in C) truncate actual type name (%.50s, %.80s, > %.200s, %.500s). Should type name be truncated at all and for how limit? > > > I assume this is over some worry of string size blowing out memory > allocation or something? I

[Python-Dev] getstatusoutput()'s behavior changed in 3.3.4 and 3.4

2015-02-24 Thread Gregory P. Smith
While porting some code from 2.7 to 3.4 I discovered that command.getstatusoutput() (renamed to subprocess.getstatusoutput() in 3.x) had changed. Surprise! The code was working under an earlier version of 3.3 but broke when I ran it on 3.4. Nowhere was this documented that I could find. Tracking

[Python-Dev] how to inspect if something includes a bound first param

2015-02-24 Thread Gregory P. Smith
inspect.getargspec(method) and inspect.signature(method) both include the 'self' parameter but how are we to figure out from method itself that it is actually bound and that its first parameter is expected to be a bound instance? So far I've come up with: *inspect.ismethod(method) or inspect.isme

Re: [Python-Dev] how to inspect if something includes a bound first param

2015-02-24 Thread Eric V. Smith
On 2/24/2015 8:56 PM, Gregory P. Smith wrote: > inspect.getargspec(method) and inspect.signature(method) both include > the 'self' parameter but how are we to figure out from method itself > that it is actually bound and that its first parameter is expected to be > a bound

Re: [Python-Dev] Working on issue 23496: should I use a macro test or an edit to configure.ac?

2015-02-26 Thread Ryan Smith-Roberts
I'm not an official cpython developer but ifdef __ANDROID__ is quite in line with other per-platform support (__FreeBSD__, __linux__, etc), as well as already being in use in Modules/_posixsubprocess.c. Is __ANDROID__ not being defined when it should be? On Thu, Feb 26, 2015 at 4:20 PM, Ryan Gonza

Re: [Python-Dev] Working on issue 23496: should I use a macro test or an edit to configure.ac?

2015-02-26 Thread Ryan Smith-Roberts
On Thu, Feb 26, 2015 at 5:13 PM, Ryan Smith-Roberts wrote: > I'm not an official cpython developer but ifdef __ANDROID__ is quite in line > with other per-platform support (__FreeBSD__, __linux__, etc), as well as > already being in use in Modules/_posixsubprocess.c. Is __ANDRO

Re: [Python-Dev] Tunning binary insertion sort algorithm in Timsort.

2015-03-09 Thread Ryan Smith-Roberts
I suspect that you will find the Python community extremely conservative about any changes to its sorting algorithm, given that it took thirteen years and some really impressive automated verification software to find this bug: http://envisage-project.eu/proving-android-java-and-python-sorting-alg

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Eric V. Smith
On 3/12/2015 10:00 AM, Antoine Pitrou wrote: > On Thu, 12 Mar 2015 12:37:16 + > "Loevborg, Soeren Jakob" wrote: >> > import ipaddress > ipaddress.IPv4Interface('10.0.0.1/8') + 1 >> IPv4Interface('10.0.0.2/32') > ipaddress.IPv6Interface('fd00::1/64') + 1 >> IPv6Interface('fd00::2/12

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Eric V. Smith
On 3/12/2015 2:17 PM, Antoine Pitrou wrote: > On Thu, 12 Mar 2015 14:08:01 -0400 > Scott Dial wrote: > >> On 2015-03-12 10:46 AM, Eric V. Smith wrote: >>> On 3/12/2015 10:00 AM, Antoine Pitrou wrote: >>>> Related issue: >>>> >>>>>&g

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-14 Thread Eric V. Smith
On 3/14/2015 7:04 AM, francis wrote: > Hi, >> I, too, was thinking /24. I think that overflowing the host portion >> should raise OverflowError. >> > Just curiosity, why not a modulo calculation on the subnet instead > of raising the error? Personally, I can't imaging wanting that behavior. I can'

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-14 Thread Eric V. Smith
On 3/14/2015 4:52 PM, Eric V. Smith wrote: > On 3/14/2015 7:04 AM, francis wrote: >> Hi, >>> I, too, was thinking /24. I think that overflowing the host portion >>> should raise OverflowError. >>> >> Just curiosity, why not a modulo calculation on

Re: [Python-Dev] Use ptyhon -s as default shbang for system python executables/daemons

2015-03-23 Thread Gregory P. Smith
On Wed, Mar 18, 2015 at 9:48 AM Barry Warsaw wrote: > On Mar 18, 2015, at 05:31 PM, Victor Stinner wrote: > > >Does it work to pass command line options to Python in the shebang? > > Yes, but only one "word", thus -Es or -I. > > We've often mused about whether it makes sense to have two Pythons o

[Python-Dev] Keyword-only parameters

2015-04-14 Thread Eric V. Smith
I'm working on adding a numeric_owner parameter to some tarfile methods (http://bugs.python.org/issue23193), In a review, Berker suggested making the parameter keyword-only. I agree that you'd likely never want to pass just "True", but that "numeric_owner=True" would be a better usage. But, I don

Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Eric V. Smith
On 04/14/2015 02:11 PM, Zachary Ware wrote: > On Tue, Apr 14, 2015 at 1:06 PM, Steven D'Aprano wrote: >> On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote: >>> But, I don't see a lot of keyword-only parameters being added to stdlib >>> code. Is th

Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Gregory P. Smith
era and maintaining compatibility with them is desirable for 2AND3 compatible code. But for new things, feel free. -gps > On 4/14/2015 13:40, Eric V. Smith wrote: > > I'm working on adding a numeric_owner parameter to some tarfile methods > > (http://bugs.python.org/issue23193

Re: [Python-Dev] Summary of Python tracker Issues

2015-04-17 Thread Eric V. Smith
Thank you, David, for all of your work. It's much appreciated. -- Eric. > On Apr 17, 2015, at 7:18 PM, R. David Murray wrote: > >> On Fri, 17 Apr 2015 18:08:24 +0200, Python tracker >> wrote: >> >> ACTIVITY SUMMARY (2015-04-10 - 2015-04-17) >> Python tracker at http://bugs.python.org/ >> >

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2015-04-21 Thread Gregory P. Smith
On Mon, Apr 20, 2015 at 6:55 AM Barry Warsaw wrote: > On Apr 19, 2015, at 01:19 AM, Larry Hastings wrote: > > >We should rename "types" to "accept". "accept" should takes a set of > types; > >these types specify the types of Python objects the Clinic parameter > should > >accept. For the funny

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Gregory P. Smith
On Tue, Apr 21, 2015 at 12:50 AM Antoine Pitrou wrote: > On Mon, 20 Apr 2015 20:43:38 -0400 > "R. David Murray" wrote: > > +1 to this from me too. I'm afraid that means I'm -1 on the PEP. > > > > I didn't write this in my earlier email because I wasn't sure about it, > > but my gut reaction afte

Re: [Python-Dev] Python 3.x Adoption for PyPI and PyPI Download Numbers

2015-04-21 Thread Gregory P. Smith
On Tue, Apr 21, 2015 at 10:55 AM Donald Stufft wrote: > Just thought I'd share this since it shows how what people are using to > download things from PyPI have changed over the past year. Of particular > interest to most people will be the final graphs showing what percentage of > downloads from

Re: [Python-Dev] [Python-checkins] cpython: Issue #24064: Property() docstrings are now writeable.

2015-05-13 Thread Eric V. Smith
On 5/13/2015 4:10 AM, raymond.hettinger wrote: > https://hg.python.org/cpython/rev/1e8a768fa0a5 > changeset: 96010:1e8a768fa0a5 > user:Raymond Hettinger > date:Wed May 13 01:09:59 2015 -0700 > summary: > Issue #24064: Property() docstrings are now writeable. > (Patch by Berker

Re: [Python-Dev] PEP 552: deterministic pycs

2017-09-07 Thread Gregory P. Smith
+1 on this PEP. The TL;DR summary of this PEP: The pyc date+length metadata check was a convenient hack. It still works well for many people and use cases, it isn't going away. PEP 552 proposes a new alternate hack that relies on file contents instead of os and filesystem date metadata. A

[Python-Dev] PEP 557: Data Classes

2017-09-08 Thread Eric V. Smith
I've written a PEP for what might be thought of as "mutable namedtuples with defaults, but not inheriting tuple's behavior" (a mouthful, but it sounded simpler when I first thought of it). It's heavily influenced by the attrs project. It uses PEP 526 type annotations to define fields. From the

Re: [Python-Dev] PEP 557: Data Classes

2017-09-08 Thread Eric V. Smith
Oops, I forgot the link. It should show up shortly at https://www.python.org/dev/peps/pep-0557/. Eric. On 9/8/17 7:57 AM, Eric V. Smith wrote: I've written a PEP for what might be thought of as "mutable namedtuples with defaults, but not inheriting tuple's behavior"

Re: [Python-Dev] PEP 557: Data Classes

2017-09-08 Thread Eric V. Smith
Hah! Thanks for the catch. There is no C in my happy place. -- Eric. > On Sep 8, 2017, at 8:52 AM, Paul Moore wrote: > >> On 8 September 2017 at 15:57, Eric V. Smith wrote: >> I've written a PEP for what might be thought of as "mutable namedtuples with >

Re: [Python-Dev] PEP 557: Data Classes

2017-09-08 Thread Eric V. Smith
On 9/8/17 9:07 AM, Eric V. Smith wrote: Hah! Thanks for the catch. I've pushed a fix to the PEP repo, it should show up online shortly. Eric. There is no C in my happy place. -- Eric. On Sep 8, 2017, at 8:52 AM, Paul Moore wrote: On 8 September 2017 at 15:57, Eric V. Smith

Re: [Python-Dev] PEP 556: Threaded garbage collection

2017-09-08 Thread Gregory P. Smith
On Fri, Sep 8, 2017 at 12:52 PM Antoine Pitrou wrote: > On Fri, 8 Sep 2017 12:40:34 -0700 > Nathaniel Smith wrote: > > > > PyPy just abandons everything when shutting down, instead of running > > finalizers. See the last paragraph of : > > &

Re: [Python-Dev] PEP 557: Data Classes

2017-09-08 Thread Eric V. Smith
On 9/8/17 3:20 PM, Mike Miller wrote: On 2017-09-08 07:57, Eric V. Smith wrote: I've written a PEP for… Apologies for the following list dumb questions and bikesheds: - 'Classes can be thought of as "mutable namedtuples with defaults".' - A C/C++ (struct)

Re: [Python-Dev] PEP 557: Data Classes

2017-09-09 Thread Eric V. Smith
On 9/9/2017 11:41 AM, Gustavo Carneiro wrote: Hi, it is not clear whether anything is done to total_cost:     def total_cost(self) -> float: Does this become a property automatically, or is it still a method call?  To that end, some examples of *using* a data class, not just defining one, wo

Re: [Python-Dev] PEP 557: Data Classes

2017-09-10 Thread Eric V. Smith
On 9/10/2017 10:00 AM, Michel Desmoulin wrote: The reaction is overwhelmingly positive everywhere: hacker news, reddit, twitter. Do you have a pointer to the Hacker News discussion? I missed it. People have been expecting something like that for a long time. Me, too! 3 questions: - is pr

Re: [Python-Dev] PEP 557: Data Classes

2017-09-10 Thread Eric V. Smith
On 9/8/2017 11:01 AM, Eric V. Smith wrote: Oops, I forgot the link. It should show up shortly at https://www.python.org/dev/peps/pep-0557/. And now I've pushed a version that works with Python 3.6 to PyPI at https://pypi.python.org/pypi/dataclasses It implements the PEP as it curr

<    4   5   6   7   8   9   10   11   12   13   >