Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Eric Smith
Martin v. Löwis wrote: A Python 3 version of NumPy might be enough of an improvement to bring *more* scientists and engineers onboard if the Python 3.x version shows what great productivity gains are to be had with Python 3.x over 2.x. I would be really surprised if 2.7 would simplify porting t

Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Eric Smith
Martin v. Löwis wrote: I would be really surprised if 2.7 would simplify porting to 3.x. How could that possibly work? The only things I can think of that would go into this category are features like: - PEP 3118, revised buffer protocol. If the buffer API that numpy uses is not present in py3

Re: [Python-Dev] Retrieve an arbitrary element from a setwithoutremoving it

2009-11-04 Thread Eric Smith
Raymond Hettinger wrote: Summarizing my opposition to a new set method: 1) there already are at least two succinct ways to get the same effect 2) those ways work with any container, not just sets 3) set implementations in other languages show that this isn't needed. 4) there is value to keeping t

Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Eric Smith
Martin v. Löwis wrote: Mike Krell wrote: Well, 3to2 would then be an option for you: use Python 3 as the source language. Making life easier for 3to2 is an *excellent* rationale for backports. I'm skeptical. If new features get added to 2.7: why would that simplify 3to2? It couldn't

Re: [Python-Dev] [format] Restrict fill characters for numerical values

2009-11-11 Thread Eric Smith
Stefan Krah wrote: Hi, I think http://www.python.org/dev/peps/pep-3101/ is too liberal with the choice of fill characters for numerical values. As far as I can see, this is quite legal: Python 2.7a0 (trunk:76132M, Nov 6 2009, 15:20:35) [GCC 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3

Re: [Python-Dev] [format] Restrict fill characters for numerical values

2009-11-11 Thread Eric Smith
Stefan Krah wrote: Eric Smith wrote: Stefan Krah wrote: Hi, I think http://www.python.org/dev/peps/pep-3101/ is too liberal with the choice of fill characters for numerical values. As far as I can see, this is quite legal: Python 2.7a0 (trunk:76132M, Nov 6 2009, 15:20:35) [GCC 4.1.3

Re: [Python-Dev] PEP 382 status

2009-11-11 Thread Eric Smith
Tarek Ziadé wrote: I was wondering what's the status of PEP 382. Is anyone (MvL?) is going to start to work on its implementation for Python 2.7/3.2 inclusion ? If Martin isn't interested in doing it, I'll take a try at it. But I'll need some rough guidance on the implementation approach. Er

Re: [Python-Dev] Removal of intobject.h in 3.1

2009-11-21 Thread Eric Smith
M.-A. Lemburg wrote: Since package developers are just starting to port things to 3.x and many appear to be considering supporting both 2.7 and 3.1 (including myself), I find it a bit strange that such an import aliasing header was removed in 3.1. There's some discussion of this at http://bugs.

[Python-Dev] Unicode locale values in 2.7

2009-12-03 Thread Eric Smith
While researching http://bugs.python.org/issue7327, I've come to the conclusion that trunk handles locales incorrectly in regards to Unicode. Fixing this would be the first step toward resolving this issue with float and Decimal locale-aware formatting. The issue concerns the locale "cs_CZ.UTF-

Re: [Python-Dev] Sort out formatting differences in decimal and float

2009-12-05 Thread Eric Smith
Mark Dickinson wrote: I find it odd that, for float formatting, the choice of fill character affects whether commas are inserted: Python 3.2a0 (py3k:76671, Dec 4 2009, 18:55:54) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more infor

Re: [Python-Dev] Proposing PEP 386 for addition

2009-12-10 Thread Eric Smith
Tarek Ziadé wrote: Also, the word "rational" is not familiar to me in the context of versions; is this term known outside of this proposal? I couldn't find any reference to it. Do you have a better suggestion ? I was thinking about StandardVersion but "Standard" doesn't really express what we w

Re: [Python-Dev] First draft of "sysconfig"

