Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-07 Thread Benjamin Peterson
trying to adapt the implementation for Cython, which > has a different generator type implementation but otherwise uses more or > less the same code now. But I'm not sure how to fix this one without major > changes to the implementation Cython's or CPython&#x

Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-07 Thread Benjamin Peterson
2012/3/7 Benjamin Peterson : > 2012/3/7 Stefan Behnel : >> The problem is in steps 5) and 6), which are handled by g1 at the wrong >> call level. They shouldn't lead to undelegation and termination in g1, just >> to an exception being raised in g2. > > That

Re: [Python-Dev] Non-string keys in type dict

2012-03-07 Thread Benjamin Peterson
2012/3/7 Victor Stinner : > So my question is: what is the use case of such dict? Why do we still > support it? Probably a side-effect of implementation. > Can't we simply raise an error if the dict contains > non-string keys? Sounds okay to me. --

Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-08 Thread Benjamin Peterson
2012/3/8 Stefan Behnel : > Would that be acceptable for CPython as well or would you prefer full > fledged normalisation? I think we have to normalize for correctness. Consider that it may be some StopIteration subclass which set "value" on construction. -- R

Re: [Python-Dev] problem with recursive "yield from" delegation

2012-03-08 Thread Benjamin Peterson
2012/3/8 Antoine Pitrou : > On Thu, 8 Mar 2012 14:36:06 -0600 > Benjamin Peterson wrote: >> 2012/3/8 Stefan Behnel : >> > Would that be acceptable for CPython as well or would you prefer full >> > fledged normalisation? >> >> I think we have to normaliz

Re: [Python-Dev] Testsuite dependency on _testcapi

2012-03-09 Thread Benjamin Peterson
test.support.import_module() for _testcapi and a 'needs_testcapi' skipping > decorator? Sounds fine to me. Post a patch. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyt

Re: [Python-Dev] cpython: PEP 417: Adding unittest.mock

2012-03-14 Thread Benjamin Peterson
s to include the full documentation instead Yes, please do. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ar

Re: [Python-Dev] cpython (3.1): - rename configure.in to configure.ac

2012-03-15 Thread Benjamin Peterson
es up to 2.13 have the .in extension, autoconf files for 2.50 >> and >> newer the .ac extension.  This is a no change, except for having >> autoconf2.13 >> installed, and the autoconf then failing. > > > Not sure it belongs in 3.1 though. I told him he could chang

Re: [Python-Dev] What letter should an UnsignedLongLong get

2012-03-15 Thread Benjamin Peterson
mbers) that errrors if the number has more > than the correct number of bits. > > I am thinking to use the letter 'N' for this purpose, since l,k,K,U,u are > all taken. Unfortunately, the would conflict with Py_BuildValue's 'N'. -- Regards, Benjamin ___

Re: [Python-Dev] What letter should an UnsignedLongLong get

2012-03-15 Thread Benjamin Peterson
r 15, 2012 at 11:49 AM, Benjamin Peterson > wrote: >> >> 2012/3/15 Gil Colgate : >> > We use a lot of UnsignedLongLongs in our program (ids) and have been >> > parsing >> > in PyArg_ParseTuple with 'K', which does not do error checking. >

Re: [Python-Dev] What letter should an UnsignedLongLong get

2012-03-15 Thread Benjamin Peterson
2012/3/15 Gil Colgate : > How about 'G'? (Giant, or perhaps gynormous, integer?) > > > Then I could also map 'g' to the signed version (same as L) for consistency. Sounds okay to me. -- Regards, Benjamin ___ Py

[Python-Dev] [RELEASED] Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-03-18 Thread Benjamin Peterson
ses/3.1.5/ http://python.org/download/releases/3.2.3/ Please test these candidates and report bugs to http://bugs.python.org/ With regards, The Python release team Barry Warsaw (2.6), Georg Brandl (3.2), Benjamin Peterson (2.7 and 3.1) [1] http://www.ocert.org/advisories/ocert-2

Re: [Python-Dev] [Python-checkins] cpython (2.7): Fixes Issue 14234: fix for the previous commit, keep compilation when

2012-03-19 Thread Benjamin Peterson
2012/3/19 Jim Jewett : > Does this mean that if Python is updated before expat, python will > compile out the expat randomization, and therefore not use if even > after expat is updated? If you're using --with-system-expat -- Reg

