[issue4667] Patch with a couple of 2.0isms in tutorial

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r67782. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4667 ___

[issue4668] examples in the functional howto are not consistent with 3.X behavior

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r67783. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4668 ___

[issue4669] bytes,join and bytearray.join not in manual; help for bytes.join is wrong.

2008-12-15 Thread John Machin
New submission from John Machin sjmac...@users.sourceforge.net: These methods are parallel to str.join, seem to work as expected, and have help entries. However there is nothing in the Library Reference Manual about them. help(bytearray.join) Help on method_descriptor: join(...)

[issue4446] Distutils Metadata Documentation Missing platforms Keyword

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Done in r67784. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4446 ___

[issue4611] Small error in Extending Python with C or C++

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r67785. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4611 ___

[issue4603] 3.0 document tab interpretation change

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r67786. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4603 ___

[issue4595] new types example is out of date

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Already fixed in SVN. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4595 ___

[issue4578] compiler: -3 warnings

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: OK, since it doesn't do any damage I've applied your patch in r67787. -- resolution: wont fix - fixed status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4578

[issue4568] Improved optparse varargs callback example

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I've reformatted and rewritten your patch a bit and applied it as r67788. Thanks! -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2008-12-15 Thread Krzysztof Szawala
Krzysztof Szawala kszaw...@slb.com added the comment: As I mentionetd, the problem occurs with Python 2.5 (I won't be switching to Python 3). The only perspective for me to upgrade is Python 2.6, but as I can see the problem applies to 2.6 as well. ___ Python

[issue4670] setup.py exception when db_setup_debug = True

2008-12-15 Thread Damien Miller
New submission from Damien Miller djm...@users.sourceforge.net: Hi, I receive the following exception when trying to build with db_setup_debug = True in setup.py. db_ver is not initialised in this path, except by accident so I think the obvious solution of -if db_setup_debug: print db.h:

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau srit...@jroger.in-berlin.de added the comment: A timedelta.toseconds method (or equivalent) makes no sense. The number of seconds in a day is not fixed (due to leap seconds) and relying on such a method would introduce subtle bugs. The only way to find out the number of seconds

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file11919/timedelta_toseconds_float.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673409 ___

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-15 Thread John Shue
Changes by John Shue john.anthony.s...@gmail.com: -- nosy: +johnshue ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4566 ___ ___ Python-bugs-list

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-13 16:08, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Here is a new patch without any dispatch shortcut in ceval.c, just optimizations in unicodeobject.c and longobject.c. Net result on pybench:

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Jon Ribbens
Jon Ribbens jribb...@users.sourceforge.net added the comment: A timedelta.toseconds method (or equivalent) makes no sense. The number of seconds in a day is not fixed (due to leap seconds) and relying on such a method would introduce subtle bugs. You are misunderstanding what timedelta is.

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I have a test case locally that demonstrates both the missing line number in the __main__.py from a zipfile case, as well as the display of main.c as the filename (the latter is not specific to the zipfile case - it also happens for a normal

[issue2155] optparse.OptionGroup with_statement context handling

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau srit...@jroger.in-berlin.de added the comment: This API is too magical to my liking and doesn't really reflect what context manager's are supposed to do, i.e. handling resources. Also, I don't see much advantage over: group = OptionGroup(parser, Group name)

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Re-opening, pending development of a fully passing test specifically for the __main__.py in zipfile case. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org

[issue3106] speedup some comparisons

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le lundi 15 décembre 2008 à 14:41 +, Marc-Andre Lemburg a écrit : Why have you removed the complete error handling section in PyUnicode_RichCompare() ? Because the only error that can occur is a TypeError when one of the two arguments is

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The number of seconds in a day is not fixed (due to leap seconds) POSIX timestamp doesn't count leap seconds. It looks like the datetime module is not aware of the leap seconds: print datetime.datetime(2006, 1, 1) -

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-15 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Closing as won't fix for now. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4665 ___

[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I tried a fix (see r67779, r6 in trunk) and it seems to work. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4666 ___

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I also think totimestamp() on datetime objects would be useful, I've missed it myself a couple of times. The return value should be similar to that of time.time(), i.e. a float. -- nosy: +pitrou ___

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau srit...@jroger.in-berlin.de added the comment: Leap second handling is usually configurable. Default on Debian Linux (but similar on RHEL and SuSE): int(date(1994,1,1).strftime(%s)) - int(date(1993,1,1).strftime(%s)) 31536000 After doing cp

[issue4568] Improved optparse varargs callback example

2008-12-15 Thread Gregg Lind
Gregg Lind gregg.l...@gmail.com added the comment: This patch should also be applied into the py3k branch, probably. Good catch on updating rargs, btw. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4568

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What you say is with 99500 days or more, the microsecond error is bigger than 90%. It means that with epoch starting at 1970, you can still return timestamps with a 1-2 microsecond accuracy for the year 2242. Additional precision would be

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I removed my .toseconds() method patch because I prefer division. See issue #2706 for divison, divmod, etc. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673409

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Took me awhile to locate a SPARC C compiler on our dwindling set of Solaris/SPARC boxes at work, but I eventually found one and got Subversion trunk to compile. test_cmath and test_math both pass with the force_to_memory2 patch. I don't know if

[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-15 Thread Carwyn Edwards
Carwyn Edwards car...@carwyn.com added the comment: Just to note that issue 4017 is related to this. -- nosy: +carwyn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4627 ___

[issue4568] Improved optparse varargs callback example

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yes, it will be merged to py3k automatically; we normally merge smaller changes in batches. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4568 ___

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, Skip. Looks like this problem is 'solved in principle'. Now I have to figure out a non-hackish solution. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4575

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: (...) totimestamp() (...) return value should be similar to that of time.time(), i.e. a float float is a source of many problems (rounding problems), especially for huge values: float is unable to store correctly microseconds for

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: It turns out you were pretty close to pinpointing the problem in doctest, but didn't quite manage to identify which step was going wrong. The problem was actually that even after __file__ was being set correctly, the call to linecache.getlines

[issue4501] asyncore's urgent data management and connection closed events are broken when using poll()

2008-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- versions: +Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4501 ___

[issue4631] urlopen returns extra, spurious bytes

2008-12-15 Thread Jeremy Hylton
Jeremy Hylton jer...@alum.mit.edu added the comment: I have a patch here that seems to work for the specific url and that passes all the tests. Can anyone check whether it works for a larger set of cases? I'm a little concerned because I don't understand the new io library in much detail.

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673409 ___ ___ Python-bugs-list

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-15 16:34, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Le lundi 15 décembre 2008 à 14:41 +, Marc-Andre Lemburg a écrit : Why have you removed the complete error handling section in

[issue4671] pydoc executes the code to be documented

2008-12-15 Thread Jim_C
New submission from Jim_C j.con...@physics.org: Running pydoc [ pydoc modulename ] on a python module using Tkinter displayed the window defined in the module - not what I was expecting.. Running pydoc on from os import remove sFile='tmp.tmp' remove(sFile) will remove the file tmp.tmp, if

[issue3954] _hotshot: invalid error control in logreader()

2008-12-15 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3954 ___ ___

[issue3954] _hotshot: invalid error control in logreader()

2008-12-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Fixed in r67797 (trunk) and r67801 (2.6) hotshot was removed from py3k. -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2008-12-15 Thread Andy Buckley
New submission from Andy Buckley a...@insectnation.org: When using distutils to build an extension module using SWIG, it makes most sense to use the built-in SWIG support. However, the distutils seem to vet the options passed via the Extension.swig_opts attr/arg: [...]

[issue4561] Optimize new io library

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've written a small file IO benchmark, available here: http://svn.python.org/view/sandbox/trunk/iobench/ It runs under both 2.6 and 3.x, so that we can compare speeds of respective implementations. ___ Python

[issue4673] Distutils should provide an uninstall command

2008-12-15 Thread Andy Buckley
New submission from Andy Buckley a...@insectnation.org: It would make package maintenance easier, as well as integration with other build systems e.g. autotools (necessary for projects where not everything is Python), if the distutils supported an uninstallation command, e.g. python setup.py

[issue3632] use string_print() in gdb

2008-12-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Committed in r67802. -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3632 ___

[issue1479255] Fix building with SWIG's -c++ option set in setup.py

2008-12-15 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: This works in my current version of distutils (Python 2.5.2, from Ubuntu Intrepid). Maybe it was fixed and no-one noticed that this bug was relevant ;) -- nosy: +andybuckley ___ Python tracker

[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: On the buildbots, the errors have now disappeared after the fix. I'm closing this, please reopen it if you still witness it. -- resolution: - fixed status: open - closed ___ Python tracker

[issue4631] urlopen returns extra, spurious bytes

2008-12-15 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: I think your patch is good, but there may be another bug around: I wrote a script to check results of 3.x against 2.x, but many pages (http://groups.google.com/, http://en.wikipedia.org/) give 403: Forbidden for 3.x... but work with 2.x! If you

[issue4663] Increase TextIOWrapper._CHUNK_SIZE

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in r67803, r67804. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4663 ___

[issue4216] subprocess.Popen hangs at communicate() when child exits

2008-12-15 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I think communicate() works as documented now: reads stdout/stderr until EOF, *and* waits for subprocess to terminate. You're asking for a different method, or perhaps an optional parameter return_when_died to communicate, so it

[issue4671] pydoc executes the code to be documented

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That's why you shouldn't put code with side effects at the root of a module, but inside a if __name__ == '__main__' guard. Anyway, it may be worth documenting it! -- assignee: - georg.brandl components: +Documentation nosy:

[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2008-12-15 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: could you provide a test case / code fragment showing the bug? -- components: +Library (Lib) -Extension Modules nosy: +gagenellina ___ Python tracker rep...@bugs.python.org

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-15 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643 ___ ___

[issue4561] Optimize new io library

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Without Christian's patch: [400KB.txt] read one byte/char at a time... 0.2685 MB/s (100% CPU) [400KB.txt] read 20 bytes/chars at a time... 4.536 MB/s (98% CPU) [400KB.txt] read one line at a time...3.805 MB/s

[issue4561] Optimize new io library

2008-12-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I'm getting caught-up with the IO changes in 3.0 and am a bit confused. The PEP says, programmers who don't want to muck about in the new I/O world can expect that the open() factory method will produce an object