Re: [Python-Dev] Quick sum up about open() + BOM

2010-01-08 Thread Michael Foord
On 09/01/2010 00:09, Antoine Pitrou wrote: Hello Victor, Victor Stinner haypocalc.com> writes: (1) Change default open() behaviour or make it optional? [...] Antoine would like to check BOM by default, because both options (system locale vs checking for BOM) is the same thing

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

2010-01-09 Thread Michael Foord
On 09/01/2010 22:14, Lennart Regebro wrote: On Sat, Jan 9, 2010 at 21:28, Antoine Pitrou wrote: If we want it to be the default, it must be able to fallback on the current locale-based algorithm if no BOM is found. I don't think it would be easy for a codec to do that. Right. It seem

Re: [Python-Dev] topics I plan to discuss at the language summit

2010-01-10 Thread Michael Foord
On 10/01/2010 21:52, Dirkjan Ochtman wrote: On Sun, Jan 10, 2010 at 21:25, Brett Cannon wrote: Michael has given me the hg transition/stdlib time slot at the language summit this year. In regards to that I plan to lead a discussion on: * where we are at w/ the Hg transition (Dirkjan should

Re: [Python-Dev] Data descriptor doc/implementation inconsistency

2010-01-11 Thread Michael Foord
On 11/01/2010 21:12, Nick Coghlan wrote: Benjamin Peterson wrote: > My question is: Is this a doc bug or a implementation bug? If the former, it will be the description of a data descriptor much less consistent, since it will require that a __get__ method be present, too. If the latter, t

Re: [Python-Dev] [RELEASED] Python 2.7 alpha 2

2010-01-12 Thread Michael Foord
On 12/01/2010 12:16, Barry Warsaw wrote: On Jan 11, 2010, at 09:57 PM, Steven Bethard wrote: Actually there's a solution to this one too: FooBase = Meta('FooBase', (), {}) class Foo(FooBase): ... That should work in Python 2.X and 3.X. Ugly, but good call! :)

Re: [Python-Dev] [RELEASED] Python 2.7 alpha 2

2010-01-12 Thread Michael Foord
On 12/01/2010 21:53, "Martin v. Löwis" wrote: a) telling people that they have to move to 2.6 first actually hurts migration, instead of helping, because it implies to them that they have to drop old versions (e.g. 2.3.) - just because they had *always* dropped old versions before suppor

[Python-Dev] Fwd: Download Page - AMD64

2010-01-12 Thread Michael Foord
I presume the email below is about the Windows binary. Does the AMD64 release work on intel 64bit and can we make the wording clearer on the download page? The current description is " Windows AMD64 binary". All the best, Michael Original Message Subject:Download Pa

Re: [Python-Dev] Fwd: Download Page - AMD64

2010-01-12 Thread Michael Foord
ey will not work on Intel Itanium Processors (formerly IA-64).""" To those not intimately aware of the history and present of 64 bit architecture this sentence would be a great addition - thanks. I'm adding it now as a footnote. A

Re: [Python-Dev] Fwd: Download Page - AMD64

2010-01-12 Thread Michael Foord
On 12/01/2010 23:40, Michael Foord wrote: On 12/01/2010 23:28, "Martin v. Löwis" wrote: [snip...] """The binaries for AMD64 will also work on processors that implement the Intel 64 architecture (formerly EM64T), i.e. the architecture that Microsoft calls x64, and

Re: [Python-Dev] Fwd: Download Page - AMD64

2010-01-12 Thread Michael Foord
On 12/01/2010 23:41, Christian Heimes wrote: Michael Foord wrote: I presume the email below is about the Windows binary. Does the AMD64 release work on intel 64bit and can we make the wording clearer on the download page? The current description is " Windows AMD64 binary".

Re: [Python-Dev] Fwd: Download Page - AMD64

2010-01-13 Thread Michael Foord
On 13/01/2010 06:11, "Martin v. Löwis" wrote: How about: * Python 2.6.4 Windows X86-64 installer (Windows AMD64 / Intel 64 / X86-64 binary -- does not include source) instead of: * Python 2.6.4 Windows AMD64 installer (Windows AMD64 binary -- does not include source) -1. AMD doesn't

