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

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r67782. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

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

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r67783. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[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 : 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(...) B.join(iterable_of_bytes) -> bytear

[issue4446] Distutils Metadata Documentation Missing "platforms" Keyword

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Done in r67784. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs

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

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r67785. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue4603] 3.0 document tab interpretation change

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r67786. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue4595] new types example is out of date

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Already fixed in SVN. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue4578] compiler: -3 warnings

2008-12-15 Thread Georg Brandl
Georg Brandl 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 __

[issue4568] Improved optparse "varargs" callback example

2008-12-15 Thread Georg Brandl
Georg Brandl 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 __

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

2008-12-15 Thread Krzysztof Szawala
Krzysztof Szawala 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 tracker

[issue4670] setup.py exception when db_setup_debug = True

2008-12-15 Thread Damien Miller
New submission from Damien Miller : 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: unsupported version", db _ve

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau 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 in a range of dates is if yo

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file11919/timedelta_toseconds_float.patch ___ Python tracker ___ ___ Python

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

2008-12-15 Thread John Shue
Changes by John Shue : -- nosy: +johnshue ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2008-12-13 16:08, Antoine Pitrou wrote: > Antoine Pitrou 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: > > Test

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Jon Ribbens
Jon Ribbens 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. It is a fixed-length period o

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan 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 main module). It stil

[issue2155] optparse.OptionGroup with_statement context handling

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau 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") group.add_option(...) parser.add_option_grou

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan 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 _

[issue3106] speedup some comparisons

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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 not an unicode

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor 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) - datetime.datetime(2005, 12, 31) 1 da

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

2008-12-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: Closing as "won't fix" for now. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ _

[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I tried a fix (see r67779, r6 in trunk) and it seems to work. ___ Python tracker ___ ___ Python-bugs-list

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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 ___ Python tracker <

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau 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 /usr/share/zoneinfo/right/Europe/Berlin /etc/localtime"

[issue4568] Improved optparse "varargs" callback example

2008-12-15 Thread Gregg Lind
Gregg Lind added the comment: This patch should also be applied into the py3k branch, probably. Good catch on updating rargs, btw. ___ Python tracker ___

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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 overkill. _

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor added the comment: I removed my ".toseconds() method" patch because I prefer division. See issue #2706 for divison, divmod, etc. ___ Python tracker ___

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Skip Montanaro
Skip Montanaro 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 I mentioned it

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

2008-12-15 Thread Carwyn Edwards
Carwyn Edwards added the comment: Just to note that issue 4017 is related to this. -- nosy: +carwyn ___ Python tracker ___ ___ Python-

[issue4568] Improved optparse "varargs" callback example

2008-12-15 Thread Georg Brandl
Georg Brandl added the comment: Yes, it will be merged to py3k automatically; we normally merge smaller changes in batches. ___ Python tracker ___

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Mark Dickinson
Mark Dickinson 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 ___ __

[issue1673409] datetime module missing some important methods

2008-12-15 Thread STINNER Victor
STINNER Victor 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 big values: see msg75426.

[issue4197] Doctest module does not work with zipped packages

2008-12-15 Thread Nick Coghlan
Nick Coghlan 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 wasn't being given t

[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' : -- versions: +Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue4631] urlopen returns extra, spurious bytes

2008-12-15 Thread Jeremy Hylton
Jeremy Hylton 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. There's an override for

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue3106] speedup some comparisons

2008-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2008-12-15 16:34, Antoine Pitrou wrote: > Antoine Pitrou 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() ? > > Becaus

[issue4671] pydoc executes the code to be documented

2008-12-15 Thread Jim_C
New submission from Jim_C : Running pydoc [ pydoc ] 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 it exists. If this behaviour i

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

2008-12-15 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

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

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

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

2008-12-15 Thread Andy Buckley
New submission from Andy Buckley : 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: [...] ext_modules=[Extension('_hepmc', ['@top_srcdi

[issue4561] Optimize new io library

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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 tracker

[issue4673] Distutils should provide an uninstall command

2008-12-15 Thread Andy Buckley
New submission from Andy Buckley : 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 uninstall This would pr

[issue3632] use string_print() in gdb

2008-12-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed in r67802. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ __

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

2008-12-15 Thread Andy Buckley
Andy Buckley 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 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 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 think of this as

[issue4663] Increase TextIOWrapper._CHUNK_SIZE

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r67803, r67804. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

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

2008-12-15 Thread Gabriel Genellina
Gabriel Genellina 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 returns as soon as the c

[issue4671] pydoc executes the code to be documented

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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: +georg.brandl, pitrou ve

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

2008-12-15 Thread Gabriel Genellina
Gabriel Genellina added the comment: could you provide a test case / code fragment showing the bug? -- components: +Library (Lib) -Extension Modules nosy: +gagenellina ___ Python tracker ___

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

2008-12-15 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue4561] Optimize new io library

2008-12-15 Thread Antoine Pitrou
Antoine Pitrou 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 (99% CPU) [400KB.t

[issue4561] Optimize new io library

2008-12-15 Thread Raymond Hettinger
Raymond Hettinger 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 backwards-compatible with old-style file obj