Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Cameron Simpson
On 30Dec2012 07:42, Lennart Regebro wrote: | On Sat, Dec 29, 2012 at 11:55 PM, Cameron Simpson wrote: | | > On 29Dec2012 21:16, Lennart Regebro wrote: | > | On Sat, Dec 29, 2012 at 8:04 PM, Antoine Pitrou | > wrote: | > | > Why should we care about that situation if we *do* provide a database?

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-30 Thread Steven D'Aprano
On 29/12/12 15:40, Lennart Regebro wrote: On Sat, Dec 29, 2012 at 2:23 AM, Steven D'Apranowrote: The PEP says: * New function :``timezone(name=None, db_path=None)`` This function takes a name string that must be a string specifying a valid zoneinfo timezone, ie "US/Eastern", "Europe/Wa

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Ronald Oussoren
On 29 Dec, 2012, at 5:48, Lennart Regebro wrote: > On Fri, Dec 28, 2012 at 10:12 PM, Ronald Oussoren > wrote: > > On 28 Dec, 2012, at 21:23, Lennart Regebro wrote: > > > Happy Holidays! Here is the update of PEP 431 with the changes that emerged > > after the earlier discussion. > > Why i

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Richard Oudkerk
On 30/12/2012 12:31am, Eli Bendersky wrote: Would it make sense to save the sys.modules state and restore it in test___all__ so that sys.modules isn't affected by this test? Deleting module objects can cause problems because the destructor replaces values in the globals dict by None. If anyth

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Eli Bendersky
On Sat, Dec 29, 2012 at 5:34 PM, Nick Coghlan wrote: > On Sun, Dec 30, 2012 at 10:46 AM, Benjamin Peterson > wrote: > > 2012/12/29 Eli Bendersky : > >> Hi, > >> > >> This came up while investigating some test-order-dependency failures in > >> issue 16076. > >> > >> test___all__ goes over modules

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Stefan Krah
Eli Bendersky wrote: > Yes, this is the solution currently used in test_xml_etree. However, once > pickling tests are added things stop working. Pickle uses __import__ to import > the module a class belongs to, bypassing all such trickery. So if test___all__ > got _elementtree into sys.modules, pi

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Eli Bendersky
On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah wrote: > Eli Bendersky wrote: > > Yes, this is the solution currently used in test_xml_etree. However, once > > pickling tests are added things stop working. Pickle uses __import__ to > import > > the module a class belongs to, bypassing all such tric

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Eli Bendersky
On Sun, Dec 30, 2012 at 6:06 AM, Eli Bendersky wrote: > > > > On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah wrote: > >> Eli Bendersky wrote: >> > Yes, this is the solution currently used in test_xml_etree. However, >> once >> > pickling tests are added things stop working. Pickle uses __import__

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Eli Bendersky
On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah wrote: > Eli Bendersky wrote: > > Yes, this is the solution currently used in test_xml_etree. However, once > > pickling tests are added things stop working. Pickle uses __import__ to > import > > the module a class belongs to, bypassing all such tric

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Stefan Krah
Eli Bendersky wrote: > Yes, this seems to have done the trick. Thanks for the suggestion. > > I'm still curious about the test-in-clean-env question though. I think that in general we do want to check unexpected interactions between tests, that's also why the test order is randomized. Here's an

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Nick Coghlan
On Mon, Dec 31, 2012 at 12:19 AM, Eli Bendersky wrote: > > > > On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah wrote: >> >> Eli Bendersky wrote: >> > Yes, this is the solution currently used in test_xml_etree. However, >> > once >> > pickling tests are added things stop working. Pickle uses __impor

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread R. David Murray
On Mon, 31 Dec 2012 00:38:47 +1000, Nick Coghlan wrote: > On Mon, Dec 31, 2012 at 12:19 AM, Eli Bendersky wrote: > > On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah wrote: > >> > >> Eli Bendersky wrote: > >> > Yes, this is the solution currently used in test_xml_etree. However, > >> > once > >> >

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/30/2012 05:19 AM, Steven D'Aprano wrote: > There is no "Etc/GMT+11" named here: > > http://en.wikipedia.org/wiki/List_of_tz_database_time_zones > > nor is it included in /usr/share/zoneinfo/zone.tab in either of the > systems I looked at (one D

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Greg Ewing
Richard Oudkerk wrote: Personally I would like to get rid of the "purge globals" behaviour for modules deleted before shutdown has started: if someone manipulates sys.modules then they can just call gc.collect() if they want to promptly get rid of orphaned reference cycles. Now that we have c

Re: [Python-Dev] PYTHONPATH processing change from 2.6 to 2.7 and Mac bundle builder problems

2012-12-30 Thread Barry Scott
Issue filed as http://bugs.python.org/issue16821 I now have a fix that I can use, a trivia patch to the bundlebuilder.py from 2.6 gives me working code. The bundelbuilder in 2.7 is not in good shape, the code changes from the 2.6 version have bugs in them, at least one is a show stopper. I'd have

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-30 Thread Antoine Pitrou
On Mon, 31 Dec 2012 10:25:25 +1300 Greg Ewing wrote: > Richard Oudkerk wrote: > > Personally I would like to get rid of the "purge globals" behaviour for > > modules deleted before shutdown has started: if someone manipulates > > sys.modules then they can just call gc.collect() if they want to

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-30 Thread Steven D'Aprano
On 30/12/12 07:16, Lennart Regebro wrote: If no database is found an ``UnknownTimeZoneError`` or subclass thereof will be raised with a message explaining that no zoneinfo database can be found, but that you can install one with the ``tzdata-update`` package. Why should we car

[Python-Dev] BDFL delegate for Daniel Holth's packaging PEPs?

2012-12-30 Thread Nick Coghlan
Does anyone object to my naming myself as BDFL-Delegate for Daniel Holth's packaging PEPs? PEP 425 Compatibility Tags for Built Distributions PEP 426 Metadata for Python Software Packages 1.3 PEP 427 The Wheel Binary Package Format 0.1 I've mentioned doing so before, but IIRC it was in the dep