[issue12920] inspect.getsource fails to get source of local classes

2011-09-09 Thread Popa Claudiu
Popa Claudiu added the comment: I forgot to mention that I executed this code directly in IDLE. It seems to work perfectly on command line though. -- ___ Python tracker ___ ___

[issue12913] Add a debugging howto

2011-09-09 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I almost always use "print" for debugging, and find the use of a real debugger overkill in Python in most of the cases. People coming from other languages often feel the need of using a debugger because that's what works best with the other languages, but

[issue12902] help("modules") executes module code

2011-09-09 Thread Ezio Melotti
Ezio Melotti added the comment: > "Warning: gathering the results for the topic 'modules' can take > considerable time and have side effects as it imports *every* module > available to get at its doc string." http://docs.python.org/documenting/style.html#affirmative-tone -- __

[issue12951] List behavior is different

2011-09-09 Thread Ezio Melotti
Ezio Melotti added the comment: I don't see where is the bug. If you do >>> lists = [[]] * 3 >>> lists [[], [], []] you are creating a list that contains 3 references to the same list, as you can see here: >>> lists[0] is lists[1] is lists[2] True >>> [id(l) for l in lists] [33714832, 3371483

[issue6560] socket sendmsg(), recvmsg() methods

2011-09-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f50b8379614 by Jesus Cea in branch '3.2': Close #12950: multiprocessing "test_fd_transfer" fails under OpenIndiana http://hg.python.org/cpython/rev/0f50b8379614 New changeset e37488e78cfa by Jesus Cea in branch 'default': MERGE: Close #12950: mult

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd15473a9de2 by Jesus Cea in branch '2.7': Close #12950: multiprocessing "test_fd_transfer" fails under OpenIndiana http://hg.python.org/cpython/rev/cd15473a9de2 -- ___ Python tracker

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1fde7cf94c76 by Jesus Cea in branch 'default': Close #12950: multiprocessing "test_fd_transfer" fails under OpenIndiana http://hg.python.org/cpython/rev/1fde7cf94c76 -- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: This failure happens only in 32 bits, not in 64 bits. I suspect a alignment issue. -- ___ Python tracker ___

[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: A few thoughts: * no one has ever made a request for this * different people may want to do it in different ways (the formulas are hard-wired). * the '...' connector is hardwired (perhaps ' ... ' would look less odd). * we should have a preference for ke

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-09-09 Thread John O'Connor
Changes by John O'Connor : Removed file: http://bugs.python.org/file22982/strip_perf.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-09-09 Thread John O'Connor
John O'Connor added the comment: Moved {l,r,}strip to stringlib as well as the bloom filters from unicodeobject. I think it cleans things up nicely. Now there is one implementation for all 3 types. This patch also improves performance for bytearray and slightly for bytes. I see no delta for u

[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11812] transient socket failure to connect to 'localhost'

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I am seeing this failure from time to time in OpenIndiana buildbots. For instance http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/1751/steps/test/logs/stdio Seems a clear race condition. -- nosy: +jcea _

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Sep 9, 2011 at 6:18 PM, Larry Hastings wrote: .. > I've drawn an ASCII table summarizing the proposals so far. You did not mention "closely matches C API" as an upside. -- ___ Python tracker

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Sep 9, 2011 at 5:42 PM, Larry Hastings wrote: .. > How is this superior to using either Decimal or float128? It is explicit about the units of time used. If we use named tuples and retain C API field names, stat_result.tv_atimespec.tv_sec will c

[issue12945] ctypes works incorrectly with _swappedbytes_ = 1

2011-09-09 Thread Meador Inge
Meador Inge added the comment: I can reproduce this on Fedora 15 with the Python tip revision. I am investigating the behavior now. -- nosy: +meadori stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3 ___ Python tracker

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Tim Chase
Tim Chase added the comment: Patch attached. -- keywords: +patch versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file23123/issue12940.diff ___ Python tracker _

[issue12941] add random.pop()

2011-09-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue12763] test_posix failure on OpenIndiana

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9ef10328180b by Jesus Cea in branch 'default': Yet another fix for #12763: test_posix failure on OpenIndiana http://hg.python.org/cpython/rev/9ef10328180b -- ___ Python tracker

