[issue5289] ctypes.util.find_library does not work under Solaris

2009-02-17 Thread Ke Wang
New submission from Ke Wang ke.w...@sun.com: Under Solaris, find_library can not give the correct path. Solaris does not have /sbin/ldconfig, so _findLib_gcc is used. def _findLib_gcc(name): expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) fdout, ccout =

[issue5290] subprocess.Popen.communicate does not encode unicode strings

2009-02-17 Thread Beda Kosata
New submission from Beda Kosata b...@zirael.org: The method subprocess.Popen.communicate (more the underlying _communicate) writes the input to the stdin stream without encoding, regardless of it being a unicode string. The result is incorrect behavior of the running program as it receives 4

[issue5291] Windows upgrade to 2.6.1 requires 2.6 installer to be present

2009-02-17 Thread Michael Kesper
New submission from Michael Kesper mkes...@schokokeks.org: When upgrading to 2.6.1, an error occurs if the old installer is not found. I needed to open it several times until I read _what_ was needed. Finding old installers on python.org requires too much search, too. -- components:

[issue5284] platform.linux_distribution() improperly documented

2009-02-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-02-16 22:42, Armin Ronacher wrote: New submission from Armin Ronacher armin.ronac...@active-4.com: platform.linux_distribution() was added in 2.6 as an alias for platform.dist(). However the documentation lists platform.dist()

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: I noticed following code crashes. I'll post fix soon. import mmap import os def main(): align = mmap.ALLOCATIONGRANULARITY path = os.path.splitext(__file__)[0] + .txt with open(path, w) as f:

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: added in r69710. Thx ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2279 ___ ___ Python-bugs-list

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file13115/fix_segfault_on_boundary.patch ___ Python tracker rep...@bugs.python.org

[issue5287] logging package on IronPython

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Rather than explicit testing for sys.platform, a try...except would be more flexible and more future-proof. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5287

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: The code below exits with timeout after about 20 secs on Windows + Python 2.5.4 import socket # address of server routable, but offline server = 192.168.1.2 s = socket.socket() s.setblocking(1) s.connect((server, 139)) s.close() The

[issue5287] logging package on IronPython

2009-02-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: IronPython provides sys._getframe but it throws an exception if you call it with a non-zero depth. Stupid question: why not fixing sys._getframe()? -- nosy: +haypo ___ Python tracker

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: 2009/2/17 George Sakkis rep...@bugs.python.org: Maybe that could be a new feature ? That would be nice, especially if we want to reimplement MANIFEST.in as setup() option at some point. My current implementation doesn't extend the API, so

[issue5292] mmap crashes just on boundary.

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: This is obvious bug (and fix is obvious too), so I've commited in r69714. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue5287] logging package on IronPython

2009-02-17 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: @Victor IronPython doesn't use Python stack frames, so tracking them and then constructing the objects on demand would add about a ~10% performance hit to IronPython. Even when it is done it is likely to be an option rather than on by

[issue5287] logging package on IronPython

2009-02-17 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Attached is an alternative patch that wraps the call to findCaller in a try:...except. Added file: http://bugs.python.org/file13116/logging2.patch ___ Python tracker rep...@bugs.python.org

[issue5289] ctypes.util.find_library does not work under Solaris

2009-02-17 Thread Ke Wang
Ke Wang ke.w...@sun.com added the comment: I tested the command 'gcc -Wl,-t' on Ubuntu, it works fine. But on Solaris, it doesn't work as expected. Finally I find that gcc does not use GNU ld on Solaris, instead, it uses SUN ld. ___ Python tracker

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Antoine, were your posted results on a 64-bit or a 32-bit system? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Mark, I think it was 32-bit at the time. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Now with the latest patch, and under a 64-bit system (the same one actually, but with a 64-bit distro): * pybench is roughly 2% slower * timeit -s a=1;b=77 a//b - before: 0.563 usec per loop - after: 0.226 usec per loop * timeit -s

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, I think my previous results were in 64-bit mode already. By the way, I don't think unconditionally using uint64_t is a good thing on 32-bit CPUs. uint64_t might be an emulated type, and operations will then be very slow. It would be

[issue5294] pdb break command messes up continue