2009-12-12 Thread Eric Smith
Tarek Ziadé wrote: On Sat, Dec 12, 2009 at 10:35 PM, Brett Cannon wrote: [...] 'nt': { 'stdlib': '$base/Lib', 'platstdlib': '$base/Lib', 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', 'include': '$base/include', 'platinclud

Re: [Python-Dev] Improve open() to support reading file starting with an unicode BOM

2010-01-08 Thread Eric Smith
>> Shouldn't this encoding guessing be a separate function that you call >> on either a file or a seekable stream ? >> >> After all, detecting encodings is just as useful to have for non-file >> streams. > > Other stream sources typically have out-of-band ways to signal the > encoding: only when r

Re: [Python-Dev] scripts, applets, and applications (Was Re: PyCon Keynote)

2010-01-27 Thread Eric Smith
This discussion probably belongs on the distutils list. Ron Adam wrote: Can I make my efforts in developing a (module, package, script, or application) a lot easier if I keep certain things in mind? Are there any best practices I should keep in mind if I intend to distribute my work? Are ther

Re: [Python-Dev] Absolute imports in Python 2.x?

2010-02-02 Thread Eric Smith
Mark Dickinson wrote: What are the current plans for PEP 328 (the absolute imports PEP) in Python 2.x? The PEP says: """In Python 2.6, any import statement that results in an intra-package import will raise DeprecationWarning (this also applies to from <> import that fails to use the relative i

Re: [Python-Dev] Absolute imports in Python 2.x?

2010-02-03 Thread Eric Smith
Mark Dickinson wrote: On Tue, Feb 2, 2010 at 1:20 PM, Eric Smith wrote: Mark Dickinson wrote: What are the current plans for PEP 328 (the absolute imports PEP) in Python 2.x? Not sure about the decision one way or the other. But if there's not going to be a 2.8, and if DeprecationWar

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-04 Thread Eric Smith
Glenn Linderman wrote: On approximately 1/30/2010 4:00 PM, came the following characters from the keyboard of Barry Warsaw: When the Python executable is given a `-R` flag, or the environment variable `$PYTHONPYR` is set, then Python will create a `foo.pyr` directory and write a `pyc` file to th

Re: [Python-Dev] deprecated stuff in standard library

2010-02-19 Thread Eric Smith
Sjoerd Mullender wrote: On 2010-02-19 14:10, Guido van Rossum wrote: Isn't mhlib itself deprecated? (It's gone in Py3k.) I wouldn't like that, but it is beside my point. If a module is deprecated, then it should not be used in released code. If mhlib is deprecated, it doesn't tell you about i

Re: [Python-Dev] Proposal for virtualenv functionality in Python

2010-02-19 Thread Eric Smith
Glenn Linderman wrote: On approximately 2/19/2010 1:18 PM, came the following characters from the keyboard of P.J. Eby: At 01:49 PM 2/19/2010 -0500, Ian Bicking wrote: I'm not sure how this should best work on Windows (without symlinks, and where things generally work differently), but I would

Re: [Python-Dev] Proposal for virtualenv functionality in Python

2010-02-20 Thread Eric Smith
Glenn Linderman wrote: Shortcuts don't work from the shell (well, cmd.exe, at least), do they? Can't test from here. So if you can't test it, why would you state it as a fact... and then back-pedal? :) It was a question, not a statement! Plus, I figured I could con someone into testing it

Re: [Python-Dev] Proposal for virtualenv functionality in Python

2010-02-20 Thread Eric Smith
Christian Heimes wrote: As long as Python supports XP we shouldn't use symlinks on Windows for stuff like virtualenv. The python.exe on Windows is small (just a few kb) since it is linked against the dll. Let's copy it and we are on the safe side. +1. Even if we dropped XP I'm not sure moving

Re: [Python-Dev] some notes from the first part of the lang summit

2010-02-21 Thread Eric Smith
Steven Bethard wrote: On Fri, Feb 19, 2010 at 7:50 AM, Brett Cannon wrote: My notes from the session I led: + argparse - Same issues brought up. For those of us not at PyCon, what were the issues? I think they were all related to deprecation of optparse, not anything to do with argpar

Re: [Python-Dev] some notes from the first part of the lang summit

2010-02-21 Thread Eric Smith
Brett Cannon wrote: Yes, DeprecationWarning is now silent under Python 2.7 and 3.1 so a DeprecationWarning would only pop up if developers exposed DeprecationWarning. But if the module is not about to be removed in 3.x then I think regardless of the silence of both warnings it should stay Pend

[Python-Dev] 3.1 and 2.7 break format() when used with complex (sometimes)

2010-02-22 Thread Eric Smith
This code works on 2.6 and 3.0: >>> format(1+1j, '10s') '(1+1j)' That's because format ends up calling object.__format__ because complex doesn't have its own __format__. Then object.__format__ calls str(self) which returns '(1+1j)'. So the original call basically turns into "format('(1

Re: [Python-Dev] 3.1 and 2.7 break format() when used with complex (sometimes)

2010-02-22 Thread Eric Smith
Eric Smith wrote: This code works on 2.6 and 3.0: >>> format(1+1j, '10s') '(1+1j)' That's because format ends up calling object.__format__ because complex doesn't have its own __format__. Then object.__format__ calls str(self) which returns '

Re: [Python-Dev] 3.1 and 2.7 break format() when used with complex (sometimes)

2010-02-23 Thread Eric Smith
The root cause of this problem is object.__format__, which is basically: def __format__(self, fmt): return str(self).__format__(fmt) So here we're changing the type of the object (to str) but still keeping the same format string. That doesn't make any sense: the format string is type specifi

[Python-Dev] Add alternate float formatting styles to new-style formatting: allowed under moratorium?

2010-02-24 Thread Eric Smith
http://bugs.python.org/issue7094 proposes adding "alternate" formatting [1] to floating point new-style formatting (float.__format__ and probably Decimal.__format__). I'd like to add this to make automated translation from %-formatting strings to str.format strings easier. Would this be allowe

Re: [Python-Dev] Desired changes to Hg emails to python-checkins

2010-03-04 Thread Eric Smith
Are the diffs gone for some deliberate reason? I realize the link tells me the changes, but I'll review a lot more code if the diffs show up in my inbox than if I have to fire up a browser, especially from my phone. Eric. Brett Cannon wrote: 1) I miss not having the affected files listed in

Re: [Python-Dev] argparse ugliness

2010-03-10 Thread Eric Smith
Nick Coghlan wrote: Greg Ewing wrote: Steven Bethard wrote: Because the names are so long and you'd have to import them, I've left them as private attributes of the module, but if there's really demand, we could rename them to argparse.StoreTrueAction, etc. What's wrong with just StoreTrue?

Re: [Python-Dev] Patch to telnetlib.py

2010-03-13 Thread Eric Smith
Can you create an issue on the bug tracker? Otherwise this will get lost. Eric. On 3/13/2010 12:24 PM, gregory dudek wrote: The Telnet module telnetlib.py can be very slow -- unusably slow -- for large automated data transfers. There are typically done in raw mode. The attached patch greatly

Re: [Python-Dev] Bug? syslog.openlog using ident "python" by default.

2010-03-19 Thread Eric Smith
Sean Reifschneider wrote: If you call: from syslog import syslog, openlog syslog('My error message') Something like the following gets logged: Mar 18 05:20:22 guin python: My error message ^^ Where I'm annoyed by the "python" in the above. This is pulled

Re: [Python-Dev] Request for commit access

2010-03-23 Thread Eric Smith
Brian Curtin wrote: Hi all, Having been active in bug triage and patch writing/reviewing since late 2009, it was suggested in the python-dev IRC channel that I request commit access to the repository. I'm primarily a Windows user and have worked with many of the other active contributors to d

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Eric Smith
Filip Gruszczyński wrote: From that spec, a straightforward API falls out: def format_mapping(self, kwds): # Method body actually written in C, so it can # easily invoke the internal formatting operation return do_string_format(self, NULL, kwds) Thanks a lot for the advice, I

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Eric Smith
Nick Coghlan wrote: Filip Gruszczyński wrote: I would appreciate any advice on this topic, even if this ticket would be dismissed altogether, as I would like to learn as much as possible on practices on developing Python. Raymond's use case is valid, but the currently proposed method name is w

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Eric Smith
Nick Coghlan wrote: Moving the decision of "how am I going to be called" to the time of writing the format string is a bit odd. On the other hand, the specially crafted format string does have the virtue of travelling far more easily through any APIs that wrap the basic format() method (since it

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Eric Smith
Nick Coghlan wrote: Completely agree on all points. Now we're just left with "is it worth expanding the str api for this?". I don't feel strongly either way. For something as core as the string API, we better feel darn strongly about it before we mess with it :) I'm inclined to leave it alone

Re: [Python-Dev] Fwd: Broken link to download (Mac OS X)

2010-04-14 Thread Eric Smith
In my case it was not a waste of time. I use MSDN for dev and testing. Just not for release building. "Steve Holden" wrote: >Paul Moore wrote: >> On 14 April 2010 07:37, Paul Rudin wrote: >>> "Martin v. Löwis" writes: >>> The major difference in the "do it yourself" attitude is that Mac

Re: [Python-Dev] Drop OS/2 support?

2010-04-17 Thread Eric Smith
Andrew MacIntyre wrote: It is nice to get heads-up messages about issues that might involve such support though, and it shouldn't take much searching to find me to enquire. Especially since aimacintyre is listed in Misc/maintainers.rst. ___ Python-D

Re: [Python-Dev] Python 2.7b1 and argparse's version action

2010-04-18 Thread Eric Smith
Steven Bethard wrote: By the way, we could simplify the typical add_argument usage by adding "show program's version number and exit" as the default help for the 'version' action. Then you should just write: parser.add_argument('--version', action='version', version='') I like this the bes

Re: [Python-Dev] argparse ambiguity handling

2010-04-21 Thread Eric Smith
Cameron Simpson wrote: On 20Apr2010 15:27, Neal Becker wrote: | Steven Bethard wrote: | | > On Tue, Apr 20, 2010 at 11:55 AM, Neal Becker wrote: | >> I've noticed argparse ambiguity handling has changed a bit over last few | >> revisions. | >> | >> I have cases where 1 valid input is a prefix

Re: [Python-Dev] PEP 376

2010-04-22 Thread Eric Smith
Jeroen Ruigrok van der Werven wrote: -On [20100422 10:55], Tarek Ziadé (ziade.ta...@gmail.com) wrote: The next big piece is the FHS-compatible handling of resource files, which will worth a PEP on its own. You do realize, I hope, that FHS is only followed by Linux distributions and not even fu

Re: [Python-Dev] argparse suggestion

2010-04-26 Thread Eric Smith
Sounds good to me (subject to arguing about spellings, case insensitivity, etc.). Just so it doesn't get lost, I created issue 8538 to track it. Neal Becker wrote: steven.beth...@gmail.com made a very nice module for me to enhance argparse called argparse_bool.py, which contains ConfigureActio

Re: [Python-Dev] Make 'normal' the default tracker priority level

2010-04-26 Thread Eric Smith
ike (in the last hour) Jesus Crea > (#8536), Eric Smith (*8538), and Mark Dickenson (*8540). You neglected my 2 dupes at 8537 and 8539! :) > If possible, I think 'normal' should be the default in the hox or else > there shoul

Re: [Python-Dev] Make 'normal' the default tracker priority level

2010-04-26 Thread Eric Smith
Martin v. Löwis wrote: If possible, I think 'normal' should be the default in the hox or else there should be some sort of auto replacement. Makes sense to me. I have now changed to make 'normal' the default priority for new issues. Shall I also set the priority on all past issues to normal wh

Re: [Python-Dev] Running Clang 2.7's static analyzer over the code base

2010-05-04 Thread Eric Smith
Dirkjan Ochtman wrote: On Tue, May 4, 2010 at 14:41, Antoine Pitrou wrote: I think we should reindent all 3 branches. Most of the work can probably be scripted (str.replace("\t", " " * 4)), and then a visual pass is necessary to fix vertical alignments and the like. If the script is robust en

[Python-Dev] Did I miss the decision to untabify all of the C code?

2010-05-05 Thread Eric Smith
It looks like we're moving ahead with removing tabs. Was there consensus on this? Last I saw Antoine had written a script that might do what we want, but hadn't been thoroughly tested. Now I've seen a few checkins for files that have been run through the script. What gives? And why do this s

Re: [Python-Dev] Did I miss the decision to untabify all of the C code?

2010-05-05 Thread Eric Smith
Antoine Pitrou wrote: Eric Smith trueblade.com> writes: Last I saw Antoine had written a script that might do what we want, but hadn't been thoroughly tested. Now I've seen a few checkins for files that have been run through the script. As far as I'm concerned, it was a

Re: [Python-Dev] bug or feature? fixing argparse's default help value for version actions

2010-05-20 Thread Eric Smith
Brett Cannon wrote: In the end it's Benjamin's call, but my vote is to make the change. The chances someone wanted None as their help message is so bloody small and this is such a good UX change that I'm +1 on making the change. I completely agree. -- Eric. ___

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-28 Thread Eric Smith
Steven D'Aprano wrote: I have suggested a way to move the existing concurrency stuff without breaking backwards compatibility, and Terry Reedy asked if it would work. I haven't seen any responses, either positive or negative. For the record, my suggestion was: for each concurrency modules:

[Python-Dev] Implementing PEP 382, Namespace Packages

2010-05-29 Thread Eric Smith
Last night Barry Warsaw, Jason Coombs, and I met to work on implementing PEP 382. As part of my research, I came across this email from Martin: http://mail.python.org/pipermail/python-dev/2009-May/089316.html In it he says that PEP 382 is being deferred until it can address PEP 302 loaders. I c

Re: [Python-Dev] Future of 2.x.

2010-06-09 Thread Eric Smith
> On 6/9/2010 4:07 AM, Stephen J. Turnbull wrote: > Closed issues are not lost. They can still be searched and the result > downloaded. > >> A keyword would do. Please don't add a status or something like that, >> though. > > I believe Type: feature request; Version: 2.7; Resolution wont fix > sho

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-06-27 Thread Eric Smith
On 6/27/2010 5:48 AM, Greg Ewing wrote: Stefan Behnel wrote: Greg Ewing, 26.06.2010 09:58: Would there be any sanity in having an option to compile Python with UTF-8 as the internal string representation? It would break Py_UNICODE, because the internal size of a unicode character would no lo

Re: [Python-Dev] A grammatical oddity: trailing commas in argument lists.

2010-07-09 Thread Eric Smith
On 7/9/10 10:40 AM, Mark Dickinson wrote: While looking at a parser module issue (http://bugs.python.org/issue9154) I noticed that Python's grammar doesn't permit trailing commas after keyword-only args. That is, def f(a, b,): pass is valid syntax, while def f(*, a, b,): pass is n

Re: [Python-Dev] A grammatical oddity: trailing commas in argument lists.

2010-07-09 Thread Eric Smith
On 7/9/2010 4:42 PM, Georg Brandl wrote: Am 09.07.2010 22:26, schrieb Mark Dickinson: On Fri, Jul 9, 2010 at 8:37 PM, Dino Viehland wrote: Terry wrote: This violates the important principle that allowed def and call arg sequences should match to the extent sensible and possible. In this sense

Re: [Python-Dev] New regex module for 3.2?

2010-07-11 Thread Eric Smith
On 7/11/2010 5:19 AM, anatoly techtonik wrote: On Fri, Jul 9, 2010 at 6:59 PM, Jeffrey Yasskin wrote: While the re2 comparison might be interesting from an abstract standpoint, it intentionally supports a different regex language from Python so that it can run faster and use less memory. Since

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Eric Smith
On 7/12/2010 5:57 PM, Benjamin Peterson wrote: 2010/7/12 "Martin v. Löwis": Not normally, no - there's no easy way to connect a checkin message to a committer's email address, There's a one-to-one mapping somewhere. Unfortunately, no: we don't have email addresses of all committers. What a

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Eric Smith
On 7/12/2010 6:04 PM, Michael Foord wrote: Given how high traffic python-checkins is I don't consider that a reasonable place to send follow-up and nor do I consider it the responsibility of committers to monitor it. As you said earlier this *isn't* in our standard dev procedures and nor do I thi

Re: [Python-Dev] python-checkins replies

2010-07-14 Thread Eric Smith
On 7/14/2010 4:21 AM, Georg Brandl wrote: Am 13.07.2010 22:29, schrieb Brett Cannon: Given how high traffic python-checkins is I don't consider that a reasonable place to send follow-up and nor do I consider it the responsibility of committers to monitor i

Re: [Python-Dev] Python Language Summit EuroPython 2010

2010-07-22 Thread Eric Smith
Thanks for writing this, Tim. On 7/21/10 11:11 AM, Tim Golden wrote: The issue of a __format__ equivalent for bytes was also raised as was the idea of object methods to render an object as string or bytes, which could be used in the polymorphic functions above. Does this mean bytes.__format__

Re: [Python-Dev] Python Language Summit EuroPython 2010

2010-07-25 Thread Eric Smith
On 7/23/10 2:44 AM, Guido van Rossum wrote: Indeed, we meant b'...{}...{}...'.format(x, y). The problem is that it can't invoke x.__format__() or y.__format__() since those will return text strings instead of bytes. A proposed solution was to try x.__bformat__() etc. Another proposed solution was

Re: [Python-Dev] View tracker patches with ViewVC?

2010-07-27 Thread Eric Smith
On 7/27/10 2:31 PM, Terry Reedy wrote: On 7/27/2010 1:48 PM, Alexander Belopolsky wrote: Multicolored diffs may look impressive the first time you see them, Side-by-side was the important part > Copying code from side by side view may or may not work depending on your browser. It is a nu

Re: [Python-Dev] View tracker patches with ViewVC?

2010-07-27 Thread Eric Smith
> On Tue, Jul 27, 2010 at 2:48 PM, Eric Smith wrote: > .. >> I agree with Terry that this would be a useful feature to have >> integrated >> with the tracker. I'd use it. But until someone write it, it's an >> academic >> point. > > I don&

Re: [Python-Dev] #2651 - KeyError does not round trip strings

2010-08-04 Thread Eric Smith
On 8/4/2010 6:09 PM, Nick Coghlan wrote: On Thu, Aug 5, 2010 at 8:02 AM, Fred Drake wrote: On Wed, Aug 4, 2010 at 5:57 PM, Nick Coghlan wrote: and use a default message of "'Key not found: %r' % key" if the key argument is supplied without an explicit message I suspect you meant a default m

Re: [Python-Dev] r83869 - in python/branches/py3k: Doc/library/socket.rst Doc/whatsnew/3.2.rst Lib/ssl.py Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c

2010-08-08 Thread Eric Smith
On 8/8/10 7:48 PM, Antoine Pitrou wrote: On Mon, 9 Aug 2010 01:24:50 +0200 (CEST) antoine.pitrou wrote: Author: antoine.pitrou Date: Mon Aug 9 01:24:50 2010 New Revision: 83869 Log: Issue #8524: Add a forget() method to socket objects, so as to put the socket into the closed state without cl

Re: [Python-Dev] [Python-checkins] r84190 - python/branches/release31-maint/Doc/library/stdtypes.rst

2010-08-19 Thread Eric Smith
On 8/19/2010 7:55 AM, Éric Araujo wrote: Thanks for the replies. The dev FAQ is clear about regular use, it tells about the svnmerge-commit-message too, and people in #python-dev have told me that the merge order is py3k> 3.1, py3k> 2.7. My problem here is that I committed r84190 in 3.1 manual

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Eric Smith
On 8/26/10 12:48 PM, Yury Selivanov wrote: On 2010-08-26, at 12:20 PM, Scott Dial wrote: BTW, attaching patches to emails on this list is generally the best way to have few look at your patch. :-p Hm, my mailing client clearly indicates that the patch has been attached and sent. In any case,

Re: [Python-Dev] Relative imports in Py3k

2010-09-25 Thread Eric Smith
On 9/25/2010 9:15 AM, anatoly techtonik wrote: from ... import config from ..utils.qthelpers import translate, add_actions, create_action But this doesn't work, and I couldn't find any short user level explanation why it is not possible to make this work at least in Py3k without additional magic

Re: [Python-Dev] [Python-checkins] r85101 - in python/branches/py3k/Doc/library: http.client.rst urllib.request.rst

2010-09-29 Thread Eric Smith
On 9/29/2010 7:24 AM, antoine.pitrou wrote: Modified: python/branches/py3k/Doc/library/urllib.request.rst == --- python/branches/py3k/Doc/library/urllib.request.rst (original) +++ python/branches/py3k/Doc/library/urllib.

Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Eric Smith
On 10/8/10 10:26 AM, Barry Warsaw wrote: No underscores, please. :) Indeed! In any case, these could be a simple shell script wrapping 'python -m setup'. It could even take a --use-python-version option to select the pythonX.Y it used, without having to encode the Python version number in th

Re: [Python-Dev] Distutils2 scripts

2010-10-08 Thread Eric Smith
On 10/8/10 2:41 PM, Tarek Ziadé wrote: On Fri, Oct 8, 2010 at 4:49 PM, Eric Smith wrote: ... On Windows it can't be a shell script or batch file, but needs to be an executable. setuptools already deals with this. Why ? The script-wrapping feature Setuptools has is on my radar for d2,

Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Eric Smith
On 10/11/2010 5:17 PM, Giampaolo Rodolà wrote: 2010/10/8 Eric Smith: On 10/8/10 10:26 AM, Barry Warsaw wrote: In any case, these could be a simple shell script wrapping 'python -m setup'. It could even take a --use-python-version option to select the pythonX.Y it used, without having

Re: [Python-Dev] Distutils2 scripts

2010-10-21 Thread Eric Smith
On 10/21/2010 4:44 AM, Antoine Pitrou wrote: On Wed, 20 Oct 2010 20:01:56 -0500 Ron Adam wrote: On Ubuntu, I use python, python2.7, python3.1, python3.2 and that is what I type to use that particular version. The -m option seems to me to be the easiest to do and works with all of these.

Re: [Python-Dev] Change to logging Formatters: support for alternative format styles

2010-10-29 Thread Eric Smith
On 10/26/10 7:08 AM, Nick Coghlan wrote: On Tue, Oct 26, 2010 at 12:28 AM, Vinay Sajip wrote: Comments welcome. Assuming there are no strong objections asking for reversion of this change, I'll publicise to the wider community in a few days. It strikes me as a solid, pragmatic solution to a t

[Python-Dev] str.format_from_mapping

2010-10-31 Thread Eric Smith
What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested "format_map") to 3.2? See http://bugs.python.org/issue6081 . This method would be similar to "%(foo)s %(bar)s" % d, where d is a dict (or rather any mapping object), but of course would use str.form

Re: [Python-Dev] str.format_from_mapping

2010-10-31 Thread Eric Smith
On 10/31/2010 6:28 PM, Glenn Linderman wrote: On 10/31/2010 2:02 PM, Benjamin Peterson wrote: 2010/10/31 Antoine Pitrou: > On Sun, 31 Oct 2010 16:39:44 -0400 > Eric Smith wrote: > >> What are your thoughts on adding a str.format_from_mapping (or similar >> name

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Eric Smith
On 11/3/10 10:16 AM, Michael Foord wrote: On 03/11/2010 14:05, Nick Coghlan wrote: On Wed, Nov 3, 2010 at 9:32 AM, Raymond Hettinger wrote: Sounds like a decision to split a module into a package is a big commitment. Each of the individual file names becomes a permanent part of the API. Even f

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Eric Smith
On 11/3/10 10:53 AM, Eric Smith wrote: The problem is that there is no unittest.loader in 2.4, and unittest.loader.TestLoader is the name that the 2.7 pickle creates. We see this problem every time we try and move anything in the stdlib. And BTW: for me, this is the strongest reason not to

Re: [Python-Dev] str.format_from_mapping

2010-11-03 Thread Eric Smith
On 10/31/10 4:39 PM, Eric Smith wrote: What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested "format_map") to 3.2? See http://bugs.python.org/issue6081 . This method would be similar to "%(foo)s %(bar)s" % d, where d is a dict (o

Re: [Python-Dev] [Python-checkins] r86170 - in python/branches/py3k: Doc/library/stdtypes.rst Lib/test/test_unicode.py Misc/NEWS Objects/stringlib/string_format.h Objects/unicodeobject.c

2010-11-06 Thread Eric Smith
On 11/6/10 1:16 AM, Ezio Melotti wrote: +.. method:: str.format_map(mapping) + + Similar to ``str.forrmat(**mapping)``, except that ``mapping`` is + used directly and not copied to a :class:`dict` . This is useful + if for example ``mapping`` is a dict subclass. Including the "__missing__" exa

Re: [Python-Dev] [Python-checkins] r86170 - in python/branches/py3k: Doc/library/stdtypes.rst Lib/test/test_unicode.py Misc/NEWS Objects/stringlib/string_format.h Objects/unicodeobject.c

2010-11-06 Thread Eric Smith
On 11/6/10 6:43 AM, Eric Smith wrote: On 11/6/10 1:16 AM, Ezio Melotti wrote: str.format_map> I've addressed all of these issues, although if anyone has suggestions for the docstrings or documentation they'd be appreciated. Thanks ag

Re: [Python-Dev] Breaking undocumented API

2010-11-11 Thread Eric Smith
On 11/10/2010 11:58 AM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/09/2010 11:12 PM, Stephen J. Turnbull wrote: Nick Coghlan writes: > > Module writers who compound the error by expecting to be imported > > this way, thereby bogarting the global namespace fo

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Eric Smith
On 12/2/2010 4:48 PM, "Martin v. Löwis" wrote: Am 02.12.2010 22:30, schrieb Steven D'Aprano: Martin v. Löwis wrote: Then these users should speak up and indicate their need, or somebody should speak up and confirm that there are users who actually want '١٢٣٤.٥٦' to denote 1234.56. To my knowled

Re: [Python-Dev] Python and the Unicode Character Database

2010-12-02 Thread Eric Smith
On 12/2/2010 5:43 PM, M.-A. Lemburg wrote: Eric Smith wrote: The current behavior should go nowhere; it is not useful. Something very similar to the current behavior (but done correctly) should go into the locale module. I agree with everything Martin says here. I think the basic premise is

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-07 Thread Eric Smith
On 12/07/2010 03:26 PM, Vinay Sajip wrote: I would suggest that when unit testing, rather than adding StreamHandlers to log to stderr, that something like TestHandler and Matcher from this post: http://plumberjack.blogspot.com/2010/09/unit-testing-and-logging.html This will allow assertion chec

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-07 Thread Eric Smith
On 12/07/2010 07:09 PM, Vinay Sajip wrote: Eric Smith trueblade.com> writes: Wouldn't it make more sense to add these to test.support? I don't think we make any guarantees about its API being stable, although I have a faint recollection of that being debated in the past.

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Eric Smith
On 12/9/2010 5:45 PM, Raymond Hettinger wrote: On Dec 9, 2010, at 2:18 PM, Nick Coghlan wrote: On Fri, Dec 10, 2010 at 2:41 AM, raymond.hettinger wrote: @@ -588,7 +593,12 @@ pointing to the original callable function. This allows wrapped functions to be introspected. It also copies

Re: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Eric Smith
On 12/9/2010 5:54 PM, Raymond Hettinger wrote: It would make me happy if we could agree to kill or at least mortally wound str.swapcase(). I did some research on what it is go for and found that it is a vestige of an old word processor command to handle the case where a user accidentally left the

Re: [Python-Dev] [python-committers] [RELEASED] Python 3.2 beta 2

2010-12-22 Thread Eric Smith
On 12/22/2010 8:46 AM, Georg Brandl wrote: Am 22.12.2010 02:15, schrieb Nick Coghlan: On Wed, Dec 22, 2010 at 6:18 AM, Georg Brandl wrote: Since PEP 3003, the Moratorium on Language Changes, is in effect, there are no changes in Python's syntax and built-in types in Python 3.2. Minor nit - w

Re: [Python-Dev] [Python-checkins] r87677 - python/branches/py3k/py3rsa.py

2011-01-03 Thread Eric Smith
On 1/3/2011 4:47 AM, senthil.kumaran wrote: Author: senthil.kumaran Date: Mon Jan 3 10:47:09 2011 New Revision: 87677 Log: py3k implmentation of RSA algorithm, Added: python/branches/py3k/py3rsa.py (contents, props changed) Did you really mean this to go in the py3k top-level directo

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-06 Thread Eric Smith
On 01/06/2011 11:08 AM, Victor Stinner wrote: Le jeudi 06 janvier 2011 à 10:47 -0500, R. David Murray a écrit : On Thu, 06 Jan 2011 12:55:24 +0100, Victor Stinner wrote: Le jeudi 06 janvier 2011 à 00:10 -0500, Alexander Belopolsky a écrit : If calling specific system functions such as strf

Re: [Python-Dev] Moving stuff out of Misc and over to the devguide

2011-01-19 Thread Eric Smith
> Bonus question: if we remove maintainers.rst from py3k, what do we do in > 3.1 and 2.7? I’d favor removing them over keeping outdated versions. Is there not some advantage to knowing who was the maintainer (or expert) of a given module at the time of a release? Eric. ___

Re: [Python-Dev] [Python-checkins] r88395 - python/branches/py3k/Lib/asyncore.py

2011-02-14 Thread Eric Smith
On 2/14/2011 5:15 PM, Greg Ewing wrote: Giampaolo Rodolà wrote: for me it should also fit one crucial requirement: it should be *simple* and reflect the simplicity and "taste" of all other stdlib modules, and to fulfill such a requirement I think Twisted probably needs to be "adapted" a bit.

Re: [Python-Dev] %-formatting depracation

2011-02-22 Thread Eric Smith
On 02/22/2011 01:43 PM, Ethan Furman wrote: Greetings! According to these release notes in Python 3.0, %-formatting will be going away. http://docs.python.org/release/3.0.1/whatsnew/3.0.html#pep-3101-a-new-approach-to-string-formatting However, I was unable to find any further evidence of ac

Re: [Python-Dev] Const-correctness in C-API Object Protocol

2011-02-22 Thread Eric Smith
On 02/22/2011 01:55 PM, Brett Cannon wrote: On Mon, Feb 21, 2011 at 15:34, David Claridge mailto:da...@daave.com>> wrote: Hi, I was wondering if there is some reason why C API functions like PyObject_CallMethod[1] and PySys_GetObject[2] take char* arguments rather than const c

Re: [Python-Dev] Fwd: deep question re dict as formatting input

2011-02-22 Thread Eric Smith
Quoting PEP 3101: An example of the 'getitem' syntax: "My name is {0[name]}".format(dict(name='Fred')) It should be noted that the use of 'getitem' within a format string is much more limited than its conventional usage. In the above example, the string 'name' really is the literal str

Re: [Python-Dev] Fwd: deep question re dict as formatting input

2011-02-22 Thread Eric Smith
On 2/22/2011 6:28 PM, Steve Holden wrote: On Feb 22, 2011, at 3:08 PM, Eric Smith wrote: Quoting PEP 3101: An example of the 'getitem' syntax: "My name is {0[name]}".format(dict(name='Fred')) It should be noted that the use of 'getitem' wit

Re: [Python-Dev] Fwd: deep question re dict as formatting input

2011-02-23 Thread Eric Smith
On 02/22/2011 07:32 PM, Eric Smith wrote: On 2/22/2011 6:28 PM, Steve Holden wrote: On Feb 22, 2011, at 3:08 PM, Eric Smith wrote: Quoting PEP 3101: An example of the 'getitem' syntax: "My name is {0[name]}".format(dict(name='Fred')) It should be noted that

Re: [Python-Dev] Fwd: deep question re dict as formatting input

2011-02-23 Thread Eric Smith
On 02/23/2011 09:42 AM, R. David Murray wrote: On Tue, 22 Feb 2011 19:32:56 -0500, Eric Smith wrote: You are correct, I didn't exactly implement the PEP on this point, probably as a shortcut. I think there's an issue somewhere that discusses this, but I can't find

Re: [Python-Dev] Fwd: deep question re dict as formatting input

2011-02-23 Thread Eric Smith
> On Feb 23, 2011, at 5:42 AM, Nick Coghlan wrote: > >> Ah, how (much more) confused would we be if we didn't have the PEPs >> and mailing list archives to remind ourselves of what we were thinking >> years ago... >> > True. And how much more useful it would be if it were incorporated into > the do

Re: [Python-Dev] PyEval_InitThreads() no longer safe before Py_Initialize() in 3.2

2011-02-26 Thread Eric Smith
Can you open an issue in the bug tracker? Thanks. On 2/25/2011 3:48 AM, Juraj Ivančić wrote: It seems that PyEval_InitThreads() can no longer be called before Py_Initialize(). I get a fatal error in PyThreadState_GET(). This contradicts the documentation http://docs.python.org/release/3.2/c-ap

<    1   2   3   4   >