[issue12954] Multiprocessing logging under Windows

2011-09-09 Thread paul j3
New submission from paul j3 : The Windows programming guidelines for the multiprocessing module documentation should include a warning that any logging initialization should be protected by the 'if __name__' block. Otherwise you will get duplicate logging entries for the child processes. Thi

[issue12763] test_posix failure on OpenIndiana

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset dba886806eb3 by Jesus Cea in branch 'default': Better fix for #12763: test_posix failure on OpenIndiana http://hg.python.org/cpython/rev/dba886806eb3 -- ___ Python tracker

[issue12953] Function calls missing from profiler output

2011-09-09 Thread Hagen Fürstenau
New submission from Hagen Fürstenau : I noticed that some function calls don't get reported by profile/cProfile. For example, 'len' works fine, but calls to 'range' or functions in 'itertools' don't show up. Is this a known limitation? I remember that there was a bug in profiling C-functions w

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings
Larry Hastings added the comment: s/pair-of-floats/pair-of-ints/ Also, to be clear: yocto is the smallest defined SI prefix. And what I meant when I referred to 10**-3 was, float128 could handle 10**-24 but not 10**-27. According to my back-of-the-envelope calculations, float128 could accur

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings
Larry Hastings added the comment: I've drawn an ASCII table summarizing the proposals so far. If I've made any factual errors I trust you'll let me know. = means os.stat().st_mtime is changed to that type. + means os.stat() grows a new field using that type, and the current behavior of st_

[issue12763] test_posix failure on OpenIndiana

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: This fix is incorrect. It is ignoring a common case (a process running under a Solaris Zone) completelly. Since the intention of the test is to check the access to the scheduling information of a different process, I change it to access the parent, instead