Re: [Python-Dev] [Python-checkins] cpython: Issue #14328: Add keyword-only parameters to PyArg_ParseTupleAndKeywords.

2012-03-20 Thread Benjamin Peterson
g.rst         |   9 +++ >  Lib/test/test_getargs2.py |  74 ++- >  Modules/_testcapimodule.c |  20 ++- >  Python/getargs.c          |  34 - >  4 files changed, 134 insertions(+), 3 deletions(-) Forgot about Misc/NEWS? -- Regards, Benjamin ___

Re: [Python-Dev] Integrating the PEP 397 launcher

2012-03-29 Thread Benjamin Peterson
s. So...does this even > need to continue the PEP process? If you have a PEP and it's accepted, what would be the difference? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyth

Re: [Python-Dev] Integrating the PEP 397 launcher

2012-03-29 Thread Benjamin Peterson
2012/3/29 Brian Curtin : > On Thu, Mar 29, 2012 at 17:45, Benjamin Peterson wrote: >> 2012/3/29 Brian Curtin : >>> After talking with Martin and several others during the language >>> summit and elsewhere around PyCon, PEP 397 should be accepted. I don't >>

Re: [Python-Dev] [Python-checkins] cpython: Issue #14065: Added cyclic GC support to ET.Element

2012-03-30 Thread Benjamin Peterson
> +        gc.collect() support.gc_collect() is preferable > +        self.assertEqual(fl, [1]) > + > +        # A longer cycle: lst->e->e2->lst > +        fl = [] > +        e = ET.Element('joe') > +        lst = [ShowGC(fl), e] > +        e2 = ET.S

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-31 Thread Benjamin Peterson
2012/3/31 Guido van Rossum : > Try reducing sys.setcheckinterval(). setcheckinterval() is a no-op since the New-GIL. sys.setswitchinterval has superseded it. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org h

Re: [Python-Dev] Pep 393 and debugging

2012-04-06 Thread Benjamin Peterson
gin? It should repr these things for you. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP-419: Protecting cleanup statements from interruptions

2012-04-08 Thread Benjamin Peterson
t as their sole argument, so that > they can figure out where they are called from. Calling a function every time you leave a finally block? Isn't that a bit expensive? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org htt

Re: [Python-Dev] Change to yield-from implementation

2012-04-09 Thread Benjamin Peterson
ectness is more important that performance, though. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] [RELEASED] Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-04-11 Thread Benjamin Peterson
3.2.3/ As always, please report bugs to http://bugs.python.org/ Happy-to-put-hash-attack-issues-behind-them-ly yours, The Python release team Barry Warsaw (2.6), Georg Brandl (3.2), and Benjamin Peterson (2.7 and 3.1) [1] http://www.ocert.org/advisories/ocert-2011-003.ht

Re: [Python-Dev] __hash__ documentation

2012-04-18 Thread Benjamin Peterson
f anything interesting has popped up or, for the insane, subscribes to python-bugs. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailm

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-23 Thread Benjamin Peterson
gt; of declaring a function or datum to be part of the API, but their usage > seems to be more to do with linkage. They define linkage on Windows. I actually don't know if they should be applied to internal functions. -- Regards, Benjamin ___ Pyth

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Benjamin Peterson
ouldn't impact the language semantics. > > dict.__getitem__ is a slot wrapper; dict.__getitem__ is not. > str.__getitem__ is a slot wrapper; list.__getitem__ is not. > If any of these change then the semantics of the language changes. -- Regards, Benjamin __

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Benjamin Peterson
: HTMLParser can now parse correctly start tags that contain >> +  a bare '/'. >> + > > I think that's misleading: there's no way to "correctly" parse malformed HTML. There is in the since that you can follow the HTML5 algorithm, which can "p

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Benjamin Peterson
2012/4/24 Benjamin Peterson : > There is in the since This is confusing, since I meant "sense". -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsub

Re: [Python-Dev] [Python-checkins] cpython: Close #10142: Support for SEEK_HOLE/SEEK_DATA

2012-04-26 Thread Benjamin Peterson
erating systems may support" is better. (They applies to other parts in the docs, too.) > +      :data:`os.SEEK_HOLE` or :data:`os.SEEK_DATA`. > + Since we're explicitly listing which ones we support, it would be nice to explain what they do. -- Regards, Benjamin ___

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-28 Thread Benjamin Peterson
) > > The fix for the import system is similarly trivial: call > os.path.abspath when calculating __file__ (just as runpy now does and > the import emulation in pkgutil always has). I thought __file__ was required to be absolute in Python 3. -- Regards, Benjamin

