Re: [Python-Dev] Proposing PEP 376

2010-04-01 Thread Glyph Lefkowitz
First: thank you distutils-sig, and especially Tarek, for spearheading this effort! I'm particularly excited about the "Distribution" object that this PEP specifies. I've been waiting for a long time to be able to load an object describing a distribution, rather than running setup.py and hopin

Re: [Python-Dev] copying of itertools iterators

2010-04-01 Thread Terry Reedy
On 4/1/2010 7:20 PM, Andrew Svetlov wrote: using of copy.copy for simple iterators is forbidden import copy copy.copy(iter([1, 2, 3])) Traceback (most recent call last): File "", line 1, in File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy return _reconstruct(x, rv, 0)

Re: [Python-Dev] copying of itertools iterators

2010-04-01 Thread Raymond Hettinger
On Apr 1, 2010, at 4:20 PM, Andrew Svetlov wrote: > using of copy.copy for simple iterators is forbidden > import copy copy.copy(iter([1, 2, 3])) > Traceback (most recent call last): > File "", line 1, in > File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy >return

Re: [Python-Dev] Proposing PEP 376

2010-04-01 Thread P.J. Eby
At 11:51 PM 4/1/2010 +0200, Tarek Ziadé wrote: Hello, On behalf of the distutils-SIG, I'd like to propose PEP 376 for inclusion. This PEP is about defining a standard for installed Python projects. http://www.python.org/dev/peps/pep-0376/ Very nice; I have only a few questions/suggestions, an

[Python-Dev] copying of itertools iterators

2010-04-01 Thread Andrew Svetlov
using of copy.copy for simple iterators is forbidden >>> import copy >>> copy.copy(iter([1, 2, 3])) Traceback (most recent call last): File "", line 1, in File "/home/andrew/projects/py3k/Lib/copy.py", line 96, in copy return _reconstruct(x, rv, 0) File "/home/andrew/projects/py3k/Lib/c

Re: [Python-Dev] PEP 3147 working implementation

2010-04-01 Thread Barry Warsaw
On Apr 01, 2010, at 09:27 PM, Antoine Pitrou wrote: >If you want a review, perhaps you should post it to Rietveld. Good idea. http://codereview.appspot.com/842043/show I've never used Rietveld before so let me know if I need to do anything to invite you or otherwise make the review possible. I

[Python-Dev] Proposing PEP 376

2010-04-01 Thread Tarek Ziadé
Hello, On behalf of the distutils-SIG, I'd like to propose PEP 376 for inclusion. This PEP is about defining a standard for installed Python projects. http://www.python.org/dev/peps/pep-0376/ It was created : - to allow interoperability among all package managers. - to provide a set of APIs in

Re: [Python-Dev] PEP 3147 working implementation

2010-04-01 Thread Antoine Pitrou
Barry Warsaw python.org> writes: > > You can also view a live diff online: > > https://code.launchpad.net/~barry/python/pep3147/+merge/22648 If you want a review, perhaps you should post it to Rietveld. Regards Antoine. ___ Python-Dev mailing list

[Python-Dev] PEP 3147 working implementation

2010-04-01 Thread Barry Warsaw
I now have a working implementation of PEP 3147 which passes all the existing, and new, tests. I'm sure there's still work to do, but I think the branch is in good enough shape to start getting some feedback from python-dev. You can grab the changes in several ways. If you have Bazaar, you can c

Re: [Python-Dev] skip all TestCase methods if resource is not available

2010-04-01 Thread Florent Xicluna
2010/4/1 anatoly techtonik: > On Thu, Apr 1, 2010 at 8:02 PM, Florent Xicluna wrote: (...) >> >> Put it in unittest.TestCase.setUp() method. It should be enough. > > It fails with error instead if skip, as it should according to > http://docs.python.org/library/unittest.html#unittest.TestCase.setUp

Re: [Python-Dev] skip all TestCase methods if resource is not available

2010-04-01 Thread anatoly techtonik
On Thu, Apr 1, 2010 at 8:02 PM, Florent Xicluna wrote: > 2010/4/1 anatoly techtonik: >> Currently it is possible to mark individual test methods with: >>            test_support.requires('network') >> >> However, sometimes it is necessary to skip the whole TestCase if >> 'network' resource is not

Re: [Python-Dev] skip all TestCase methods if resource is not available

2010-04-01 Thread Florent Xicluna
2010/4/1 anatoly techtonik: > Currently it is possible to mark individual test methods with: >test_support.requires('network') > > However, sometimes it is necessary to skip the whole TestCase if > 'network' resource is not available counting the number of skipped > tests at the same ti

[Python-Dev] skip all TestCase methods if resource is not available

2010-04-01 Thread anatoly techtonik
Currently it is possible to mark individual test methods with: test_support.requires('network') However, sometimes it is necessary to skip the whole TestCase if 'network' resource is not available counting the number of skipped tests at the same time. Are there any standard means to do

Re: [Python-Dev] Modifying Grammar/grammar and other foul acts

2010-04-01 Thread Nick Coghlan
Gregg Lind wrote: > Thank you for the advice everyone. This seed has finally born (rotten) > fruit at: > > http://writeonly.wordpress.com/2010/04/01/whython-python-for-people-who-hate-whitespace/ > http://bitbucket.org/gregglind/python-whython3k/ Nicely done :) Cheers, Nick. -- Nick Coghlan

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

2010-04-01 Thread Nick Coghlan
anatoly techtonik wrote: > I mean that usually testing tools/libraries are separated from tests > itself, as well as data. test_support.py is not only located in the > same directory - it is even named in the same way. The test directory > looks like a mess with all these aux data files. But it is

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

2010-04-01 Thread anatoly techtonik
On Thu, Apr 1, 2010 at 3:59 PM, Michael Foord 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 go

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] trunk doctests fail to execute with 2.7 alpha

2010-04-01 Thread anatoly techtonik
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. -- anatoly t. On Thu, Apr 1, 2010 at 2:18 PM, Michael Foord wrote: > On 01/04/2010 10:05, anatoly techtonik wr

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

2010-04-01 Thread Michael Foord
On 01/04/2010 10:05, anatoly techtonik wrote: I can not compile Python itself, Building Python on Windows can be done with free tools, so it should be possible for you to build Python. See the instructions here: http://python.org/dev/faq/#id8 so I use Alpha version to run tests in trunk.

Re: [Python-Dev] Modifying Grammar/grammar and other foul acts

2010-04-01 Thread Gregg Lind
Thank you for the advice everyone. This seed has finally born (rotten) fruit at: http://writeonly.wordpress.com/2010/04/01/whython-python-for-people-who-hate-whitespace/ http://bitbucket.org/gregglind/python-whython3k/ On Fri, Mar 12, 2010 at 4:13 AM, Georg Brandl wrote: > Am 09.03.2010 14:42,

Re: [Python-Dev] Replacing threads with swapcontext()

2010-04-01 Thread Alexander Sabourenkov
Nick Coghlan wrote: Off the top of my head, recursion limit checks will definitely go haywire, and I would expect threading.local() and exception handling to explode at some point (although the latter depends on what you mean by "switching C stacks" - if you really are just fiddling the stack poi

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

2010-04-01 Thread anatoly techtonik
I can not compile Python itself, so I use Alpha version to run tests in trunk. Recent update broke successfully running tests. Any hints why this happened and how to fix them back? > C:\~env\Python27\python.exe test\test_doctest.py doctest (doctest) ... 66 tests with zero failures Traceback (most