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. Given that

[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

Re: [Python-Dev] [Python-checkins] cpython: Issue #12452: Plist and Dict are now deprecated

2011-07-05 Thread Eric Smith
Plist and Dict were never documented (in Doc/library/plistlib.rst). These classes have no test. Ouch! You mean that I should add an entry to Misc/NEWS saying that these classe are now deprecated? Should I also mention the deprecation to the What's new in Python 3.3? document? Yes. I think

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless ++ at the end of functions

2011-05-27 Thread Eric Smith
So, given the discussions about this change, can you please revert it, Victor? Eric. On 05/26/2011 08:07 AM, victor.stinner wrote: http://hg.python.org/cpython/rev/7ba176c2f558 changeset: 70397:7ba176c2f558 user:Victor Stinner victor.stin...@haypocalc.com date:Thu May 26

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless ++ at the end of functions

2011-05-26 Thread Eric Smith
On 5/26/2011 8:32 AM, Victor Stinner wrote: Le jeudi 26 mai 2011 à 08:13 -0400, Eric Smith a écrit : If you're ever going to add code at the end of these functions, it's unlikely you'll remember that you need to add these increments back in. You don't have to remember. Test the result

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless ++ at the end of functions

2011-05-26 Thread Eric Smith
On 5/26/2011 10:34 AM, Ronald Oussoren wrote: On 26 May, 2011, at 16:10, Eric Smith wrote: and make silent the Clang Static Analyzer :-) I care less about that than maintainability and future-proofing. Have to looked at the patch? The patch and resulting code look sane to me

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Eric Smith
Victor Stinner wrote: I already patched the doc of the random module to add a security warning. Well, you don't really need to know how a CSPRNG is implemented, just that random cannot be used for security and that ssl.RAND_bytes() raises an error if was seeded with enough data. Tell me if

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Eric Smith
On 05/25/2011 06:58 AM, Petri Lehtinen wrote: Eric Smith wrote: Victor Stinner wrote: I already patched the doc of the random module to add a security warning. Well, you don't really need to know how a CSPRNG is implemented, just that random cannot be used for security

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Eric Smith
On 5/25/2011 1:17 PM, Victor Stinner wrote: Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like function to

Re: [Python-Dev] Python 3.x and bytes

2011-05-18 Thread Eric Smith
On 05/18/2011 12:16 PM, Stephen J. Turnbull wrote: Robert Collins writes: Its probably too late to change, but please don't try to argue that its correct: the continued confusion of folk running into this is evidence that confusion *is happening*. Treat that as evidence and think

Re: [Python-Dev] Python 3.x and bytes

2011-05-18 Thread Eric Smith
On 5/18/2011 6:32 PM, Greg Ewing wrote: Eric Smith wrote: And of course it's too late to make any change to this. It's too late to change the meaning of b'...', but is it really too late to introduce an x'...' literal and change the repr() to produce it? My this was the different types

Re: [Python-Dev] Commit messages: please avoid temporal ambiguity

2011-05-09 Thread Eric Smith
On 05/09/2011 03:17 PM, Guido van Rossum wrote: On Mon, May 9, 2011 at 11:36 AM, Ned Batchelder n...@nedbatchelder.com wrote: On 5/9/2011 1:24 PM, Terry Reedy wrote: A commit (push) partition time and behavior into before and after (with a short change period in between during which

Re: [Python-Dev] Code highlighting in tracker

2011-04-07 Thread Eric Smith
On Thu, Apr 7, 2011 at 7:01 AM, Benjamin Peterson benja...@python.org wrote: 2011/4/6 anatoly techtonik techto...@gmail.com: Is it a good idea to have code highlighting in tracker? Why would we need it? Because tracker is ugly. That's not a good enough reason. I'm -1 on adding this: it's

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 - default): Merge fix for issue #11746

2011-04-03 Thread Eric Smith
On 4/3/2011 12:20 PM, antoine.pitrou wrote: http://hg.python.org/cpython/rev/c11e05a60d36 changeset: 69115:c11e05a60d36 parent: 69113:ff105faf1bac parent: 69114:88ed3de28520 user:Antoine Pitrou solip...@pitrou.net date:Sun Apr 03 18:16:50 2011 +0200 summary:

Re: [Python-Dev] Issue 11715: building Python from source on multiarch Debian/Ubuntu

2011-04-01 Thread Eric Smith
On 4/1/2011 6:46 AM, Georg Brandl wrote: Am 31.03.2011 19:35, schrieb Éric Araujo: I would like to apply this patch (or its moral equivalent) to all active, affected branches of Python, meaning 2.5 through 2.7, and 3.1 through 3.3, as soon as possible. Without this, it will be very

Re: [Python-Dev] Issue 11715: building Python from source on multiarch Debian/Ubuntu