[Python-Dev] time.clock_info() field names

2012-04-29 Thread Benjamin Peterson
Hi, I see PEP 418 gives time.clock_info() two boolean fields named "is_monotonic" and "is_adjusted". I think the "is_" is unnecessary and a bit ugly, and they could just be renamed "monotonic" and "adjusted". Thoughts? -- Regards, Benjamin

Re: [Python-Dev] time.clock_info() field names

2012-04-29 Thread Benjamin Peterson
2012/4/29 Jim J. Jewett : > > > In http://mail.python.org/pipermail/python-dev/2012-April/119134.html > Benjamin Peterson wrote: > >> I see PEP 418 gives time.clock_info() two boolean fields named >> "is_monotonic" and "is_adjusted". I think the &

Re: [Python-Dev] time.clock_info() field names

2012-05-01 Thread Benjamin Peterson
I've now renamed "is_monotonic" to "monotonic" and "is_adjusted" to "adjusted". 2012/4/29 Benjamin Peterson : > Hi, > I see PEP 418 gives time.clock_info() two boolean fields named > "is_monotonic" and "is_adjusted".

Re: [Python-Dev] Open PEPs and large-scale changes for 3.3

2012-05-01 Thread Benjamin Peterson
2012/5/1 Eli Bendersky : > Will this package go through the provisional state mandated by PEP 411 ? I don't see PEP 411 requiring any module to go through its process. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] [Python-checkins] cpython: unicode_writer: add finish() method and assertions to write_str() method

2012-05-03 Thread Benjamin Peterson
2012/5/3 victor.stinner : >  Py_LOCAL_INLINE(void) Do these have to be marked inline? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

Re: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.

