[issue15882] _decimal.Decimal constructed from tuple
Stefan Krah added the comment: Thanks for the report and the patch. I used another approach that still validates the digits in the coefficient tuple even if it is not used. decimal.py allows any coefficient: Decimal((0, ('n', 'a', 'n'), 'F')) Decimal('Infinity') _decimal raises: Decimal((0, ('n', 'a', 'n'), 'F')) Traceback (most recent call last): File stdin, line 1, in module ValueError: coefficient must be a tuple of digits I'm leaving the issue open: If some release blocker arises, we could get this into 3.3.0-rc3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15882] _decimal.Decimal constructed from tuple
Changes by Stefan Krah stefan-use...@bytereef.org: -- resolution: - fixed stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15898] OSX TTY bug
Andrew Moffat added the comment: Sorry about that, I refactored out the string at the last minute and typed testing123 instead of the original testing from the trace. I'm not sure I follow the problem exactly. So you're saying that the failing version uses _cancel sys calls, and that __pthread_testcancel may result in EINTR. But that this is not happening in the trace, and data is being written successfully. I guess I'm wondering where the written bytes went and if there's any way to retrieve them? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: I wrote a C-language program to reproduce this issue on Mac OS without Python. It reproduces the issue in both increasing and decreasing order of initial read sizes, and it reliably reproduces it for each KB from 128KB to 1024KB ; the Python version reproduced the issue every 4K and only in decreasing order (probably something related to Python's memory management optimizations). A new caveat: if the read buffer is allocated once before entering the read loop, then we don't get any EINVAL in the entire run; however, if the read buffer is allocated for each read request inside the loop, then we get EINVAL every other time in the range from 128KB and up. I would like to file this issue with apple/Mac OS. What's the appropriate URL for this? -- Added file: http://bugs.python.org/file27172/test_fork_pipe_error.cpp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15913] PyBuffer_SizeFromFormat is missing
Stefan Krah added the comment: Even though it's documented, the function is probably a new feature and should go into 3.4. Meanwhile, you can call struct.calcsize(format). Any non-trivial implementation of PyBuffer_SizeFromFormat() would likely do the same. -- components: +Interpreter Core -None nosy: +skrah type: - enhancement versions: +Python 3.4 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: The C-language program for reproducing the same issue is attached as test_fork_pipe_error.cpp -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: I used g++ to compile test_fork_pipe_error.cpp on both Mac OS and on Linux. EINVAL showed up only on Mac OS. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Charles-François Natali added the comment: The reason I said above that those might be red-herring discoveries is this: if I insert a short time.sleep(0.001) delay before the outer pipe-read loop, the EINVAL errors don't get triggered either. That's interesting. So it really seems that under certain conditions, a non-blocking read from an empty pipe could fail with EINVAL instead of EAGAIN. But this is definitely a bug, in such cases read() should return EAGAIN. 1. Why doesn't the test encounter EINVAL in the range 127KB ... 1KB (when iterating initialReadSize in *decreasing* order). If the pre-read delay is significant, then does it take significantly more time to allocate a 127KB chunk of memory than it does a 128KB chunk? 2. Why doesn't the test encounter EINVAL at all when iterating initialReadSize in *increasing* order? I'm not sure it's a delay issue in this case. It may have more to do with the aligment of the buffer passed to read(). You can for example imagine that this error would show up only when the buffer is (or is not) aligned on a page boundary (usually 4K). As for the gap between 127KB and 128KB, it could be that we're allocating a new arena (we have a custom memory allocator over malloc()/mmap()), or that we switch between brk() and mmap(), but that's mere speculation, and there's nothing we can (and should) do here. I'm not sure about what to do with this, though: - adding a delay is out of question - retrying on EINVAL like on EAGAIN is not a good idead, since it could mask real bugs One thing we could do would be to limit the the call to read() to, let's say 64KB per call: newData = os.read(errpipe_read, min(65536, rSize)) But this would only work here, there are probably other places where this bug could be encountered (and I don't like adding hacks to avoid platform bugs). I wrote a C-language program to reproduce this issue on Mac OS without Python. I would like to file this issue with apple/Mac OS. What's the appropriate URL for this? I used g++ to compile test_fork_pipe_error.cpp on both Mac OS and on Linux. EINVAL showed up only on Mac OS. Told you it was an OS-X bug (we've had several of those) ;-) As for where to report it, I'm making some OS-X enclined devs nosy. I'm suggest closing this bug as invalid (unless someone considers that we should try to work around it with the above trick). -- nosy: +hynek, ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Changes by Charles-François Natali neolo...@free.fr: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: By the way, the existing code in subprocess.Popen (at least on 2.6.7) reads the pipe incorrectly: It doesn't loop to read all the data until EOF -- it only loops over EINTR until it gets a single successful os.read() call. However, since this is a pipe read (not a real file read), the system doesn't guarantee that the blocking read will read everything up to requested read size or EOF, whichever comes first. So, the single os.read call could return a partial read, and the subsequent un-pickling of the exception would fail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.
Senthil Kumaran added the comment: Hi Eduardo, I tested further and do observe some very strange oddities. On Mon, Sep 10, 2012 at 10:45 PM, Eduardo A. Bustamante López rep...@bugs.python.org wrote: Also, I'm aware that you shouldn't normally worry about setting a specific user-agent to fetch the file. But that's not the case of Wikipedia. In my case, Wikipedia returned 403 for the urllib user-agent. Yeah, this really surprised me. I would normally assume robots.txt to be readable by any agent, but I think something odd is happening. In 2.7, I do not see the problem because, the implementation is: import urllib class URLOpener(urllib.FancyURLopener): def __init__(self, *args): urllib.FancyURLopener.__init__(self, *args) self.errcode = 200 opener = URLOpener() fobj = opener.open('http://en.wikipedia.org/robots.txt') print opener.errcode This will print 200 and everything is fine. Also, look at it that robots.txt is accessible. In 3.3, the implementation is: import urllib.request try: fobj = urllib.request.urlopen('http://en.wikipedia.org/robots.txt') except urllib.error.HTTPError as err: print(err.code) This gives 403. I would normally expect this to work without any issues. But according to my analysis, what is happening is when the User-agent is set to something which has '-' in that, the server is rejecting it with 403. In the above code, what is happening underlying is this: import urllib.request opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Python-urllib/3.3')] fobj = opener.open('http://en.wikipedia.org/robots.txt') print(fobj.getcode()) This would give 403. In order to see it work, change the addheaders line to opener.addheaders = [('', '')] opener.addheaders = [('User-agent', 'Pythonurllib/3.3')] opener.addheaders = [('User-agent', 'KillerSpamBot')] All should work (as expected). So, thing which surrprises me is, if sending Python-urllib/3.3 is a mistake for THAT Server. Is this a server oddity at Wikipedia part? ( Coz, I refered to hg log to see from when we are sending Python-urllib/version and it seems that it's being sent for long time). Can't see how should this be fixed in urllib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: I filed this issue with apple: Problem ID: 12274650: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/64/wo/VE1RGG9qEL5OS9KdzFSDHw/19.66 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: Apple bug report URL correction: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/64/wo/VE1RGG9qEL5OS9KdzFSDHw/17.66 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: Sorry, I don't know why the URL comes out all messed up. I can't seem to find the correct syntax for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Charles-François Natali added the comment: By the way, the existing code in subprocess.Popen (at least on 2.6.7) reads the pipe incorrectly: It doesn't loop to read all the data until EOF -- it only loops over EINTR until it gets a single successful os.read() call. However, since this is a pipe read (not a real file read), the system doesn't guarantee that the blocking read will read everything up to requested read size or EOF, whichever comes first. So, the single os.read call could return a partial read, and the subsequent un-pickling of the exception would fail. Indeed. Do you want to open a new issue for that (and provide a patch)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
New submission from Vitaly: subprocess.Popen (at least on 2.6.7) reads the pipe incorrectly: It doesn't loop to read all the data until EOF -- it only loops over EINTR until it gets a single successful os.read() call. However, since this is a pipe read (not a real file read), the system doesn't guarantee that the blocking read will read everything up to requested read size or EOF, whichever comes first. So, the single os.read call could return a partial read, and the subsequent un-pickling of the exception would fail/crash. Sorry, I can't submit a patch as I am merely a Python user, not a Python developer, and it would take me too long to set up and figure out Python build just for this one issue. -- components: Library (Lib) messages: 170279 nosy: vitaly priority: normal severity: normal status: open title: subprocess.Popen reads errpipe_read incorrectly, can result in short read type: crash versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: Filed http://bugs.python.org/issue15918 for the incorrect pipe read logic in subprocess.Popen. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15887] urlencode should accept generators or two elements tuples
Senthil Kumaran added the comment: This is a feature request. urlencode tries to prepare the data in the form items are submitted. It has been like form is list of key,value pairs and that's what is reflect in the current behavior. That said, I am not -1 if see if some frameworks adopting generator approach or if it cna considered useful without any confusion. I still have soem doubts, namely if it can be just key,value pairs then why have a list at all? -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib
Senthil Kumaran added the comment: 2012/9/10 Jesús Cea Avión rep...@bugs.python.org: Ping!. Guess, it is still for 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11943 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15899] howto/unicode.rst doctest corrections
Senthil Kumaran added the comment: Thanks!. Verified the patch, it is fine and can be applied directly on 3.2 and 3.3 branch. Tested it as well. On 2.7, some changes would be required. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15899] howto/unicode.rst doctest corrections
Roundup Robot added the comment: New changeset 8a40bc71c072 by Senthil Kumaran in branch '3.2': Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/8a40bc71c072 New changeset 1d9e89f6abec by Senthil Kumaran in branch 'default': merge. Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/1d9e89f6abec -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Ronald Oussoren added the comment: What's wrong with working around this bug by reading a smaller amount? How much data is there supposed to be? BTW. URLs for reports in Apple's tracker are fairly useless as bugreports are private (only you and Apple's engineers can see the report). The bug number is useful though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15899] howto/unicode.rst doctest corrections
Senthil Kumaran added the comment: I shall make the changes 2.7, keeping this open for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15899] howto/unicode.rst doctest corrections
Chris Jerdonek added the comment: Thanks, Senthil! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15888] ipaddress doctest examples have some errors
Chris Jerdonek added the comment: Adding Eli to this because he did some work on the HOWTO for this module in issue 14814. -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15803] Incorrect docstring on ConfigParser.items()
Changes by Łukasz Langa luk...@langa.pl: -- assignee: - lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15803 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Jesús Cea Avión added the comment: We need something like this. I can not review, I am not familiar with mercurial hooks internals. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15919] hg.python.org: log page entries don't always link to revision
New submission from Chris Jerdonek: On hg.python.org, it seems like the entries on the log page don't always link to the corresponding revision, for example some of the rows in-- http://hg.python.org/cpython/shortlog/1d9e89f6abec This seems to happen whenever the revision description begins with text that results in a link to something else (e.g. an issue number). See, for example, the row for-- #15886: remove redundant phrase In contrast, the graph page seems always to link to the revision: http://hg.python.org/cpython/graph Related to this, if the description field contains text that results in a link to something else, then the UI doesn't make a distinction between the portion of the description that links to the revision and the portion that links to the something else. For example, with description text Fix for fcc629208842, Fix for links to the revision for the log entry, but fcc629208842 links to the named revision, and there is no separation or visual indicator that the two portions of text link to different things. It might be better if the revision link was separate from the description text. That would be one way to address both of the issues above. (This was originally posted to python-dev here: http://mail.python.org/pipermail/python-dev/2012-September/121635.html ) -- messages: 170290 nosy: cjerdonek, ezio.melotti, pitrou priority: normal severity: normal status: open title: hg.python.org: log page entries don't always link to revision ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15533] subprocess.Popen(cwd) documentation
Chris Jerdonek added the comment: Andrew, do you think my changes to the patch are adequate given the response on python-dev to your question? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Christian Heimes added the comment: +1 for the feature -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15900] Memory leak in PyUnicode_TranslateCharmap()
Roundup Robot added the comment: New changeset 4f2811e5e462 by Christian Heimes in branch 'default': Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap() http://hg.python.org/cpython/rev/4f2811e5e462 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15900] Memory leak in PyUnicode_TranslateCharmap()
Christian Heimes added the comment: Yes, 3.2 and earlier are not affected. Georg, I'm assigning the bug to you so you can decide if you like to cherry pick the fix. -- assignee: - georg.brandl nosy: +georg.brandl resolution: - fixed stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15920] make howto/regex.rst doctests pass
New submission from Chris Jerdonek: This issue is to make the doctests in howto/regex.rst pass using vanilla doctest. After this issue, 10 out of the 17 HOWTO's will pass with vanilla doctest. Patch attached. -- assignee: docs@python components: Documentation files: issue-doctest-howto-regex-1.patch keywords: patch messages: 170295 nosy: cjerdonek, docs@python, orsenthil priority: normal severity: normal stage: patch review status: open title: make howto/regex.rst doctests pass versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27173/issue-doctest-howto-regex-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer
Roundup Robot added the comment: New changeset 4754c4a710e6 by Christian Heimes in branch 'default': Issue #15895: Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false. http://hg.python.org/cpython/rev/4754c4a710e6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13773] Support sqlite3 uri filenames
André Anjos added the comment: A question concerning this patch: is this going to be applied only to 3.3 or to 2.7 as well? Python-2.7.x also does not have this functionality which would be interesting to get. -- nosy: +anjos ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer
Christian Heimes added the comment: The bug was a 3.3 regression, possibly introduced with the merge of importlib. I forgot to tick the 3,3regression keyword. I've applied the fix. I'm leaving this ticket open and assigned to Georg for 3.3.0. -- keywords: +3.3regression resolution: - fixed stage: patch review - committed/rejected versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15921] select module uses uninitialized value tv.tv_usec
New submission from Christian Heimes: Starting with Python 3.3 the select module access the uninitialized tv.tv_usec member of a timeval struct. I don't see the point of initializing the local variable long tv_usec from tv.tv_usec. The comment above the code states that long tv_usec is required as a workaround for Mac OS X. http://hg.python.org/cpython/file/4754c4a710e6/Modules/selectmodule.c#l242 Coverity message: CID 719694: Uninitialized scalar variable (UNINIT)At (5): Using uninitialized value tv.tv_usec. 242long tv_usec = tv.tv_usec; 243if (_PyTime_ObjectToTimeval(tout, tv.tv_sec, tv_usec) == -1) 244return NULL; 245tv.tv_usec = tv_usec; Suggested fix: change line 242 to long tv_usec; -- keywords: 3.3regression messages: 170299 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: select module uses uninitialized value tv.tv_usec type: resource usage versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15912] Intermittent import failure
Brett Cannon added the comment: I don't think sys.modules is the right place about a warning regarding importlib.invalidate_caches(); this has nothing to do with sys.modules but instead import itself. Probably something more along those lines would be more fitting. This is also mentioned the 3.3 What's New on how to port your code, so at least that's covered. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15911] can't step through _frozen_importlib/importlib._bootstrap using gdb
Brett Cannon added the comment: I'm going to guess this is a shortcoming of pdb when it comes to frozen modules as I can get to the source using inspect (which pdb leans on):: len(inspect.findsource(_frozen_importlib)[0]) 1761 len(inspect.findsource(importlib._bootstrap)[0]) 1761 Which are accurate line counts:: $ wc Lib/importlib/_bootstrap.py 1761 6236 62517 Lib/importlib/_bootstrap.py So why gdb can't output the source line when it has the line number of the file I don't know when it can already get access to the source without issue. And yes, debugging imports are hard. =) Still, it's better than before as you can easily toss in a print statement or two and then just regenerate the frozen object. But I do agree it would be nice to get gdb to play along with the whole situation (and thus the title change for this bug). -- nosy: +brett.cannon stage: - test needed title: Debugging import problems is hard - can't step through _frozen_importlib/importlib._bootstrap using gdb type: - behavior versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15719] Sort dict items in urlencode()
Chris Jerdonek added the comment: As an aside, I noticed a doctest affected by this in the urllib HOWTO: url_values = urllib.parse.urlencode(data) print(url_values) name=Somebody+Herelanguage=Pythonlocation=Northampton http://docs.python.org/dev/howto/urllib2.html#data (search for the string Somebody). This is merely a curiosity though (i.e. don't construe this as an argument on the issue :)). -- nosy: +cjerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15719 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read
Michael Foord added the comment: Yep, interesting idea. In Python 3 you can't import unittest.mock without importing unittest, so there could even be a default testcase to fall back on. For the external release I'd rather not have unittest as a dependency, but allowing a testcase to be provided at instantiation would be fine. -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read
Michael Foord added the comment: The only issue is that the testcase would have to be propagated to child mocks too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15922] make howto/urllib2.rst doctests pass
New submission from Chris Jerdonek: This issue is to make the doctests in howto/urllib2.rst pass using vanilla doctest. Patch attached. -- assignee: docs@python components: Documentation files: issue-doctest-howto-urllib-1.patch keywords: easy, patch messages: 170305 nosy: cjerdonek, docs@python, orsenthil priority: normal severity: normal status: open title: make howto/urllib2.rst doctests pass versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27174/issue-doctest-howto-urllib-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15922] make howto/urllib2.rst doctests pass
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer
Roundup Robot added the comment: New changeset c3539eb02470 by Christian Heimes in branch 'default': Issue #15895: my analysis was slightly off. The FILE pointer is only leaked when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening. http://hg.python.org/cpython/rev/c3539eb02470 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib
Jesús Cea Avión added the comment: Yes, 3.4. I would hate to rush, in two years, because this issue was neglected during 18 months :) No reason for not starting now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11943 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib
Antoine Pitrou added the comment: Le mardi 11 septembre 2012 à 13:52 +, Jesús Cea Avión a écrit : No reason for not starting now. There's no point in being pushy, though. If you want to start, the best thing is to work on the patch and update it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11943 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Ezio Melotti added the comment: Attached a set up script to reproduce a test environment for the hook. Create an empty dir and run ``sh setup.sh`` in it. This will: 1) create a 'c1' subdir which is a cpython-like repo with the branches 2.7, 3.1, 3.2, default; 2) download and set up the hook for this repo; 3) create a 'c2' clone of 'c1'; Once the clones are created, cd in 'c2', try to commit something, and push it. Use `hg up branchname` to switch between branches. If you `hg up 3.1`, change something, commit, and push, the hook will tell you that you have to merge with 3.2, if you do the same on 3.2 it will say you have to merge with default. You can try unusual combinations (e.g. null merges, rollbacks, multiple commits per branch, etc.) to see how well the hook works. -- Added file: http://bugs.python.org/file27175/setup.sh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15912] Intermittent import failure
Eric Snow added the comment: The relationship between invalidate_caches() and sys.modules is definitely tenuous. However, my rationale was that people would look for an explanation on why modifying sys.modules was not working as expected. The sys.modules doc entry was the one that seemed to make the most sense. However, this is a pretty uncommon case and you're right that the What's New entry should be enough. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13773] Support sqlite3 uri filenames
Éric Araujo added the comment: 2.7 and 3.2 are stable versions which only get bug fixes. 3.3 is in release candidate stage, so this new feature can only go into 3.4. See the devguide and PEPs for more info about the process we follow. -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Barry A. Warsaw added the comment: Okay, this bug is clearly caused by the patch applied for issue 12776. Here's the patch set url: http://hg.python.org/cpython/rev/74f6d87cd471 Now, if you look at this, I think this changes the semantics for non-string default with a type converter, but the question then becomes, what is the intended semantics? The documentation at: http://docs.python.org/py3k/library/argparse.html#the-add-argument-method says: type - The type to which the command-line argument should be converted. Okay, that makes perfect sense, because the command line arguments will always be strings in need of conversion. What *doesn't* make sense, IMHO, is that the type conversion should be applied to the default value. This is not documented behavior, but more importantly, is unnecessary, because the .add_argument() call site can just as easily provide a default that's already been converted. However, if you do this with the change, then the default value will get converted twice, once explicitly at the .add_argument() call site, and again, implicitly by argparse. Also, as this bug report indicates, it then becomes impossible to provide a default that is not converted. So I believe that the test added for issue 12776 is not correct (specifically test_type_function_call_with_non_string_default), and should be removed. I'm not even sure the original analysis of that bug is correct, but there is a serious semantic ambiguity that needs to be resolved. Specifically, should you support both the use case given in that bug and this bug's use case, and if so, how? E.g. should you even expect this to work: .add_argument('--foo', type=open, default='/etc/passwd') ? Maybe another way to look at it is that the conversion should only happen if the action is 'store'. It definitely should not happen if the action is 'append'. Let's say that the latter is the intended semantics. Attached is a patch that implements these semantics, with a test. If approved, I think we also need to describe the exact semantics in the documentation. I will do that, add a NEWS entry, and back port. -- keywords: +patch Added file: http://bugs.python.org/file27176/15906-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15914] multiprocessing.SyncManager connection hang
Richard Oudkerk added the comment: I get the same hang on Linux with Python 3.2. For Windows the documentation does warn against starting a process as a side effect of importing a process. There is no explicit warning for Unix, but I would still consider it bad form to do such things as a side effect of importing a module. It appears that it is the import of the hmac module inside deliver_challenge() that is hanging. I expect forking a process while an import is in progress may cause the import machinery (which I am not familiar with) to be in an inconsistent state. The import lock should have been reset automatically after the fork, but maybe that is not enough. Maybe the fact that the import is being done by a non-main thread is relevant. I would suggest just rewriting the code as create.py: import multiprocessing def main(): manager = multiprocessing.Manager() namespace = manager.Namespace() print(create.py complete) if __name__ == '__main__': main() run.py: import create create.main() print(run.py complete) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15914] multiprocessing.SyncManager connection hang
Richard Oudkerk added the comment: Here is a reproduction without using multiprocessing: create.py: import threading, os def foo(): print(Trying import) import sys print(Import successful) pid = os.fork() if pid == 0: try: t = threading.Thread(target=foo) t.start() t.join() finally: os._exit(0) os.waitpid(pid, 0) print(create.py complete) run.py: import create print(run.py complete) Using python2.7 and python3.3 this works as expected, but with python3.2 I get user@mint-vm /tmp $ python3 create.py Trying import Import successful create.py complete user@mint-vm /tmp $ python3 run.py Trying import Hang ^CTraceback (most recent call last): File run.py, line 1, in module import create File /tmp/create.py, line 17, in module os.waitpid(pid, 0) KeyboardInterrupt -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15914] multiprocessing.SyncManager connection hang
Changes by Richard Oudkerk shibt...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Vitaly added the comment: What's wrong with working around this bug by reading a smaller amount? How much data is there supposed to be? This makes sense for working around the issue. Even in the blocking-read case, such as in subprocess.Popen, attempting to read a 1MB chunk of data in a single os.read call is unhelpful anyway - see http://bugs.python.org/issue15918. Also, the 1MB read forces os.read() to unnecessarily allocate a huge !MB buffer (even if only for a short lifetime) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Vitaly added the comment: Also, attempting to read a 1MB chunk of data in a single os.read call forces os.read() to unnecessarily allocate a huge !MB buffer (even if only for a short lifetime). Using something like 4KB read calls in a loop is more practical (and looping is necessary anyway). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Antoine Pitrou added the comment: 2.6 doesn't receive bug fixes anymore. Can you at least test with a recent 2.7? -- nosy: +gregory.p.smith, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Antoine Pitrou added the comment: I might be wrong, but the logic in your hook looks a bit complicated. Wouldn't it be simpler to find all topological heads in the new csets (a topological head is a cset without any child), and check that none of them is on a 3.* branch? Finding topological heads is very easy, so http://hg.python.org/hooks/file/72aaeb80a55a/checkwhitespace.py#l85 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Ezio Melotti added the comment: I might be wrong, but the logic in your hook looks a bit complicated. This might be true. The logic I followed is that once a cset is merged, it becomes a parent of another cset (either in the same branch or in the next one). So, if the cset is in 3.x and is not a parent, it should be merged. Wouldn't it be simpler to find all topological heads in the new csets (a topological head is a cset without any child), and check that none of them is on a 3.* branch? If it's not a parent, it also means that it doesn't have any child, so we are looking at the same thing from two different points of view. If I'm reading the code you linked correctly, it's adding all the incoming changesets in a set, and for each changeset added to the set, all its parent are removed, so that eventually only the childless changesets (the topological heads) are left. This should also be equivalent to set(allcsets) - set(allparents). On the other hand my code checks for specific branches, so if you commit on 3.1 and merge on default, the cset in 3.1 is not a topological head so it's not detected by the version you linked, whereas my script will complain saying that it should be merged with 3.2 and then with default (even if maybe it should complain because you merged it in the wrong branch). -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS
Changes by Vitaly vitaly.krugl.nume...@gmail.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15914] multiprocessing.SyncManager connection hang
Richard Oudkerk added the comment: Python 3.2 has extra code in _PyImport_ReInitLock() which means that when a fork happens as a side effect of an import, the main thread of the forked process owns the import lock. Therefore other threads in the forked process cannot import anything. _PyImport_ReInitLock(void) { if (import_lock != NULL) import_lock = PyThread_allocate_lock(); if (import_lock_level 1) { /* Forked as a side effect of import */ long me = PyThread_get_thread_ident(); PyThread_acquire_lock(import_lock, 0); /* XXX: can the previous line fail? */ import_lock_thread = me; import_lock_level--; } else { import_lock_thread = -1; import_lock_level = 0; } } I think the reason this code is not triggered in Python 3.3 is the introduction of per-module import locks. -- type: behavior - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15921] select module uses uninitialized value tv.tv_usec
Roundup Robot added the comment: New changeset 6cdc72f4d82c by Benjamin Peterson in branch 'default': remove useless and defined initialization (closes #15921) http://hg.python.org/cpython/rev/6cdc72f4d82c -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Chris Jerdonek added the comment: I'm not sure of all the implications of this, but it seems like this is a relevant piece of information from the docs: type= can take any callable that takes a single string argument and returns the converted value: (from http://docs.python.org/dev/library/argparse.html#type ) In particular, it doesn't seem like it's meant to be supported to be calling type on an argument (e.g. a default argument) that's not a string. That's what's happening in the code snippet in the first comment above, where the default argument is a list. I haven't thought about this very long, but what would happen if the type conversion is only called on arguments and default arguments that are strings, and otherwise left alone? It seems like that would at least address the use case in the first comment, and maybe the type=open one as well. Either way, it seems like you still might need to track whether an argument has been converted (e.g. if type converts string to another string type). -- nosy: +cjerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14617] confusing docs with regard to __hash__
Ethan Furman added the comment: RC2 has just been released. Any chance of this getting in to the final release? Nobobdy has pointed out any problems with the last update... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Chris Jerdonek added the comment: Along the lines of my previous comment, I notice that the following str type check was removed in the patch for issue 12776: -if isinstance(action.default, str): -default = self._get_value(action, default) -setattr(namespace, action.dest, default) But it was not preserved when the call to _get_value() was added back elsewhere: +if (action.default is not None and +hasattr(namespace, action.dest) and +action.default is getattr(namespace, action.dest)): +setattr(namespace, action.dest, +self._get_value(action, action.default)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15914] multiprocessing.SyncManager connection hang
Richard Oudkerk added the comment: It looks like the problem was caused be the fix for http://bugs.python.org/issue9573 I think the usage this was intended to enable is evil since one of the forked processes should always be terminated with os._exit(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14617] confusing docs with regard to __hash__
Roundup Robot added the comment: New changeset 957e1eef3296 by R David Murray in branch '3.2': #14617: clarify discussion of interrelationship of __eq__ and __hash__. http://hg.python.org/cpython/rev/957e1eef3296 New changeset c8d60d0c736b by R David Murray in branch 'default': Merge #14617: clarify discussion of interrelationship of __eq__ and __hash__. http://hg.python.org/cpython/rev/c8d60d0c736b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14617] confusing docs with regard to __hash__
R. David Murray added the comment: I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. -- nosy: +r.david.murray resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Gregory P. Smith added the comment: fyi - i suspect Python 3.2 and the backport of that to 2.x http://code.google.com/p/python-subprocess32/ do not have this issue. but you didn't give enough information in the bug report for me to know which pipe and which read call you're talking about to really be sure. (show tracebacks, mention specific version source lines, etc..). If the bug is present in 2.7, we'll consider a fix for it. regardless, I recommend *everyone* using Python 2.x use the subprocess32 module rather than the built in subprocess module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Chris Jerdonek added the comment: Here is a type of test case that I think should be considered for addition (to confirm that the code doesn't double-convert strings in at least one case). Maybe there is already a test case like this: class MyString(str): pass def convert(s): return MyString(* + s) parser = ArgumentParser() parser.add_argument(--test, dest=test, type=convert, default=foo) args = parser.parse_args() print(args.test) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15629] Add to regrtest the ability to run Lib and Doc doctests
R. David Murray added the comment: turtle uses it because that was the file that I made work when I was playing with 'make doctest'. I think being able to use the testsetup directive would be good. It could also them be used (I think!) to put resource directives in the docs that would control whether or not (eg) turtle was run via regertest '-u', making it not run by default. What make doctest does is to write the doctests out to to a file and then run them with the normal doctest tools, so there ought to be a way to integrate with it. I guess how easy that is depends on how easy it is to run sphinx on just one file...which might not be easy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15629 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15917] hg hook to detect unmerged changesets
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer
Roundup Robot added the comment: New changeset 6fea947edead by Christian Heimes in branch 'default': Updates NEWS for issue #15895 http://hg.python.org/cpython/rev/6fea947edead -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
R. David Murray added the comment: I believe you've identified the broken part of the change, Chris. So to restore previous behavior we need to add that back correctly. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Changes by R. David Murray rdmur...@bitdance.com: -- priority: high - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Vitaly added the comment: My bug report refers to the following code block in subprocess.py. The problem is the same in 2.6.7 and 2.7.3: === From subprocess.py in Python 2.7.3 Source Distribution: # Wait for exec to fail or succeed; possibly raising exception # Exception limited to 1M data = _eintr_retry_call(os.read, errpipe_read, 1048576) finally: # be sure the FD is closed no matter what os.close(errpipe_read) === However, Python 3.2.3 appears to be doing this correctly; it loops, gathers the data from multiple os.read calls, and doesn't make huge (1048576) os.read requests: === from subprocess.py in 3.2.3 source distribution # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) data = bytearray() while True: part = _eintr_retry_call(os.read, errpipe_read, 5) data += part if not part or len(data) 5: break === -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14617] confusing docs with regard to __hash__
Ethan Furman added the comment: R. David Murray wrote: I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. This line is incorrect: A class which defines its own :meth:`__hash__` that explicitly raises a :exc:`TypeError` would be incorrectly identified as hashable by an ``isinstance(obj, collections.Hashable)`` call. It should be would not be correctly identified as hashable. Otherwise, looks great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Vitaly added the comment: Sorry, there is no traceback. The issue was identified in code review. 'man 2 read' states: === The system guaran- tees to read the number of bytes requested if the descriptor references a normal file that has that many bytes left before the end-of-file, but in no other case. === Since a pipe is not a normal file, the guarantee to read the number of bytes requested does not apply. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14617] confusing docs with regard to __hash__
Ethan Furman added the comment: Ethan Furman wrote: Ethan Furman added the comment: R. David Murray wrote: I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. This line is incorrect: A class which defines its own :meth:`__hash__` that explicitly raises a :exc:`TypeError` would be incorrectly identified as hashable by an ``isinstance(obj, collections.Hashable)`` call. It should be would not be correctly identified as hashable. Otherwise, looks great. Argh. Nevermind! It all looks good. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Vitaly added the comment: The prior 'man 2 read' quote was from Mac OS X; On amazon (centos) Linux, 'man 2 read' makes the same claim, albeit in different verbiage: === It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now (maybe because we were close to end-of-file, or because we are reading from a pipe, or from a terminal), or because read() was interrupted by a signal. === -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Gregory P. Smith added the comment: Yeah, sounds like _eintr_retry_call alone isn't appropriate here in 2.7. I'll fix it. In practice I doubt this matters much as this error string is likely to be less than one page (depends on pathnames involved) but it is still technically incorrect as written. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15209] Re-raising exceptions from an expression
Ethan Furman added the comment: Can we also get this committed before 3.3.0 final? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15209] Re-raising exceptions from an expression
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Barry A. Warsaw added the comment: On Sep 11, 2012, at 04:15 PM, Chris Jerdonek wrote: I haven't thought about this very long, but what would happen if the type conversion is only called on arguments and default arguments that are strings, and otherwise left alone? I thought about that, and actually, my first take on a fix was almost exactly to restore the isinstance check for str-ness. When I thought about it longer, it occurred to me that the type conversion for default only made sense when action was 'store'. Still, either approach would solve the problem. It seems like that would at least address the use case in the first comment, and maybe the type=open one as well. Either way, it seems like you still might need to track whether an argument has been converted (e.g. if type converts string to another string type). That would be more complicated, so we'd really have to decide whether to back port such changes, and whether we can sneak that into 3.3 given how late in the process we are. I'd be in favor either of my patch, or restoring the isinstance check (probably in that order). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read
Vitaly added the comment: In practice I doubt this matters much as this error string is likely to be less than one page (depends on pathnames involved) but it is still technically incorrect as written. Agreed. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
R. David Murray added the comment: To repeat: there is no change to be made for 3.3. 3.3.0 will go out the door with the pre-12776 behavior. So any backward compatibility concerns that apply to 2.7 and 3.2 also apply to 3.3. Thus I suggest we restore the string check, and consider an enhancement patch at more leisure for 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15906] argparse add_argument() confusing behavior when type=str, default=
Barry A. Warsaw added the comment: On Sep 11, 2012, at 07:00 PM, R. David Murray wrote: To repeat: there is no change to be made for 3.3. 3.3.0 will go out the door with the pre-12776 behavior. So any backward compatibility concerns that apply to 2.7 and 3.2 also apply to 3.3. Thus I suggest we restore the string check, and consider an enhancement patch at more leisure for 3.4. Okay, I missed that Georg has a separate branch for the 3.3.0 release, so we don't have to worry about it there. But yes, 2.7, 3.2, and 3.3.1 must be fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15923] Building from a fresh clone breaks on Parser/asdl_c.py
New submission from Barry A. Warsaw: After a fresh clone, configure make fails due to a fairly obvious bug in the code. Note that if you `hg revert --all`, configure make will succeed, probably because the timestamps get updated enough to fool make. @resist[~/projects/python:1043]% hg clone ssh://h...@hg.python.org/releasing/3.3.0 [...] @resist[~/projects/python:1044]% cd 3.3.0/ @resist[~/projects/python/3.3.0:1045]% ./configure make [...] gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-I. -I./Include-DPy_BUILD_CORE -o Python/_warnings.o Python/_warnings.c ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl Error visitingSum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])], []) not all arguments converted during string formatting Traceback (most recent call last): File /home/barry/projects/python/3.3.0/Parser/asdl.py, line 309, in visit meth(object, *args) File ./Parser/asdl_c.py, line 1043, in visitSum self.simpleSum(sum, name) File ./Parser/asdl_c.py, line 1067, in simpleSum self.emit(default: % name, 2) TypeError: not all arguments converted during string formatting make: *** [Python/Python-ast.c] Error 1 -- messages: 170344 nosy: barry, georg.brandl, loewis priority: normal severity: normal status: open title: Building from a fresh clone breaks on Parser/asdl_c.py versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15923] Building from a fresh clone breaks on Parser/asdl_c.py
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15924] 404 link on Python about page
New submission from Joshua Landau: http://www.python.org/about/ section Python plays well with others, last paragraph, link extension modules links to http://www.python.org/doc/ext/intro.html, a 404 page. http://www.python.org/doc/ext/ redirects to http://docs.python.org/extending/ -- components: None messages: 170345 nosy: Joshua.Landau priority: normal severity: normal status: open title: 404 link on Python about page ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15924 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5766] Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5766 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1005895] curses for win32
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1005895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1005895] curses for win32
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1005895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8964] platform._sys_version does not parse correctly IronPython 2.x version
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11385] TextTestRunner methods are not documented
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11385 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15315] Can't build Python extension with mingw32 on Windows
Changes by Ezio Melotti ezio.melo...@gmail.com: -- dependencies: +Remove -mno-cygwin from distutils type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15315 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10445] _ast py3k : add lineno back to args node
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Interpreter Core -None nosy: +ncoghlan stage: - needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13990] Benchmarks: 2to3 failures on the py3 side
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com