[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: The more I think about this, the more concerned I am about changing the number of elements in the tuple. That's the change that broke platform.py. Maybe we should add a parameter named something like "level", defaulting to 0. 0 = existing behavior, but with named

[issue7782] new test for test_iter.py

2010-01-26 Thread showell
New submission from showell : I would like to submit the following test to be part of the test_iter.py test suite: def test_extends(self): # This test would break on an incomplete patch to listobject.c def gen(): for i in range(500): yield i

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-01-26 Thread Glenn Linderman
Changes by Glenn Linderman : -- nosy: +v+python ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
New submission from Florent Xicluna : The test "test_normalization" download a file from the "unicode.org" website and keep it in the local cache "Lib/test/data/" directory for next runs. On test setup, it verifies if the 1st line contains the right version "unicodedata.unidata_version". It sho

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: Here is a patch. The function "test_support.open_urlresource" is enhanced with an optional argument "check" which receives a function. This "check" function accepts an open file as input and return False if the file is outdated. -- keywords: +patch

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Eric Smith wrote: > > Eric Smith added the comment: > > The more I think about this, the more concerned I am about changing the > number of elements in the tuple. That's the change that broke platform.py. > Maybe we should add a parameter named somethin

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread showell
New submission from showell : I am attaching a patch to improve the performance of list operations that insert or delete elements at the front of the list. The patch has had some discussion on python-dev in the thread entitled "patch to make list.pop(0) work in O(1) time." So far the verdict

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Interesting. I agree that that looks like a case where it would be desirable for a >> -n to do a << n. By the way, I don't think your formula is quite correct: your crc is going to grow unboundedly as extra data bytes come in. I suspect that you want to ma

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: One other thought: you could always compute the expression crc >> (crc_width - 8) as crc << 8 >> crc_width Since you're computing crc << 8 anyway, this doesn't increase the operations count, so probably wouldn't significant impact performance.

[issue7615] unicode_escape codec does not escape quotes

2010-01-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > I feel uneasy to change the default unicode-escape encoding. > I think that we mix two features here; to transfer a unicode string between > two points, programs must agree on where the data ends, and how characters > are repr

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: Steve, thank you for your patch. IMHO, it's better to provide a patch against trunk (Py2) when the optimization is not specific to 3.x. I merged it manually on my working copy, and all tests pass without leaking. Patch for Py2 attached. However, I am not a

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread showell
showell added the comment: --- On Tue, 1/26/10, Florent Xicluna wrote: > From: Florent Xicluna > Subject: [issue7784] patch for making list/insert at the top of the list > avoid memmoves > To: showel...@yahoo.com > Date: Tuesday, January 26, 2010, 3:53 AM > > Florent Xicluna > added the co

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: Great idea, Marc-Andre. I agree that's the better approach. It looks like PyStructSequence supports this, by setting n_in_sequence to a value smaller then the number of PyStructSequence_Fields. A quick look doesn't show any uses of this in the C code (except mayb

[issue7372] Regression in pstats

2010-01-26 Thread Jim Fulton
Jim Fulton added the comment: On Mon, Jan 25, 2010 at 7:35 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > See also #7372. > > AFAIU add_callers can receive either a tuple or an int (and this is what is > not working now). When I looked at #7372 I wasn't able to find out why i

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Eric Smith wrote: > > Eric Smith added the comment: > > Great idea, Marc-Andre. I agree that's the better approach. > > It looks like PyStructSequence supports this, by setting n_in_sequence to a > value smaller then the number of PyStructSequence_Field

[issue7785] FileIO.write() accepts Unicode strings

2010-01-26 Thread David Beazley
New submission from David Beazley : Is io.FileIO.write() supposed to accept and implicitly encode Unicode strings as illustrated by this simple example? >>> f = open("/dev/null","wb",buffering=0) >>> f.write("Hello World\n") 12 >>> Moreover, is the behavior of BufferedWriter objects supposed

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: Patch to skip the test with the appropriate warning in verbose mode. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file16010/issue7564_test_ioctl.diff ___ Python tracker

[issue7242] Forking in a thread raises RuntimeError

2010-01-26 Thread Zsolt Cserna
Zsolt Cserna added the comment: Ok, here's the new patch. I've removed the #ifdef-#endif lines. It passed the test thread_test.py on linux (and as well on solaris). -- Added file: http://bugs.python.org/file16011/patch_2.diff ___ Python tracker

[issue7785] FileIO.write() accepts Unicode strings

2010-01-26 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: Here's a patch that implement's Marc-Andre's suggestion. The docstring and documentation need work. I still need to verify that this isn't a misuse of PyStructSequence, but the tests pass on Windows. I need to verify a few other platforms to make sure the #ifdef

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16010/issue7564_test_ioctl.diff ___ Python tracker ___ ___ Python-bugs-li

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: Patch to make the "skip" message visible in normal mode: test_ioctl test_ioctl skipped -- Process group 1844 is associated with /dev/tty And in the summary you have the information: 1 test skipped: test_ioctl 1 skip unexpected on linux2: test_ioctl

[issue7785] FileIO.write() accepts Unicode strings

2010-01-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs-lis

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Brian Curtin
Brian Curtin added the comment: Thanks a lot for taking a look at this, Eric and Marc-Andre. Apologies for the few mistakes in there, I jumped the gun and submitted that last patch before having run the full test suite again. Good catch on the missing #ifdef. I will also run this on Mac and L

[issue7782] new test for test_iter.py

2010-01-26 Thread Ezio Melotti
Ezio Melotti added the comment: >From the comment ("This test would break on an incomplete patch to >listobject.c") is not clear what exactly the test is supposed to check. Probably the test should include some assert* or more comments if it is supposed to work but it might raise an error if t

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread R. David Murray
R. David Murray added the comment: Could the skip message be made a little more explanatory? I have no idea why "Process group 1844 is associated with /dev/tty" would mean that test_ioctl would need to be skipped. -- nosy: +r.david.murray ___ Pyth

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-26 Thread Ezio Melotti
Ezio Melotti added the comment: json is now fixed in r77755. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-26 Thread R. David Murray
R. David Murray added the comment: First of all, thanks for working on this. Now for some feedback :) It is most helpful if you provide patches against trunk (which is 2.7 alpha right now). We then forward port them to py3k. (This will change after the release of 2.7, when py3k will become

[issue1559298] test_popen fails on Windows if installed to "Program Files"

2010-01-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7786] Is the BlockingIOError exception an aborted idea?

2010-01-26 Thread David Beazley
New submission from David Beazley : Documentation (e.g., docstrings) for the io module make mention of a BlockingIOError exception that might be raised if operations are performed on a file that's in non-blocking mode. However, I am unable to get this exception on any operation (instead None

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16013/issue7564_test_ioctl.diff ___ Python tracker ___ ___ Python-bugs-li

[issue7564] test_ioctl may fail when run in background

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: A little more explanatory. -- Added file: http://bugs.python.org/file16014/issue7564_test_ioctl_v2.diff ___ Python tracker ___

[issue7787] Add an argument to test_support.open_urlresource to invalidate the cache

2010-01-26 Thread Florent Xicluna
New submission from Florent Xicluna : The function "open_urlresource" never invalidates its cache. If a file with same name is available in "Lib/test/data/", it is returned. There's a snippet in test_normalization which tries to invalidate the cache, but it fails because it looks in the wrong l

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Stefan Krah
Stefan Krah added the comment: If none of you is working on it right now, I'll produce a new patch. Mark, how about this: def __add__(self, other, context=None, raiseit=False): """Returns self + other. -INF + INF (or the reverse) cause InvalidOperation errors. """

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Juan José Conti
Juan José Conti added the comment: I've been working in the modified version of my last patch to solve the 6 mentioned points. I'm posting it in less than 24 hs. If you're not hurry, please wait for me. This is just my second patch and is very useful to learn how to contribute to Python. ---

[issue7787] Add an argument to test_support.open_urlresource to invalidate the cache

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Jan Kaliszewski
New submission from Jan Kaliszewski : del list_instance([start : stop : very_big_step]) causes segfaults... The boundary values seem to be: * start -- near length of the list * stop -- near (-length) of the list * very_big_step -- near sys.maxint Let examples speak... >>> from sys import maxin

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Stefan Krah
Stefan Krah added the comment: Juan: Sure, take your time. :) I just wanted to know if you were still busy with it. -- ___ Python tracker ___ ___

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: ** Erratum ** -- was: del list_instance([start : stop : very_big_step]) causes segfaults... -- should be: del list_instance[start : stop : very_big_step] causes segfaults... ** Post scriptum ** In each example only the last statement causes segmentation fault

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Juan, don't worry about the documentation if you don't want to. I can fix that up easily. (Of course, if you do want to, go ahead!) -- ___ Python tracker ___

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Ezio Melotti
Ezio Melotti added the comment: This is what I get on trunk: Python 2.7a2+ (trunk:77754:77755, Jan 26 2010, 20:16:49) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sys import maxint >>> del range(10)[::maxint] >>> del range(10)[:-9:maxint]

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox, haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Raising priority: it shouldn't be possible to crash Python this easily. Ezio, are you on a 64-bit or 32-bit system? -- priority: normal -> critical ___ Python tracker ___

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Facundo Batista
Facundo Batista added the comment: Juanjo, ping me in private if you want help with the doc toolchain, I can show you how to touch the .rst and see the changes after processing. -- ___ Python tracker _

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Ezio Melotti
Ezio Melotti added the comment: 32bit, with sys.maxint/maxsize == 2147483647. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: Interesting that in Py2.5... >>> del range(10)[::maxint] ...this causes segfault but in Py2.6 is ok, as well as in Py3.0 (with maxsize insetad of maxint). (That's why I didn't noticed that it concerns newer version than 2.5, and marked only 2.5). But, as E

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: I can confirm the most recent patch (ex2) doesn't break anything on MacOS or Linux. It's clear that structseq.c is designed to be used this way, with more named members than unnamed members (and vice-versa, actually). See n_members vs. n_in_sequence in Objects/s