2012-05-03 Thread Benjamin Peterson
     && (_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 1), Put && on previous line like Python. > +                    &(ua->mtime_s), &(ua->mtime_ns)) != -1); > +    } > + > +    if (ns) { > +        if (!PyTuple_CheckExact(ns) || (PyTuple_Size(ns)

Re: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.

2012-05-04 Thread Benjamin Peterson
ce example: if (type->tp_dictoffset != 0 && base->tp_dictoffset == 0 && type->tp_dictoffset == b_size && (size_t)t_size == b_size + sizeof(PyObject *)) return 0; /* "Forgive" adding a __dict__ only */ There&#

Re: [Python-Dev] [Python-checkins] cpython: avoid unitialized memory

2012-05-04 Thread Benjamin Peterson
2012/5/4 Eric V. Smith : > On 5/4/2012 1:14 AM, benjamin.peterson wrote: >> http://hg.python.org/cpython/rev/b0deafca6c02 >> changeset:   76743:b0deafca6c02 >> user:        Benjamin Peterson >> date:        Fri May 04 01:14:03 2012 -0400 >> summary: >>

Re: [Python-Dev] [Python-checkins] cpython: Issue #14705: Add 'p' format character to PyArg_ParseTuple* for bool support.

2012-05-05 Thread Benjamin Peterson
support. > > files: >  Doc/c-api/arg.rst         |   9 +++ >  Lib/test/test_getargs2.py |  31 +++ >  Modules/_testcapimodule.c |  10 >  Python/getargs.c          |  12 ++ >  4 files changed, 62 insertions(+), 0 deletions(-

Re: [Python-Dev] [Python-checkins] cpython: Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.)

2012-05-05 Thread Benjamin Peterson
; > files: >  Modules/posixmodule.c |  372 +++-- Um? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] Adding types.build_class for 3.3

2012-05-07 Thread Benjamin Peterson
d out that all the types could be extracted in Python. :) Maybe you could make it a static or class method of type? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscrib

Re: [Python-Dev] Accepting PEP 415 (alternative implementation strategy for PEP 409's "raise exc from None" syntax)

2012-05-14 Thread Benjamin Peterson
e implementation. >> >> I'm glad to see this PEP get accepted.  I have just minor quibbles :). >> >> Can you or Benjamin improve the title of the PEP?  It's already difficult >> enough to keep the mappings of PEP numbers to subjects in your head, even f

Re: [Python-Dev] docs.python.org pointing to Python 3 by default?

2012-05-18 Thread Benjamin Peterson
2012/5/18 Barry Warsaw : > At what point should we cut over docs.python.org to point to the Python 3 > documentation by default?  Wouldn't this be an easy bit to flip in order to > promote Python 3 more better? Perhaps on the occasion on the release on Python 3.3? -- Reg

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Benjamin Peterson
ng class. I don't understand why PEP 3135 cares how it's implemented. It's silly enough that you can get the class by "using" super (even just referencing the name). Thus that you can get __class__ reeks of more an implementation detail than a

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Benjamin Peterson
2012/5/20 Calvin Spealman : > On Sun, May 20, 2012 at 4:28 PM, Benjamin Peterson > wrote: >> 2012/5/20 Nick Coghlan : >>> PEP 3135 defines the new zero-argument form of super() as implicitly >>> equivalent to super(__class__, ), and up until 3.2 has >>&g

Re: [Python-Dev] docs.python.org pointing to Python 3 by default?

2012-05-20 Thread Benjamin Peterson
m everything else on python.org), but having multiple docs > subdomains is completely unnecessary when we already have directory > based versioning. > > Namespaces are a great idea, let's do more of those :) A subdomain isn't a namespace? -- Regards, Benjamin _

Re: [Python-Dev] doc change for weakref

2012-05-25 Thread Benjamin Peterson
2012/5/25 Ethan Furman : > I'd like to make a slight doc change for weakref to state (more or less): > >   weakrefs are not invalidated when the strong refs >   are gone, but rather when garbage collection >   reclaims the object I think this is fine. -

Re: [Python-Dev] Hacking on the compiler in ways that break the frozen instance of importlib...

2012-05-27 Thread Benjamin Peterson
ah, be warned that you're in for some fun > when tinkering with any construct used by importlib._bootstrap and end > up doing something that involves changing the PYC magic number. Nasty! Perhaps freeze_importlib.py could be rewritten in C, so importlib could be recompiled when the compiler cha

Re: [Python-Dev] a new type for sys.implementation

2012-05-31 Thread Benjamin Peterson
apping issues (e.g. that's > why both _structseq and collections.namedtuple exist). sys.implementation could be added by site or some other startup file. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] [Python-checkins] Daily reference leaks (d9b7399d9e45): sum=462

2012-06-02 Thread Benjamin Peterson
2012/6/2 : > results for d9b7399d9e45 on branch "default" > > > test_smtplib leaked [154, 154, 154] references, sum=462 Can other people reproduce this one? I can't. -- Regards, Benjamin ___

Re: [Python-Dev] JITted regex engine from pypy

2012-06-03 Thread Benjamin Peterson
ng requested features especially with respect to Unicode. That it's faster is only windfall. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.or

Re: [Python-Dev] Updated PEP 362 (Function Signature Object)

2012-06-10 Thread Benjamin Peterson
sult in the parameter being ignored, >     or in NotImplementedError being raised.  It is intended that >     all conditions where ``is_implemented`` may be False be >     thoroughly documented. -- Regards, Benjamin ___ Python-Dev mailin

Re: [Python-Dev] Updated PEP 362 (Function Signature Object)

2012-06-10 Thread Benjamin Peterson
2012/6/10 Larry Hastings : > Can you make a more concrete suggestion?  "type" strikes me as a poor choice > of name, as it makes one think immediately of type(), which is another, uh, > variety of "type". kind -> "position" or "keword_only&

Re: [Python-Dev] Updated PEP 362 (Function Signature Object)

2012-06-10 Thread Benjamin Peterson
g 4 names is any harder than remember four attributes. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
;> >> +1 if this change is made. > > How about adding 'kind' and keeping 'is_*' attributes, > but making them read-only dynamic properties, i.e.: > >   class Parameter: >       ... > >       @property >       def is_vararg(self): >           ret

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
now that a string cannot be both all-upper and all-lower at the same > time; likewise we know a variable cannot be both positional and kwargs. This is much less clear cut as there's no clause in the Unicode standard saying (!islower() or !isupper()) must be true. -- Regards, Benjamin __

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
time is much less obvious to most people. > > Is it obvious to most people? No. Is it obvious to most users of this > functionality? I would expect so. This isn't some implementation > detail, this is a characteristic of python parameters. If you don't > understand it, you are p

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
flates the name of the parameter with what it does. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
s internally) > > The level of abbreviation used also seems unnecessary and internally > inconsistent. > > My proposal: > POSITIONAL- positional only > NAMED_POSITIONAL - normal parameter Probably POSITIONAL should be the normal one, and there should be ONLY_

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
all parameters (whatever exactly that means) is not a very common case for a function, so I don't see what it needs to pollute a signature object for every Python function. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Benjamin Peterson
d it's more granular than a parameter being "implemented" or not. A parameter may have a more restricted or extended meaning on different operating systems. (sendfile() on files for example). -- Regards, Benjamin ___ Python-Dev mailing list Py

Re: [Python-Dev] PEP 362 Third Revision

2012-06-15 Thread Benjamin Peterson
ific. Exactly! It's too context sensitive to belong on a generic signature object. Without is_implemented, all the properties of the signature object should only change if you alter the parameter list. How a parameter is dealt with in the function should not affect the signature o

Re: [Python-Dev] PEP 362 Third Revision

2012-06-15 Thread Benjamin Peterson
x27;) is true. > > Q: Can I use the fd parameter to os.utime? > A: Only if sysconfig.get_config_var('HAVE_FUTIMENS') or > sysconfig.get_config_var('HAVE_FUTIMES') is true. > > I feel this interface lacks civility. Ther