2011-04-01 Thread Eric Smith
On 4/1/2011 3:52 PM, Martin v. Löwis wrote: And I don't see a problem with build fixes. It's not like we're adding language features. If it makes someone's life easier, then what's the harm? It's extra work with no volunteer doing it. I understood Barry was volunteering. Certainly if no one

Re: [Python-Dev] Deprecating non-Py_ssize_t use of PyArg_ParseTuple

2011-03-21 Thread Eric Smith
On Mon, 21 Mar 2011 04:09:35 +0100 Martin v. Löwis mar...@v.loewis.de wrote: Since Python 2.5, we maintain two versions of PyArg_ParseTuple: one outputting int; the other one outputting Py_ssize_t. The former should have been removed in 3.0, but this was forgotten. Still, I would like

Re: [Python-Dev] Deprecating non-Py_ssize_t use of PyArg_ParseTuple

2011-03-21 Thread Eric Smith
Given the recent discussion about backwards compatibility: what's the best approach? What warning should be emitted, if any? (the warning would only be generated if an s# or similar format was actually encountered - not just if merely PyArg_ParseTuple is called). I'd say a

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

2011-03-17 Thread Eric Smith
On 3/16/2011 11:58 PM, Jesus Cea wrote: I agree that half the changesets are merges now. Which has basically stopped me from reviewing changes. I can't quickly tell the real changes from the noise of merges. ___ Python-Dev mailing list

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

2011-03-17 Thread Eric Smith
On 3/17/2011 6:28 AM, Georg Brandl wrote: Am 17.03.2011 09:57, schrieb Eric Smith: On 3/16/2011 11:58 PM, Jesus Cea wrote: I agree that half the changesets are merges now. Which has basically stopped me from reviewing changes. I can't quickly tell the real changes from the noise of merges

Re: [Python-Dev] API deprecations in Python 3, from a Python 2 perspective

2011-03-17 Thread Eric Smith
On 03/17/2011 03:08 PM, Jesus Cea wrote: I would suggest to keep deprecating things in 3.x, BUT keeping the deprecated stuff around (maybe reimplementing them using the new stuff) until we decide is safe to axe it, instead of the regular 3.x deprecates, 3.(x+1) cleans up. At some point, didn't

Re: [Python-Dev] Module version variable

2011-03-16 Thread Eric Smith
On 3/16/2011 5:54 PM, Alexander Belopolsky wrote: On Wed, Mar 16, 2011 at 3:00 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: .. The version number in the decimal module refers to the version of the spec that is being complied with. I would like that version number to remain in the

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-15 Thread Eric Smith
On 03/14/2011 10:02 PM, James Mills wrote: On Tue, Mar 15, 2011 at 11:50 AM, Terry Reedytjre...@udel.edu wrote: How would that work if you had a field named replace? I think Raymond's current design is as good as it's going to get. 'as_dict' is an unlikely fieldname. 're_place' is too, but

Re: [Python-Dev] User conversions in custom string.Formatter

2011-03-15 Thread Eric Smith
On 03/15/2011 08:07 PM, Andrew Svetlov wrote: As PEP 3101 http://www.python.org/dev/peps/pep-3101/ says (and current Python does) user can specify conversions like {0!s}. In custom formatters (derived from string.Formatter) he can override convert_field method to add custom conversions. I

Re: [Python-Dev] public visibility of python-dev decisions before it's too late

2011-03-15 Thread Eric Smith
On 3/15/2011 10:58 PM, Lennart Regebro wrote: On Tue, Mar 15, 2011 at 22:42, Guido van Rossumgu...@python.org wrote: Fortunately there may not be any more such cases since no new major versions of Python 2 will be released. So I'm not sure what an update of PEP 5 will buy us. That is a good

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 03/14/2011 02:33 AM, Greg Ewing wrote: Tim Lesher wrote: Because named tuple prefixes a single underscore to its added method names (_asdict, _replace, and _make), those methods' docstrings are omitted from pydoc: IMO these should be called __asdict__, __replace__ and __make__. Users are

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 03/14/2011 07:46 AM, Antoine Pitrou wrote: On Mon, 14 Mar 2011 06:29:09 -0400 Eric Smithe...@trueblade.com wrote: On 03/14/2011 02:33 AM, Greg Ewing wrote: Tim Lesher wrote: Because named tuple prefixes a single underscore to its added method names (_asdict, _replace, and _make), those

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 3/14/2011 8:44 PM, James Mills wrote: On Tue, Mar 15, 2011 at 9:48 AM, R. David Murrayrdmur...@bitdance.com wrote: But directly calling a __xxx__ method in Python is a very unusual thing to do. It would be extremely odd to have that be the expected way to call a method on a class. Can't

Re: [Python-Dev] Python 3.4 version in the tracker

2011-03-13 Thread Eric Smith
On 03/13/2011 06:49 AM, Georg Brandl wrote: On 12.03.2011 17:09, Eric Smith wrote: On 03/12/2011 10:55 AM, Éric Araujo wrote: I have a deprecation warning that I need to make an error in 3.4. A neat trick to remember to do those changes is using a test that fails if something does not raise