[issue7786] Is the BlockingIOError exception an aborted idea?

2010-01-26 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue7789] Issue using datetime with format()

2010-01-26 Thread JordanS
New submission from JordanS : format() cannot handle datetime.DateTime objects, returns the format_spec instead, without applying formatting to it, perhaps default behaviour in case of unknown type. Different modifications, ie: using str.format() syntax produce same behaviour. Sample code:

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: PS. Is such a data-dependant segfault considered as security problem? (if it is, maybe Python2.5 shuld be kept in "Versions" list) -- ___ Python tracker _

[issue7789] Issue using datetime with format()

2010-01-26 Thread Brian Curtin
Changes by Brian Curtin : -- components: +Library (Lib) -2to3 (2.x to 3.0 conversion tool) priority: -> normal stage: -> test needed ___ Python tracker ___ _

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: I don't immediately see why it would be considered a security issue. -- ___ Python tracker ___ ___ P

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: For the record: >>> del bytearray('%%%')[1::1<<333] Segmentation fault -- ___ Python tracker ___ _

[issue7789] Issue using datetime with format()

2010-01-26 Thread JordanS
JordanS added the comment: sorry, first time posting anything like this: versions: Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 -- ___ Python tracker

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Eric Smith added the comment: datetime.datetime passes its format string to strftime: >>> import datetime >>> x = datetime.datetime(2001, 1, 2, 3, 4) >>> x.strftime('%Y-%m-%d') '2001-01-02' >>> '{0:%Y-%m-%d}'.format(x) '2001-01-02' I'll check to make sure this is documented. -- assign

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: There's a suspicious looking test in list_ass_subscript in Objects/listobject.c: if (cur + step >= Py_SIZE(self)) { lim = Py_SIZE(self) - cur - 1; } I think what's happening here is that cur + step is overflowing, so that the test fails. --

