From schmir at gmail.com Mon Aug 4 10:20:21 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Mon, 4 Aug 2008 10:20:21 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080723113426.GS22324@trillke.net> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> Message-ID: <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> On Wed, Jul 23, 2008 at 1:34 PM, holger krekel wrote: >> Thinking about it I have maybe another issue for 0.9.2. When using easy_install >> the greenlets module is not installed correctly. I haven't looked into >> this (python setup.py install works). But I will probably have a look >> at it in the next days.... > > cool. You may just work in release/0.9.x or branch off from there. > The current way of compiling c-extension modules is a hack IIRC ... > mostly because i am a bit clueless on how to this correctly, > particularly for win32. > Hi Holger, I took the time to look at it. It looks like a packaging issue. The archive found on cheeseshop ( http://pypi.python.org/packages/source/p/py/py-0.9.1.tar.gz#md5=daab8d9a814eab31809d973370d23600) does not even contain the c-extension directory. easy_install -f http://codespeak.net/py/dist/download.html works. Regards, - Ralf From holger at merlinux.eu Mon Aug 4 10:41:32 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 4 Aug 2008 10:41:32 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> Message-ID: <20080804084131.GL9619@trillke.net> Hi Ralf, On Mon, Aug 04, 2008 at 10:20 +0200, Ralf Schmitt wrote: > On Wed, Jul 23, 2008 at 1:34 PM, holger krekel wrote: > >> Thinking about it I have maybe another issue for 0.9.2. When using easy_install > >> the greenlets module is not installed correctly. I haven't looked into > >> this (python setup.py install works). But I will probably have a look > >> at it in the next days.... > > > > cool. You may just work in release/0.9.x or branch off from there. > > The current way of compiling c-extension modules is a hack IIRC ... > > mostly because i am a bit clueless on how to this correctly, > > particularly for win32. > > > > Hi Holger, > > I took the time to look at it. It looks like a packaging issue. > The archive found on cheeseshop ( > http://pypi.python.org/packages/source/p/py/py-0.9.1.tar.gz#md5=daab8d9a814eab31809d973370d23600) > does not even contain the > c-extension directory. > > easy_install -f http://codespeak.net/py/dist/download.html works. ok, but this requires a C-compiler on the client side. The thing i don't know much about is how to best provide eggs with pre-compiled c-extensions. best, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From schmir at gmail.com Mon Aug 4 11:01:40 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Mon, 4 Aug 2008 11:01:40 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080804084131.GL9619@trillke.net> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> Message-ID: <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> On Mon, Aug 4, 2008 at 10:41 AM, holger krekel wrote: > > ok, but this requires a C-compiler on the client side. > The thing i don't know much about is how to best provide eggs > with pre-compiled c-extensions. > ahh. ok. But you really shouldn't remove the c code... python setup.py bdist_wininst will create a binary installer suitable for windows. In case you use setuptools python setup.py bdist_egg would build an egg. But I guess then the problem is that your setup.py does not even compile the c-extensions when it's run? What about removing some magic and using a standard setup.py? Regards, - Ralf From holger at merlinux.eu Mon Aug 4 12:02:46 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 4 Aug 2008 12:02:46 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> Message-ID: <20080804100246.GN9619@trillke.net> Hi Ralf, On Mon, Aug 04, 2008 at 11:01 +0200, Ralf Schmitt wrote: > On Mon, Aug 4, 2008 at 10:41 AM, holger krekel wrote: > > > > > ok, but this requires a C-compiler on the client side. > > The thing i don't know much about is how to best provide eggs > > with pre-compiled c-extensions. > > > > ahh. ok. But you really shouldn't remove the c code... > python setup.py bdist_wininst will create a binary installer suitable > for windows. > In case you use setuptools python setup.py bdist_egg would build an egg. > But I guess then the problem is that your setup.py does not even > compile the c-extensions when it's run? > What about removing some magic and using a standard setup.py? that's a good idea, i think. Actually i'd like to have a (generated or manually written for now) setup.py that plays along nicely with setuptools. Maybe it'S good if it also works without setuptools? What do you think about starting a branch (based on release/0.9.x) to get it towards such a state? cheers, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From schmir at gmail.com Mon Aug 4 14:57:14 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Mon, 4 Aug 2008 14:57:14 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080804100246.GN9619@trillke.net> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> Message-ID: <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> On Mon, Aug 4, 2008 at 12:02 PM, holger krekel wrote: >> What about removing some magic and using a standard setup.py? > > that's a good idea, i think. > > Actually i'd like to have a (generated or manually written for > now) setup.py that plays along nicely with setuptools. > Maybe it'S good if it also works without setuptools? I would rather use setuptools. You could remove the whole py/bin/win32 directory as setuptools will create an .exe for each script. It's also easier to include data files, and makes development easier by being able to install the package in-place (python setup.py develop). However, it's also possible to create a standard distutils setup.py, which works with setuptools easy_install (you basically already have it) and which allows building a binary package for windows. > > What do you think about starting a branch (based on release/0.9.x) > to get it towards such a state? Yes, why not. You want me to donate some spare time to work on it? What do you think about distributing the greenlet module as it's own package? Do you know about http://pypi.python.org/pypi/greenlet/? (I've recently tried the eventlet library, which specifies the above as a dependency). Regards, - Ralf From holger at merlinux.eu Mon Aug 4 15:48:32 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 4 Aug 2008 15:48:32 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> References: <20080723062751.GM22324@trillke.net> <932f8baf0807230319r572ae634v93a07e2b8cc8b490@mail.gmail.com> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> Message-ID: <20080804134832.GO9619@trillke.net> Hi Ralf, On Mon, Aug 04, 2008 at 14:57 +0200, Ralf Schmitt wrote: > On Mon, Aug 4, 2008 at 12:02 PM, holger krekel wrote: > > >> What about removing some magic and using a standard setup.py? > > > > that's a good idea, i think. > > > > Actually i'd like to have a (generated or manually written for > > now) setup.py that plays along nicely with setuptools. > > Maybe it'S good if it also works without setuptools? > > I would rather use setuptools. You could remove the whole py/bin/win32 > directory as setuptools will create an .exe for each script. > It's also easier to include data files, and makes development easier > by being able to install the package in-place (python setup.py > develop). > > However, it's also possible to create a standard distutils setup.py, > which works with setuptools easy_install (you basically already have > it) and which allows building a binary package for windows. I don't have a strong opinion on this. But for python 2.3 and 2.4 i guess it's somewhat nice to be able to type "python setup.py install" and have it work indepedently from the question if setuptools is installed. > > What do you think about starting a branch (based on release/0.9.x) > > to get it towards such a state? > > Yes, why not. You want me to donate some spare time to work on it? would be nice! i'd also contribute, of course. > What do you think about distributing the greenlet module as it's own package? > Do you know about http://pypi.python.org/pypi/greenlet/? yes. is it actively maintained, though? > (I've recently tried the eventlet library, which specifies the above > as a dependency). originally the greenlet lib was moved into the py lib to ease maintenance and because it was used in PyPy and we didn't want to add dependencies there. Today, I'd be fine both ways - for 0.9.2 i guess greenlets should still be part of the py lib, though. cheers, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From schmir at gmail.com Mon Aug 4 16:11:38 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Mon, 4 Aug 2008 16:11:38 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080804134832.GO9619@trillke.net> References: <20080723062751.GM22324@trillke.net> <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> Message-ID: <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> On Mon, Aug 4, 2008 at 3:48 PM, holger krekel wrote: > I don't have a strong opinion on this. But for python 2.3 and > 2.4 i guess it's somewhat nice to be able to type "python setup.py install" > and have it work indepedently from the question if > setuptools is installed. > setuptools enabled packages come with a short bootstrap module which does install setuptools in case it is not installed. This should also work with python 2.3. (I think you will also need vs 6.0 instead of vs 2003 to build extensions for python 2.3 on windows) > >> What do you think about distributing the greenlet module as it's own package? >> Do you know about http://pypi.python.org/pypi/greenlet/? > > yes. is it actively maintained, though? > I don't think so..but I could be wrong, pypi unfortunately does not show the release date. > > originally the greenlet lib was moved into the py lib > to ease maintenance and because it was used in PyPy and > we didn't want to add dependencies there. > > Today, I'd be fine both ways - for 0.9.2 i guess > greenlets should still be part of the py lib, though. > ok. I'll try to implement a setuptools based setup.py then. Regards, - Ralf From johnny at johnnydebris.net Thu Aug 7 22:39:08 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Thu, 07 Aug 2008 22:39:08 +0200 Subject: [py-dev] svn st --xml support for py.path - progress In-Reply-To: <48903F5C.5010306@johnnydebris.net> References: <48903F5C.5010306@johnnydebris.net> Message-ID: <489B5D6C.8000402@johnnydebris.net> Guido Wesdorp wrote: > Unfortunately I didn't find the time to test on any platform other than > Linux, using SVN v. 1.3. The tests seem to run successfully on: Linux with SVN 1.3 and 1.4 Mac OS-X with SVN 1.4 Windows XP with SVN 1.4 Also tested SVN 1.5 on Windows XP, which fails, but that also happens with trunk... The only thing I'm not sure how to handle, and which is currently not supported, is the 'kindmismatch' attribute name. There doesn't seem to be a test for this, and I'm not even sure how to produce a report with such an attribute... Apart from that, I think the branch can be merged. (Note that I left in the old code for when the --xml switch fails, this should be removed when 1.2 support is dropped.) Cheers, Guido From holger at merlinux.eu Fri Aug 8 08:10:12 2008 From: holger at merlinux.eu (holger krekel) Date: Fri, 8 Aug 2008 08:10:12 +0200 Subject: [py-dev] svn st --xml support for py.path - progress In-Reply-To: <489B5D6C.8000402@johnnydebris.net> References: <48903F5C.5010306@johnnydebris.net> <489B5D6C.8000402@johnnydebris.net> Message-ID: <20080808061012.GU9619@trillke.net> Hi Guido, On Thu, Aug 07, 2008 at 22:39 +0200, Guido Wesdorp wrote: > Guido Wesdorp wrote: > > Unfortunately I didn't find the time to test on any platform other than > > Linux, using SVN v. 1.3. > The tests seem to run successfully on: > > Linux with SVN 1.3 and 1.4 > Mac OS-X with SVN 1.4 > Windows XP with SVN 1.4 same here, good. > Also tested SVN 1.5 on Windows XP, which fails, but that also happens > with trunk... could you attach a textual log of the failures? > The only thing I'm not sure how to handle, and which is currently not > supported, is the 'kindmismatch' attribute name. There doesn't seem to > be a test for this, and I'm not even sure how to produce a report with > such an attribute... Apart from that, I think the branch can be merged. > (Note that I left in the old code for when the --xml switch fails, this > should be removed when 1.2 support is dropped.) did you get to check the degraded test speed? cheers, holger From johnny at johnnydebris.net Fri Aug 8 09:21:09 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Fri, 08 Aug 2008 09:21:09 +0200 Subject: [py-dev] svn st --xml support for py.path - progress In-Reply-To: <20080808061012.GU9619@trillke.net> References: <48903F5C.5010306@johnnydebris.net> <489B5D6C.8000402@johnnydebris.net> <20080808061012.GU9619@trillke.net> Message-ID: <489BF3E5.70205@johnnydebris.net> holger krekel wrote: >> Also tested SVN 1.5 on Windows XP, which fails, but that also happens >> with trunk... >> > > could you attach a textual log of the failures? > Hrmph, not easily, but I'll do my best (nice to work on a platform where e.g. copy/paste from a console doesn't work)... > did you get to check the degraded test speed? > > Ah, right, did that just now... I fear the problem is that SVN interaction is just slow, there's a test (test_status_conflict) that takes about 7 seconds to run on my machine, while I don't think it does anything unexpected... It just creates a second wc, checks out the repo, does some writes and commits and checks for conflicts, which I guess is what it _should_ do. I already changed it so that it doesn't build its own repo anymore, but still it takes a _long_ time to run - i fear the problem is just SVN. :( Cheers, Guido From monopocalypse+py-dev at gmail.com Sun Aug 10 22:17:59 2008 From: monopocalypse+py-dev at gmail.com (Matthew Edwards) Date: Mon, 11 Aug 2008 08:17:59 +1200 Subject: [py-dev] Exceptions in setup/teardown hooks Message-ID: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> Hi, I've got some tests for a module which manages log files. The setup_class and teardown_class functions create and delete a directory for them, and the teardown_method function deletes the individual files based on a list. When a test fails, it can leave files which aren't on the list, so don't get deleted in teardown_method, which makes teardown_class choke on os.rmdir (because the directory is not empty). While I do need to know if there are files left over, the problem is that when an exception occurs in a hook, it shows a traceback for that only, and not the actual test failure, so I can't tell what failed. Am I just doing this wrong, or is this a bit of a bug? I would prefer an exception in [setup|teardown]_method to fail that method, and an exception in [setup|teardown]_class to fail all the tests in that class, and if an exception is raised in a test and the following hook, tracebacks for both should be displayed. As an aside, stdout capture doesn't work particularly well from the hooks either. Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From nshepperd at gmail.com Mon Aug 11 08:36:13 2008 From: nshepperd at gmail.com (Neil Shepperd) Date: Mon, 11 Aug 2008 16:36:13 +1000 Subject: [py-dev] Exceptions in setup/teardown hooks In-Reply-To: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> References: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> Message-ID: <1218436573.6463.14.camel@neil> On Mon, 2008-08-11 at 08:17 +1200, Matthew Edwards wrote: > Hi, > > I've got some tests for a module which manages log files. The > setup_class and teardown_class functions create and delete a directory > for them, and the teardown_method function deletes the individual > files based on a list. When a test fails, it can leave files which > aren't on the list, so don't get deleted in teardown_method, which > makes teardown_class choke on os.rmdir (because the directory is not > empty). While I do need to know if there are files left over, the > problem is that when an exception occurs in a hook, it shows a > traceback for that only, and not the actual test failure, so I can't > tell what failed. If having no files left over is necessary for the test to pass, that should be part of the test. You should probably use rmtree in the hook, as hooks are not tests, and must always work - independent of whether the test itself passes. > > Am I just doing this wrong, or is this a bit of a bug? I would prefer > an exception in [setup|teardown]_method to fail that method, and an > exception in [setup|teardown]_class to fail all the tests in that > class May be a bad idea. IMHO setup/teardown should do just what they're called - setup and teardown an environment for tests to run in. If an exception occurs in [setup|teardown]_* it should be because your setup/teardown code is broken. Mixing up setup/teardown with tests themselves seems like a mistake to me. Neil Shepperd -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From monopocalypse+py-dev at gmail.com Mon Aug 11 08:44:41 2008 From: monopocalypse+py-dev at gmail.com (Matthew Edwards) Date: Mon, 11 Aug 2008 18:44:41 +1200 Subject: [py-dev] Exceptions in setup/teardown hooks In-Reply-To: <1218436423.6463.11.camel@neil> References: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> <1218436423.6463.11.camel@neil> Message-ID: <4025a36d0808102344i18f24538h22fc549436037aff@mail.gmail.com> Thanks, I'll try that. It's just that it's likely I'll end up moving stuff from [setup|teardown]_* into other functions which I call manually (or possibly magically) before and after each test, which seems a bit counterproductive. Matthew On Mon, Aug 11, 2008 at 6:33 PM, Neil Shepperd wrote: > On Mon, 2008-08-11 at 08:17 +1200, Matthew Edwards wrote: > > Hi, > > > > I've got some tests for a module which manages log files. The > > setup_class and teardown_class functions create and delete a directory > > for them, and the teardown_method function deletes the individual > > files based on a list. When a test fails, it can leave files which > > aren't on the list, so don't get deleted in teardown_method, which > > makes teardown_class choke on os.rmdir (because the directory is not > > empty). While I do need to know if there are files left over, the > > problem is that when an exception occurs in a hook, it shows a > > traceback for that only, and not the actual test failure, so I can't > > tell what failed. > If having no files left over is necessary for the test to pass, > that should be part of the test. You should probably use rmtree > in the hook, as hooks are not tests, and must always work - independent > of whether the test itself passes. > > > > Am I just doing this wrong, or is this a bit of a bug? I would prefer > > an exception in [setup|teardown]_method to fail that method, and an > > exception in [setup|teardown]_class to fail all the tests in that > > class > May be a bad idea. IMHO setup/teardown should do just what they're > called - setup and teardown an environment for tests to run in. If > an exception occurs in [setup|teardown]_* it should be because your > setup/teardown code is broken. Mixing up setup/teardown with tests > themselves seems like a mistake to me. > > Neil Shepperd > -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Mon Aug 11 09:10:50 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 11 Aug 2008 09:10:50 +0200 Subject: [py-dev] Exceptions in setup/teardown hooks In-Reply-To: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> References: <4025a36d0808101317y594c42ceq54c476ad13a303cb@mail.gmail.com> Message-ID: <20080811071050.GC9619@trillke.net> Hi Matthew, On Mon, Aug 11, 2008 at 08:17 +1200, Matthew Edwards wrote: > Hi, > > I've got some tests for a module which manages log files. The setup_class > and teardown_class functions create and delete a directory for them, and the > teardown_method function deletes the individual files based on a list. When > a test fails, it can leave files which aren't on the list, so don't get > deleted in teardown_method, which makes teardown_class choke on os.rmdir > (because the directory is not empty). While I do need to know if there are > files left over, the problem is that when an exception occurs in a hook, it > shows a traceback for that only, and not the actual test failure, so I can't > tell what failed. Hum, I think failing setup/teardown methods could use more helpful debug info. This should be better on trunk soon (after i merge the branch i am currently working on). Otherwise i agree with Neil. setup/teardowns should not contain test code by design. In practise they often call into application code that may fail and there is nothing wrong with being more helpful about this. Concretely, I think a "self.assert_nofilesleft()" at the end of the tests in question is fine and makes it obvious what is expected program behaviour. > Am I just doing this wrong, or is this a bit of a bug? I would prefer an > exception in [setup|teardown]_method to fail that method, and an exception > in [setup|teardown]_class to fail all the tests in that class, and if an > exception is raised in a test and the following hook, tracebacks for both > should be displayed. I agree that teardown_method/teardown_function reporting should closely relate to the test object. I don't think that teardown_class should fail all tests retroactively - they were already reported as success. Again, it should indeed get easier to see what test class failed. > As an aside, stdout capture doesn't work particularly well from the hooks > either. is better already. cheers, holger From holger at merlinux.eu Tue Aug 12 21:16:31 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 12 Aug 2008 21:16:31 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> References: <20080723104132.GO22324@trillke.net> <932f8baf0807230404g28fdc895q642a90623d9bc27@mail.gmail.com> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> Message-ID: <20080812191631.GH9619@trillke.net> Hi Ralf, On Mon, Aug 04, 2008 at 16:11 +0200, Ralf Schmitt wrote: > On Mon, Aug 4, 2008 at 3:48 PM, holger krekel wrote: > > I don't have a strong opinion on this. But for python 2.3 and > > 2.4 i guess it's somewhat nice to be able to type "python setup.py install" > > and have it work indepedently from the question if > > setuptools is installed. > > > > setuptools enabled packages come with a short bootstrap module which > does install setuptools in case it is not installed. This should also > work with python 2.3. > (I think you will also need vs 6.0 instead of vs 2003 to build > extensions for python 2.3 on windows) ok. if we want to ship with a pre-compiled greenlet module we would need to distribute per-python versions, right? If we can't manage this ourselves then i hope we can find people to prepare binary eggs. > > originally the greenlet lib was moved into the py lib > > to ease maintenance and because it was used in PyPy and > > we didn't want to add dependencies there. > > > > Today, I'd be fine both ways - for 0.9.2 i guess > > greenlets should still be part of the py lib, though. > > > > ok. I'll try to implement a setuptools based setup.py then. any chances you'll get to that this week? I think i'd like to get the 0.9.2 release out the coming weekend. cheers, holger From schmir at gmail.com Wed Aug 13 00:13:02 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 00:13:02 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080812191631.GH9619@trillke.net> References: <20080723104132.GO22324@trillke.net> <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> Message-ID: <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> On Tue, Aug 12, 2008 at 9:16 PM, holger krekel wrote: > Hi Ralf, > > On Mon, Aug 04, 2008 at 16:11 +0200, Ralf Schmitt wrote: >> On Mon, Aug 4, 2008 at 3:48 PM, holger krekel wrote: >> > I don't have a strong opinion on this. But for python 2.3 and >> > 2.4 i guess it's somewhat nice to be able to type "python setup.py install" >> > and have it work indepedently from the question if >> > setuptools is installed. >> > >> >> setuptools enabled packages come with a short bootstrap module which >> does install setuptools in case it is not installed. This should also >> work with python 2.3. >> (I think you will also need vs 6.0 instead of vs 2003 to build >> extensions for python 2.3 on windows) > > ok. if we want to ship with a pre-compiled greenlet module > we would need to distribute per-python versions, right? yes. > If we can't manage this ourselves then i hope we can > find people to prepare binary eggs. yes, for mac and windows only I guess. This would be another good reason to split the greenlet module from the other code. You wouldn't have to build new binary packages as long as only some python code got changed.. > >> > originally the greenlet lib was moved into the py lib >> > to ease maintenance and because it was used in PyPy and >> > we didn't want to add dependencies there. >> > >> > Today, I'd be fine both ways - for 0.9.2 i guess >> > greenlets should still be part of the py lib, though. >> > >> >> ok. I'll try to implement a setuptools based setup.py then. > > any chances you'll get to that this week? I think i'd > like to get the 0.9.2 release out the coming weekend. > http://systemexit.de/repo/py-setup/ contains a mercurial repository with a setup.py using setuptools. The setup.py itself currently can be viewed here: http://systemexit.de/repo/py-setup/file/tip/setup.py It currently only installs a py.test as a script (everything else from py/bin/ is missing). It installs the greenlet module under the name greenlet. py.magic.greenlet should be adapted accordingly. (You still want to compile it on the fly???). Something like try: import greenlet except ImportError: try_compile() should work.. You can build a source distribution with python setup.py build sdist and a binary egg with python setup.py build bdist_egg When doing development you can run python setup.py develop in order to use the source files in place. ez_setup.py has been downloaded from http://peak.telecommunity.com/dist/ez_setup.py The MANIFEST.in file should not be needed as setuptools would handle that automatically for a subversion repository. - Ralf From holger at merlinux.eu Wed Aug 13 08:21:29 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 13 Aug 2008 08:21:29 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> References: <20080723113426.GS22324@trillke.net> <932f8baf0808040120k4f91d2ddh11771803fb2236eb@mail.gmail.com> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> Message-ID: <20080813062128.GJ9619@trillke.net> On Wed, Aug 13, 2008 at 00:13 +0200, Ralf Schmitt wrote: > On Tue, Aug 12, 2008 at 9:16 PM, holger krekel wrote: > > Hi Ralf, > > > > On Mon, Aug 04, 2008 at 16:11 +0200, Ralf Schmitt wrote: > >> On Mon, Aug 4, 2008 at 3:48 PM, holger krekel wrote: > >> > I don't have a strong opinion on this. But for python 2.3 and > >> > 2.4 i guess it's somewhat nice to be able to type "python setup.py install" > >> > and have it work indepedently from the question if > >> > setuptools is installed. > >> > > >> > >> setuptools enabled packages come with a short bootstrap module which > >> does install setuptools in case it is not installed. This should also > >> work with python 2.3. > >> (I think you will also need vs 6.0 instead of vs 2003 to build > >> extensions for python 2.3 on windows) > > > > ok. if we want to ship with a pre-compiled greenlet module > > we would need to distribute per-python versions, right? > > yes. > > > If we can't manage this ourselves then i hope we can > > find people to prepare binary eggs. > > yes, for mac and windows only I guess. This would be another good > reason to split the greenlet module from the other code. You wouldn't > have to build new binary packages as long as only some python code got > changed.. sure but in any case i don't want to change this going from 0.9.1 to 0.9.2. > >> > originally the greenlet lib was moved into the py lib > >> > to ease maintenance and because it was used in PyPy and > >> > we didn't want to add dependencies there. > >> > > >> > Today, I'd be fine both ways - for 0.9.2 i guess > >> > greenlets should still be part of the py lib, though. > >> > > >> > >> ok. I'll try to implement a setuptools based setup.py then. > > > > any chances you'll get to that this week? I think i'd > > like to get the 0.9.2 release out the coming weekend. > > > > http://systemexit.de/repo/py-setup/ contains a mercurial repository > with a setup.py using setuptools. > The setup.py itself currently can be viewed here: > http://systemexit.de/repo/py-setup/file/tip/setup.py > > It currently only installs a py.test as a script (everything else from > py/bin/ is missing). > It installs the greenlet module under the name greenlet. > py.magic.greenlet should be adapted accordingly. > (You still want to compile it on the fly???). Something like I think i'd like to have a flag that turns automatic compilation on or off. A setup.py installed release should have this flag off so that no automatic installation occurs. > try: > import greenlet > except ImportError: > try_compile() > > should work.. > > You can build a source distribution with > python setup.py build sdist > and a binary egg with > python setup.py build bdist_egg is it usual to do binary eggs for linux/osx? > When doing development you can run python setup.py develop in order to > use the source files in place. > > ez_setup.py has been downloaded from > http://peak.telecommunity.com/dist/ez_setup.py > The MANIFEST.in file should not be needed as setuptools would handle > that automatically for a subversion repository. ah, it looks at all the files that are versioned? thanks for the work, btw! holger From schmir at gmail.com Wed Aug 13 17:24:25 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 17:24:25 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080813062128.GJ9619@trillke.net> References: <20080723113426.GS22324@trillke.net> <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> Message-ID: <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> On Wed, Aug 13, 2008 at 8:21 AM, holger krekel wrote: > > sure but in any case i don't want to change this going from 0.9.1 to 0.9.2. ack. > > I think i'd like to have a flag that turns automatic > compilation on or off. A setup.py installed release > should have this flag off so that no automatic > installation occurs. I've implemented this in http://systemexit.de/repo/py-setup/rev/4e18f70b985d. The flag used here is the existence of greenlet.c in py/c-extensions/greenlet/. > > is it usual to do binary eggs for linux/osx? linux no. osx probably. some people might not have xcode installed. >> The MANIFEST.in file should not be needed as setuptools would handle >> that automatically for a subversion repository. > > ah, it looks at all the files that are versioned? > yes From schmir at gmail.com Wed Aug 13 18:06:57 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 18:06:57 +0200 Subject: [py-dev] SyntaxWarning: assertion is always true Message-ID: <932f8baf0808130906y5a46df14r3fec7bb00ddab58d@mail.gmail.com> Hi, minor issue, but you probably want to fix it: /home/ralf/py26/lib/python2.6/site-packages/py-0.9.2_pre_alpha-py2.6-linux-x86_64.egg/py/apigen/linker.py:33: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (linkid not in self._linkid2target, - Ralf From holger at merlinux.eu Wed Aug 13 18:23:20 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 13 Aug 2008 18:23:20 +0200 Subject: [py-dev] SyntaxWarning: assertion is always true In-Reply-To: <932f8baf0808130906y5a46df14r3fec7bb00ddab58d@mail.gmail.com> References: <932f8baf0808130906y5a46df14r3fec7bb00ddab58d@mail.gmail.com> Message-ID: <20080813162320.GO9619@trillke.net> On Wed, Aug 13, 2008 at 18:06 +0200, Ralf Schmitt wrote: > minor issue, but you probably want to fix it: > > /home/ralf/py26/lib/python2.6/site-packages/py-0.9.2_pre_alpha-py2.6-linux-x86_64.egg/py/apigen/linker.py:33: > SyntaxWarning: assertion is always true, perhaps remove parentheses? > assert (linkid not in self._linkid2target, fixed, i shifted the left parenthesis to after the comma. holger From holger at merlinux.eu Wed Aug 13 18:32:41 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 13 Aug 2008 18:32:41 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> References: <20080804084131.GL9619@trillke.net> <932f8baf0808040201w61f53f03l99f188249ba67c99@mail.gmail.com> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> Message-ID: <20080813163241.GP9619@trillke.net> On Wed, Aug 13, 2008 at 17:24 +0200, Ralf Schmitt wrote: > On Wed, Aug 13, 2008 at 8:21 AM, holger krekel wrote: > > > > > sure but in any case i don't want to change this going from 0.9.1 to 0.9.2. > > ack. > > > > > I think i'd like to have a flag that turns automatic > > compilation on or off. A setup.py installed release > > should have this flag off so that no automatic > > installation occurs. > > I've implemented this in http://systemexit.de/repo/py-setup/rev/4e18f70b985d. > The flag used here is the existence of greenlet.c in py/c-extensions/greenlet/. ok, i'll check this. another thing with setuptools: the way that py.test is installed as a console script modifies the py lib lookup: py/bin/py.test usually looks for a py lib upwards from where you invokve it (the curdir) with the help of _findpy.py. this is important at least for pypy and when you are using py.test to work on the py lib itself. Do you have an idea how to preserve this logic with setuptools? Specifying a module import path probably does not work because then there is no chance anymore to influence which py lib gets loaded. holger From schmir at gmail.com Wed Aug 13 19:14:25 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 19:14:25 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080813163241.GP9619@trillke.net> References: <20080804084131.GL9619@trillke.net> <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> <20080813163241.GP9619@trillke.net> Message-ID: <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> On Wed, Aug 13, 2008 at 6:32 PM, holger krekel wrote: > another thing with setuptools: the way that py.test is > installed as a console script modifies the py lib lookup: > py/bin/py.test usually looks for a py lib upwards > from where you invokve it (the curdir) with the help of _findpy.py. > sometimes I have the feeling that you're using too much magic... > this is important at least for pypy and when you are using py.test > to work on the py lib itself. Do you have an idea > how to preserve this logic with setuptools? Specifying > a module import path probably does not work because > then there is no chance anymore to influence which > py lib gets loaded. setuptools creates the following py.test script for me: #!/home/ralf/py26/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'py==0.9.2-pre-alpha','console_scripts','py.test' __requires__ = 'py==0.9.2-pre-alpha' import sys from pkg_resources import load_entry_point sys.exit( load_entry_point('py==0.9.2-pre-alpha', 'console_scripts', 'py.test')() ) I would rather be surprised if it used anything else than py lib version 0.9.2.-pre-alpha. Can't you just use the inplace installation? (i.e. eval py/env.py)? py/bin/py.test is still there.. - Ralf From holger at merlinux.eu Wed Aug 13 19:40:47 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 13 Aug 2008 19:40:47 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> References: <20080804100246.GN9619@trillke.net> <932f8baf0808040557l24e7ec14m703f0c22e0cbd8dc@mail.gmail.com> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> <20080813163241.GP9619@trillke.net> <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> Message-ID: <20080813174047.GQ9619@trillke.net> Hi Ralf, On Wed, Aug 13, 2008 at 19:14 +0200, Ralf Schmitt wrote: > On Wed, Aug 13, 2008 at 6:32 PM, holger krekel wrote: > > > another thing with setuptools: the way that py.test is > > installed as a console script modifies the py lib lookup: > > py/bin/py.test usually looks for a py lib upwards > > from where you invokve it (the curdir) with the help of _findpy.py. > > sometimes I have the feeling that you're using too much magic... hum, it's a feature that has been of use to some people. let me ask: has it ever hit you badly? > > this is important at least for pypy and when you are using py.test > > to work on the py lib itself. Do you have an idea > > how to preserve this logic with setuptools? Specifying > > a module import path probably does not work because > > then there is no chance anymore to influence which > > py lib gets loaded. > > setuptools creates the following py.test script for me: > > #!/home/ralf/py26/bin/python > # EASY-INSTALL-ENTRY-SCRIPT: 'py==0.9.2-pre-alpha','console_scripts','py.test' > __requires__ = 'py==0.9.2-pre-alpha' > import sys > from pkg_resources import load_entry_point > > sys.exit( > load_entry_point('py==0.9.2-pre-alpha', 'console_scripts', 'py.test')() > ) > > I would rather be surprised if it used anything else than py lib > version 0.9.2.-pre-alpha. sure, but this is what setuptools creates, it's not what py/bin/py.test specifies and what gets installed with a distutils install. > Can't you just use the inplace installation? (i.e. eval py/env.py)? > py/bin/py.test is still there.. i guess i could and probably also the others. I'll think about it. If others like to chime in here, please do so. I can also imagine to just use a normal distutils setup.py for 0.9.2 based on what you did. I recently i even had someone not wanting to use setuptools based installs (for a different project). Btw, I actually assumed that python 2.5 came with setuptools but that is not the case, has just been discussed at some point, right? holger From schmir at gmail.com Wed Aug 13 19:51:49 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 19:51:49 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080813174047.GQ9619@trillke.net> References: <20080804100246.GN9619@trillke.net> <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> <20080813163241.GP9619@trillke.net> <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> <20080813174047.GQ9619@trillke.net> Message-ID: <932f8baf0808131051v7962d450xa17f05b2d21c8f60@mail.gmail.com> On Wed, Aug 13, 2008 at 7:40 PM, holger krekel wrote: > > hum, it's a feature that has been of use to some people. > let me ask: has it ever hit you badly? > not yet :) >> Can't you just use the inplace installation? (i.e. eval py/env.py)? >> py/bin/py.test is still there.. > > i guess i could and probably also the others. I'll think about it. searching for the py lib and calling exec with another py.test (if py lib is found) sounds like a clean solution (on unix platforms).... > > If others like to chime in here, please do so. > > I can also imagine to just use a normal distutils setup.py > for 0.9.2 based on what you did. I recently i even had someone > not wanting to use setuptools based installs (for a different > project). Btw, I actually assumed that python 2.5 came with setuptools > but that is not the case, has just been discussed at some point, right? it's automatically installed. Regards, - Ralf From holger at merlinux.eu Wed Aug 13 19:55:29 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 13 Aug 2008 19:55:29 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <932f8baf0808131051v7962d450xa17f05b2d21c8f60@mail.gmail.com> References: <20080804134832.GO9619@trillke.net> <932f8baf0808040711ne4e933fn73998bbe6023dd1e@mail.gmail.com> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> <20080813163241.GP9619@trillke.net> <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> <20080813174047.GQ9619@trillke.net> <932f8baf0808131051v7962d450xa17f05b2d21c8f60@mail.gmail.com> Message-ID: <20080813175529.GR9619@trillke.net> On Wed, Aug 13, 2008 at 19:51 +0200, Ralf Schmitt wrote: > On Wed, Aug 13, 2008 at 7:40 PM, holger krekel wrote: > > Btw, I actually assumed that python 2.5 came with setuptools > > but that is not the case, has just been discussed at some point, right? > > it's automatically installed. ok - but not included with python 2.5, despite http://mail.python.org/pipermail/python-dev/2006-April/063964.html or am i getting this wrong? best, holger From schmir at gmail.com Wed Aug 13 20:02:10 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 13 Aug 2008 20:02:10 +0200 Subject: [py-dev] py.test and editors (Re: [issue57] Emacs and py.test tracebacks) In-Reply-To: <20080813175529.GR9619@trillke.net> References: <20080804134832.GO9619@trillke.net> <20080812191631.GH9619@trillke.net> <932f8baf0808121513t677faa05yca90262a02f1b982@mail.gmail.com> <20080813062128.GJ9619@trillke.net> <932f8baf0808130824i257ca1belaf54b01f53ccee3a@mail.gmail.com> <20080813163241.GP9619@trillke.net> <932f8baf0808131014m53e60fc6q148d5b7e4367f34f@mail.gmail.com> <20080813174047.GQ9619@trillke.net> <932f8baf0808131051v7962d450xa17f05b2d21c8f60@mail.gmail.com> <20080813175529.GR9619@trillke.net> Message-ID: <932f8baf0808131102o1cd17e46y7fecce92b572e46b@mail.gmail.com> On Wed, Aug 13, 2008 at 7:55 PM, holger krekel wrote: > On Wed, Aug 13, 2008 at 19:51 +0200, Ralf Schmitt wrote: >> On Wed, Aug 13, 2008 at 7:40 PM, holger krekel wrote: >> > Btw, I actually assumed that python 2.5 came with setuptools >> > but that is not the case, has just been discussed at some point, right? >> >> it's automatically installed. > > ok - but not included with python 2.5, despite > http://mail.python.org/pipermail/python-dev/2006-April/063964.html > > or am i getting this wrong? no, setuptools is not included. it will also *not* be in 2.6. - Ralf From fijal at genesilico.pl Thu Aug 14 09:45:04 2008 From: fijal at genesilico.pl (Maciek Fijalkowski) Date: Thu, 14 Aug 2008 09:45:04 +0200 Subject: [py-dev] broken/notimplemented? In-Reply-To: <486E323E.6060500@johnnydebris.net> References: <20080704065051.GN759@trillke.net> <486E323E.6060500@johnnydebris.net> Message-ID: <48A3E280.6080601@genesilico.pl> Guido Wesdorp wrote: > holger krekel wrote: > >> in the 0.9.1 release i see that "py.test.broken" and >> "py.test.notimplemented" were introduced into the namespace. >> What is the rationale? >> >> >> > Hm, doesn't ring a bell, I probably have merged them in because there > seemed to be a dependency on them from other bits of code, or because > the checkin was part of other changes, or even because the checkin > message for the change was confusing... Anyway, not sure if they can > just go, I guess it's best to ask Maciek. > > Cheers, > > Guido > I think I had at some point some idea about that, but I don't remember details. From holger at merlinux.eu Thu Aug 14 12:33:55 2008 From: holger at merlinux.eu (holger krekel) Date: Thu, 14 Aug 2008 12:33:55 +0200 Subject: [py-dev] setuptools and PYTHONPATH Message-ID: <20080814103355.GV9619@trillke.net> Hi Ralf, all, so when i have installed a py egg - i seem to have problems getting my PYTHONPATH env variable respected. i refer to this situation - executed ralf's "setup.py" install - PYTHONPATH=/some/path/to/py/lib/branchdir - python && "import py" && "py.__file__" points to the egg still Does setuptools really force global installation over private environment settings? (i wouldn't regard the need to do "python setup.py develop" or something like a convenient solution, btw) best, holger From schmir at gmail.com Thu Aug 14 13:11:55 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Thu, 14 Aug 2008 13:11:55 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <20080814103355.GV9619@trillke.net> References: <20080814103355.GV9619@trillke.net> Message-ID: <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> On Thu, Aug 14, 2008 at 12:33 PM, holger krekel wrote: > Hi Ralf, all, > > so when i have installed a py egg - i seem to > have problems getting my PYTHONPATH env variable > respected. i refer to this situation > > - executed ralf's "setup.py" install > - PYTHONPATH=/some/path/to/py/lib/branchdir > - python && "import py" && "py.__file__" > points to the egg still > > Does setuptools really force global installation > over private environment settings? > See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for a discussion. You can deactivate the installed package with easy_install -m py. - Ralf From schmir at gmail.com Thu Aug 14 13:46:28 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Thu, 14 Aug 2008 13:46:28 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> References: <20080814103355.GV9619@trillke.net> <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> Message-ID: <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt wrote: >> Does setuptools really force global installation >> over private environment settings? >> > > See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for > a discussion. > You can deactivate the installed package with easy_install -m py. > >From the same thread (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): """ This isn't what you want. What you want to do is point PYTHONPATH to a staging directory of some sort, and put that directory on the "develop" line. What you're doing here is trying to install the library *onto itself*. -d and PYTHONPATH need to be some *other* location, to which you're installing. >which overrides the site-packages version, but also requires root >access. how would I do this without requiring root access ? mkdir ~/py_lib export PYTHONPATH=~/py_lib cd ~/sa020 python setup.py develop -d ~/py_lib """ i.e. you need to put the egg on PYTHONPATH in order to override the system wide installation, *not* the directory which contains the source code. - Ralf From holger at merlinux.eu Thu Aug 14 14:27:14 2008 From: holger at merlinux.eu (holger krekel) Date: Thu, 14 Aug 2008 14:27:14 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> References: <20080814103355.GV9619@trillke.net> <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> Message-ID: <20080814122714.GW9619@trillke.net> On Thu, Aug 14, 2008 at 13:46 +0200, Ralf Schmitt wrote: > On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt wrote: > >> Does setuptools really force global installation > >> over private environment settings? > >> > > > > See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for > > a discussion. > > You can deactivate the installed package with easy_install -m py. > > > > >From the same thread > (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): > """ > This isn't what you want. What you want to do is point PYTHONPATH to a > staging directory of some sort, and put that directory on the "develop" > line. What you're doing here is trying to install the library *onto > itself*. -d and PYTHONPATH need to be some *other* location, to which > you're installing. > > > >which overrides the site-packages version, but also requires root > >access. how would I do this without requiring root access ? > > mkdir ~/py_lib > export PYTHONPATH=~/py_lib > cd ~/sa020 > python setup.py develop -d ~/py_lib > """ > > i.e. you need to put the egg on PYTHONPATH in order to override the > system wide installation, *not* the directory which contains the > source code. thanks for the info and clarification. looks inconvenient and IMHO changes the basic PYTHONPATH expectation - as noted down in http://docs.python.org/tut/node8.html#SECTION008120000000000000000 actually i don't really see why setuptools has to violate this. holger From fijal at genesilico.pl Thu Aug 14 14:32:42 2008 From: fijal at genesilico.pl (Maciek Fijalkowski) Date: Thu, 14 Aug 2008 14:32:42 +0200 Subject: [py-dev] oncoming 0.9.2 release In-Reply-To: <20080723105443.GQ22324@trillke.net> References: <7be3f35d0807230120y3cc20515x68ebfd7322a21bed@mail.gmail.com> <20080723105443.GQ22324@trillke.net> Message-ID: <48A425EA.2080505@genesilico.pl> holger krekel wrote: > Hi Harald, > > On Wed, Jul 23, 2008 at 10:20 +0200, Harald Armin Massa wrote: > >> Whish-list: >> >> pytest -e >> pytest --testforever >> >> includes --startsserver and --runbrowser, loops "forever" until >> Ctrl+Break on the given file / directory / filtered files and >> publishes results on Webport. >> Bonus points for really showing a traffic light :) >> > > :) > > This is nothing for 0.9.2, i am afraid. Particularly > since i am relatively clueless about the browser reporter > currently. But if you are up to do a patch that does > what you suggest i'd consider it. > > sidenote: I promise to support anyone going for > a (new) nice AJAX frontend :) > I know a bit about AJAX frontend and I promise to support anyone that'll go for a better one definitely :-) I think writing javascript by hand instead of using pypy would simplify stuff a bit. Cheers, fijal From monopocalypse+py-dev at gmail.com Sat Aug 16 06:27:02 2008 From: monopocalypse+py-dev at gmail.com (Matthew Edwards) Date: Sat, 16 Aug 2008 16:27:02 +1200 Subject: [py-dev] WindowsErrors when removing file (file in use) Message-ID: <4025a36d0808152127q4bfb2601v2b9ca056396f2e65@mail.gmail.com> Hi, This kind of relates to my last problem. With my new file-related test setup, I often get WindowsErrors when removing files, because they are still in use, because for some reason the file objects refuse to be closed or deleted, and are still wandering around when teardown_method is called. Again, I'm not sure whether this is something I'm doing wrong or a bug, but I've attached a test (simplified, with attempts at debugging), which fails with the error every second run (every other run the file exists at the start) on Python 2.5.2, py 0.9.1 or svn 57262, Windows XP. Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test_remove.py URL: From johnny at johnnydebris.net Sat Aug 16 10:22:08 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Sat, 16 Aug 2008 10:22:08 +0200 Subject: [py-dev] WindowsErrors when removing file (file in use) In-Reply-To: <4025a36d0808152127q4bfb2601v2b9ca056396f2e65@mail.gmail.com> References: <4025a36d0808152127q4bfb2601v2b9ca056396f2e65@mail.gmail.com> Message-ID: <48A68E30.9060205@johnnydebris.net> Matthew Edwards wrote: ... > logger = Logger(open(self.filename, 'wb')) > for packet in self.subjects: > logger.recv(packet.data) > logger.file.close() > If something goes wrong in the recv() call, the log file will not be closed with this code (something similar happens later with the reader). Could you try if things are better when you use try/finally to make sure that the file is closed: fp = open(self.filename, 'wb') try: logger = Logger(fp) for packet in self.subjects: logger.recv(packet.data) finally: fp.close() Hope that helps! Cheers, Guido From holger at merlinux.eu Sat Aug 16 20:33:00 2008 From: holger at merlinux.eu (holger krekel) Date: Sat, 16 Aug 2008 20:33:00 +0200 Subject: [py-dev] svn st --xml support for py.path - progress In-Reply-To: <489BF3E5.70205@johnnydebris.net> References: <48903F5C.5010306@johnnydebris.net> <489B5D6C.8000402@johnnydebris.net> <20080808061012.GU9619@trillke.net> <489BF3E5.70205@johnnydebris.net> Message-ID: <20080816183300.GD9619@trillke.net> Hi Guido! On Fri, Aug 08, 2008 at 09:21 +0200, Guido Wesdorp wrote: > holger krekel wrote: > >> Also tested SVN 1.5 on Windows XP, which fails, but that also happens > >> with trunk... > >> > > > > could you attach a textual log of the failures? > > > Hrmph, not easily, but I'll do my best (nice to work on a platform where > e.g. copy/paste from a console doesn't work)... > > > did you get to check the degraded test speed? > > > > > Ah, right, did that just now... I fear the problem is that SVN > interaction is just slow, there's a test (test_status_conflict) that > takes about 7 seconds to run on my machine, while I don't think it does > anything unexpected... It just creates a second wc, checks out the repo, > does some writes and commits and checks for conflicts, which I guess is > what it _should_ do. I already changed it so that it doesn't build its > own repo anymore, but still it takes a _long_ time to run - i fear the > problem is just SVN. :( i guess any test that takes more than two seconds should be categorized as slow and only run when --runslowtests is enabled. Could you do this and otherwise merge the branch to trunk? best & thanks! holger From holger at merlinux.eu Mon Aug 18 15:52:44 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 18 Aug 2008 15:52:44 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test Message-ID: <20080818135244.GI9619@trillke.net> Hi all, i am experimenting with building eggs and installation improvements, particularly for windows but also for unix. Would be great if you could give "easy_install" with one of these packages a try and report back any problems: http://codespeak.net/~hpk/py/dist/ This should work nicely out of the box, including accessing "py.magic.greenlet" (the stackless light c-extension) and running "py.test" on the command line on your project. You should be able to remove all previous hacks, additions to the PATH environment setting. thanks & best, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From holger at merlinux.eu Mon Aug 18 15:54:51 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 18 Aug 2008 15:54:51 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test In-Reply-To: <20080818135244.GI9619@trillke.net> References: <20080818135244.GI9619@trillke.net> Message-ID: <20080818135451.GJ9619@trillke.net> On Mon, Aug 18, 2008 at 15:52 +0200, holger krekel wrote: > i am experimenting with building eggs and installation > improvements, particularly for windows but also for unix. > Would be great if you could give "easy_install" with one of > these packages a try and report back any problems: > > http://codespeak.net/~hpk/py/dist/ i assume you know that you can do "easy_install URL_TO_EGG". holger From holger at merlinux.eu Mon Aug 18 16:44:12 2008 From: holger at merlinux.eu (holger krekel) Date: Mon, 18 Aug 2008 16:44:12 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <20080814122714.GW9619@trillke.net> References: <20080814103355.GV9619@trillke.net> <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> <20080814122714.GW9619@trillke.net> Message-ID: <20080818144412.GK9619@trillke.net> Hi Ralf, with your setup script installing the py.* scripts didn't work on windows where setuptools created "py.test.exe" but this is not looked up by the windows command line when you type "py.test". I experimented a bit and think i found a somewhat sensible solution for the windows issue. As to the way scripts are installed in general - i am just using the "scripts" keyword now, not the setuptools specific one and it seems to work well. See the new svn/py/release/0.9.x/setup.py. This setup script works also works with plain distutils. It's generated by svn/py/build/gensetup.py and it's thus easy to apply systematic changes. thanks for your setup.py, anyway - was useful to look at. holger On Thu, Aug 14, 2008 at 14:27 +0200, holger krekel wrote: > On Thu, Aug 14, 2008 at 13:46 +0200, Ralf Schmitt wrote: > > On Thu, Aug 14, 2008 at 1:11 PM, Ralf Schmitt wrote: > > >> Does setuptools really force global installation > > >> over private environment settings? > > >> > > > > > > See http://www.eby-sarna.com/pipermail/peak/2006-June/002582.html for > > > a discussion. > > > You can deactivate the installed package with easy_install -m py. > > > > > > > >From the same thread > > (http://www.eby-sarna.com/pipermail/peak/2006-June/002584.html): > > """ > > This isn't what you want. What you want to do is point PYTHONPATH to a > > staging directory of some sort, and put that directory on the "develop" > > line. What you're doing here is trying to install the library *onto > > itself*. -d and PYTHONPATH need to be some *other* location, to which > > you're installing. > > > > > > >which overrides the site-packages version, but also requires root > > >access. how would I do this without requiring root access ? > > > > mkdir ~/py_lib > > export PYTHONPATH=~/py_lib > > cd ~/sa020 > > python setup.py develop -d ~/py_lib > > """ > > > > i.e. you need to put the egg on PYTHONPATH in order to override the > > system wide installation, *not* the directory which contains the > > source code. > > thanks for the info and clarification. > > looks inconvenient and IMHO changes the basic PYTHONPATH > expectation - as noted down in > http://docs.python.org/tut/node8.html#SECTION008120000000000000000 > > actually i don't really see why setuptools has to violate this. > > holger > -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From haraldarminmassa at gmail.com Tue Aug 19 09:17:42 2008 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Tue, 19 Aug 2008 09:17:42 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test In-Reply-To: <20080818135451.GJ9619@trillke.net> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> Message-ID: <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> Holger, >> http://codespeak.net/~hpk/py/dist/ > > i assume you know that you can do "easy_install URL_TO_EGG". > Thanks for typing out the assumption :) I did an easy install, and it worked, also copied a greenlet test from the documentation and it printed as expected. Improvement suggestion: Put out a small .html with the total file names. Actually Firefox only lists the name as py-0.9.2_alpha_7-py2..> so some mousing over is required to judge if it fits for 2.5 or 2.4 ... best wishes, Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 no fx, no carrier pigeon - EuroPython 2009 will take place in Birmingham - Stay tuned! From haraldarminmassa at gmail.com Tue Aug 19 09:25:12 2008 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Tue, 19 Aug 2008 09:25:12 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test In-Reply-To: <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> Message-ID: <7be3f35d0808190025t473743f4w5cf7affa35715786@mail.gmail.com> Holger, other test results: ----> py-0.9.2_alpha_7-py2..> installs flawless. But: there are a lot of useless things copied to python25\scripts: py.cleanup.cmd py.countloc.cmd py.lookup.cmd py.rest.cmd py.test.cmd do not have ANY use on windows, as windows tries to open "py.cleanup" when typin py.cleanup; which of course fails. Recommendation: rename those to pycleanup.cmd, pycountloc.cmd etc. Best wishes, Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 no fx, no carrier pigeon - EuroPython 2009 will take place in Birmingham - Stay tuned! From schmir at gmail.com Tue Aug 19 09:31:04 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Tue, 19 Aug 2008 09:31:04 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test In-Reply-To: <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> Message-ID: <932f8baf0808190031i57ae1a6vf72efcd2caf2682b@mail.gmail.com> On Tue, Aug 19, 2008 at 9:17 AM, Harald Armin Massa wrote: > Holger, > >>> http://codespeak.net/~hpk/py/dist/ >> >> i assume you know that you can do "easy_install URL_TO_EGG". >> > Thanks for typing out the assumption :) I did an easy install, and it > worked, also copied a greenlet test from the documentation and it > printed as expected. > same here, everything seems to work. I've tested (a litte bit) with OS X (python 2.5) and with python 2.6 on a linux box... - Ralf From schmir at gmail.com Tue Aug 19 09:35:31 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Tue, 19 Aug 2008 09:35:31 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <20080818144412.GK9619@trillke.net> References: <20080814103355.GV9619@trillke.net> <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> <20080814122714.GW9619@trillke.net> <20080818144412.GK9619@trillke.net> Message-ID: <932f8baf0808190035q3d6ad395p41a6ba488961c051@mail.gmail.com> On Mon, Aug 18, 2008 at 4:44 PM, holger krekel wrote: > Hi Ralf, > > with your setup script installing the py.* scripts didn't work > on windows where setuptools created "py.test.exe" but this is > not looked up by the windows command line when you type > "py.test". I experimented a bit and think i found a somewhat > sensible solution for the windows issue. > strange. I'm pretty sure this *must* work. (Or is ther a problem with the two dots?) Regards, - Ralf From holger at merlinux.eu Tue Aug 19 10:36:09 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 10:36:09 +0200 Subject: [py-dev] setuptools and PYTHONPATH In-Reply-To: <932f8baf0808190035q3d6ad395p41a6ba488961c051@mail.gmail.com> References: <20080814103355.GV9619@trillke.net> <932f8baf0808140411l14bd6625r1572929cc4442858@mail.gmail.com> <932f8baf0808140446q424ff47dq4e8070b221e43044@mail.gmail.com> <20080814122714.GW9619@trillke.net> <20080818144412.GK9619@trillke.net> <932f8baf0808190035q3d6ad395p41a6ba488961c051@mail.gmail.com> Message-ID: <20080819083609.GQ9619@trillke.net> On Tue, Aug 19, 2008 at 09:35 +0200, Ralf Schmitt wrote: > On Mon, Aug 18, 2008 at 4:44 PM, holger krekel wrote: > > Hi Ralf, > > > > with your setup script installing the py.* scripts didn't work > > on windows where setuptools created "py.test.exe" but this is > > not looked up by the windows command line when you type > > "py.test". I experimented a bit and think i found a somewhat > > sensible solution for the windows issue. > > > > strange. I'm pretty sure this *must* work. (Or is ther a problem with > the two dots?) right, i *guess* it's windows not checking because of the two dots. holger From holger at merlinux.eu Tue Aug 19 10:57:23 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 10:57:23 +0200 Subject: [py-dev] 0.9.2 alpha eggs - please test In-Reply-To: <7be3f35d0808190025t473743f4w5cf7affa35715786@mail.gmail.com> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> <7be3f35d0808190025t473743f4w5cf7affa35715786@mail.gmail.com> Message-ID: <20080819085723.GR9619@trillke.net> Hi Harald, On Tue, Aug 19, 2008 at 09:25 +0200, Harald Armin Massa wrote: > other test results: > > ----> py-0.9.2_alpha_7-py2..> > > installs flawless. > > But: there are a lot of useless things copied to python25\scripts: > > py.cleanup.cmd > py.countloc.cmd > py.lookup.cmd > py.rest.cmd > py.test.cmd > > do not have ANY use on windows, as windows tries to open "py.cleanup" > when typin py.cleanup; which of course fails. hum, i think this relates to earlier installs and/or your PATH settings. the above egg does not install "py.*". What it does is this (see "def run" at the end of http://codespeak.net/svn/py/release/0.9.x/setup.py): rename py.test, py.rest, etc. to py_test, py_rest, etc. in the Python25/Scripts dir and create py.test.cmd, py.rest.cmd, ... helpers which calls the underscore scripts. But indeed, if one installs 0.9.1 and then 0.9.2-alpha one cannot use "py.test" out of the box. This relates to the old PATH hacks. The new egg does not need to add to PATH which i think is good. So i guess I am going to work to try to fix things by going through the PATH and pruning out "py/bin/" PATHS if they look like py lib ones. Actually i think it makes sense to try to undo this PATH addition while upgrading, anyway. > Recommendation: rename those to pycleanup.cmd, pycountloc.cmd etc. i'd like to have uniforming naming if possible. on two sidenotes, i wonder why setuptools does not automatically delete the old py lib version and if there is a setuptool-supported way of uninstalling packages. many thanks for noting this, holger From holger at merlinux.eu Tue Aug 19 14:36:38 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 14:36:38 +0200 Subject: [py-dev] setuptools / undoing 0.9.1 PATH hacks (Re: 0.9.2 alpha eggs - please test) In-Reply-To: <20080819085723.GR9619@trillke.net> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> <7be3f35d0808190025t473743f4w5cf7affa35715786@mail.gmail.com> <20080819085723.GR9619@trillke.net> Message-ID: <20080819123638.GU9619@trillke.net> Hi Harald, Ralf, so i created an egg with a function that tries to undo the path changes done with 0.9.1. I checked that the code works but i think that setuptools does not execute my code at runtime, only at bdist_egg time. I guess i need to investigate how i can have some code executed at install time. Anybody has hints? best, holger On Tue, Aug 19, 2008 at 10:57 +0200, holger krekel wrote: > Hi Harald, > > On Tue, Aug 19, 2008 at 09:25 +0200, Harald Armin Massa wrote: > > other test results: > > > > ----> py-0.9.2_alpha_7-py2..> > > > > installs flawless. > > > > But: there are a lot of useless things copied to python25\scripts: > > > > py.cleanup.cmd > > py.countloc.cmd > > py.lookup.cmd > > py.rest.cmd > > py.test.cmd > > > > do not have ANY use on windows, as windows tries to open "py.cleanup" > > when typin py.cleanup; which of course fails. > > hum, i think this relates to earlier installs and/or your > PATH settings. the above egg does not install "py.*". > What it does is this (see "def run" at the end of > http://codespeak.net/svn/py/release/0.9.x/setup.py): > rename > py.test, py.rest, etc. to > py_test, py_rest, etc. > > in the Python25/Scripts dir and create py.test.cmd, py.rest.cmd, ... > helpers which calls the underscore scripts. > > But indeed, if one installs 0.9.1 and then 0.9.2-alpha one cannot > use "py.test" out of the box. This relates to the old PATH hacks. > The new egg does not need to add to PATH which i think is good. > So i guess I am going to work to try to fix things by > going through the PATH and pruning out "py/bin/" PATHS > if they look like py lib ones. Actually i think it > makes sense to try to undo this PATH addition while > upgrading, anyway. > > > Recommendation: rename those to pycleanup.cmd, pycountloc.cmd etc. > > i'd like to have uniforming naming if possible. > > on two sidenotes, i wonder why setuptools does not automatically > delete the old py lib version and if there is a setuptool-supported > way of uninstalling packages. > > many thanks for noting this, > holger > _______________________________________________ > py-dev mailing list > py-dev at codespeak.net > http://codespeak.net/mailman/listinfo/py-dev > -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From faassen at startifact.com Tue Aug 19 18:46:55 2008 From: faassen at startifact.com (Martijn Faassen) Date: Tue, 19 Aug 2008 18:46:55 +0200 Subject: [py-dev] setup.py broken in develop mode on trunk Message-ID: Hi there, In order to see whether a bugfix in Py trunk fixed a bug in my project, I tried installing the py trunk as a develop egg (using buildout). It's possible "python setup.py develop" is therefore similarly broken. I see files mentioned in MANIFEST which don't exist, so initially I thought this was blocking things. It turns out however that setup.py has references to packages which at least don't appear to exist: py.io.test, py.test.rsession, py.test.terminal. After I remove those from setup.py things seem to work again (that is, I can run the code. I get errors. Another mail about those...) With setuptools, MANIFEST shouldn't be necessary: you can instruct setup.py to automatically assume files that are checked into SVN are in manifest, with something like this: from setuptools import find_packages package_dir={'': 'src'}, packages=find_packages('py'), Regards, Martijn From faassen at startifact.com Tue Aug 19 19:02:34 2008 From: faassen at startifact.com (Martijn Faassen) Date: Tue, 19 Aug 2008 19:02:34 +0200 Subject: [py-dev] error on trunk in py.path.svn support Message-ID: Hi there, I just tried the trunk of Py with my project which makes very heavy use of the py.path SVN facilities, and I get a lot of errors that look like this: File "/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line 270, in status rootstatus = XMLWCStatus(self).fromstring(out, self) File "/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line 687, in fromstring for c in commitel.getElementsByTagName('author')[0]\ IndexError: list index out of range It looks to me like a certain assumption about the format of the XML returned is incorrect. The SVN version on my system is svn, version 1.4.3 (r23084) When debugging it, the XML that trips up the code looks like this: 2008-08-19T16:50:53.400198Z It looks like this means there is not always an 'author' entry in this XML structure. Attached is a patch to wccommand.py that makes the problem go away (and indeed seems to fix the original problem I was looking into - the trunk has support for the svn status flag R, something that py 0.9.1 didn't have). I realize this patch isn't enough but needs a test as well. I could find no obvious way (in the form of documentation, say, the README.txt, or the website) on how to actually run the tests of the trunk. :) It's quite possible I missed something. Is py 0.9.2 to be based off the work on the trunk? Regards, Martijn -------------- next part -------------- A non-text attachment was scrubbed... Name: authorxml.patch Type: text/x-patch Size: 867 bytes Desc: not available URL: From faassen at startifact.com Tue Aug 19 19:05:30 2008 From: faassen at startifact.com (Martijn Faassen) Date: Tue, 19 Aug 2008 19:05:30 +0200 Subject: [py-dev] setup.py broken in develop mode on trunk In-Reply-To: References: Message-ID: Hi there, Attached is a hacky patch to setup.py which makes buildout develop mode (and quite possibly also "python setup.py develop", but I know buildout better) happy for the trunk. I just removed anything that tripped up running setup.py. Regards, Martijn -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.patch Type: text/x-patch Size: 936 bytes Desc: not available URL: From holger at merlinux.eu Tue Aug 19 19:39:44 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 19:39:44 +0200 Subject: [py-dev] setup.py broken in develop mode on trunk In-Reply-To: References: Message-ID: <20080819173944.GX9619@trillke.net> Hi Martijn, thanks for noting ... On Tue, Aug 19, 2008 at 18:46 +0200, Martijn Faassen wrote: > In order to see whether a bugfix in Py trunk fixed a bug in my project, > I tried installing the py trunk as a develop egg (using buildout). It's > possible "python setup.py develop" is therefore similarly broken. > > I see files mentioned in MANIFEST which don't exist, so initially I > thought this was blocking things. It turns out however that setup.py has > references to packages which at least don't appear to exist: py.io.test, > py.test.rsession, py.test.terminal. After I remove those from setup.py > things seem to work again (that is, I can run the code. I get errors. > Another mail about those...) ... and sorry for the confusion. Actually the setup.py on py/trunk resulted from a yesterday merge of release/0.9.x ... but i now regenerated the setup.py and MANIFEST files. > With setuptools, MANIFEST shouldn't be necessary: you can instruct > setup.py to automatically assume files that are checked into SVN are in > manifest, with something like this: > > from setuptools import find_packages > > package_dir={'': 'src'}, > packages=find_packages('py'), ok, but for now i'd still like to be compatible to distutils (a user can just switch a "1" to "0") and i am auto-generating the setup.py file so i don't care. let me know if the problems persist or things just work. holger From holger at merlinux.eu Tue Aug 19 19:48:59 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 19:48:59 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: References: Message-ID: <20080819174859.GY9619@trillke.net> Hi Martijn, hum, this probably results from Guido's yesterday merge of his xmlstatus branch ... On Tue, Aug 19, 2008 at 19:02 +0200, Martijn Faassen wrote: > Hi there, > > I just tried the trunk of Py with my project which makes very heavy use > of the py.path SVN facilities, and I get a lot of errors that look like > this: > > File > "/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line > 270, in status > rootstatus = XMLWCStatus(self).fromstring(out, self) > File > "/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line > 687, in fromstring > for c in commitel.getElementsByTagName('author')[0]\ > IndexError: list index out of range > > It looks to me like a certain assumption about the format of the XML > returned is incorrect. > > The SVN version on my system is svn, version 1.4.3 (r23084) > > When debugging it, the XML that trips up the code looks like this: > > > > > 2008-08-19T16:50:53.400198Z > > > > > It looks like this means there is not always an 'author' entry in this > XML structure. > > Attached is a patch to wccommand.py that makes the problem go away (and > indeed seems to fix the original problem I was looking into - the trunk > has support for the svn status flag R, something that py 0.9.1 didn't > have). > > I realize this patch isn't enough but needs a test as well. I could find > no obvious way (in the form of documentation, say, the README.txt, or > the website) on how to actually run the tests of the trunk. :) It's > quite possible I missed something. > > Is py 0.9.2 to be based off the work on the trunk? yes, 0.9.2 actually mirrors trunk/py/path. If you could submit a test and a fix today or early tomorrow it can definitely go in. (i anyway still am fighting with windows installation issues, sight). as to the tests: if you have "setup.py develop" you should be able to run py.test --runslowtests py/path/svn/testing/test_wccomannd.py or even better :) py.test -n 3 --runslowtests py/path/svn/testing/test_wccomannd.py which doubles test speed on dual-core machines. you can add a test there, i guess one that just feeds a minimal XML string into the method and checks that it groks it fine. oh, and just commit, i'll review the commit (and guido as well, i guess). thanks & best, holger From johnny at johnnydebris.net Tue Aug 19 22:04:04 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Tue, 19 Aug 2008 22:04:04 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <20080819174859.GY9619@trillke.net> References: <20080819174859.GY9619@trillke.net> Message-ID: <48AB2734.1050603@johnnydebris.net> holger krekel wrote: > hum, this probably results from Guido's yesterday merge > of his xmlstatus branch ... > > Indeed it does... Or did, because I just fixed it by applying Martijn's patch, and adding a test. Thanks for reporting, and for the patch, Martijn! Cheers, Guido From schmir at gmail.com Tue Aug 19 22:33:07 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Tue, 19 Aug 2008 22:33:07 +0200 Subject: [py-dev] setuptools / undoing 0.9.1 PATH hacks (Re: 0.9.2 alpha eggs - please test) In-Reply-To: <20080819123638.GU9619@trillke.net> References: <20080818135244.GI9619@trillke.net> <20080818135451.GJ9619@trillke.net> <7be3f35d0808190017w3db68e58rf4970a4c69e444d2@mail.gmail.com> <7be3f35d0808190025t473743f4w5cf7affa35715786@mail.gmail.com> <20080819085723.GR9619@trillke.net> <20080819123638.GU9619@trillke.net> Message-ID: <932f8baf0808191333h5335af53n2a42add6f9aa1167@mail.gmail.com> On Tue, Aug 19, 2008 at 2:36 PM, holger krekel wrote: > Hi Harald, Ralf, > > so i created an egg with a function that tries to undo > the path changes done with 0.9.1. I checked that the > code works but i think that setuptools does not execute > my code at runtime, only at bdist_egg time. I guess > i need to investigate how i can have some code executed > at install time. Anybody has hints? > no, sorry. From faassen at startifact.com Tue Aug 19 22:52:25 2008 From: faassen at startifact.com (Martijn Faassen) Date: Tue, 19 Aug 2008 22:52:25 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <48AB2734.1050603@johnnydebris.net> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> Message-ID: <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> Hey, Thanks for the test, Guido! Regards, Martijn From holger at merlinux.eu Tue Aug 19 22:57:37 2008 From: holger at merlinux.eu (holger krekel) Date: Tue, 19 Aug 2008 22:57:37 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> Message-ID: <20080819205737.GA9619@trillke.net> On Tue, Aug 19, 2008 at 22:52 +0200, Martijn Faassen wrote: > Thanks for the test, Guido! > > Regards, > > Martijn thanks to both of you, i merged it to 0.9.x ... and i am still thinking about the way to approach bdist eggs, windows, sdist's and py.* cmdlines ... there *must* a nice solution :) holger From faassen at startifact.com Wed Aug 20 14:52:39 2008 From: faassen at startifact.com (Martijn Faassen) Date: Wed, 20 Aug 2008 14:52:39 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <20080819205737.GA9619@trillke.net> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> <20080819205737.GA9619@trillke.net> Message-ID: <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> Hi there, Concerning bdist eggs, don't make them unless something should be compiled. If you do need a compiler, make them *only* for the Windows platform. We went to this pattern for all Zope-related eggs and also with lxml and it has worked well. The drawback of binary eggs for any other platform but Windows is that they tend to break under various circumstances if there is compiled code (Python might be compiled with 2 or 4 byte unicode support, for instance). If there *is* no code to compile, the drawback is that the binary egg locks you into whatever Python versions it has been released for. A .tgz works just fine as well with the easy_install tools and buildout and works without them too. This describes the Zope-related release procedure: http://grok.zope.org/documentation/how-to/releasing-software So, the rule: python setup.py register sdist upload for any egg unless you have compiled extensions and you're releasing a Windows egg. Concerning command-line scripts I'm not sure I can help. I use (I believe setuptools) support for entry_points: 'console_scripts': { 'scriptname = foo.bar:mainfunc', ] }, with default easy_install that causes scripts to end up in /usr/bin, but with buildout, these scripts end up in a 'bin' subdirectory (or whatever your configuration is) of the buildout direcory (which is by default the project directory which contains setup.py). (for other scripts not directly supplied by the package such as for instance a test runner itself I use various buildout recipes to create them. I'm not sure whether that's relevant here) Regards, Martijn From schmir at gmail.com Wed Aug 20 15:27:01 2008 From: schmir at gmail.com (Ralf Schmitt) Date: Wed, 20 Aug 2008 15:27:01 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> <20080819205737.GA9619@trillke.net> <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> Message-ID: <932f8baf0808200627v6c12dd26y1d53ad423d744e18@mail.gmail.com> On Wed, Aug 20, 2008 at 2:52 PM, Martijn Faassen wrote: > Hi there, > > Concerning bdist eggs, don't make them unless something should be > compiled. If you do need a compiler, make them *only* for the Windows > platform. > Isn't it safe to build eggs for OS X? Did you run into problems with that? Regards, - Ralf From faassen at startifact.com Wed Aug 20 15:48:27 2008 From: faassen at startifact.com (Martijn Faassen) Date: Wed, 20 Aug 2008 15:48:27 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <932f8baf0808200627v6c12dd26y1d53ad423d744e18@mail.gmail.com> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> <20080819205737.GA9619@trillke.net> <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> <932f8baf0808200627v6c12dd26y1d53ad423d744e18@mail.gmail.com> Message-ID: <8928d4e90808200648u65338db6rc9f24dedcfc9a6ce@mail.gmail.com> Hi there, On Wed, Aug 20, 2008 at 3:27 PM, Ralf Schmitt wrote: > On Wed, Aug 20, 2008 at 2:52 PM, Martijn Faassen wrote: >> Concerning bdist eggs, don't make them unless something should be >> compiled. If you do need a compiler, make them *only* for the Windows >> platform. > > Isn't it safe to build eggs for OS X? Did you run into problems with that? I don't use OS X as my primary development platform, but people who *do* use OS X have recommended this practice. Anyway, I'd expect problems, as from what I've seen of OS X it is very frequent people install non-system Pythons on it, in a variety of ways (fink, darwinports, etc). Regards, Martijn From holger at merlinux.eu Wed Aug 20 19:12:15 2008 From: holger at merlinux.eu (holger krekel) Date: Wed, 20 Aug 2008 19:12:15 +0200 Subject: [py-dev] 0.9.2 beta eggs / Windows Notes / API gen pending Message-ID: <20080820171215.GE9619@trillke.net> Hi again, after i fixed a number of bugs (mostly windows specific) and after lots of experimentation i settled for a simpler approach for setup.py: it's now setuptools only and uses the "entry_points" hook as Ralf originally suggested and Martijn now recommended as well. There is no "_findpy" hack anymore. i've uploaded the beta to pypi: http://codespeak.net/py/0.9.2/download.html Note to harald and users who have used py.test and friends with earlier installs: please read the important note and execute the cleanupscript. Guido: i think i need some help with API generation - that link is currently broken and i guess you know what is wrong. best & cheers, holger -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From fijall at gmail.com Thu Aug 21 00:09:59 2008 From: fijall at gmail.com (Maciej Fijalkowski) Date: Thu, 21 Aug 2008 00:09:59 +0200 Subject: [py-dev] 0.9.2 beta eggs / Windows Notes / API gen pending In-Reply-To: <20080820171215.GE9619@trillke.net> References: <20080820171215.GE9619@trillke.net> Message-ID: <693bc9ab0808201509l6016ae72icc232d5f1732974e@mail.gmail.com> I checked out on my linux machine. Stuff seems to work (module my broken setuptools on some python installations). Will try on more random machines tomorrow, let's see. PS. Do we care if it works with pypy-c? Because then there is no need of invoking C compiler (greenlets are either builtin or not at all) Cheers, fijal On Wed, Aug 20, 2008 at 7:12 PM, holger krekel wrote: > Hi again, > > after i fixed a number of bugs (mostly windows specific) > and after lots of experimentation i settled for a simpler > approach for setup.py: it's now setuptools only and > uses the "entry_points" hook as Ralf originally suggested > and Martijn now recommended as well. There is no "_findpy" > hack anymore. > > i've uploaded the beta to pypi: > > http://codespeak.net/py/0.9.2/download.html > > Note to harald and users who have used py.test and friends > with earlier installs: please read the important note > and execute the cleanupscript. > > Guido: i think i need some help with API generation - > that link is currently broken and i guess you know > what is wrong. > > best & cheers, > > holger > > -- > collaborative expert contracting: http://merlinux.eu > PyPy Python/Compiler tool chain: http://codespeak.net/pypy > pylib py.test/greenlets/svn APIs: http://pylib.org > _______________________________________________ > py-dev mailing list > py-dev at codespeak.net > http://codespeak.net/mailman/listinfo/py-dev > From holger at merlinux.eu Thu Aug 21 09:10:54 2008 From: holger at merlinux.eu (holger krekel) Date: Thu, 21 Aug 2008 09:10:54 +0200 Subject: [py-dev] 0.9.2 beta eggs / Windows Notes / API gen pending In-Reply-To: <693bc9ab0808201509l6016ae72icc232d5f1732974e@mail.gmail.com> References: <20080820171215.GE9619@trillke.net> <693bc9ab0808201509l6016ae72icc232d5f1732974e@mail.gmail.com> Message-ID: <20080821071054.GG9619@trillke.net> On Thu, Aug 21, 2008 at 00:09 +0200, Maciej Fijalkowski wrote: > I checked out on my linux machine. Stuff seems to work (module my > broken setuptools on some python installations). Will try on more > random machines tomorrow, let's see. > > PS. Do we care if it works with pypy-c? Because then there is no need > of invoking C compiler (greenlets are either builtin or not at all) i expect things to work - but in any case let's see that pypy-1.1 and py lib 1.0 work well together. holger > On Wed, Aug 20, 2008 at 7:12 PM, holger krekel wrote: > > Hi again, > > > > after i fixed a number of bugs (mostly windows specific) > > and after lots of experimentation i settled for a simpler > > approach for setup.py: it's now setuptools only and > > uses the "entry_points" hook as Ralf originally suggested > > and Martijn now recommended as well. There is no "_findpy" > > hack anymore. > > > > i've uploaded the beta to pypi: > > > > http://codespeak.net/py/0.9.2/download.html > > > > Note to harald and users who have used py.test and friends > > with earlier installs: please read the important note > > and execute the cleanupscript. > > > > Guido: i think i need some help with API generation - > > that link is currently broken and i guess you know > > what is wrong. > > > > best & cheers, > > > > holger > > > > -- > > collaborative expert contracting: http://merlinux.eu > > PyPy Python/Compiler tool chain: http://codespeak.net/pypy > > pylib py.test/greenlets/svn APIs: http://pylib.org > > _______________________________________________ > > py-dev mailing list > > py-dev at codespeak.net > > http://codespeak.net/mailman/listinfo/py-dev > > > _______________________________________________ > py-dev mailing list > py-dev at codespeak.net > http://codespeak.net/mailman/listinfo/py-dev > -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From holger at merlinux.eu Thu Aug 21 10:30:58 2008 From: holger at merlinux.eu (holger krekel) Date: Thu, 21 Aug 2008 10:30:58 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> <20080819205737.GA9619@trillke.net> <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> Message-ID: <20080821083058.GI9619@trillke.net> Hi Martijn, On Wed, Aug 20, 2008 at 14:52 +0200, Martijn Faassen wrote: > Concerning bdist eggs, don't make them unless something should be > compiled. If you do need a compiler, make them *only* for the Windows > platform. > > We went to this pattern for all Zope-related eggs and also with lxml > and it has worked well. yip, i am using that as well. > The drawback of binary eggs for any other platform but Windows is that > they tend to break under various circumstances if there is compiled > code (Python might be compiled with 2 or 4 byte unicode support, for > instance). If there *is* no code to compile, the drawback is that the > binary egg locks you into whatever Python versions it has been > released for. A .tgz works just fine as well with the easy_install > tools and buildout and works without them too. > > This describes the Zope-related release procedure: > > http://grok.zope.org/documentation/how-to/releasing-software thanks, nice doc. > So, the rule: > > python setup.py register sdist upload > > for any egg unless you have compiled extensions and you're releasing a > Windows egg. ok. py lib has the greenlet extension so this requires bdist_egg from windows. so, now i am trying to also get "easy_install py==dev" to work. I tried having a setup.cfg of [egg_info] tag_build = .dev tag_svn_revision = 1 and with a "version=1.0.0.a1" in setup.py and calling python setup.py sdist upload this registered and uploaded a 1.0.0a1-r57529 version fine. But then "easy_install py" on another machine gave me the dev version instead of the release (0.9.2b7 currently). What am i missing? (i removed the 1.0.0a1 completely from pypi, btw). > Concerning command-line scripts I'm not sure I can help. I use (I > believe setuptools) support for entry_points: > > 'console_scripts': { > 'scriptname = foo.bar:mainfunc', > ] > }, py lib is using that as well now. > with default easy_install that causes scripts to end up in /usr/bin, > but with buildout, these scripts end up in a 'bin' subdirectory (or > whatever your configuration is) of the buildout direcory (which is by > default the project directory which contains setup.py). yip, same with virtualenv. > (for other scripts not directly supplied by the package such as for > instance a test runner itself I use various buildout recipes to create > them. I'm not sure whether that's relevant here) i guess i am still learning how to deal conveniently with setuptools ... holger From faassen at startifact.com Thu Aug 21 14:31:19 2008 From: faassen at startifact.com (Martijn Faassen) Date: Thu, 21 Aug 2008 14:31:19 +0200 Subject: [py-dev] error on trunk in py.path.svn support In-Reply-To: <20080821083058.GI9619@trillke.net> References: <20080819174859.GY9619@trillke.net> <48AB2734.1050603@johnnydebris.net> <8928d4e90808191352v67f95825w4b490b99487dfbce@mail.gmail.com> <20080819205737.GA9619@trillke.net> <8928d4e90808200552v3db5d812s74e2ad1773d0395@mail.gmail.com> <20080821083058.GI9619@trillke.net> Message-ID: <8928d4e90808210531w3fc3848dnc4c4116aa806d3c4@mail.gmail.com> Hi there, [snip] > so, now i am trying to also get "easy_install py==dev" to work. > I tried having a setup.cfg of > > [egg_info] > tag_build = .dev > tag_svn_revision = 1 > > and with a "version=1.0.0.a1" in setup.py and calling > > python setup.py sdist upload > > this registered and uploaded a 1.0.0a1-r57529 version fine. Ugly. In the Zope community we've been avoiding any setup.cfg and we've done actual proper releases whenever needed. We used to produce a lot of those ugly -r515153 eggs, but for a large system composed out of multiple packages such a "release but not really a proper release" things were far more pain than they're worth, as the releases didn't tend to be very well managed. > But then "easy_install py" on another machine gave me the dev > version instead of the release (0.9.2b7 currently). > What am i missing? Hm, I don't know off the top of my head, I'm afraid. > (i removed the 1.0.0a1 completely from pypi, btw). Removing released eggs is also not a good idea to do very often. We have a policy that we never remove anything from PyPI but just make a new, later, release. People may be depending on the versions on PyPI - automatic build systems may pull in an egg before you know it, after all. I'm just sketching out what I know from our Zope egg release mill here. Other approaches may of course work too, I'm just telling you what works for us (and the bits I know). Regards, Martijn From holger at merlinux.eu Fri Aug 22 13:21:46 2008 From: holger at merlinux.eu (holger krekel) Date: Fri, 22 Aug 2008 13:21:46 +0200 Subject: [py-dev] 0.9.2 is out Message-ID: <20080822112146.GR9619@trillke.net> Hi, thanks to all who helped with the 0.9.2 release! see below for the release announcement. hope that all the eggs now work properly. cheers, holger Welcome to the 0.9.2 py lib and py.test release - mainly fixing Windows issues, providing better packaging and integration with setuptools. Summry of main features: * py.test: cross-project testing tool with many advanced features * py.execnet: ad-hoc code distribution to SSH, Socket and local sub processes * py.magic.greenlet: micro-threads on standard CPython ("stackless-light") * py.path: path abstractions over local and subversion files * rich documentation of py's exported API * tested against Linux, Win32, OSX, works on python 2.3-2.6 good entry points: Pypi pages: http://pypi.python.org/pypi/py/ Download/Install: http://codespeak.net/py/0.9.2/download.html Documentation/API: http://codespeak.net/py/0.9.2/index.html the CHANGELOG excerpt for the 0.9.1 -> 0.9.2 transition: * refined installation and metadata, created new setup.py, now based on setuptools/ez_setup (thanks to Ralf Schmitt for his support). * improved the way of making py.* scripts available in windows environments, they are now added to the Scripts directory as ".cmd" files. * py.path.svnwc.status() now is more complete and uses xml output from the 'svn' command if available (Guido Wesdorp) * fix for py.path.svn* to work with svn 1.5 (Chris Lamb) * fix path.relto(otherpath) method on windows to use normcase for checking if a path is relative. * py.test's traceback is better parseable from editors (follows the filenames:LINENO: MSG convention) (thanks to Osmo Salomaa) * fix to javascript-generation, "py.test --runbrowser" should work more reliably now * removed previously accidentally added py.test.broken and py.test.notimplemented helpers. * there now is a py.__version__ attribute best and have fun, holger krekel -- collaborative expert contracting: http://merlinux.eu PyPy Python/Compiler tool chain: http://codespeak.net/pypy pylib py.test/greenlets/svn APIs: http://pylib.org From Jim.Vickroy at noaa.gov Thu Aug 28 23:09:20 2008 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu, 28 Aug 2008 15:09:20 -0600 Subject: [py-dev] 0.9.2 is out In-Reply-To: <20080822112146.GR9619@trillke.net> References: <20080822112146.GR9619@trillke.net> Message-ID: <48B71400.4000403@noaa.gov> holger krekel wrote: > Hi, thanks to all who helped with the 0.9.2 release! > see below for the release announcement. hope that > all the eggs now work properly. cheers, holger > > > Welcome to the 0.9.2 py lib and py.test release - > mainly fixing Windows issues, providing better > packaging and integration with setuptools. > > Summry of main features: > > * py.test: cross-project testing tool with many advanced features > * py.execnet: ad-hoc code distribution to SSH, Socket and local sub processes > * py.magic.greenlet: micro-threads on standard CPython ("stackless-light") > * py.path: path abstractions over local and subversion files > * rich documentation of py's exported API > * tested against Linux, Win32, OSX, works on python 2.3-2.6 > > good entry points: > > Pypi pages: http://pypi.python.org/pypi/py/ > Download/Install: http://codespeak.net/py/0.9.2/download.html > Documentation/API: http://codespeak.net/py/0.9.2/index.html > > [... snip ...] I attempted to upgrade from py 0.9.1 to 0.9.2 on my fully-patched, MS Windows XP Pro machine running Python 2.5.2, but I do not think I was successful. Following the recommendation at http://codespeak.net/py/0.9.2/download.html, I downloaded and ran the cleanup script. Here is the output: C:\>py-winpath-clean.py PATH contains old py/bin/win32 scripts: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Python25;C:\Python25\DLLS;C:\Python25\Lib\s ite-packages;C:\Program Files\Microsoft Visual Studio\VSS;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\PAGE;C:\Program Files\Multi-Edit 9;C:\Program Files\NSIS;C:\RSI\IDL55\bin\bin.x86;C:\Py thon25\Lib\site-packages\py\bin\win32;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Intel\DMIX;C:\Python25\Lib\site-packages\py\bin\win32 pruning and setting a new PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Python25;C:\Python25\DLLS;C:\Python25\Lib\site-pack ages;C:\Program Files\Microsoft Visual Studio\VSS;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\PAGE;C:\Program Files\Multi-Edit 9;C:\Program Files\NSIS;C:\RSI\IDL55\bin\bin.x86;C:\Program Fi les\QuickTime\QTSystem\;C:\Program Files\Intel\DMIX removing C:\Python25\scripts\py.test removing C:\Python25\scripts\py.lookup removing C:\Python25\scripts\py.cleanup removing C:\Python25\scripts\py.rest removing C:\Python25\scripts\py.countloc removing C:\Python25\scripts\_update_website.py removing C:\Python25\scripts\_makepyrelease.py removing C:\Python25\scripts\_findpy.py removing C:\Python25\scripts\pytest.cmd Here is my attempt to install py 0.9.2 ... C:\>easy_install py Searching for py Best match: py 0.9.1 Adding py 0.9.1 to easy-install.pth file Using c:\python25\lib\site-packages Processing dependencies for py Finished processing dependencies for py C:\> ... which looks like the same version I already had was reinstalled. Could someone provide some guidance on what I did incorrectly? Thanks, -- jv From cfbolz at gmx.de Thu Aug 28 23:13:57 2008 From: cfbolz at gmx.de (Carl Friedrich Bolz) Date: Thu, 28 Aug 2008 23:13:57 +0200 Subject: [py-dev] 0.9.2 is out In-Reply-To: <48B71400.4000403@noaa.gov> References: <20080822112146.GR9619@trillke.net> <48B71400.4000403@noaa.gov> Message-ID: <48B71515.4000104@gmx.de> Jim Vickroy wrote: [snip] > > I attempted to upgrade from py 0.9.1 to 0.9.2 on my fully-patched, MS > Windows XP Pro machine running Python 2.5.2, but I do not think I was > successful. > > Following the recommendation at > http://codespeak.net/py/0.9.2/download.html, I downloaded and ran the > cleanup script. Here is the output: > [snip] > > > Here is my attempt to install py 0.9.2 ... > > C:\>easy_install py > > Searching for py > > Best match: py 0.9.1 > > Adding py 0.9.1 to easy-install.pth file > > Using c:\python25\lib\site-packages > > Processing dependencies for py > > Finished processing dependencies for py > > C:\> > > > ... which looks like the same version I already had was reinstalled. > > Could someone provide some guidance on what I did incorrectly? Maybe you did nothing wrong :-). I Actually observe exactly the same behavior on my Ubuntu machine, so somehow easy_install does not seem to pick up 0.9.2? Cheers, Carl Friedrich From pedronis at openend.se Fri Aug 29 09:57:28 2008 From: pedronis at openend.se (Samuele Pedroni) Date: Fri, 29 Aug 2008 09:57:28 +0200 Subject: [py-dev] 0.9.2 is out In-Reply-To: <48B71515.4000104@gmx.de> References: <20080822112146.GR9619@trillke.net> <48B71400.4000403@noaa.gov> <48B71515.4000104@gmx.de> Message-ID: <48B7ABE8.6000302@openend.se> Carl Friedrich Bolz wrote: > Jim Vickroy wrote: > [snip] > >> I attempted to upgrade from py 0.9.1 to 0.9.2 on my fully-patched, MS >> Windows XP Pro machine running Python 2.5.2, but I do not think I was >> successful. >> >> Following the recommendation at >> http://codespeak.net/py/0.9.2/download.html, I downloaded and ran the >> cleanup script. Here is the output: >> >> > [snip] > >> Here is my attempt to install py 0.9.2 ... >> >> C:\>easy_install py >> >> Searching for py >> >> Best match: py 0.9.1 >> >> Adding py 0.9.1 to easy-install.pth file >> >> Using c:\python25\lib\site-packages >> >> Processing dependencies for py >> >> Finished processing dependencies for py >> >> C:\> >> >> >> ... which looks like the same version I already had was reinstalled. >> >> Could someone provide some guidance on what I did incorrectly? >> > > Maybe you did nothing wrong :-). I Actually observe exactly the same > behavior on my Ubuntu machine, so somehow easy_install does not seem to > pick up 0.9.2? > you need to ask explicitly for an upgrade I think (--upgrade or -U) From cfbolz at gmx.de Fri Aug 29 10:47:50 2008 From: cfbolz at gmx.de (Carl Friedrich Bolz) Date: Fri, 29 Aug 2008 10:47:50 +0200 Subject: [py-dev] 0.9.2 is out In-Reply-To: <48B7ABE8.6000302@openend.se> References: <20080822112146.GR9619@trillke.net> <48B71400.4000403@noaa.gov> <48B71515.4000104@gmx.de> <48B7ABE8.6000302@openend.se> Message-ID: <48B7B7B6.8030703@gmx.de> Samuele Pedroni wrote: > Carl Friedrich Bolz wrote: >> Maybe you did nothing wrong :-). I Actually observe exactly the same >> behavior on my Ubuntu machine, so somehow easy_install does not seem to >> pick up 0.9.2? >> > you need to ask explicitly for an upgrade I think (--upgrade or -U) It works! The wonders of extremely advanced technology. Thanks, Samuele. Cheers, Carl Friedrich From holger at merlinux.eu Fri Aug 29 21:02:25 2008 From: holger at merlinux.eu (holger krekel) Date: Fri, 29 Aug 2008 21:02:25 +0200 Subject: [py-dev] 0.9.2 is out In-Reply-To: <48B71400.4000403@noaa.gov> References: <20080822112146.GR9619@trillke.net> <48B71400.4000403@noaa.gov> Message-ID: <20080829190225.GE9619@trillke.net> On Thu, Aug 28, 2008 at 15:09 -0600, Jim Vickroy wrote: > I attempted to upgrade from py 0.9.1 to 0.9.2 on my fully-patched, MS > Windows XP Pro machine running Python 2.5.2, but I do not think I was > successful. > > Following the recommendation at > http://codespeak.net/py/0.9.2/download.html, I downloaded and ran the > cleanup script. Here is the output: > > C:\>py-winpath-clean.py > > PATH contains old py/bin/win32 scripts: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Python25;C:\Python25\DLLS;C:\Python25\Lib\s > > ite-packages;C:\Program Files\Microsoft Visual Studio\VSS;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\PAGE;C:\Program Files\Multi-Edit 9;C:\Program Files\NSIS;C:\RSI\IDL55\bin\bin.x86;C:\Py > > thon25\Lib\site-packages\py\bin\win32;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Intel\DMIX;C:\Python25\Lib\site-packages\py\bin\win32 > > pruning and setting a new PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Python25;C:\Python25\DLLS;C:\Python25\Lib\site-pack > > ages;C:\Program Files\Microsoft Visual Studio\VSS;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\PAGE;C:\Program Files\Multi-Edit 9;C:\Program Files\NSIS;C:\RSI\IDL55\bin\bin.x86;C:\Program Fi > > les\QuickTime\QTSystem\;C:\Program Files\Intel\DMIX > > removing C:\Python25\scripts\py.test > > removing C:\Python25\scripts\py.lookup > > removing C:\Python25\scripts\py.cleanup > > removing C:\Python25\scripts\py.rest > > removing C:\Python25\scripts\py.countloc > > removing C:\Python25\scripts\_update_website.py > > removing C:\Python25\scripts\_makepyrelease.py > > removing C:\Python25\scripts\_findpy.py > > removing C:\Python25\scripts\pytest.cmd this look good :) > Here is my attempt to install py 0.9.2 ... > > C:\>easy_install py > > Searching for py > > Best match: py 0.9.1 > > Adding py 0.9.1 to easy-install.pth file the others correctly pointed to "-U" already. I just updated the web pages to include this switch by default. Thanks for reporting the issue and let us know if there are any more problems. holger