Re: [Python-Dev] PEP 362 Third Revision

2012-06-15 Thread Benjamin Peterson
rt it. Then you could do things like "chown" in os.supports_at_variant -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] Status of packaging in 3.3

2012-06-21 Thread Oscar Benjamin
On 21 June 2012 12:48, Chris McDonough wrote: > On 06/21/2012 04:45 AM, Nick Coghlan wrote: > >> On Thu, Jun 21, 2012 at 2:44 PM, Chris McDonough >> wrote: >> >>> All of these are really pretty minor issues compared with the main >>> benefit >>> of not needing to ship everything with everything

Re: [Python-Dev] Problem with hg hook for devguide repo?

2012-07-06 Thread Benjamin Peterson
hook exited with status 127 Yes, this is because hg was migrated to OSUL. This is being discussed on the infrastructure list. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Un

Re: [Python-Dev] PEP 0424: A method for exposing a length hint

2012-07-14 Thread Benjamin Peterson
_hint__``, like ``builtins.len`` calls ``__len__``. Let's try to keep this as limited as possible for a public API. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 0424: A method for exposing a length hint

2012-07-14 Thread Benjamin Peterson
2012/7/14 Alex Gaynor : > > > On Sat, Jul 14, 2012 at 4:18 PM, Benjamin Peterson > wrote: >> >> 2012/7/14 Alex Gaynor : >> > >> > Proposal >> > >> > >> > This PEP proposes formally documenting ``__length_hint__`` fo

[Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread Oscar Benjamin
On 22 July 2012 14:08, R. David Murray wrote: > On Sun, 22 Jul 2012 11:21:38 +0300, anatoly techtonik > wrote: > > http://docs.python.org/py3k/howto/pyporting.html#during-installation > > > > What's the point in making implicit Python 3 check here: > > try: # Python 3 > > from distutils.comma

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-22 Thread Oscar Benjamin
On 22 July 2012 20:57, R. David Murray wrote: > Benjamin sent me this message separately(*) privately and I responded > privately. Here is my response. > (*) or his mailer did > I think I accidentally replied from my work email address (which is not subscribed to python-dev) and s

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-23 Thread Oscar Benjamin
On 23 July 2012 23:27, Éric Araujo wrote: > On 22/07/2012 15:57, R. David Murray wrote: > >> I'm not familiar with distutils, really, so you could be right about >> what it is important to test. I was commenting based on the code >> snippet presented, which just deciding which "build" object to

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Oscar Benjamin
On Jul 24, 2012 10:32 AM, "Terry Reedy" wrote: > > On 7/24/2012 12:44 AM, anatoly techtonik wrote: > >> Python 3 check explicitly tells the reader that 2to3 should only be >> used in Python 3. Otherwise everybody need to guess when this *_2to3 >> tools are triggered. As for me, I see no technical

Re: [Python-Dev] feature freeze questions

2012-07-25 Thread Benjamin Peterson
27;t make them less stable. > > (3) What types of documentation changes are allowed during feature > freeze? For example, are we only allowed to fix incorrect > information, or is it acceptable to improve or add to the information > about existing functionality? All documenta

Re: [Python-Dev] 2.7 releases

2012-07-27 Thread Benjamin Peterson
2012/7/26 Thomas Heller : > Will there be more 2.7 bugfix releases, and when the next one? Probably late fall or early 2013. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-Dev] Issue 15295: New import documentation

