[issue4591] uid/gid problem in os.chown

2008-12-09 Thread Sjoerd Mullender
Sjoerd Mullender [EMAIL PROTECTED] added the comment: I'm sure you meant 2^32-2 ;-). The fix to use long doesn't seem right to me either. unsigned int is a better match with uid_t and gid_t. ___ Python tracker [EMAIL PROTECTED]

[issue4589] 'with' loses -bool exceptions

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: The patch doesn't apply cleanly to the 2.5 branch, because that doesn't have r61290. If somebody wants to backport it, go ahead (if you can do so by Thursday). -- nosy: +loewis ___ Python tracker

[issue4589] 'with' loses -bool exceptions

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Does it need to be backported to 2.5? IMO it is a corner case. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4589 ___

[issue4512] Add get_filename method to zipimport

2008-12-09 Thread Nick Coghlan
Changes by Nick Coghlan [EMAIL PROTECTED]: -- assignee: - ncoghlan ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4512 ___ ___ Python-bugs-list mailing

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: More seriously, if cmp were to go into the standard library somewhere, perhaps Raymond's class decorator (for filling in missing rich comparisons) could go into the same place? ___ Python tracker [EMAIL

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

2008-12-09 Thread Robert Luce
New submission from Robert Luce [EMAIL PROTECTED]: Consider the library 'c_lib.so' consisting of a single function 'c_func' int c_func ( double *arg0, double *arg1, double *arg2, double *arg3, double *arg4, double *arg5, double *arg6) { printf(Value of arg0 is %p\n, arg0);

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Moving cmp() somewhere other than builtins is not progress. IMO, it needs to die off and the concept of it needs to disappear completely. Code is better without it. Three-way comparisons are PITA to use -- their only virtue is as an

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: On 2008-12-09 10:59, Raymond Hettinger wrote: Raymond Hettinger [EMAIL PROTECTED] added the comment: Moving cmp() somewhere other than builtins is not progress. IMO, it needs to die off and the concept of it needs to disappear

[issue4601] directory permission error with make install in 3.0

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Hum, there is not fixer for 2to3. But I might be hard to write such fixer because walk() generates (dirpath, dirnames, filenames) instead of (dirpath, filenames). Python2 prototype: os.path.walk(path, visit, arg) - None with visit:

[issue3439] create a numbits() method for int and long types

2008-12-09 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11988/numbits-3.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3439 ___

[issue4608] urllib.request.urlopen does not return an iterable object

2008-12-09 Thread Senthil
Senthil [EMAIL PROTECTED] added the comment: I verified this bug in the Py3.0 and Py3.1. Shall come out with a patch for it. -- nosy: +orsenthil ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4608

[issue4609] Allow use of 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
New submission from Peter Saunders [EMAIL PROTECTED]: Feature Request: Could configure etc be modified to detect if it can use enable_extended_FILE_stdio() to allow solaris to use 256 FD's while still be compiled 32 bit. This is a new feature in Solaris 10 (came in Update 4). Some futher

[issue4609] Allow use of 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
Changes by Peter Saunders [EMAIL PROTECTED]: -- components: +Distutils -Interpreter Core type: - feature request ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4609 ___

[issue4609] Allow use of 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
Changes by Peter Saunders [EMAIL PROTECTED]: -- components: +Interpreter Core -Distutils ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4609 ___ ___

[issue4607] uuid behavior with multiple threads

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: It looks like the bug is already fixed in Python trunk: def uuid4(): Generate a random UUID. # When the system provides a version-4 UUID generator, use it. if _uuid_generate_random: _buffer =

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: float(295147905179352891391L) gives different result on Python 2.5 and Python 2.6: - 2.9514790517935289e+20 # Python 2.5.1 - 2.9514790517935283e+20 # 2.7a0 whereas the code is the same!? ___ Python

[issue3439] create a numbits() method for int and long types

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: New version of my patch using a method instead of a property. Added file: http://bugs.python.org/file12302/numbits-5.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3439

[issue4608] urllib.request.urlopen does not return an iterable object

2008-12-09 Thread Jakub Wilk
New submission from Jakub Wilk [EMAIL PROTECTED]: $ cat urltest2.5 #!/usr/bin/python2.5 from urllib2 import urlopen for line in urlopen('http://python.org/'): print line break $ ./urltest2.5 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN

[issue3439] create a numbits() method for int and long types

2008-12-09 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11990/numbits-4.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3439 ___

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40) reduce(lambda x,y: x*32768.0 + y, [256, 0, 0, 1, 32767]) 2.9514790517935283e+20 float(295147905179352891391L) 2.9514790517935289e+20 Python 2.7a0 (trunk:67679M, Dec 9 2008, 14:29:12)

