[issue12804] "make test" fails on systems without internet access

2012-01-24 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12804] "make test" fails on systems without internet access

2012-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 585d3664da89 by Nadeem Vawda in branch 'default': Issue #12804: Fix test failures on systems without internet access. http://hg.python.org/cpython/rev/585d3664da89 -- ___ Python tracker

[issue12500] Skip test_ssl.test_connect_ex() on connection error

2012-01-24 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13858] readline fails on nonblocking, unbuffered io.FileIO objects

2012-01-24 Thread Matt Joiner
New submission from Matt Joiner : _io._IOBase.readline doesn't seem to like _io.FileIO.read returning None, which occurs when it's unbuffered and nonblocking. (Modules/_io/fileio.c:745 in trunk). Can this be handled some other way? $ python3.3 Python 3.3.0a0 (default:fb0f4fe8123e+, Jan 24 2012

[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-01-24 Thread Nick Coghlan
New submission from Nick Coghlan : As far I am aware, the simplest way to indent a multi-line string is with the following snippet: '\n'.join((4 * ' ') + x for x in s.splitlines()) It would be a lot simpler and clearer if I could just write that as "textwrap.indent(s, 4 * ' ')". (i.e. in

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-24 Thread Meador Inge
Meador Inge added the comment: The 'create_unicode_buffer' docs are currently wrong too: """ If the first parameter is a bytes object, it is converted into an unicode string according to ctypes conversion rules. """ >>> ctypes.create_unicode_buffer(b'foo') Traceback (most recent call last):

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 from me. The docs in their present form are a great tutorial but are a total failure as a quick reference. Besides having table of parameters, it may also be worthwhile to move some of the examples to a HOWTO document (much as was done with the logging

[issue7097] urlparse.urljoin of simple "http://" and "somedomain.com" produces incorrect result

2012-01-24 Thread Mark Nottingham
Mark Nottingham added the comment: http: and http:// are both valid base URIs; see RFC3986. More to the point, it's a useful thing to use a scheme as a base URI; many users omit the HTTP:// from their URIs. -- nosy: +mnot ___ Python tracker

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Having a second table of "Applicable Parameters" could definitely work. I don't think the "no horizontal headers" limitation should be a big problem - the matrix should be readable even if the action names are just listed in an ordinary column. -- ___

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-24 Thread Nathanael Noblet
New submission from Nathanael Noblet : If I wanted to create a HTTPS connection to a xmlrpc server *and* validate its certificate, I need to override the HTTPSConnection and SafeTransport objects. However it seems like they could easily support both methods. At least it seems to work both ways

[issue13846] Add time.monotonic() function

2012-01-24 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13855] Add qualname support to types.FunctionType

2012-01-24 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Xavier Morel
Xavier Morel added the comment: > The "Parameters" column would span multiple lines, with one parameter and a > brief description of the parameter on each line. I started looking into that, and it turns out that's more annoying than expected: a bunch of parameters are shared by many (to all)

[issue13855] Add qualname support to types.FunctionType

2012-01-24 Thread Meador Inge
New submission from Meador Inge : As mentioned in issue13672 currently there is no way to specify a qualname on types.FunctionType: >>> def f(): ...def g(): ... pass ...return g ... >>> g = f() >>> g .g at 0x7f1dac4d8ba0> >>> types.FunctionType(f.__code__, {}) >>> types.Function

[issue13672] Add co_qualname attribute in code objects

2012-01-24 Thread Meador Inge
Meador Inge added the comment: This seems to be a useful feature to me. Another area where it can help is with fixing function types. Currently the qualname can be lost: >>> def f(): ...def g(): ... pass ...return g ... >>> g = f() >>> g .g at 0x7f1dac4d8ba0> >>> types.Function

[issue12501] callable(): remove/amend the deprecation warning in Python 2.7

2012-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62bd0553693f by Florent Xicluna in branch '2.7': Issue #12501: merge the discordant NEWS entries. http://hg.python.org/cpython/rev/62bd0553693f -- ___ Python tracker

[issue13672] Add co_qualname attribute in code objects

2012-01-24 Thread Meador Inge
Meador Inge added the comment: On Wed, Dec 28, 2011 at 3:11 PM, Eric Snow wrote: > One sticky point is that there isn't a guarantee of one-to-one between > function object and code object.  A code object could be bound to several > different functions as happens with function definitions (par

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-24 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13852] Doc fixes with patch

2012-01-24 Thread Boštjan Mejak
Changes by Boštjan Mejak : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13854] multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError

2012-01-24 Thread Jon Brandvein
New submission from Jon Brandvein : In a child process, raising SystemExit or calling sys.exit with a non-integer, non-string argument value causes a TypeError at Lib/multiprocessing/process.py :: _bootstrap. This is from concatenating the argument with '\n' and writing it to stderr. Suggeste

[issue13853] SystemExit/sys.exit() doesn't print boolean argument

2012-01-24 Thread Jon Brandvein
New submission from Jon Brandvein : Raising SystemExit manually, or calling sys.exit, with an argument of "True" or "False" results in no output to the screen. According to Doc/library/exceptions.rst and Doc/library/sys.rst, any object that is not an integer or None should be printed to stderr

[issue13841] multiprocessing should use sys.exit() where possible

2012-01-24 Thread Jon Brandvein
Jon Brandvein added the comment: Good point. I don't think those particular behaviors are documented, so I'm not sure whether we need to worry about breaking them. -- ___ Python tracker __

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Steven Bethard
Steven Bethard added the comment: Sounds like an excellent plan to me too. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Jon Brandvein
Jon Brandvein added the comment: Patch looks fine. I like the use of "finally" for the flush. -- ___ Python tracker ___ ___ Python-bu

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed, thanks. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2f3d6986bfa by Antoine Pitrou in branch '3.2': Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. http://hg.python.org/cpython/rev/a2f3d6986bfa New changeset cb13d8cff050

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- assignee: -> pitrou stage: patch review -> commit review ___ Python tracker ___ ___ Python-b

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: So I have good news and bad news. The good is: I fixed it for non-Win platforms and the patch is truly beautiful: Lib/test/test_builtin.py | 6 ++ Modules/_io/fileio.c | 25 - 2 files changed, 10 insertions(+), 21 deletions

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2012-01-24 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: st_atim, st_ctim and st_mtim attributes could be instances of a class (implemented in posixmodule.c) similar to: class timespec(tuple): def __init__(self, arg): if not isinstance(arg, tuple): raise TypeError

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-24 Thread James Sanders
James Sanders added the comment: I've submitted a patch that just uses save_global to pickle Ellipsis and NotImplemented, so the resulting pickle should be unpicklable anywhere. I'm completely new to the C API so not sure if the way I am building python strings (to pass to save_global) is co

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Note: without the Python docs CSS to create the sidebar, the internal table of contents appears at the *bottom* of the rendered page. Really, reviewing this sensibly is probably going to require building the docs locally after using hg pull to retrieve the chan

[issue13851] Packaging distutils2 for Fedora

2012-01-24 Thread Dave Malcolm
Dave Malcolm added the comment: Hi Vikash - thanks for working on this. It's normal when packaging code "downstream" for Fedora to file a package review request at bugzilla.redhat.com, following the process here: http://fedoraproject.org/wiki/Package_Review_Process (sorry if the process seem

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Reconsidering: I think it shouldn't be checked into the cpython *repository*. Instead, if PyPy developers want to contribute changes to the test suite and standard library to improve the standard library, there should be a separate Mercurial repository for t

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: If so, I think this change should not checked into the 2.7 branch. Instead, a separate branch should be made for changes not intended for CPython, but for Python implementations in general. Making the Python test suite usable for other implementations is cer

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: JFTR, file()'s C equivalent is fileio_init and not io_open, I lost track of all the opens. ;) -- ___ Python tracker ___ _

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Pushed an initial cut to my sandbox branch. Built HTML is attached so you can get a general idea of how it looks (links, etc, obviously won't work). So far, I have made the split into 3 sections and updated the new (shorter) Sequence Types section. That sectio

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread R. David Murray
R. David Murray added the comment: Oh, and in case it isn't clear, this request is *coming* from one of the other VMs (pypy), so if my summit recollection is correct, they are in fact "adding a test that they need" by submitting this issue :) (Or at least they will have once Alex posts the pa

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread R. David Murray
R. David Murray added the comment: My understanding (and recollection, but I don't have notes I can point at to hand) is that one goal that arose from recent VM and language summits was for the CPython test suite to be used as the validating test suite, with CPython-specific tests marked as s

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, fixing the conversion block is probably the right approach. Apparently posixmodule.c uses PyUnicode_FSConverter, perhaps that would work? (also make sure that the case where a bytes string is given is fixed too: >>> open(b"\x00") Traceback (most recent cal

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor added the comment: > NtSetTimerResolution is a system-wide change, and may have impact on other > running applications.  It may be an option to set it during the execution of > profile.run() for example, but I would not enable it just to call > time.clock(). I was not proposin

[issue13852] Doc fixes with patch

2012-01-24 Thread Boštjan Mejak
New submission from Boštjan Mejak : I have collected a small amount of documentation fixes in my patch. Please review it and apply it. No pressure. ;) -- assignee: docs@python components: Documentation files: changes.diff keywords: patch messages: 151900 nosy: Retro, docs@python priorit

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: I took a deep dive into parts of CPython that were unknown to me :) and dug up the following: Methods like os.stat or even os.open convert the file name using "et" in PyArg_ParseTuple[AndKeywords]. OTOH, open() and io.open() just hand through the object as

[issue13851] Packaging distutils2 for Fedora

2012-01-24 Thread Vikash Agrawal
New submission from Vikash Agrawal : Packaging distutils2 for Fedora The spec file, is attached and lack many things. I also need to add files like README, COPYING etc. The problem is, after installtion of the generated rpm, "python -distutils2-1.0-0.1.0.a3.fc16.noarch.rpm" , distutils2 func

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications. It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call time.clock(). -- _

[issue13841] multiprocessing should use sys.exit() where possible

2012-01-24 Thread sbt
sbt added the comment: Currently, on both Windows and Unix, when the main thread of a child process exits: * atexit callbacks are NOT run (although multiprocessing.util._exit_function IS run), * the main thread does NOT wait for non-daemonic background threads. A simple replacement of ExitP

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Xavier Morel
Xavier Morel added the comment: > My specific suggestion is to have a dedicated "Quick Reference" section > before the first example. OK, that looks like a good plan. -- ___ Python tracker __

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread STINNER Victor
STINNER Victor added the comment: > GetSystemTimeAsFileTime() represent durations as multiple of 100ns, > unfortunately its value is only updated every 15ms or so.  Precision is not > accuracy... It is possible to improve the accuracy of this clock using the undocumented NtSetTimerResolution(

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: I realised that the lack of a clear binary/text distinction would make it messy to do the split docs in 2.7, so I made a new branch based on 3.2 instead (link to repo updated accordingly). -- assignee: eric.araujo -> ncoghlan __

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so. Precision is not accuracy... -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue13850] Summary tables for argparse add_argument options

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

[issue13686] Some notes on the docs of multiprocessing

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

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: My specific suggestion is to have a dedicated "Quick Reference" section before the first example. This section would be aimed at two groups of people: - those wanting a quick overview of the features argparse offers them ("This looks complicated, what can it do

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Charles-François Natali
Charles-François Natali added the comment: LGTM. (I just noticed a bug in Rietveld: when one selects "expand 10 after", the line right after that marker appears duplicated in the new view). -- ___ Python tracker

[issue13850] Summary tables for argparse add_argument options

2012-01-24 Thread Xavier Morel
Xavier Morel added the comment: Creating the tables should not be too hard, especially using e.g. org-mode, but: 1. Where should those tables live? The argparse documentation is pretty big and there's no completely obvious place. I would guess table 1. could just replace the list of arguments

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch sanitizing the various flushes done on exit, as per Charles-François's recommendation. Also removes TESTFN explicitly. -- Added file: http://bugs.python.org/file24311/mpstderrflush2.patch ___ Python tr

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +patch Added file: http://bugs.python.org/file24310/imptimestampoverflow.patch ___ Python tracker ___ ___

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for 3.2. importlib doesn't have the issue, so I just added a test. -- stage: -> patch review ___ Python tracker ___ _

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-24 Thread Charles-François Natali
Charles-François Natali added the comment: > I propose applying the following patch. The test looks good to me (except we don't remove TESTFN explicitely, but I'm not sure it's really necessary). As for the patch, couldn't we put all the file stream flushing in one place? stdout and stderr ar

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 839fa289e226 by Antoine Pitrou in branch '3.2': Issue #13772: In os.symlink() under Windows, do not try to guess the link http://hg.python.org/cpython/rev/839fa289e226 New changeset a7406565ef1c by Antoine Pitrou in branch 'default': Issue #13772:

[issue13849] Add tests for NUL checking in certain strs

2012-01-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: If other VMs need this test for some reason, they can easily add a test case themselves. I'm -1 on adding test cases to bug fix releases just for completeness. A lacking test is not a bug, and hence must not be added to a bug fix release. -- __