2012-07-27 Thread Benjamin Peterson
.org/issue15295 > > I now have a first draft of the new import machinery documentation. That's great! Thanks a lot for doing this. It is desparately in need of documentation. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] Requesting pronouncement on PEP 0424

2012-07-28 Thread Benjamin Peterson
2012/7/28 Guido van Rossum : > Looks good to me, so accepted. > > But why isn't it visible on python.org/dev/peps/ yet? The rebuilding hook is broken. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://m

Re: [Python-Dev] yield from, user defined iterators, and StopIteration w/ a value...

2012-08-06 Thread Benjamin Peterson
doing "(*iter->ob_type->tp_iternext)(iter);" > directly and avoid the error checking code? Or am I wrong and this is the > intended behavior? This is probably the simpliest fix. In C, returning NULL from __next__ with no exception set is shorthand for StopIteration. -- Regar

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Benjamin Peterson
; (excepting variadic ones). I'm certainly open to suggestions. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Benjamin Peterson
Traceback (most recent call last): File "", line 1, in TypeError: f() missing 2 required positional arguments: 'a' and 'b' >>> f(1, 2, 3, 4) Traceback (most recent call last): File "", line 1,

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Oscar Benjamin
On 20 September 2012 16:14, Benjamin Peterson wrote: > 2012/9/20 Mark Dickinson : > > And excepting optional ones, too, right? E.g., the c in > > > > def foo(a, b, c=1, *args, d): > > pass > > > > can be passed to by position, but isn't &

Re: [Python-Dev] Memoryviews should expose the underlying memory address

2012-09-20 Thread Benjamin Peterson
er into functions you've dynamically compiled using libraries such as > LLVM-py. There might be other kinds of applications, but just having that > one bit of extra information available would be useful for various advanced > programming techniques involving

Re: [Python-Dev] Memoryviews should expose the underlying memory address

2012-09-20 Thread Benjamin Peterson
2012/9/20 David Beazley : > How? I must be missing something very obvious. If you have some ctypes function that requires a pointer and you pass a memoryview, ctypes should pass the pointer to the raw memory, right? -- Regards, Benjamin ___ Pyt

Re: [Python-Dev] [Python-checkins] cpython: don't depend on __debug__ because it's baked in at freeze time (issue #16046)

2012-09-25 Thread Benjamin Peterson
> s/bool(sys.flags.optimize)/"not sys.flags.optimize"/? > > It may be better to just rephrase this sentence entirely to better > account for the fact that we're now checking the runtime > sys.flags.optimize value rather than the compile time __debug__ va

[Python-Dev] buildbot with -O

2012-09-26 Thread Benjamin Peterson
In light of issue #16046, I think it would be helpful to have a buildbot running the testsuite with -O enabled. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] buildbot with -O

2012-09-26 Thread Benjamin Peterson
2012/9/26 Maciej Fijalkowski : > On Thu, Sep 27, 2012 at 1:00 AM, Benjamin Peterson > wrote: >> In light of issue #16046, I think it would be helpful to have a >> buildbot running the testsuite with -O enabled. > > How about deprecating -O completely instead? It doe

Re: [Python-Dev] str.format bug again

2012-09-29 Thread Benjamin Peterson
d be great if someone could just give it a > thumbs up or down (or say what needs to be changed, or whatever). It seems like Eric Smith is the one needs to make a decision. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Stdlib and timezones, again

2012-09-30 Thread Benjamin Peterson
obscure enough scripts that not many notice. :) -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Bootstrap issue: "select" is compiled "too late"

2012-10-04 Thread Benjamin Peterson
2012/10/4 Jesus Cea : > Any suggestion about how to solve this? Easy solutions include somehow removing the dependence on subprocess or moving the import of subprocess into the function that uses it. -- Regards, Benjamin ___ Python-Dev mailing l

Re: [Python-Dev] Split unicodeobject.c into subfiles?

2012-10-04 Thread Benjamin Peterson
2012/10/4 Victor Stinner : > I only see one argument against such refactoring: it will be harder to > backport/forwardport bugfixes. I imagine it could also prevent inlining of hot paths. -- Regards, Benjamin ___ Python-Dev mailing list Pyth