[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Under Solaris 10 Update 9, FSS (Fair Share Scheduling) is usually used in the Zones, but it is not defined in "sched.h", so the test will fail. -- ___ Python tracker ___

[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1644c8edc3e by Jesus Cea in branch 'default': Close issue 12952: Solaris/Illumos (OpenIndiana) Scheduling policies http://hg.python.org/cpython/rev/e1644c8edc3e -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected statu

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: > This predates both the inclusion of Decimal in Python (2.4) and > nanosecond resolution in the utime API (2008). I could find no > discussion of the change, so I don't know what other representations > were considered. It's hard to say what the author of th

[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

2011-09-09 Thread Jesús Cea Avión
New submission from Jesús Cea Avión : Solaris/Illumos (OpenIndiana) have several more Scheduling Policies, specially if the program is running under a Solaris Zone. OpenIndiana buildbots are running under Zones, and the test is failing because current (under Zones) scheduling policy is not rec

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings
Larry Hastings added the comment: > To support higher resolution > will need to supply 3 fields in st_xtimesuperspec: tv_sec and tv_nsec > packed in st_xtimespec (say tv_timespec) and new tv_psec field. > st_xtime will now be st_xtimesuperspec.tv_timespec.tv_sec and > st_xtimespec will be a ne

[issue12841] Incorrect tarfile.py extraction

2011-09-09 Thread Lars Gustäbel
Lars Gustäbel added the comment: It's the low-level operating system aspects of tarfile that are very difficult to test, e.g. filesystem and operating system dependent features such as symbolic links, hard links, file permissions, ownership. It is not even possible to reliably determine the f

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Sep 9, 2011 at 5:22 PM, Alexander Belopolsky wrote: .. > If history repeats, struct stat will grow new st_xtimesuperspec > fields, st_xtimespec will become a macro expanding to > st_xtimesuperspec.tv_picosec On the second thought, this won't work

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Sep 9, 2011 at 4:50 PM, Larry Hastings wrote: .. > I think a pair of integers is a poor API.  It ties the value of the > fractional part to nanoseconds.  What happens > when a future filesystem implements picosecond resolution? If history repeat

[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings
Larry Hastings added the comment: I think a pair of integers is a poor API. It ties the value of the fractional part to nanoseconds. What happens when a future filesystem implements picosecond resolution? And then later goes to femtoseconds? Or some platform chooses another divisor (2**32

[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f4d72da69a8 by Jesus Cea in branch '2.7': Fix issue #12948: multiprocessing test failures can hang the buildbots http://hg.python.org/cpython/rev/9f4d72da69a8 New changeset 559ea53e25df by Jesus Cea in branch '3.2': Fix issue #12948: multiprocessi

[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Phillip J. Eby
Phillip J. Eby added the comment: No, I only consolidated the two copies of the code to a single function, in order to more easily add the PEP 302 support. The feature was already there. -- ___ Python tracker ___

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-09-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I have compiled ncurses myself, supporting wide characters. I get this warnings in the buildbots: """ /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Modules/_cursesmodule.c:920: warning: implicit declaration of function 'wget_wch' /export/home/buildb

[issue12942] Shebang line fixer for 2to3

2011-09-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue12941] add random.pop()

2011-09-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.2. Any patch should trivially port to 3.3 and 2.7 -- nosy: +terry.reedy versions: +Python 2.7, Python 3.2 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: To be a little clearer, this is about dotted import names, not regular dotted names. pydoc.locate(path, forceload=0): """Locate an object by name or dotted path, importing as necessary""" pydoc.resolve(thing, forceload=0): """Given an object or a path to an

[issue12914] Add cram function to textwrap

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is already available: >>> import pydoc >>> pydoc.cram('This sentence is too long to fit the space I have made >>> available', 28) 'This sentenc...ade available' def cram(text, maxlen): """Omit part of a string if needed to make it fit in a maximum lengt

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Tim Chase
Tim Chase added the comment: I see the status changed to needs-patch. what do I patch against? -- ___ Python tracker ___ ___ Python-

[issue12951] List behavior is different

2011-09-09 Thread शंतनू
New submission from शंतनू : URL: http://docs.python.org/library/stdtypes.html Following example is given. >>> lists = [[]] * 3 >>> lists [[], [], []] >>> lists[0].append(3) >>> lists [[3], [3], [3]] Behavior is as follows. >>> a = [[]] * 3 >>> a [[], [], []] >>> a[0] = 1 >>> a [1, [], []] >>

[issue12299] Stop documenting functions added by site as builtins

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can we close this as out-of-date, since 2/3rds of what you asked seems to be done already, and the last 1/3 should (in my opinion) absolutely not be? -- ___ Python tracker __

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-09 Thread Stefan Krah
Stefan Krah added the comment: No such luck. Somehow gdb doesn't dump the core file: [ 25/359] test_urllib2_localnet Fatal Python error: Segmentation fault Current thread 0x400225f0: File "/home/user/cpython-e91ad9669c08/Lib/socket.py", line 389 in create_connection File "/home/user/cpyt

[issue12920] inspect.getsource fails to get source of local classes

2011-09-09 Thread Popa Claudiu
Popa Claudiu added the comment: Yes. On Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32, the result for the following lines: import inspect class A: pass inspect.getsource(A) is: Traceback (most recent call last): File "E:/Scripts/Snippets/test_inspec

[issue12913] Add a debugging howto

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you write 'How to debug Python code' rather than just "How to use pdb", I would start with the use of print statements and binary search. Have short sections on using trace and profile. Very useful would be a list of error messages and possible un-obvious

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Example: -- ___ Python tracker ___

[issue12950] multiprocessing "test_fd_transfer" fails under OpenIndiana

2011-09-09 Thread Jesús Cea Avión
New submission from Jesús Cea Avión : Buildbots running OpenIndiana 147 show failures in multiprocessing "test_fd_transfer": """ == ERROR: test_fd_transfer (test.test_multiprocessing.WithProcessesTestConnection) ---

[issue12902] help("modules") executes module code

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The immediate issue is improvement of the entries for help and help(): In builtin functions section: Expand "Invoke the built-in help system." to "Invoke the built-in help system, which uses *pydoc*." where *pydoc* is linked to the pydoc section. Add to the e

[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebeb58f3de39 by Jesus Cea in branch '3.2': Close issue #12948: multiprocessing test failures can hang the buildbots http://hg.python.org/cpython/rev/ebeb58f3de39 New changeset 1e189d55721c by Jesus Cea in branch 'default': Close issue #12948: multi

[issue12949] Documentation of PyCode_New() lacks kwonlyargcount argument

2011-09-09 Thread Stefan Behnel
New submission from Stefan Behnel : In Py3, PyCode_New() takes a new argument "kwonlyargcount". The signature change is not currently in the Py3 C-API documentation. http://docs.python.org/dev/c-api/code.html PyCodeObject * PyCode_New(int argcount, int kwonlyargcount, int nlocals, i

[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Jesús Cea Avión
New submission from Jesús Cea Avión : Some failures in the multiprocessing testsuite can leave processes around, hanging the buildbots (until the timeout). I take care of this myself. -- assignee: jcea messages: 143783 nosy: jcea priority: normal severity: normal status: open title: mu

[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: I misread the Subversion viewer, it was actually PJE in r45248 (if I read correctly this time :) -- nosy: +pje ___ Python tracker ___

[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Yes, I got Windows 7, downloaded VS 2008 express, compiled, ran python python_d.exe -m test test_shutil and tests failed. I found out that os.rename does not raise OSError, according to my previous comment... -- _

[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Georg Brandl
Georg Brandl added the comment: Hehe... Sphinx makes a point of *removing* doctest flags, to enable doctesting of code snippets without distracting the reader with the test-internal flags. I think it's because you used a newer version locally. -- _

[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Georg Brandl
Georg Brandl added the comment: > The revision you linked to seems to say that Georg was the one who > added this code. Can you elaborate? Line 355 in trunk was last edited by "edloper". -- ___ Python tracker ___

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: After thinking about this, I think it may be easier for everyone if I just did the change. It’s just a list of boring grep-sed combos to run, and it’s easier if a core dev just does it instead of reviewing a long patch. Sorry if you invested time, Bryce.

[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: Ezio prompted me to give precise examples, and I can’t find any in the docs online. Maybe it was only a local build with certain options that caused this problem, I’ll reopen if I find out. -- resolution: -> invalid stage: -> committed/rejected status

[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: The revision you linked to seems to say that Georg was the one who added this code. -- nosy: +georg.brandl versions: +Python 3.3 -Python 3.1 ___ Python tracker __

[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo
New submission from Éric Araujo : The docs for the doctest module contains examples that use doctest flags to control behavior, but the HTML version does not contain the flags, making the examples useless. I don’t know if this is a bug with the HTML builder or something we can fix in markup.

[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: By testing, I mean running ./python -m test test_shutil -- ___ Python tracker ___ ___ Python-bugs-li

[issue12893] Invitation to connect on LinkedIn

2011-09-09 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file23098/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue12920] inspect.getsource fails to get source of local classes

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: > inspect.getsource called with a class defined in the same file fails > with TypeError: is a built-in class The error message makes me think that getsource(__main__) was used, not getsource(SomeClass). Can you check again? -- nosy: +eric.araujo title:

[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c759be5 by Éric Araujo in branch '3.2': Fix current name of the Python 3 binary on Unix (#12896). http://hg.python.org/cpython/rev/4c759be5 -- nosy: +python-dev ___ Python tracker

[issue12919] Control what module is imported first

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: Thomas: I assume you have “hg add”-ed the file; you may need to use git-style diffs to have new files included in diffs: http://hgtip.com/tips/beginner/2009-10-22-always-use-git-diffs/ -- nosy: +eric.araujo ___ Python

[issue12841] Incorrect tarfile.py extraction

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: > I think we have to go without a unit test. May I ask why? I don’t know tarfile well, but I know that a lot can be done with unittest. -- nosy: +eric.araujo ___ Python tracker ___

[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-09 Thread Éric Araujo
Éric Araujo added the comment: I got your message but you committed before I could do it :) Thanks! -- ___ Python tracker ___ ___ Py

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-09 Thread Charles-François Natali
Charles-François Natali added the comment: You don't have a core dump, do you? -- nosy: +neologix ___ Python tracker ___ ___ Python-b

[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: docs@python -> eric.araujo nosy: +eric.araujo versions: -Python 3.1 ___ Python tracker ___ ___

[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a74483c12740 by Jesus Cea in branch '2.7': Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou http://hg.python.org/cpython/rev/a74483c12740 -- ___ Python tr

[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein
John Feuerstein added the comment: > The test doesn't have to check that seq.pop() is working fine (there are > other tests for that) but that it's actually called and that it pops the > right element from the input sequence (and not e.g. from a copy of the > sequence that might have been cre

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-09 Thread Stefan Behnel
New submission from Stefan Behnel : As is obvious from the code, PyModule_GetDict() can fail if being passed a non-module object, and when the (unlikely) dict creation at the end fails. The documentation of the C-API function should be fixed to reflect that, i.e. it should state that NULL is r

[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I am seen the same problem in 2.7 buildbots. Eric, could you apply this patch to 2.7 branch too?. Thanks!. -- nosy: +jcea versions: +Python 2.7 ___ Python tracker _

[issue12942] Shebang line fixer for 2to3

2011-09-09 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue12941] add random.pop()

2011-09-09 Thread Ezio Melotti
Ezio Melotti added the comment: >> Not all the sequences have a .pop() method. > Not all sequences support indexing or item assignment either: All the sequences support indexing and len(), but not assignment (e.g. tuples and strings are sequences, but they are immutable). So talking about seq

[issue12945] ctypes works incorrectly with _swappedbytes_ = 1

2011-09-09 Thread Pavel Boldin
New submission from Pavel Boldin : ctypes seems to work incorrectly with _swappedbytes_ specified. I.e. it misses some values from buffer: class X(ctypes.Structure): _swappedbytes_ = 1 _pack_ = 1 _fields_ = [ ('a', ctypes.c_ubyte, 4), ('b', ctypes.c_ubyte, 4),

[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein
John Feuerstein added the comment: > r.pop(random.randrange(0, len(r))) So seq[random.randrange(0, len(seq))] suddenly makes random.choice(seq) obsolete? There is no functional reasoning here, it's convenience for a common operation. > Not all the sequences have a .pop() method. Not all seq

[issue12941] add random.pop()

2011-09-09 Thread Mark Dickinson
Mark Dickinson added the comment: > is it really worth adding? Probably not. For improvements along these lines, I'd rather see random.choice support sets: >>> random.choice({1, 2}) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versio

[issue12555] PEP 3151 implementation

2011-09-09 Thread Stefan Krah
Stefan Krah added the comment: I still need to understand the full impact of the PEP, but it seems very sound. I've left two small comments on Rietveld, and there's an additional question: Should the input of OSError be checked? >>> OSError("not an errno", "Bad file descriptor") OSError('not

[issue6715] xz compressor support

2011-09-09 Thread Nadeem Vawda
Nadeem Vawda added the comment: > In uint32_converter, I'm not sure the if statement comparing val and > UINT32_MAX makes sense. val was defined to be unsigned long, which is > 32bit on 32-bit compiler. Yes, on a 32-bit system, this comparison will always be false. However, on a 64-bit system,