[issue4616] tarfile does not set the creation date and time of the extracted directories

2008-12-09 Thread Horváth István Róbert
Horváth István Róbert <[EMAIL PROTECTED]> added the comment: Sure, see the attachment. Just call: python pack.py unpack directory.tar You should get the folder named "directory" dated to the current date and time. Added file: http://bugs.python.org/file12314/testcase.zip ___

[issue4616] tarfile does not set the creation date and time of the extracted directories

2008-12-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I cannot reproduce this; it works fine for me. Can you provide a test case? -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]> _

[issue4616] tarfile does not set the creation date and time of the extracted directories

2008-12-09 Thread Horváth István Róbert
New submission from Horváth István Róbert <[EMAIL PROTECTED]>: tarfile does not set the creation date and time of the extracted directories, all extracted directories will get the date and time of the extraction, although in the source archive (created by tarfile) the creation date and time is st

[issue4589] 'with' loses ->bool exceptions

2008-12-09 Thread Jeffrey Yasskin
Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment: It's a corner case that would confuse anyone who ran into it, so I'm happy to backport it. I'll probably just re-do your patch on the 2.5 branch since WITH_CLEANUP has a different structure there. ___ Pyth

[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
Albert Hopkins <[EMAIL PROTECTED]> added the comment: Thanks for looking into this. Ok... I applied your patch (actually it does not apply against Python 3.0 so I had to change it manually). Now I'm not sure if this is still an error in the compiler or if it's truly a problem on my end, but the

[issue4615] de-duping function in itertools

2008-12-09 Thread Tom Pinckney
Tom Pinckney <[EMAIL PROTECTED]> added the comment: My latest need for something like this was something like this: src1 = db_query(query_1) src2 = db_query(query_2) results = deduped(src1 + src2, key=lambda x: x.field2) Basically, I wanted data from src1 if it existed and otherwise from src2

[issue4615] de-duping function in itertools

2008-12-09 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Am curious about your use cases. In what contexts are you needing to eliminate duplicates but retain the original ordering? Am wondering if the proposals for an ordered dictionary will meet your needs? Also, am looking to see what typifi

[issue4614] Document PyModule_Create()

2008-12-09 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- keywords: +needs review nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]> ___ __

[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]> ___ _

[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]> __

[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

[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]> ___ __

[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 tr

[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:

[issue4604] close() seems to have limited effect

2008-12-09 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Amaury> - It should use Amaury>self._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 jus

[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 e

[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 <[EM

[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: http://bugs.python.org/file1

[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

[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 it

[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

[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: -> skip.m

[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]> ___ ___

[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

[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 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

[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 <[EMAI

[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]> ___ ___ Python-bugs-list mailing list Un

[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]>

[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 impor

[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.

[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:

[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 i

[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

[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]> ___ ___ Pyth

[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]>: Removed file: http://bugs.python.org/file12305/iobug.diff ___ 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 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.patc

[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 me

[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 w

[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]> ___ _

[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 befor

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

2008-12-09 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > floating-point variable "x" has an exact nonnegative integer value > between 0 and 2**DBL_MANT_DIG. Hmm. On closer inspection that's not quite true. After the line x = x * PyLong_BASE + (dig & (PyLong_BASE - pmask)); x has a value of

[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]> _

[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]>

[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()

[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.

[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]> ___ ___ Pytho

[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 ___

[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]>

[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-modul

[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 vari

[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 "PyModule_Create(&Em

[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.

[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]> __

[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]> ___ ___ Python-bugs-list

[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 ___ Py

[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 any

[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]> ___ ___ 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.

[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]> ___ ___ 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: .. > 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 integ

[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

[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 (a>b) - (b> instead of 10 or so instances of this snippet in the Python std

[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.

[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 w

[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 r

[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 w

[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]> _

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

2008-12-09 Thread blake madden
New submission from blake madden <[EMAIL PROTECTED]>: In reference to Issue4592 (which includes a patch), PyModule_Create()calls PyModule_New instead of PyImport_AddModule. Because of this, calling PyModule_Create() won't work like Py_InitModule(). Is this correct, because the documentation is

[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

[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]> ___ ___ Python-bugs-list mailing lis

[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: 7742

[issue1615] descriptor protocol bug

2008-12-09 Thread Thomas Lee
Thomas Lee <[EMAIL PROTECTED]> added the comment: Related reading from a few years back: http://coding.derkeiler.com/Archive/Python/comp.lang.python/2005-05/msg03829.html -- nosy: +thomas.lee ___ Python tracker <[EMAIL PROTECTED]>

[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]> ___ ___ Py

[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,

[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]> ___ _

[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 (a>b) - (b 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 l

[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]>

[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

[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]> ___ ___ Python-bugs-list mai

[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", "copyr

[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]> __

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

[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

[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)

[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) >

[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 tr

[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]> ___ __

[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]> ___

[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 i

[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]> __

[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 bett

[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]>

[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]> ___ ___

[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]> ___ ___

[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: cal

[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 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> $ cat urltest3.0 #!/usr/bi

[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 _

[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

  1   2   >