Re: [Python-Dev] Split unicodeobject.c into subfiles?

2012-10-04 Thread Benjamin Peterson
2012/10/4 Victor Stinner : > 2012/10/4 Benjamin Peterson : >> 2012/10/4 Victor Stinner : >>> I only see one argument against such refactoring: it will be harder to >>> backport/forwardport bugfixes. >> >> I imagine it could also prevent inlining of ho

Re: [Python-Dev] Split unicodeobject.c into subfiles?

2012-10-04 Thread Benjamin Peterson
> If new files are created using "hg cp unicodeobject.c > unicode/newfile.c", the historic is kept. Yes, but you can only create one file that way. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://

Re: [Python-Dev] Split unicodeobject.c into subfiles?

2012-10-04 Thread Benjamin Peterson
t to do that can be done easier if it's multiple >> files? > > Navigate, basically. That is, switch between different pieces of code, > without having to type in some text to search for. I find it's only possible to navigate without searching for extremely small files. -- Re

Re: [Python-Dev] Split unicodeobject.c into subfiles?

2012-10-07 Thread Benjamin Peterson
declared at the top of the file. Having separate files doesn't alleviate this, though. If they're in separate files, you have to have header files of prototypes. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://m

Re: [Python-Dev] Improved evaluator added to ast module

2012-10-11 Thread Benjamin Peterson
mprove the security model for logging > listener"). What exactly are you trying to prevent? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Improved evaluator added to ast module

2012-10-11 Thread Benjamin Peterson
2012/10/11 Vinay Sajip : > Benjamin Peterson python.org> writes: > >> >> With this operations, you can still cause a lot of trouble. >> > > Perhaps; I am hoping that some more specific information (about the kind of > trouble this can cause) will emerge. Hence

Re: [Python-Dev] [Python-checkins] cpython (merge 3.3 -> 3.3): merge heads

2012-10-12 Thread Benjamin Peterson
to piece together exactly what happened, or else I > would try to fix it myself. Sorry about that. I merged 3.2 -> default instead of 3.2 -> 3.3 -> default and these were my attempts to fix it. -- Regards, Benjamin ___ Python-Dev mailing list

Re: [Python-Dev] [Python-checkins] cpython (merge 3.3 -> 3.3): merge heads

2012-10-12 Thread Benjamin Peterson
2012/10/12 Chris Jerdonek : > On Fri, Oct 12, 2012 at 8:22 PM, Chris Jerdonek > wrote: >> On Fri, Oct 12, 2012 at 7:40 PM, Benjamin Peterson >> wrote: >>> 2012/10/12 Chris Jerdonek : >>>> On Fri, Oct 12, 2012 at 9:05 AM, benjamin.peterson >>>

Re: [Python-Dev] accept the wheel PEPs 425, 426, 427

2012-10-18 Thread Benjamin Peterson
2012/10/18 Daniel Holth : > Let me know what I need to do to get it accepted, if anything needs to > be added or revised, or, preferably, that it is awesome and you want > to use it ASAP. Traditionally, you send the peps to python-dev, so people can bikeshed inline. -- Regards,

Re: [Python-Dev] accept the wheel PEPs 425, 426, 427

2012-10-18 Thread Benjamin Peterson
2012/10/18 Daniel Holth : > On Thu, Oct 18, 2012 at 3:10 PM, Antoine Pitrou wrote: >> On Thu, 18 Oct 2012 14:35:19 -0400 >> Benjamin Peterson wrote: >>> 2012/10/18 Daniel Holth : >>> > Let me know what I need to do to get it accepted, if anything ne

Re: [Python-Dev] Why not using the hash when comparing strings?

2012-10-18 Thread Benjamin Peterson
*/ > } > > There are hash collision, so a->ob_shash == b->ob_shash doesn't mean > that the two strings are equal. But if the two hashs are different, > the two strings are different. Isn't it? It would be interestin

Re: [Python-Dev] Why not using the hash when comparing strings?

2012-10-19 Thread Benjamin Peterson
2012/10/19 Duncan Booth : > Hrvoje Niksic wrote: > >> On 10/19/2012 03:22 AM, Benjamin Peterson wrote: >>> It would be interesting to see how common it is for strings which have >>> their hash computed to be compared. >> >> Since all identifier-like str

<    10   11   12   13   14   15   16   >