[issue4594] Can't compile with -O3, on ARM, with gcc 3.4.4

2008-12-09 Thread John Stracke
John Stracke [EMAIL PROTECTED] added the comment: The OPT env var is good. Maybe it could be documented in configure --help? And, yeah, recognizing the platform is messy. I'll dig and see whether gcc3 does the same thing on x86, though; if so, some logic to say use -O2 for gcc 4 shouldn't be

Re: [issue4608] urllib.request.urlopen does not return an iterable object

2008-12-09 Thread Jeremy Hylton
Oops. I didn't think it translate the code in addinfobase to the new style of iterators. Jeremy On Tue, Dec 9, 2008 at 7:50 AM, Senthil [EMAIL PROTECTED] wrote: Senthil [EMAIL PROTECTED] added the comment: I verified this bug in the Py3.0 and Py3.1. Shall come out with a patch for it.

[issue4594] Can't compile with -O3, on ARM, with gcc 3.4.4

2008-12-09 Thread John Stracke
John Stracke [EMAIL PROTECTED] added the comment: OK, nope, gcc 3.4.6 on x86-64 builds fine. So, please, just have configure --help mention OPT. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4594 ___

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Please, can you provide a patch that does not change whitespace everywhere? Even if these files use indentation inconsistently; the patch will be smaller and much easier to proofread. (I vaguely remember a document saying that it's

[issue4601] directory permission error with make install in 3.0

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The patch is fine. If it were me, I'd change os.walk to accept keyword-only arguments: def walk(top, *, topdown=True, onerror=None, followlinks=False): ... -- nosy: +amaury.forgeotdarc resolution: - accepted

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-09 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Copy paste from python-dev post: The problem with memoryview appears to be related to the way it calculates its own length (since that is the check that is failing when the view blows up): a = array('i', range(10)) m = memoryview(a) len(m)

[issue4591] 32-bits unsigned user/group identifier

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: There is not only chown! There are also lchown(), fchown(), stat() and lstat(). Attached patch: - use unsigned int to store Windows st_uid/st_gid in the win32_stat structure - use PyLong to store an unsigned group in the stat result

[issue4607] uuid behavior with multiple threads

2008-12-09 Thread Morten Bentsen
New submission from Morten Bentsen [EMAIL PROTECTED]: The uuid module uses a single global buffer for storing random values obtained from the system. This can (and does) cause non-uniqueness of generated id's when using the uuid4 function in a multithreaded program. The following snippet

[issue4591] 32-bits unsigned user/group identifier

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: I tested my patch (for Python trunk) on Ubuntu Gutsy with a 32 bits CPU: chown(), lchwon(), fchown(), stat() and lstat() works as expected (support identifier 2**31-1). ___ Python tracker [EMAIL

[issue4610] Unicode case mappings are incorrect

2008-12-09 Thread Alex Stapleton
New submission from Alex Stapleton [EMAIL PROTECTED]: Following a discussion on reddit it seems that the unicode case conversion algorithms are not being followed. $ python3.0 Python 3.0rc1 (r30rc1:66499, Oct 10 2008, 02:33:36) [GCC 4.0.1 (Apple Inc. build 5488)] on darwin Type help,

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

2008-12-09 Thread David W. Lambert
Changes by David W. Lambert [EMAIL PROTECTED]: -- nosy: +LambertDW ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4606 ___ ___ Python-bugs-list mailing

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Ok, I understand why different versions of the same code gives different results: compiler flags! Python 2.5.1 is my Ubuntu version (should be compiled with -O3) whereas Python 2.7 and 3.1a0 are compiled by me with -00. Results with Python

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-09 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Sorry for the whitespace changes, here is a patch that has less of them... hope that helps ;-S Added file: http://bugs.python.org/file12303/issue4580ws.patch ___ Python tracker [EMAIL PROTECTED]

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: The idea was to have one implementation of the work-around (ab) - (ba) instead of 10 or so instances of this snippet in the Python stdlib and probably a few hundred places in other code. But what use-case does it solve, except for making

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Victor, what does 1e16 + 2. give on your Ubuntu 2.5 machine? (Humor me. :) ) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3166 ___

[issue4335] inspect.getsourcelines ignores last line in module

2008-12-09 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: Just to add to the list of getsource quirks: with the following in x.py, f = lambda: 0 \ [EOF] import inspect, x; inspect.getsource(x.f) Traceback (most recent call last): .. tokenize.TokenError: ('EOF in multi-line statement', (2, 0))

[issue4598] IDLE not opening

2008-12-09 Thread Elizabeth Chang
Elizabeth Chang [EMAIL PROTECTED] added the comment: No, I don't have those set. - Elizabeth ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4598 ___ ___

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

2008-12-09 Thread Kuba Kończyk
New submission from Kuba Kończyk [EMAIL PROTECTED]: Near the end of Reference Counting in Python section we have: (...)The disadvantage of borrowing over leaking is(...), leaking should be replaced by borrowing. -- assignee: georg.brandl components: Documentation messages: 77425 nosy:

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

2008-12-09 Thread Kuba Kończyk
Kuba Kończyk [EMAIL PROTECTED] added the comment: I meant owning. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4611 ___ ___ Python-bugs-list mailing list

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: About -O0 vs -O1, I think that I understood (by reading the assembler). pseudocode of the -O0 version: while () { load x from the stack x = x * ... + ... write x to the stack } pseudocode of the -O1 version: while

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: An interresting document: Request for Comments: Rounding in PHP http://wiki.php.net/rfc/rounding ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3166 ___

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Intel uses 80 bits float in internals, but load/store uses 64 bits float. Load/store looses least significant bits. Exactly. If your Intel machine is Pentium 4 or newer, you can get around this by using the SSE2 extensions, which work with

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On Tue, Dec 9, 2008 at 11:02 AM, Mark Dickinson [EMAIL PROTECTED] wrote: ... If your Intel machine is Pentium 4 or newer, you can get around this by using the SSE2 extensions, which work with 64-bit doubles throughout. I don't

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: [Alexander] The flags you may be looking for are -msse2 -mfpmath=sse Thanks, Alexander! [Alexander again, from an earlier post...] I noticed that you replaced a call to _PyLong_AsScaledDouble with your round to nearest algorithm. I

[issue4335] inspect.getsourcelines ignores last line in module

2008-12-09 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: You convinced me. After all, if python interpreter does not complain about missing end-of-line and processes the unterminated line, getsource should report it. Here is a patch that passes existing tests and adds a NoEOF test case. I

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: On 2008-12-09 16:06, Antoine Pitrou wrote: Antoine Pitrou [EMAIL PROTECTED] added the comment: The idea was to have one implementation of the work-around (ab) - (ba) instead of 10 or so instances of this snippet in the Python stdlib

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: [Alexander] I also wonder whether round to nearest float can be implemented without floating point arithmetics. I would think round towards zero should be a simple matter of extracting an appropriate number of bits from the long and

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: .. The idea's attractive. The problem is finding an integer type that's guaranteed to have enough bits to store the mantissa for the float (probably plus one or two bits more for comfort); for IEEE 754 this means a 64-bit integer

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Gabriel Genellina
Changes by Gabriel Genellina [EMAIL PROTECTED]: -- nosy: +gagenellina ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3166 ___ ___ Python-bugs-list

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: As you say, performance would suffer. What would using Python's integer type solve, that isn't already solved by the patch? I know the code isn't terribly readable; I'll add some comments explaining clearly what's going on.

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

2008-12-09 Thread Gabriel Genellina
Changes by Gabriel Genellina [EMAIL PROTECTED]: -- nosy: +gagenellina ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4566 ___ ___ Python-bugs-list

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On Tue, Dec 9, 2008 at 12:39 PM, Mark Dickinson [EMAIL PROTECTED] wrote: .. What would using Python's integer type solve, that isn't already solved by the patch? Speaking for myself, it would alleviate the irrational fear of anything

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Are you returning the module in your extension's init function? The import machinery takes the returned module from the init function and adds it to sys.modules for you. -- nosy: +brett.cannon ___

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: -- status: open - pending ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4612 ___ ___ Python-bugs-list

[issue4604] close() seems to have limited effect

2008-12-09 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Indeed, it seems to happen if you first call read() before calling close(). -- nosy: +pitrou ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4604

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: By the way, the algorithm here is essentially the same as the algorithm that I implemented for the float.fromhex method, except that the float.fromhex method is more complicated in that it may have to deal with signed zeros or subnormals.

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread blake madden
blake madden [EMAIL PROTECTED] added the comment: Sorry, mate, that's all Greek to me--I'm a total noob with Python. I'm simply trying to run the example in r67655 (the Extending Embedded Python example) and it fails with 'emb' not being found. It appears that calling

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Albert Hopkins
New submission from Albert Hopkins [EMAIL PROTECTED]: Say I have module foo.py: def a(x): def b(): x del x If I run foo.py under Python 2.4.4 I get: File foo.py, line 4 del x SyntaxError: can not delete

[issue1717] Get rid of more refercenes to __cmp__

2008-12-09 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Guido approved removing __builtin__.cmp() in 3.0.1. It was supposed to have been taken out but was forgotten. With respect to the DRY principle, I disagree about its utility here. The code is so simple that it doesn't warrant cross-module

[issue4592] Example patch is missing something

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Because the init function for extension modules are supposed to return the module now and the import machinery adds the module itself. -- nosy: +brett.cannon ___ Python tracker [EMAIL PROTECTED]

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Here's a test case (diff against Lib/test/test_io.py). This fails for me on OS X 10.5.5 with the tip of the py3k branch. -- keywords: +patch Added file: http://bugs.python.org/file12305/iobug.diff

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Changes by Skip Montanaro [EMAIL PROTECTED]: -- stage: test needed - needs patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4604 ___ ___

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Ah, I had not looked at the issue; sorry about the confusion. PyImport_Create() is doing what it is supposed to be doing and should not call PyImport_AddModule(). The example is wrong. Closing this as invalid since the example is off.

[issue4586] Extending Embedded Python documention uses removed Py_InitModule function

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: You are probably looking at http://docs.python.org/3.0/ still and that only updates when a new release happens. To see the in-development docs look at http://docs.python.org/dev/3.0/ . And the problem with the docs and its new PyModule_Create()

[issue4592] Example patch is missing something

2008-12-09 Thread blake madden
blake madden [EMAIL PROTECTED] added the comment: So, does that mean that Python is fine and there is a problem in the example? How do I get that example to work, there seems to be something missing in it. Thanks. ___ Python tracker [EMAIL PROTECTED]

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: fixed patch. I'm still a bit clumsy with the assertRaises stuff. Added file: http://bugs.python.org/file12306/iobug.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4604

[issue3167] math test fails on Solaris 10

2008-12-09 Thread Jean Brouwers
Jean Brouwers [EMAIL PROTECTED] added the comment: It looks like the patch did fix the problems. Attached are the results for 32- and 64-bit Python 2.6.1 with and without the patch, all built with SUN's compilers on Solaris 10 (Opteron). The math log tests failed with the 32-bit build before

[issue3167] math test fails on Solaris 10

2008-12-09 Thread Jean Brouwers
Changes by Jean Brouwers [EMAIL PROTECTED]: Added file: http://bugs.python.org/file12308/Python-2.6.1-64bit-Solaris10-math_patch.log ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___

[issue4592] Embedding example does not add created module

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: The example is broken. And the example under discussion is http://docs.python.org/dev/3.0/extending/embedding.html#extending-embedded-python . I have changed the title to be more descriptive and assigned to Martin to find out what the proper

[issue4614] Document PyModule_Create()

2008-12-09 Thread Brett Cannon
New submission from Brett Cannon [EMAIL PROTECTED]: PyModule_Create() is not documented (or at least it isn't showing up in the C API index). Might be other parts of the new module initialization API that are not documented either. -- assignee: georg.brandl components: Documentation

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Here's a minimal patch to BufferedReader.read() which causes the test to pass. I will leave it for smarter people to decided whether or not all the other read() methods need the same test. Added file: http://bugs.python.org/file12309/io.patch

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Changes by Skip Montanaro [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file12305/iobug.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4604 ___

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-09 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: The patch still gets the length of memory view objects wrong - it just makes it *consistently* wrong so that the specific assignment being tested appears to work. Note the following behaviour with the current memoryview : from array import

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Changes by Skip Montanaro [EMAIL PROTECTED]: -- stage: needs patch - patch review ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4604 ___ ___

[issue4586] Extending Embedded Python documention uses removed Py_InitModule function

2008-12-09 Thread blake madden
blake madden [EMAIL PROTECTED] added the comment: You are probably looking at http://docs.python.org/3.0/ still and that only updates when a new release happens. Didn't you just have a new release, Python 3? I thought the website said it was a stable release? The production help for Python 3

[issue4589] 'with' loses -bool exceptions

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Does it need to be backported to 2.5? IMO it is a corner case. Not necessarily. If nobody volunteers, it won't be backported, which is fine with me. The only potential release blocker for a bug fix release can be a regression, which this

[issue4586] Extending Embedded Python documention uses removed Py_InitModule function

2008-12-09 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Brett: You are probably looking at http://docs.python.org/3.0/ still and that only updates when a new release happens. That is not true, I want it to update continually, like the 2.6 ones, and have already contacted Neal about it. Blake:

[issue4594] Can't compile with -O3, on ARM, with gcc 3.4.4

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: OK, nope, gcc 3.4.6 on x86-64 builds fine. So, please, just have configure --help mention OPT. Can you contribute a patch? I'm skeptical it whether it is even possible to influence the output of --help.

[issue4610] Unicode case mappings are incorrect

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I have known this problem for years, and decided not to act; I don't consider it an important problem. Implementing it properly is complicated by the fact that some of the case mappings are conditional on the locale. If you consider it

[issue4598] IDLE not opening

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Ok, then please run, in a cmd.exe shell, in the Python directory python.exe Lib\idlelib\idle.py and report its output. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4598

[issue4587] Need to rework the dbm lib/include selection process

2008-12-09 Thread Roumen Petrov
Roumen Petrov [EMAIL PROTECTED] added the comment: ok for patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4587 ___ ___ Python-bugs-list mailing list

[issue4592] Embedding example does not add created module

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: The proper way of extending embedded Python can be seen in Demo/embed/demo.c. I can't contribute to the documentation, so I'm unassigning myself. -- assignee: loewis - ___ Python tracker [EMAIL

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: When python is embedded in a program, there must be a way for the program to export some of its functions to python - a module that resides in the main executable. You cannot use the import machinery to import such a module, because

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Unfortunately, it missed the deadlines (i.e. nobody checked it in in time). I'll look into it. -- assignee: - loewis priority: normal - critical ___ Python tracker [EMAIL PROTECTED]

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Tue, Dec 9, 2008 at 14:34, Amaury Forgeot d'Arc [EMAIL PROTECTED] wrote: Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: When python is embedded in a program, there must be a way for the program to export some of its functions

[issue4612] PyModule_Create() doesn't add/import module

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: OK. I'm currently writing a documentation patch for issue4592. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4612 ___

[issue4587] Need to rework the dbm lib/include selection process

2008-12-09 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Thanks Roumen. Can I get a verdict on this approach from one of the main Python developers? I'm thinking a better way to control this would be to add a --flag to the build command to control the search order. -- assignee: -

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-09 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Hi Nick, 1. memoryview needs to be fixed so that internally self-view.len is always the length in bytes, even after taking a slice of the view This is in my patch, unless I'm missing something? 2. memoryview needs to be fixed so that

[issue4592] Embedding example does not add created module

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: See attached documentation patch. Instead of a direct call to PyModule_Create(), the main function must use PyImport_AppendInittab(emb, PyInit_emb); Note that the same line also works for all 2.x versions. I'll try to add an item

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Somehow you caught the only SyntaxError that forgets to add filename and line information. Patch attached, at the expense of not displaying the variable name (it should be obvious if the line is displayed) -- keywords: +needs

[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Thanks for your comments, Alexander. Here's a rewritten version of the patch that's better commented and somewhat less convoluted; I think it should be easier to verify the correctness of this one. Added file:

[issue4592] Embedding example does not add created module

2008-12-09 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Applied in r67682. Please don't add things directly to cporting.rst, rather amend the PortingExtensionModulesToPy3k wiki page. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL

[issue4604] close() seems to have limited effect

2008-12-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: - The patch corrects a specific case, but not others: for example if the file is opened in r (text) mode. There are also other methods to test: peek(), read1()... - It should use self._checkClosed() which already raises the same

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: Amaury - It should use Amauryself._checkClosed() Amaury which already raises the same exception with the same message. I think some other places will need this change then. Note that I don't know the io code at all. I was just

[issue4615] de-duping function in itertools

2008-12-09 Thread Tom Pinckney
New submission from Tom Pinckney [EMAIL PROTECTED]: Any interest in an itertools de-duping function? I find I have to write this over and over for different projects: def deduped(iter,key=None): keys = set() for x in iter: if key: k = key(x) else:

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: New patch: - limit memory footprint: use a static buffer to store the frames, with a maximum of MAXDEPTH frames (default: MAXDEPTH=100) - if there are more than MAXDEPTH frames, jump to the frame MAXDEPTH on error (it's like a truncated

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11666/segfault-2.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Oh, another change in segfault-3.patch: - disable signal handler before the first call to segfault_enter() and the last call to segfault_exit() About the memory footprint: it would be possible to use variable size buffer using malloc() and

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: +1 compiler_error should be used anyway. -- keywords: -needs review nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4613

[issue4615] de-duping function in itertools

2008-12-09 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4615 ___ ___

  1   2   >