Re: [Python-Dev] Fwd: Download Page - AMD64

2010-01-13 Thread Michael Foord
On 13/01/2010 19:13, "Martin v. Löwis" wrote: * Python 2.6.4 Windows X86-64 installer (Windows AMD64 / Intel 64 / X86-64 binary -- does not include source) instead of: * Python 2.6.4 Windows AMD64 installer (Windows AMD64 binary -- does not include source) -1. AMD doesn't want

Re: [Python-Dev] PYTHON3PATH

2010-01-14 Thread Michael Foord
On 14/01/2010 21:02, Nick Coghlan wrote: However, I agree that that is a fairly unlikely scenario (since preinstalled Pythons tend not to rely on the e Well, on the other hand I think that during the next few years it will be increasingly common for developers (and possibly users) to have Pytho

Re: [Python-Dev] Enhancing the shutil module

2010-01-17 Thread Michael Foord
On 17/01/2010 19:51, Tarek Ziadé wrote: Hello, For 2.7/3.2, I am in the process of removing modules in Distutils that can be replaced by calls to existing functions in stdlib. For instance, "dir_util" and "file_util" (old modules from the Python 1.x era) are going away in favor of calls to shuti

Re: [Python-Dev] Enhancing the shutil module

2010-01-17 Thread Michael Foord
On 17/01/2010 20:04, Antoine Pitrou wrote: Tarek Ziadé gmail.com> writes: Another module I would like to move away from Distutils is "archive_util". It contains helpers to build archives, whether they are zip or tar files. I propose to move those useful functions into shutil, as this seems

Re: [Python-Dev] Enhancing the shutil module

2010-01-18 Thread Michael Foord
On 18/01/2010 13:46, Doug Hellmann wrote: On Jan 18, 2010, at 8:34 AM, Masklinn wrote: On 18 Jan 2010, at 13:40 , Nick Coghlan wrote: Tarek Ziadé wrote: There's one remaining external call for "zip" done if the zip module is not found, but I am happy to remove it and throw an exception if i

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-20 Thread Michael Foord
On 20/01/2010 21:37, M.-A. Lemburg wrote: David Malcolm wrote: I'm thinking of making this downstream change to Fedora's site.py (and possibly in future RHEL releases) so that the default encoding automatically picks up the encoding from the locale: def setencoding(): """Set the str

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-21 Thread Michael Foord
n use site.py and / or environment variables for global switches. All the best, Michael Foord -gps disclaimer: I work for Google but not on unladen-swallow. My motivation is to improve the future of CPython for the entire world in the long

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-21 Thread Michael Foord
On 20/01/2010 23:46, MRAB wrote: Martin v. Löwis wrote: The only supported default encodings in Python are: Python 2.x: ASCII Python 3.x: UTF-8 Is this true? For 3.x: yes. However, the default encoding is much less relevant in 3.x, since Python will never implicitly use the default encoding,

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-21 Thread Michael Foord
On 21/01/2010 11:15, M.-A. Lemburg wrote: Michael Foord wrote: On 20/01/2010 21:37, M.-A. Lemburg wrote: The only supported default encodings in Python are: Python 2.x: ASCII Python 3.x: UTF-8 Is this true? I thought the default encoding in Python 3 was platform

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-21 Thread Michael Foord
On 21/01/2010 12:00, M.-A. Lemburg wrote: Michael Foord wrote: On 21/01/2010 11:15, M.-A. Lemburg wrote: Michael Foord wrote: On 20/01/2010 21:37, M.-A. Lemburg wrote: The only supported default encodings in Python are: Python 2.x: ASCII Python 3.x: UTF

Re: [Python-Dev] PyCon Keynote

2010-01-21 Thread Michael Foord
On 21/01/2010 15:03, Thomas Wouters wrote: On Wed, Jan 13, 2010 at 19:51, Guido van Rossum > wrote: Please mail me topics you'd like to hear me talk about in my keynote at PyCon this year. How about something completely different... ? Your history of Pytho

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-22 Thread Michael Foord
ete list from the memory. If you really are after a complete list, you'll need to perform a thorough code review. For a few examples where some kind of default encoding is applied, consider XML and the dbm interfaces. Ok. Understood. Thanks Michael Foord Regards, Martin -- htt

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-22 Thread Michael Foord
ed. It is provided as a separate tool (and often invoked by application installers) rather than allowing the native code to be distributed because the results can be system specific. Michael Foord S ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-22 Thread Michael Foord
On 22/01/2010 14:18, Karen Tracey wrote: On Fri, Jan 22, 2010 at 7:38 AM, Michael Foord mailto:fuzzy...@voidspace.org.uk>> wrote: On 21/01/2010 21:21, "Martin v. Löwis" wrote: Where the default *file system encoding* is used (i.e. text files are

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-22 Thread Michael Foord
On 22/01/2010 14:33, Antoine Pitrou wrote: Michael Foord voidspace.org.uk> writes: Heh, so we have two different encoding mechanisms both called "default encoding". One is always utf-8 in Python 3 and one is platform dependent... Great. The former is merely internal

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-22 Thread Michael Foord
On 22/01/2010 22:43, "Martin v. Löwis" wrote: It is provided as a separate tool (and often invoked by application installers) rather than allowing the native code to be distributed because the results can be system specific. Actually, they have now changed the implementation: it is now a s

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-24 Thread Michael Foord
On 23 Jan 2010, at 07:53, "Martin v. Löwis" wrote: [snip...] Yes, definitely. It is this very reasoning that caused Python 2.x to use ASCII as the default encoding (when mixing strings and unicode), and, for the entire lifetime of 2.x, has caused endless pain for developers, which simply fai

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-24 Thread Michael Foord
On 24/01/2010 14:23, Stephen J. Turnbull wrote: Michael Foord writes: > This is why I'm keen that by *default* Python should honour the UTF8 > signature when reading files; Unfortunately, your caveat about "a lot of the time it will *seem* to work" applies to this a

Re: [Python-Dev] Proposed downstream change to site.py in Fedora (sys.defaultencoding)

2010-01-24 Thread Michael Foord
On 24/01/2010 18:41, "Martin v. Löwis" wrote: However it is likely to be often wrong, and where the user's locale specifies an encoding like CP1252 then it will result in silent corruption rather than an immediate exception. Why do you say that? Why do you think it will likely be often wro

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-25 Thread Michael Foord
On 26/01/2010 00:12, Christian Heimes wrote: Benjamin Peterson wrote: Yes, but in either of these cases is there an excellent performance improvement to be gained and is it worth the complexity of your optimization? I think not. Me, too. I already tried to explain Steve that I have us

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-25 Thread Michael Foord
On 26/01/2010 00:28, Christian Heimes wrote: Michael Foord wrote: How great is the complication? Making list.pop(0) efficient sounds like a worthy goal, particularly given that the reason you don't use it is because you *know* it is inefficient (so the fact that you don't us

Re: [Python-Dev] PyCon Keynote

2010-01-26 Thread Michael Foord
and setup all the shortcuts so that they can actually use it. Again - done by your installer, not provided by the language. It just isn't up to modern standards. What standards? Even with my two years experience in python I had no knowledge of this trick. A whole two years? ;

Re: [Python-Dev] Rich Comparison recipe wrong?

2010-01-26 Thread Michael Foord
On 26/01/2010 12:22, Nick Coghlan wrote: Lennart Regebro wrote: It never gets to that root comparison, as several of that types comparisons just refer back to the type who returns NotImplemented. To solve it you need to never refer to the other type in your comparisons. And as far as I see t

Re: [Python-Dev] Help wanted on a code generator project

2010-01-26 Thread Michael Foord
On 26/01/2010 12:04, Yingjie Lan wrote: note that this is quite off-topic for this list, which is about the development of the CPython interpreter and runtime environment. Sorry if this is bothering you. I thought here are a lot of people who knows how to write extensions, and has a lot o

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Michael Foord
d the data similarly and everything is sweet. If the programmer is building applications for Windows then they should create an installer that installs into the right place. No argument about that. Python doesn't need to, and *shouldn't* do anything to accommodate that. All the be

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Michael Foord
On 27/01/2010 13:04, David Lyon wrote: On 27/01/2010 11:21, Michael Foord wrote: .. If a Python programmer wants to create an application that is properly 'installed' on Windows then the *right* thing to do is to create an installer - and that uses infrastructure not pro

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-29 Thread Michael Foord
On 29/01/2010 13:24, s...@pobox.com wrote: Cesare> ... (you can find the wpython 1.0 final here Cesare> ). I tried downloading it. Something about wpython10.7z and wpython10_fix.7z. What's a 7z file? What tool on my Mac will unpack

Re: [Python-Dev] Forking and Multithreading - enemy brothers

2010-02-01 Thread Michael Foord
On 01/02/2010 23:03, Reid Kleckner wrote: On Mon, Feb 1, 2010 at 5:48 PM, Jesse Noller wrote: Your reasonable argument is making it difficult for me to be irrational about this. No problem. :) This begs the question - assuming a patch that clones the behavior of win32 for mult

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

2010-02-03 Thread Michael Foord
On 03/02/2010 06:50, Barry Warsaw wrote: I have to say up front that I'm somewhat shocked at how quickly this thread has exploded! Since I'm sprinting this week, I haven't thoroughly read every message and won't have time tonight to answer every question, but I'll try to pick out some common ide

Re: [Python-Dev] __file__

2010-02-03 Thread Michael Foord
On 03/02/2010 22:05, Brett Cannon wrote: On Wed, Feb 3, 2010 at 13:52, Nick Coghlan wrote: Brett Cannon wrote: On Wed, Feb 3, 2010 at 05:07, Antoine Pitrou wrote: Barry Warsaw python.org> writes: Python 3 uses the .py file for __file__ but I'd like to see a tra

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

2010-02-07 Thread Michael Foord
by April 3rd (first beta release according to the schedule [1]). Michael Foord [1] http://www.python.org/dev/peps/pep-0373/#release-schedule -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your

[Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
TestCase API is big enough already All the best, Michael Foord [1] Mostly in revision 7-837. http://svn.python.org/view?view=rev&revision=70837 -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of

[Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Michael Foord
unittest (modulo licensing issues which he is happy to work on). I'm not sure what response I expect from this email, and neither option will be implemented without further discussion - possibly at the PyCon sprints - but I thought I would make it clear what the possible directions ar

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Michael Foord
On 09/02/2010 17:57, Antoine Pitrou wrote: Le Tue, 09 Feb 2010 16:42:50 +, Michael Foord a écrit : The next 'big' change to unittest will (may?) be the introduction of class and module level setUp and tearDown. This was discussed on Python-ideas and Guido supported them. T

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Michael Foord
On 09/02/2010 19:00, Olemis Lang wrote: Sorry. I had not finished the previous message On Tue, Feb 9, 2010 at 1:55 PM, Olemis Lang wrote: On Tue, Feb 9, 2010 at 1:29 PM, Olemis Lang wrote: On Tue, Feb 9, 2010 at 11:42 AM, Michael Foord wrote: Hello all, Several authors

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Michael Foord
On 09/02/2010 19:14, Holger Krekel wrote: [snip...] and all tests in the class / module will have an explicit skip in the event of a setUp failure. I think reporting tests as skipped when the setup failed is a bad idea. Out of several years of practise with skips and large test suites

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
to TextTestRunner allowing you to pass in a result class (or other callable) that _makeResult will use to create the result object. Should be uncontroversial. :-) http://bugs.python.org/issue7893 Michael On 09/02/2010 16:40, Michael Foord wrote: Hello all, I've been looking at outsta

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
On 09/02/2010 22:22, Olemis Lang wrote: On Tue, Feb 9, 2010 at 4:50 PM, Ben Finney wrote: Michael Foord writes: It seems to me that the same effect (always reporting test name) can be achieved in _TextTestResult.getDescription(). I propose to revert the change to

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-09 Thread Michael Foord
On 09/02/2010 21:50, Ben Finney wrote: Michael Foord writes: It seems to me that the same effect (always reporting test name) can be achieved in _TextTestResult.getDescription(). I propose to revert the change to TestCase.shortDescription() (which has both a horrible name and a horrible

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Michael Foord
On 09/02/2010 21:57, Ben Finney wrote: Michael Foord writes: The next 'big' change to unittest will (may?) be the introduction of class and module level setUp and tearDown. This was discussed on Python-ideas and Guido supported them. They can be useful but are also very easy to

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-10 Thread Michael Foord
On 10/02/2010 01:07, Ben Finney wrote: Michael Foord writes: On 09/02/2010 21:50, Ben Finney wrote: I understood the point of ‘TestCase.shortDescription’, and indeed the point of that particular name, was to be clear that some *other* text could be the short description for the

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-11 Thread Michael Foord
On 11/02/2010 12:30, Nick Coghlan wrote: Michael Foord wrote: I'm not sure what response I expect from this email, and neither option will be implemented without further discussion - possibly at the PyCon sprints - but I thought I would make it clear what the possible direction

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Michael Foord
On 11/02/2010 12:13, Nick Coghlan wrote: Michael Foord wrote: Given that the change broke something, and the desired effect can be gained with a different change, I don't really see a downside to the change I'm proposing (reverting shortDescription and moving the code that add

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-11 Thread Michael Foord
On 11/02/2010 15:56, R. David Murray wrote: On Thu, 11 Feb 2010 12:41:37 +, Michael Foord wrote: On 11/02/2010 12:30, Nick Coghlan wrote: The test framework might promise to do the following for each test: with get_module_cm(test_instance): # However identified with

Re: [Python-Dev] unittest: shortDescription, _TextTestResult and other issues

2010-02-11 Thread Michael Foord
On 11/02/2010 22:03, Ben Finney wrote: Michael Foord writes: It is done. The slight disadvantage is that overriding shortDescription on your own TestCase no longer removes the test name from being added to the short description. That's a significant disadvantage; it can e

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-12 Thread Michael Foord
On 11/02/2010 18:11, Guido van Rossum wrote: On Tue, Feb 9, 2010 at 8:42 AM, Michael Foord wrote: The next 'big' change to unittest will (may?) be the introduction of class and module level setUp and tearDown. This was discussed on Python-ideas and Guido supported them. They can

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-12 Thread Michael Foord
'workdir' ends up being an instance attribute, why not make it a dict instead of a list of tuples? Or even better, a could each resource become a class variable? I guess we could introspect the class for every attribute that is a resource, but I prefer some way of explicitly declaring wh

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-15 Thread Michael Foord
On 13/02/2010 11:00, Robert Collins wrote: On Sat, 2010-02-13 at 10:42 +, Antoine Pitrou wrote: Robert Collins robertcollins.net> writes: I'm not personally very keen on inspecting everything in self.__dict__, I suspect it would tickle bugs in other unittest extensions. However

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-15 Thread Michael Foord
On 13/02/2010 04:01, Glyph Lefkowitz wrote: [snipping some good points...] Regarding the objection that setUp/tearDown for classes would run into issues with subclassing, I propose to let the standard semantics of subclasses do their job. Thus a subclass that overrides setUpClass or tearDownClass

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-15 Thread Michael Foord
On 15/02/2010 17:05, Michael Foord wrote: [snip] This is also an interesting point. The 'naive' implementation, which I think I prefer, only runs the setUpModule of modules actually containing tests. Similarly setUpClass is only called on classes with actual tests, although they m

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-15 Thread Michael Foord
On 15/02/2010 20:27, Glyph Lefkowitz wrote: On Feb 13, 2010, at 12:46 PM, Guido van Rossum wrote: On Fri, Feb 12, 2010 at 8:01 PM, Glyph Lefkowitz mailto:gl...@twistedmatrix.com>> wrote: On Feb 11, 2010, at 1:11 PM, Guido van Rossum wrote: For what it's worth, I am a big fan of abusing test

Re: [Python-Dev] Add UTC to 2.7 (PyCon sprint idea)

2010-02-17 Thread Michael Foord
ould then still be available and released regularly without being tied to the Python release schedule. That assumes that the author of pytz *wants* it to come into the standard library of course. Michael Foord > -- > Lennart Regebro: Python, Zope, Plone, Grok > http://regebro.wor

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

2010-02-19 Thread Michael Foord
On 19/02/2010 16:30, Gregory P. Smith wrote: On Fri, Feb 19, 2010 at 4:18 PM, P.J. Eby wrote: 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 hope if this id

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

2010-02-19 Thread Michael Foord
-- http://www.ironpythoninaction.com On 19 Feb 2010, at 22:52, Eric Smith wrote: 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

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

2010-02-21 Thread Michael Foord
On 21/02/2010 08:45, Guido van Rossum wrote: On Sun, Feb 21, 2010 at 4:30 AM, Eric Smith wrote: 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 n

Re: [Python-Dev] Question for you

2010-02-23 Thread Michael Foord
Hello Connor, I think you have the wrong email address - this is Python-dev, an email list for the development *of* Python. All the best, Michael Foord On 23/02/2010 15:41, Connor, Craig A. wrote: Hello, Dave; My name is Craig Connor and I am a senior s/w developer at Northrop

Re: [Python-Dev] __file__

2010-02-25 Thread Michael Foord
On 25/02/2010 23:56, Greg Ewing wrote: Barry Warsaw wrote: We discussed this at Pycon and agreed that we will not support source-less deployments by default. The source file must exist or it will be an ImportError. This does not mean source-less deployments are not possible though. To support

[Python-Dev] Pickling named tuples on IronPython

2010-02-26 Thread Michael Foord
Hello Raymond, Named tuples have compatibility code to enable them to work on IronPython without frame support, but unfortunately this doesn't allow pickling / unpickling of named tuples. One fix is to manually set __module__ on the named tuples once created, but I wonder if it would be poss

Re: [Python-Dev] Another version of Python

2010-02-26 Thread Michael Foord
On 26/02/2010 17:26, s...@pobox.com wrote: >> Â Â http://www.staringispolite.com/likepython/ Simon> I'm reminded of LOLPython:. You know, I'm thinking while both are obviously tongue-in-cheek we should probably include them on the /dev/implementations page of p

Re: [Python-Dev] __file__

2010-02-26 Thread Michael Foord
On 26/02/2010 22:09, Brett Cannon wrote: On Thu, Feb 25, 2010 at 16:13, Greg Ewing <mailto:greg.ew...@canterbury.ac.nz>> wrote: Michael Foord wrote: I thought we agreed at the language summit that if a .pyc was in the place of the source file it *could* be impo

Re: [Python-Dev] __file__

2010-02-26 Thread Michael Foord
On 26/02/2010 23:35, Glenn Linderman wrote: On approximately 2/26/2010 2:55 PM, came the following characters from the keyboard of Brett Cannon: Maybe Greg's and my response to the mention of dropping this feature is too strong -- after all we're both dinosaurs. And maybe the developers who wan

Re: [Python-Dev] __file__

2010-02-27 Thread Michael Foord
it yourself - doesn't make a very convincing argument. Michael Foord regards Antoine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pyt

Re: [Python-Dev] __file__

2010-02-28 Thread Michael Foord
-- http://www.ironpythoninaction.com On 28 Feb 2010, at 12:19, Floris Bruynooghe wrote: On Sun, Feb 28, 2010 at 02:51:16PM +1300, Greg Ewing wrote: Floris Bruynooghe wrote: (But even then I'm not convinced that would double the stat calls for normal users, only for those who only sh

[Python-Dev] FWD: Broken link in 2.6.5 rc 1 download page.

2010-03-03 Thread Michael Foord
As far as I can tell there is no Python 2.6.5 documentation online and the link to 3.1 docs is actually for 3.1.1 whilst the link for 3.1.1 docs is dead. The actual documentation doesn't seem to be in the pydotorg svn repository so I guess this a release manager issue? Michael

Re: [Python-Dev] doctest, unicode repr, and 2to3

2010-03-05 Thread Michael Foord
On 05/03/2010 15:56, Antoine Pitrou wrote: Le Thu, 4 Mar 2010 23:30:12 -0500, Barry Warsaw a écrit : If you really want to test that it's a unicode, shouldn't you actually test its type? (I'm not sure what would happen with that under 2to3.) Besides, the type of the string is very rarely

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-06 Thread Michael Foord
On 06/03/2010 23:37, Greg Ewing wrote: Phillip J. Eby wrote: while at the same time creating yet another alternative (and mutually incompatible) event loop system in the stdlib, beyond the ones that are already in asyncore, tkinter, and the various SocketServer subclasses. Aaargh... that's t

[Python-Dev] unittest2 plus class and module level fixtures in unittest

2010-03-07 Thread Michael Foord
ng to override functionality. This will take a fair bit of discussion and experimentation, so I will probably trial this in unittest2 first. It would be nice to have something in place for the release of 3.2, but that may be ambitious. All the best, Michael Foord -- http://www.ironpythoninacti

Re: [Python-Dev] Catch SIGINT at Python startup

2010-03-08 Thread Michael Foord
On 08/03/2010 13:12, Victor Stinner wrote: Hi, I wrote patches for the issue #3137 and I would like your opinion about my solution (not directly about the patches): I propose to consider a SIGINT during startup as a fatal error. If you press CTRL+c while Python is starting, Python displays an er

Re: [Python-Dev] unittest2 plus class and module level fixtures in unittest

2010-03-08 Thread Michael Foord
On 08/03/2010 01:11, Antoine Pitrou wrote: Le Mon, 08 Mar 2010 00:51:02 +, Michael Foord a écrit : In other news, class and module fixtures (setUpClass / tearDownClass / setUpModule / tearDownModule) are now implemented in unittest (in trunk - not yet merged to py3k). These features

Re: [Python-Dev] FWD: http://www.python.org/dev/patches/

2010-03-10 Thread Michael Foord
> sure to set the "Category" field to "Documentation". There doesn't appear to be a field named "Category". Perhaps there used to be? The correct field name now appears to be "Components". Yep, 'Components' is correct. I&

Re: [Python-Dev] __file__ and bytecode-only

2010-03-12 Thread Michael Foord
On 12/03/2010 19:53, Barry Warsaw wrote: On Mar 04, 2010, at 11:34 PM, Nick Coghlan wrote: The remaining open question to my mind is whether or not there should be a -X option to control the bytecode generation. E.g.: -Xcache_bytecode=no (don't write bytecode files at all) -B and $P

Re: [Python-Dev] __file__ and bytecode-only

2010-03-12 Thread Michael Foord
On 12/03/2010 22:48, Michael Foord wrote: On 12/03/2010 19:53, Barry Warsaw wrote: On Mar 04, 2010, at 11:34 PM, Nick Coghlan wrote: The remaining open question to my mind is whether or not there should be a -X option to control the bytecode generation. E.g.: -Xcache_bytecode=no (don&#

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Michael Foord
On 18/03/2010 18:44, Antoine Pitrou wrote: [snip...] Seems like it would be better to raise an exception, and in the documentation for the exception point out that turning off the exception (if it should be decided that that should be possible, which could be good for compatibility), would regre

Re: [Python-Dev] binary operation heuristics -- bug or undocumented?

2010-03-19 Thread Michael Foord
On 19/03/2010 12:46, Alex A. Naanou wrote: [snip...] class C(object): ... def __radd__(self, other): ... print 'C: adding C and %s objects.' % other.__class__.__name__ ... a, b, c = A(), B(), C() 1 + c C: adding C and int objects. That is the whole

Re: [Python-Dev] Attribute lookup ambiguity

2010-03-19 Thread Michael Foord
On 19/03/2010 18:58, Pascal Chambon wrote: Hello I've already crossed a bunch of articles detailing python's attribute lookup semantic (__dict__, descriptors, order of base class traversing...), but I have never seen, so far, an explanation of WHICH method did waht, exactly. I assumed that

Re: [Python-Dev] containment checking

2010-03-19 Thread Michael Foord
On 20/03/2010 00:15, Glenn Linderman wrote: On 3/19/2010 4:58 PM, Antoine Pitrou wrote: Glenn Linderman g.nevcal.com> writes: > > If there's a bug in your __eq__ method, it may or may not raise an > exception, which may or may not get you wrong containment results. But > it will probably get y

Re: [Python-Dev] containment checking

2010-03-19 Thread Michael Foord
On 20/03/2010 00:19, Glenn Linderman wrote: On 3/19/2010 5:18 PM, Michael Foord wrote: will probably get you buggy results, somehow or another. That's what > design, code reviews, and testing are for. We'll have to "agree to disagree" then. If you want error silencing

Re: [Python-Dev] Attribute lookup ambiguity

2010-03-20 Thread Michael Foord
On 20/03/2010 12:00, Pascal Chambon wrote: Michael Foord a écrit : On 19/03/2010 18:58, Pascal Chambon wrote: Hello I've already crossed a bunch of articles detailing python's attribute lookup semantic (__dict__, descriptors, order of base class traversing...), but I have neve

[Python-Dev] Optional delta argument for assertAlmostEqual

2010-03-26 Thread Michael Foord
Hello all, A user has suggested an optional argument to unittest.TestCase.assertAlmostEqual for specifying a maximum difference between the expected and actual values, instead of using rounding. This sounds great to me as the default implementation of assertAlmostEqual has *never* been usefu

Re: [Python-Dev] OOP On Web

2010-03-29 Thread Michael Foord
have google and gmane web interfaces as well I believe. You can find more information at: http://www.python.org/community/lists/ All the best, Michael Foord I have two files (class.py and object.py). Now, within object.py I create two objects from the class.py file. The class.py file

[Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Michael Foord
Hello all, Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7? http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet I needed this in unittest and used a WeakKeyDictionary instead. Michael -- http://www.ironpythoninaction.com/ http://www.void

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Michael Foord
On 29/03/2010 18:16, Michael Foord wrote: Hello all, Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7? http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet I needed this in unittest and used a WeakKeyDictionary instead. Hmmm... I was

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Michael Foord
On 29/03/2010 19:14, Daniel Stutzbach wrote: On Mon, Mar 29, 2010 at 12:16 PM, Michael Foord mailto:mich...@voidspace.org.uk>> wrote: Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7? http://docs.python.org/py3k/library/weakre

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Michael Foord
On 29/03/2010 20:20, Michael Foord wrote: On 29/03/2010 18:16, Michael Foord wrote: Hello all, Python 3 includes a WeakSet implementation. Any objections to me backporting this to 2.7? http://docs.python.org/py3k/library/weakref.html#weakref.WeakSet I needed this in unittest and used a

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Michael Foord
On 29/03/2010 20:46, Daniel Stutzbach wrote: On Mon, Mar 29, 2010 at 2:21 PM, Michael Foord mailto:mich...@voidspace.org.uk>> wrote: It should be possible to fix it with a WeakKeyDictionary instead of WeakSet. True. I should have said "Backporting WeakSet would make it *

Re: [Python-Dev] Contribute

2010-03-29 Thread Michael Foord
On 30/03/2010 00:06, Valerio Turturici wrote: Hello everyone, my name's Valerio, i'm italian and i study computer science at University of Pisa. I'm honored to speak and learn from people like you. My knowledge of C language is not very advanced, but i know Python well enough. I really like to

Re: [Python-Dev] trunk doctests fail to execute with 2.7 alpha

2010-04-01 Thread Michael Foord
ilures [42795 refs] All the best, Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agree

Re: [Python-Dev] trunk doctests fail to execute with 2.7 alpha

2010-04-01 Thread Michael Foord
On 01/04/2010 13:15, anatoly techtonik wrote: Thanks. I've copied test/test_support.py form Lib into 2.7 alpha directory and it seems to work. Although it doesn't seem good to me to mix test support library with tests themselves. What do you mean by "it doesn't seem good to me to mix test sup

Re: [Python-Dev] python compiler

2010-04-05 Thread Michael Foord
On 05/04/2010 15:54, will...@ufpa.br wrote: for a college project, I proposed to create a compiler for python. I've read something about it and maybe I saw that made a bad choice. I hear everyone's opinion respond. Python itself is a highly dynamic language and not amenable to direct compi

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