[issue7789] Issue using datetime with format()

2010-01-26 Thread R. David Murray
R. David Murray added the comment: If it is, it isn't any place obvious. I thought I remembered something about using strftime strings in format, but when I looked in the docs for datetime and the section on the format mini language I couldn't find it, so I ended up doing '{} ...'.format(x.s

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Marcin Bachry
Marcin Bachry added the comment: I think the expression "cur + step" in line 2660 of listobject.c (py2.7 trunk) overflows to negative value and the "if" branch isn't entered. if (cur + step >= Py_SIZE(self)) { lim = Py_SIZE(self) - cur - 1; } If I change the type of "cur" variable to

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Eric Smith added the comment: I don't think this is documented (that I can find, at least), so I'll assign it to Georg. I think the correct thing to do is something like this, in the datetime, date, and time object descriptions: date.__format__(fmt) For a date d, format(d, fmt) is equiva

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks. Yes, that fix seems to work. I also tried rewriting the suspect test as if (step >= Py_SIZE(self) - cur) but this produced a different failure: it looks like there's more than one point with potential overflow for cur. Not to mention that the 'cu

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Eric Smith added the comment: The documentation for this belongs in the mini-language specification, since that just address built-in types. Each type can define its own format specification language. So I think adding documentation of __format__ to each non-builtin type that implements __fo

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Eric Smith added the comment: Eric Smith wrote: > The documentation for this belongs in the mini-language specification, ... Oops. "does NOT belong in the mini-language specification". -- ___ Python tracker __

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: And judging by flox's result for bytearray, we should check all the other sequence types, too. -- stage: test needed -> needs patch ___ Python tracker

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Marcin Bachry
Marcin Bachry added the comment: Using "grep" I found the same code in Modules/arraymodule.c: from array import array del array('i', range(10))[9::1<<333] -- ___ Python tracker

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Nice! Marcin, are you interested in contributing a patch that fixes the three known cases (bytearray, list, array), and also adds suitable tests? -- ___ Python tracker __

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Marcin Bachry
Marcin Bachry added the comment: Yes, I can give a shot. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Great---thank you! I'll review the patch when it's ready. -- assignee: -> mark.dickinson ___ Python tracker ___ __

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Mark Dickinson
Mark Dickinson added the comment: Raising priority again. I'm not sure when 3.1.2 is going out, but I'd like to make sure that this issue at least gets considered before it does. -- priority: critical -> release blocker ___ Python tracker

[issue7787] Add an argument to test_support.open_urlresource to invalidate the cache

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: The check argument is any function which receives an open file and return a boolean. For example: - verify the version number on the first line (test_normalization) - calculate the MD5 -- keywords: +patch nosy: +r.david.murray stage: -> patch revi

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16007/issue7783_normalization.diff ___ Python tracker ___ ___ Python-bugs

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
Florent Xicluna added the comment: Now the fix depends on #7787 -- dependencies: +Add an argument to test_support.open_urlresource to invalidate the cache stage: -> patch review Added file: http://bugs.python.org/file16017/issue7787_urlresource.diff __

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16017/issue7787_urlresource.diff ___ Python tracker ___ ___ Python-bugs-l

[issue7783] test_normalization fails when NormalizationTest.txt is outdated

2010-01-26 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file16018/issue7783_normalization_v2.diff ___ Python tracker ___ ___ Python-bug

[issue7790] struct_time documentation entry should point to the table defining the tuple

2010-01-26 Thread R. David Murray
New submission from R. David Murray : In the beginning of 16.3 (time module documentation) the fields of a time tuple are defined, and it mentions that struct_time returns a named tuple version. The entry for struct_time, which is what you get sent to by the entries for the functions that ret

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-01-26 Thread Marcin Bachry
Marcin Bachry added the comment: I attach the patch. I changed signedness in all three sequence types and made sure tests crash when run on unpatched Python. -- Added file: http://bugs.python.org/file16019/fix.diff ___ Python tracker

[issue4770] binascii module, inconsistent behavior: some functions accept unicode string input

2010-01-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please also add a NEWS entry which mentions the changes to those APIs and the change in the email package. Thanks. -- ___ Python tracker _

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-26 Thread Charles Cazabon
Charles Cazabon added the comment: Thanks, Jesse -- it looks good. If there are bugs remaining in the patch, they're mine and not yours. -- ___ Python tracker ___ _

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread showell
showell added the comment: The next stage for the patch is that I need to switch from using orphans count to using ob_allocated pointer. -- ___ Python tracker ___ __

[issue7791] Python 2.6 standard library "sees also" something not in the standard library

2010-01-26 Thread dholth
New submission from dholth : I thought it was really odd that the standard library documentation references ipaddr, a module from pypi, not something else in the standard library. The documentation should explain that the referenced package is not a standard part of Python. http://docs.python

[issue7791] Python 2.6 standard library "sees also" something not in the standard library

2010-01-26 Thread dholth
dholth added the comment: Also ipaddr.BaseIP.packed is a property, not a method, so no () -- ___ Python tracker ___ ___ Python-bugs-li

[issue7791] Python 2.6 standard library "sees also" something not in the standard library

2010-01-26 Thread Brian Curtin
Brian Curtin added the comment: unittest also does this, but it does so at the top and references projects as a whole, rather than individual functions/classes in the project. Seems like this should be taken out. It doesn't exist in any version after 2.6. -- nosy: +brian.curtin priori

[issue7792] Errors registering non-classes with ABCs

2010-01-26 Thread andrew cooke
New submission from andrew cooke : There are two related issues here. The first is, I think, a simple bug: When I try to register a function as a subclass of an ABC I get the error: TypeError: issubclass() arg 2 must be a class or tuple of classes Looking at the code - http://svn.python.org

[issue7753] newgil backport

2010-01-26 Thread Ross Cohen
Ross Cohen added the comment: On Fri, 22 Jan 2010 09:32:36 + Marc-Andre Lemburg wrote: > * Please add the fallback solutions from the time module in case > gettimeofday() is not available. You cannot assume that "all modern POSIX > systems" implement that API - it was introduced in POSI

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: Here's the final version of the patch. After some testing on various platforms I'll commit it. -- Added file: http://bugs.python.org/file16020/winver_as_structseq_ex4.diff ___ Python tracker

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread Adam Olsen
Adam Olsen added the comment: $ ./python -m timeit -s 'from collections import deque; c = deque(range(100))' 'c.append(c.popleft())' 100 loops, best of 3: 0.29 usec per loop $ ./python -m timeit -s 'c = range(100)' 'c.append(c.pop(0))' 100 loops, best of 3: 0.424 usec per loop

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please take care in presenting timings. It is easy to get misleading results: * Factor-out the attribute lookup time (since that isn't the part being changed: -s 'c = range(100); c_ins=c.insert; c_pop=c.pop' 'c_insert(0, c_pop())' * The case of a

[issue7793] regrtest fails with "RuntimeError: maximum recursion depth exceeded" in some cases

2010-01-26 Thread Florent Xicluna
New submission from Florent Xicluna : ~ $ ./python -m test.regrtest -R 1:0: test_multibytecodec_support test_codecencodings_tw test_codecencodings_jp test_multibytecodec_support test_codecencodings_tw test test_codecencodings_tw failed -- Traceback (most recent call last): File "./Lib/test/te

[issue7753] newgil backport

2010-01-26 Thread Ross Cohen
Ross Cohen added the comment: On Sat, 23 Jan 2010 18:23:10 + Antoine Pitrou wrote: > By the way, the new GIL only works with POSIX and Windows NT threading APIs. > Perhaps it can't be backported at all to 2.x, given that 2.x supports more > threading APIs than py3k does? Looking at the

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Craig McQueen
Craig McQueen added the comment: Thanks, good points. I'm thinking with a C background and the fixed-width data types. The 0xFF could be needed if the data_byte is actually a larger number and you need to ensure only the lowest 8 bits are set. Or, if there is some sign-extending going on with

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-26 Thread Eric Smith
Eric Smith added the comment: Committed in trunk r77763, in py3k r77765. -- assignee: -> eric.smith resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue1205239] Let shift operators take any integer value

2010-01-26 Thread Craig McQueen
Craig McQueen added the comment: To complete that thought... Since crc << 8 could bump the calculation into long territory, for that final mask I guess I'd want to mask and then shift. I.e. rather than crc_mask = ((1 << crc_width) - 1) crc = (...) ^ ((crc << 8) & crc_mask) do: c

[issue7789] Issue using datetime with format()

2010-01-26 Thread Eric Smith
Changes by Eric Smith : -- assignee: eric.smith -> georg.brandl nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7793] regrtest fails with "RuntimeError: maximum recursion depth exceeded" in some cases