[Python-Dev] Python 3.4 version in the tracker

2011-03-12 Thread Eric Smith
Could someone with the right access add a Python 3.4 version to the tracker? I have a deprecation warning that I need to make an error in 3.4. I'd also like to make it a release blocker in 3.4 so I don't forget about it. If I do that, will it screw up any release workflow? Thanks.

Re: [Python-Dev] Python 3.4 version in the tracker

2011-03-12 Thread Eric Smith
On 03/12/2011 10:55 AM, Éric Araujo wrote: I have a deprecation warning that I need to make an error in 3.4. A neat trick to remember to do those changes is using a test that fails if something does not raise a DeprecationWarning if sys.version_info[:2] == (3, 3), or an error if

Re: [Python-Dev] [Python-checkins] devguide: Suggest using mpatch in the FAQ

2011-03-11 Thread Eric Smith
On 03/11/2011 06:03 PM, antoine.pitrou wrote: If you want to try out or review a patch generated using Mercurial, do:: - hg import --no-commit somework.patch + patch -p1 somework.patch This will apply the changes in your working copy without committing them. If the patch was not

Re: [Python-Dev] Implementation of variable sized objects.

2011-03-09 Thread Eric Smith
On 3/9/2011 7:55 AM, Mark Shannon wrote: Hi, I hope this is the right place to ask this. Do anyone know why the str (unicode) object is implemented with an external buffer like list, rather than internal one like tuple and bytes? Would anything bad happen if it were changed? I'm not

Re: [Python-Dev] hgeol

2011-03-05 Thread Eric Smith
On 3/5/2011 7:37 PM, Martin v. Löwis wrote: I am trying to fix the hgeol settings for the vcproj files, with little success so far. I created http://hg.python.org/sandbox/hgeol/ which merely changes the .hgeol file. Now, if you enable the eol extension, and check this branch out, you

Re: [Python-Dev] Support the /usr/bin/python2 symlink upstream

2011-03-01 Thread Eric Smith
On 3/1/2011 4:19 PM, Kerrick Staley wrote: Hello, There is a need for the default Python2 install to place a symlink at /usr/bin/python2 that points to /usr/bin/python, or for the documentation to recommend that packagers ensure that python2 is defined. Also, all documentation should be changed

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

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 the use of 'getitem' within

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 Smithe...@trueblade.com 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 it. The

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 documentation

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

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 da...@daave.com 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

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

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' within a format string is much more limited

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. My

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] 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 Stinnervictor.stin...@haypocalc.com wrote: Le jeudi 06 janvier 2011 à 00:10 -0500, Alexander Belopolsky a écrit : If calling specific

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

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 Brandlge...@python.org 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

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 python-check...@python.org wrote: @@ -588,7 +593,12 @@ pointing to the original callable function. This allows wrapped functions to be

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

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

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 Smithericat 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. That's what

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

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

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 for

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__

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: issues with format_map documentation and docstrings for str.format and str.format_map I've addressed all of these issues, although if anyone has suggestions for the docstrings or documentation they'd

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 raymond.hettin...@gmail.com wrote: Sounds like a decision to split a module into a package is a big commitment. Each of the individual file names becomes a

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

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 (or rather any mapping object

[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.format

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 Pitrousolip...@pitrou.net: On Sun, 31 Oct 2010 16:39:44 -0400 Eric Smithe...@trueblade.com wrote: What are your thoughts on adding a str.format_from_mapping (or similar

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 Sajipvinay_sa...@yahoo.co.uk 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,

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 Adamr...@ronadam.com 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

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 Smithe...@trueblade.com: 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,

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

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 Smithe...@trueblade.com 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

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) +++

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

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] [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

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.pitroupython-check...@python.org 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

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 Drakefdr...@acm.org wrote: On Wed, Aug 4, 2010 at 5:57 PM, Nick Coghlanncogh...@gmail.com wrote: and use a default message of 'Key not found: %r' % key if the key argument is supplied without an explicit message

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

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 e...@trueblade.com 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't say it is useless. And I never said you said

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

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

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

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öwismar...@v.loewis.de: 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

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

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 Yasskinjyass...@gmail.com 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

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

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

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 should do

[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

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:

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.

[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

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 eric at 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 case of eating

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 solip...@pitrou.net 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

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

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

2010-04-26 Thread Eric Smith
Currently, the 'default' Priority for new tracker issues is '- no selection -'. This is, I believe, widely understood to be equivalent to 'normal'. Consequently, almost no one bothers to make a selection. This applies even to experienced people like (in the last hour) Jesus Crea (#8536), Eric

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

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

Re: [Python-Dev] argparse ambiguity handling

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

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='the version') I like

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. ___

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,

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

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

  1   2   3   4   >