2009-02-17 Thread Petr Viktorin
New submission from Petr Viktorin encu...@gmail.com: Consider this program: import pdb pdb.set_trace() print (At line 5) print (At line 6) print (At line 7) print (At line 8) print (At line 9) When set_trace starts the debugger, I set a breakpoint at line 8. When I do that, the continue

[issue5282] mmap.resize and offset

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file13117/fix_offset_and_resize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5282

[issue5294] pdb break command messes up continue

2009-02-17 Thread Petr Viktorin
Petr Viktorin encu...@gmail.com added the comment: It doesn't matter whether the breakpoint is set from within a function or not, but only the module-level frame is affected. import pdb def test(): print (At line 4) print (At line 5) print (At line 6) print (At line 7)

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, I still get a speedup on a 32-bit build. :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a version of the patch that includes optimizations to basecase multiplication, and a streamlined x_divrem for faster division. With Victor's benchmark, I'm getting 43% speed increase on 64-bit Linux/Core 2 Duo. Note: the base patch is

[issue706585] Expose FinderInfo in FSCatalogInfo

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm closing this as wont fix because the Carbon bindings are deprecated and are removed in Python 3.0. -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed ___ Python

[issue706592] Crbon.File.FSSpec should accept non-existing pathnames

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Closing as won't fix because the Carbon bindings are deprecated, and FSSpec's are even more deprecated (they're even deprecated at the C-level) -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file11986/30bit_longdigit6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue806149] aetools.TalkTo methods can be obscured

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Closing as won't fix because the aepack module is deprecated and has various other major issues on little-endian systems. -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed

[issue852150] Can't send Apple Events without WindowServer connection

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Closing as won't fix because the Carbon modules are deprecated. This doesn't actually affect behaviour of the Carbon bindings, other than causing an icon to appear on the dock which is basicly purely cosmetical. -- nosy:

[issue853656] Carbon.CF.CFURLRef should be easier to create

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Carbon.CF is very imcomplete. Use PyObjC instead. -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org

[issue869649] Quicktime missing funcitonality

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Fixing this isn't worth the trouble. -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue869649

[issue878560] Add a console window for Carbon MacPython applets

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Closing as won't fix. The Make Applet tool is still present, but rather useless. Use py2app to create application bundles. -- nosy: +ronaldoussoren resolution: - wont fix status: open - closed

[issue5284] platform.linux_distribution() improperly documented

2009-02-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Fixed in r69717. -- versions: -Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5284

[issue5284] platform.linux_distribution() improperly documented

2009-02-17 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg m...@egenix.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5284 ___ ___

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Tim, I confirmed your test fails on my machine, and is fixed by your patch. I want to commit this. Can I? -- components: +Extension Modules, Windows -Library (Lib) nosy: +ocean-city stage: - commit review versions: +Python

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-17 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: From me, yes of course, but I assume you want another core dev for a 2nd opinion. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2733 ___

[issue5282] mmap.resize and offset

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I hope this is obvious too. Fixed in r69718. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5282

[issue1759169] clean up Solaris port and allow C99 extension modules

2009-02-17 Thread John Levon
John Levon movem...@users.sourceforge.net added the comment: However, experience tells that systems can break in surprising ways if the system headers are compiled with different defines. This is indeed a reasonable concern (for which the best solution is dropping the defines in the Python

[issue3921] smtplib cannot sendmail over TLS

2009-02-17 Thread Musashi Tamura
Musashi Tamura yuri.musashi.miwa.tam...@gmail.com added the comment: The difference is this line. (2.5, work) send: 'AUTH PLAIN AGxhbWJkYS5sZXRAZ21haWwuY29tAGNoaWtha29zMDA=\r\n' (Python3, error) send: 'AUTH PLAIN AGxhbWJkYS5sZXRAZ21haWwuY29tAGNoaWtha29zMDA=\n\r\n' -- nosy: +miwa

[issue974159] Starting a script in OSX within a specific folder

2009-02-17 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- assignee: - ronaldoussoren nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue974159 ___

[issue1941] 2.6 stdlib using with statement

2009-02-17 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone exar...@divmod.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1941 ___ ___ Python-bugs-list

[issue1047540] Turtle.py hangs Idle

2009-02-17 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Taro, the OP, has been able to reproduce the issue with Python 3.0. Leaving open, details on how to reproduce forthcoming. -- versions: +Python 3.0 ___ Python tracker rep...@bugs.python.org

[issue5295] turtle.py dicionary spelling patch

2009-02-17 Thread David W. Lambert
New submission from David W. Lambert lamber...@corning.com: x/lib/python3.0$ diff --unified turtle.py.bak turtle.py --- turtle.py.bak 2009-02-17 11:29:15.0 -0500 +++ turtle.py 2009-02-17 11:29:37.0 -0500 @@ -2265,7 +2265,7 @@ outline: positive number

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As I said, I actually see a speedup as well on a 32-bit build on a 64-bit CPU. So the current patch (30bit_longdigit13.patch) is fine. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258

[issue1159425] 2.4 crashes when try to exit app and mulitple threads active

2009-02-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the issue1596321 is very similar (same traceback on another platform). The problem is still valid, and the discussion seems more advanced there. -- nosy: +amaury.forgeotdarc resolution: - duplicate status: open - closed

[issue1159425] 2.4 crashes when try to exit app and mulitple threads active

2009-02-17 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- superseder: - KeyError at exit after 'import threading' in other thread ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159425 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Some more benchmarks results (with 30bit_longdigit13.patch): * Victor's bench_int.py: - 32-bit without patch: 1370.1 ms - 32-bit with patch:1197.8 ms (23% speedup) - 64-bit without patch: 1357.6 ms - 64-bit with patch:981.6 ms (28%

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here's the py3k version of pidigits.py. Added file: http://bugs.python.org/file13119/pidigits.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, Antoine. I've reworked the configure stuff anyway: the decision about what size digits to use should take place in pyport.h rather than Include/longintrepr.h. Updated patches will arrive shortly!

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Updated non-optimized patch. The only real change is that I've moved some of the configuration stuff around (so not worth re-benchmarking this one); I hope that I've now got the division of labour correct: - configure script simply parses

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The last patch (30bit_longdigit14.patch) is obviously missing some stuff, but other than that I think everything's fine and you could commit. ___ Python tracker rep...@bugs.python.org

[issue5287] logging package on IronPython

2009-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into release26-maint. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5287 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Oops. Here's the correct patch. Added file: http://bugs.python.org/file13121/30bit_longdigit14.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file13120/30bit_longdigit14.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue5287] logging package on IronPython

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Vinay, the fix should also be committed to trunk (unless the relevant code doesn't exist anymore), and to py3k. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5287

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Added file: http://bugs.python.org/file13122/30bit_longdigit14.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file13121/30bit_longdigit14.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

[issue5291] Windows upgrade to 2.6.1 requires 2.6 installer to be present

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: How exactly did you install the old installer? It should have been cached into your Windows folder, so that it is available on uninstallation. That the old installer is required on an upgrade installation in unavoidable; installation of

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Why do you think this is a bug in Python? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5293 ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Jeffrey Yasskin
Changes by Jeffrey Yasskin jyass...@gmail.com: -- nosy: +collinwinter, jyasskin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___

[issue5283] setting __class__ in __del__ is bad. mmkay. negative ref count! kaboom!

2009-02-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, the wrong type is DECREF'd when the object is deallocated. Patch attached. -- keywords: +needs review, patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file13123/del_changes_class.patch

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Because documentation doesn't say that Python should timeout after 20 seconds after entering blocking mode if socket to remote host can not be opened. ___ Python tracker rep...@bugs.python.org

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: You can't use a connect() call for the purpose of waiting for your network to be up. This has nothing to do with Python. This is how all network APIs work regardless of OS and language. The timeout is due to the network stack being unable

[issue5296] Use of term sequence in Reference 6.3 Assignment Statements

2009-02-17 Thread bob gailer
New submission from bob gailer bgai...@gmail.com: Currently reads, in part, If the target list is a comma-separated list of targets: The object must be a sequence ... Change a sequence to an iterable. Also consider removing references to versions earlier than 1.5. -- assignee:

[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2009-02-17 Thread Pavel Repin
Pavel Repin prepin+pythonb...@gmail.com added the comment: I'd like to point out that on some configurations (at least mine), you really need to specify /MANIFEST option to the linker, even though MSDN documentation seems to imply that /MANIFEST behavior is ON by default. My config: beta

[issue1283110] Give __len__() advice for don't know

2009-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If iterators don't want their boolean value to be messed up, couldn't they simply use __bool__ for that? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1283110

[issue5192] Update log message formatting.

2009-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Isn't there a backward compatibility problem? If a message format string contains both %s and {0}, how is logging supposed to know what to use - a % b or a.format(b)? The way to do it is a custom Formatter, as you've indicated. --

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Robert Schuppenies
Changes by Robert Schuppenies robert.schuppen...@gmail.com: -- nosy: +schuppenies ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___ ___

[issue1283110] Give __len__() advice for don't know

2009-02-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: On Tue, Feb 17, 2009 at 1:27 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: If iterators don't want their boolean value to be messed up, couldn't they simply use __bool__ for that?

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Has any conclusion been reached wrt. overhead of 30-bit multiplication on 32-bit systems? IIUC, the single-digit multiplication is equivalent to the C program unsigned long long m(unsigned long long a, unsigned long b) { return a*b;

[issue5297] Bug in SocketServer Example

2009-02-17 Thread Zach Dwiel
New submission from Zach Dwiel zdw...@gmail.com: There is a bug in the example code: http://docs.python.org/library/socketserver.html The very last example has the line: print Server loop running in thread:, t.getName() should be: print Server loop running in thread:, server_thread.getName()

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: unsigned long long m(unsigned long long a, unsigned long b) { return a*b; } I think that's doing a 32 x 64 - 64 multiplication; what's being used is more like this: unsigned long long m(unsigned long a, unsigned long b) {

[issue5298] Inconsistency in C-API thread docs

2009-02-17 Thread Philip Semanchuk
New submission from Philip Semanchuk osvens...@users.sourceforge.net: The language in the threading API documentation is a little inconsistent. The section I'm talking about is here: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock The GIL is variously

[issue5299] PyGILState_Ensure()/PyGILState_Release() documentation incomplete?

2009-02-17 Thread Philip Semanchuk
New submission from Philip Semanchuk osvens...@users.sourceforge.net: The threading API documentation might omit out some important information about the GIL. The GIL can be acquired by explicitly calling PyEval_AcquireLock(). One can also acquire the GIL by calling PyGILState_Ensure(). The

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Because documentation doesn't say that Python should timeout after 20 seconds after entering blocking mode if socket to remote host can not be opened. That's not true: The documentation says In blocking mode, operations block until

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch uploaded to Rietveld (assuming that I did it right): http://codereview.appspot.com/14105 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258

[issue776533] Carbon.Snd module SPB constructor shadowed

2009-02-17 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've reapplied the hack. I'm closing the issue because we will not regenerate the Carbon bindings as these are deprecated and are no longer present in Python 3.x -- nosy: +ronaldoussoren resolution: later - fixed status: open -

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: After rewriting my reply several times I've noticed my mistake, but it took more time to understand the problem than could be expected for a language that we all would like to see as easy and intuitive as possible. That why I still would

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-02-17 Thread Robert Luce
Robert Luce l...@math.tu-berlin.de added the comment: Thomas, is there any chance of getting your attention for this one? Deciding whether or not this issue can be fully resolved by applying the proposed patch would already be sufficient. If it is not, I am willing to invest more time on

[issue5300] Distutils ignores file permissions

2009-02-17 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: Distutils ignores file permissions when copying modules and package_data files to the build directory, and consequently to the installation directory too. According to an XXX comment at distutils/command/build_py.py, this is deliberate

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2009-02-17 Thread Drew Hintz
New submission from Drew Hintz d...@overt.org: Adds a mimetype entry for image/vnd.microsoft.icon This mimetype is commonly used for favicon.ico files and is registered with IANA. -- components: Library (Lib) files: mimetypes.py.diff keywords: patch messages: 82373 nosy: adhintz

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It looks as though Visual Studio 2008 does the 'right' thing, too, at least in some circumstances. Here's some assembler output (MSVC Express Edition, 32-bit Windows XP / Macbook Pro). ; 3: unsigned long long mul(unsigned long x,

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch uploaded to Rietveld (assuming that I did it right): http://codereview.appspot.com/14105 Hehe, your configure's patch is too huge for Rietveld which displays a MemoryError :-) Bug reported at:

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: 10060 is a winsock error, and there are many, MANY more of them. Read the winsock documentation for details. It's both impossible and pointless to document them, since some never occur, others aren't documented by Microsoft well enough in the

[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2009-02-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-02-17 20:22, Pavel Repin wrote: Pavel Repin prepin+pythonb...@gmail.com added the comment: I'd like to point out that on some configurations (at least mine), you really need to specify /MANIFEST option to the linker, even though

[issue5302] Allow package_data globs match directories

2009-02-17 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: Currently each glob defined in package_data must match files only; if it matches a directory, it raises an exception later when calling copy_file(). This means that a glob like 'mydata/*' will fail if there is any subdirectory under

[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2009-02-17 Thread Pavel Repin
Pavel Repin prepin+pythonb...@gmail.com added the comment: Hi Marc,I am pretty sure it helped on my particular configuration. I was trying to compile MySQL-python-1.2.2.tar.gz package from source and it was failing in mt.exe step because the manifest file was not there. I didn't do anything

[issue5303] Use base 2**30 for Python longs, when possible

2009-02-17 Thread Martin v. Löwis
New submission from Martin v. Löwis mar...@v.loewis.de: http://codereview.appspot.com/14105/diff/1/11 File Doc/library/sys.rst (right): http://codereview.appspot.com/14105/diff/1/11#newcode418 Line 418: A struct sequence that holds information about Python's I don't think the sequence interface

[issue5303] Use base 2**30 for Python longs, when possible

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This was meant to go to issue4258, but I failed to set the subject when sending this from Rietveld. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-17 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: Opened #5300 and #5302 for the mentioned issues. Btw in your patch, I believe `os.path.join(dirname, f)` should be replaced by `f` alone; `dirname` refers to the dir under the installation directory, not the source.

[issue5302] Allow package_data globs match directories

2009-02-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I am no in favor of MANIFEST.in removal because I find it very convenient to define what is included in a package and I rarely use package_data or data_files. So I am -1 on its deprecation. That said, having a mechanism to include directory

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, let's try 30bit_longdigit14.patch: patch -p0 30bit_longdigit14.patch autoconf autoheader ./configure make I'm using two computers: - marge: Pentium4, 32 bits, 3 GHz (32 bits) - lisa: Core Quad (Q9300), 64 bits,

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New attachment: pidigits_noprint.py, hacked version of pidigits.py to remove the print and add the computation time in millisecond. Print was useless because we don't want to benchmark int-str conversion, especially when the

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Isn't it a job of crossplatform programming language to abstract from low-level platform details? The scope of this bug is not about handling all possible Winsock errors. It is about proper handling the sole timeout error from the list

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Opened #5300 and #5302 for the mentioned issues. ok thanks Btw in your patch, I believe `os.path.join(dirname, f)` should be replaced by `f` alone; `dirname` refers to the dir under the installation directory, not the source. Right,

[issue5300] Distutils ignores file permissions

2009-02-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I believe that the default behavior should be changed to preserve all permissions, with the possible exception of setting u+w. Even that might be unnecessary; AFAIK to delete a file you need write permissions only to its parent

[issue5293] socket timeouts even in blocking mode

2009-02-17 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Isn't it a job of crossplatform programming language to abstract from low-level platform details? It's certainly not Python's job. It's an explicit design goal, and a long tradition, to expose system interfaces *as is*, with the very same

[issue1229239] optionally allow mutable builtin types

2009-02-17 Thread Greg Couch
Greg Couch gr...@cgl.ucsf.edu added the comment: FYI, I was able to work around this and use an unmodified Python by subtyping type and overriding the setattr method as shown below. It's a lot messier than patching Python. static int Mutable_SetAttr(PyObject *obj, PyObject *name, PyObject

[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2009-02-17 Thread Pavel Repin
Pavel Repin prepin+pythonb...@gmail.com added the comment: Marc-Andre, I can also repro this on Vista machine with the same Python MSVS configuration. This is the build error stemming from missing manifest file (unnecessary details elided; note the absence of /MANIFEST option):

  1   2   >