2010-01-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7030] Update version{added, changed} entries in py3k unittest docs

2010-01-26 Thread Michael Foord
Michael Foord added the comment: skip* functions are missing 'new in' documentation. These need to be correct for 2.7 and 3.1 / 3.2 as well. Plus the example of assertRaises as a context manager sucks. http://docs.python.org/dev/library/unittest.html#unittest.TestCase.assertRaises --

[issue7785] FileIO.write() accepts Unicode strings

2010-01-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Oops. Fixed in r77781. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue7786] Is the BlockingIOError exception an aborted idea?

2010-01-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: The BufferedReader/Writer classes are supposed to handle this exception correctly, so presumably you could have RawIO class that raises this exceptions and use it with the io stack. Since this bug report has no clear resolution, I'm closing it. Further di

[issue7792] Errors registering non-classes with ABCs

2010-01-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed first bug in r77789. The second issue is a separate feature request. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker __

[issue7776] httplib.py: ._tunnel() broken

2010-01-26 Thread Cameron Simpson
Cameron Simpson added the comment: Well, following your description I've backed out my urllib2 test case to this: f = urllib2.urlopen('https://localhost/boguspath') os.system("lsof -p %d | grep IPv4" % (os.getpid(),)) f = urllib2.urlopen(R) print f.read() and it happily runs HTTPS thro

  1   2   >