[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The ref-counts in the islice_reduce code don't look to be correct at first glance. -- assignee: -> rhettinger ___ Python tracker ___ __

[issue6305] islice doesn't accept large stop values

2014-04-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The first patch was cleaner. I don't think it is necessary to start-fast and switch-to-slow in the case where not all of the arguments are in the normal range. -- ___ Python tracker

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2014-04-21 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue15112 breaks one test that I added to issue +class TestPositionalsAfterOptionalsPlus(ParserTestCase): +"""Tests specifying a positional that follows an arg with nargs=+ +http://bugs.python.org/issue9338#msg111270 +

[issue21139] Idle: change default reformat width from 70 to 72

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I put 21138 in the commit message. The push messages are these. New changeset 374746c5dedc by Terry Jan Reedy in branch '2.7': Issue #21138: Change default reformat paragraph width to PEP 8's 72. http://hg.python.org/cpython/rev/374746c5dedc New changeset dd2409

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The unlinked push message was for #21139. -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bu

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg216987 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 374746c5dedc by Terry Jan Reedy in branch '2.7': Issue #21138: Change default reformat paragraph width to PEP 8's 72. http://hg.python.org/cpython/rev/374746c5dedc New changeset dd24099c0cf6 by Terry Jan Reedy in branch '3.4': Issue #21138: Change d

[issue21139] Idle: change default reformat width from 70 to 72

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I applied my patch as part of #21284. When I did so, I added 'limit=70' so that the tests pass otherwise unchanged. The only thing left here is to change config-main.def. -- ___ Python tracker

[issue21284] IDLE reformat tests fail in presence of non-default FormatParagraph setting

2014-04-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21284] IDLE reformat tests fail in presence of non-default FormatParagraph setting

2014-04-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ff2c0a637cf by Terry Jan Reedy in branch '2.7': Issue 21284: Idle: make test_formatparagraph pass even when a user changes the http://hg.python.org/cpython/rev/4ff2c0a637cf New changeset fe067339af80 by Terry Jan Reedy in branch '3.4': Issue 21284:

[issue21044] tarfile does not handle file .name being an int

2014-04-21 Thread Martin Panter
Martin Panter added the comment: I ran into a related issue with the gettarinfo() method. Would that fall under the scope of this bug, or should I raise a separate one? >>> with tarfile.open("/dev/null", "w") as tar: ... with open(b"/bin/sh", "rb") as file: ... tar.gettarinfo(fileob

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: My concern with a file for each entry is a possible slowdown of some operations, like TortoiseHg resyncing the diff between repository and working directory (it is not instantaneous even now). However, if there are multiple directories and if they are emptied

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-21 Thread Martin Panter
Martin Panter added the comment: I interpreted it more along the lines of “. . . returns a http.client.HTTPResponse object [with] the following [additional] methods.” Indeed, a HTTP urlopen() response I just tried does have info(), geturl() and getcode() methods, and I know the info() method i

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-21 Thread Kushal Das
Kushal Das added the comment: New patch with test and news entry. -- Added file: http://bugs.python.org/file34998/issue21256_v2.patch ___ Python tracker ___ _

[issue20901] test_sqlite fails with SQLite 3.8.4

2014-04-21 Thread koobs
koobs added the comment: Updating versions to match branches fix was committed in -- nosy: +koobs versions: +Python 3.3 ___ Python tracker ___ ___

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +josiah.carlson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Instead of returning [...] you could specify `no_fallback=False` that > could be set to `True` to assert that the fallback is not used > [...] and return the number of bytes sent. Good idea, thanks, that is much better indeed. Updated patch is in attachmen

[issue21325] Missing Generic EXIF library for images in the standard library

2014-04-21 Thread karl
New submission from karl: There is a room for a consistent and good EXIF library for the Python Standard Library. -- components: Library (Lib) messages: 216978 nosy: karlcow priority: normal severity: normal status: open title: Missing Generic EXIF library for images in the standard lib

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Nick Coghlan
Nick Coghlan added the comment: Folks, this is *really, really, simple*: one file per NEWS entry. How we arrange them is just a detail. Don't go off trying to invent wild exotic alternatives that spread state across multiple sources of truth - significant historical info belongs in the version co

[issue18617] TLS and Intermediate Certificates

2014-04-21 Thread Sam Vilain
Sam Vilain added the comment: Perhaps the simplest thing here is to add a standard verify callback that catches verification errors, and returns the parsed server certificate as an attribute of the raised exception object. From python, the exception can be caught and then the certificate data

[issue17552] socket.sendfile()

2014-04-21 Thread akira
akira added the comment: Should socket.sendfile() always return number of bytes sent because file.tell() may be changed by something else that uses the same file descriptor? What happens if the file grows? Instead of returning `(was_os_sendfile_used, os_sendfile_error)`, you could specify `no

[issue6305] islice doesn't accept large stop values

2014-04-21 Thread Alok Singhal
Alok Singhal added the comment: This updated patch has support for starting in fast mode until the next count would result in overflow in Py_ssize_t. The first patch started in slow mode as soon as any of 'start', 'stop', or 'step' was outside of the range. With this patch, we start in fast

[issue21225] io.py: Improve docstrings for classes

2014-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue17552] socket.sendfile()

2014-04-21 Thread Josh Rosenberg
Josh Rosenberg added the comment: For TransmitFile support, the Windows function to turn an integer file descriptor into a WinAPI file HANDLE should be _get_osfhandle: http://msdn.microsoft.com/en-us/library/ks2530z6.aspx -- nosy: +josh.rosenberg __

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-21 Thread R. David Murray
R. David Murray added the comment: That section of the docs is indeed rather confusing. Probably it just needs to be changed to say "for the methods supported by this object, see HTTPResponse Objects. I'd like to see the docs reorganized so that the '.. class' declaration in the docs is imme

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Most other Path methods operate on the link target, not the link itself, so I don't see why these methods would work otherwise. -- ___ Python tracker _

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-21 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19771] runpy should check ImportError.name before wrapping it

2014-04-21 Thread Luiz Poleto
Changes by Luiz Poleto : Added file: http://bugs.python.org/file34995/issue_19771.patch.v2 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21225] io.py: Improve docstrings for classes

2014-04-21 Thread R. David Murray
R. David Murray added the comment: Looks good to me. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: A sequential log of commit messages for a particular branch would give one an even better snapshot view of activity since not all commits have news messages and even when they do, commit messages sometimes have additional info. But see below. The essence of m

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Attached is a simple benchmark script transmitting a 100MB file. On my Linux box sendfile() is almost twice as fast as send(): send() real 0.0613s user 0.0100s sys 0.0900s total0.1000s sendfile() real 0.0318s user 0.s sys 0

[issue21324] dbhash leaks random memory fragments to a database

2014-04-21 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue837046] pyport.h redeclares gethostname() if SOLARIS is defined

2014-04-21 Thread Michael Stahl
Michael Stahl added the comment: (note that i haven't used any Solaris myself since 2011) * the #ifdef SOLARIS block still exists in current hg checkout * according to comment http://bugs.python.org/msg18910 the SOLARIS macro can not be defined during a build of python itself, so: - the #ifd

[issue21324] dbhash leaks random memory fragments to a database

2014-04-21 Thread Marcin Szewczyk
New submission from Marcin Szewczyk: As stated in the subject. Example is in a remote Git repository: https://bitbucket.org/wodny/python-dbm-experiments/ It shows how some random data gets into the database (into some gaps between keys and values). There is also a C example which hasn't been cau

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Ezio Melotti
Ezio Melotti added the comment: Agreed. Once the gating system is in place nothing prevent us to read the NEWS entry either from the patch that is being committed or from a field in the tracker and then including it together with the patch once it is approved. --

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread R. David Murray
R. David Murray added the comment: Yeah, Guido was strongly in favor of that too. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Zachary Ware
Zachary Ware added the comment: Terry J. Reedy wrote: > Moving News items from the repository to the tracker, where I think > they initially belong anyway, would also remove them as an issue for > a future gating system. I think News items are best left in the repository just so that for any giv

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Moving News items from the repository to the tracker, where I think they initially belong anyway, would also remove them as an issue for a future gating system. -- ___ Python tracker

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: If we put news items in a database keyed by issue number (and I think it reasonable that all news-worthy patches should have a tracker issue), then there would be no conflicts. (We already avoid simultaneous commits to the same issue.) If the database had fiel

[issue21323] CGI HTTP server not running scripts from subdirectories

2014-04-21 Thread Konstantin S. Solnushkin
New submission from Konstantin S. Solnushkin: Somewhere between Python 3.3 and 3.4, a bug was introduced that forbids the "http.server" module, working in CGI server mode, to run scripts residing in subdirectories. This will break existing software that relies on this feature. How to reproduc

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread R. David Murray
R. David Murray added the comment: That makes the tooling of the gating system harder, though. If the NEWS can just be a file in the patch, we don't have to have any special tooling for it in the gating system. -- ___ Python tracker

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Ezio Melotti
Ezio Melotti added the comment: Also having a list of enhancements and bug fixes might be more meaningful for users than a list of core issues vs library issues vs other similar sections. This could also be done with two separate files, with the "new features/enhancements" file existing only o

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Mon, Apr 21, 2014, at 9:38, Zachary Ware wrote: > > Zachary Ware added the comment: > > Any opinions on which version to update to? 8.5.11 is easy and available > and fixes the bug; 8.5.15 is the newest 8.5 but not on svn.python.org; > 8.6.1 is available

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Ned Deily
Ned Deily added the comment: FWIW, ActiveState is shipping 8.5.15 and 8.6.1 in ActiveTcl. For the OS X installers, we have been using 8.5.x (for the 64-bit/32-bit installer) because that's also what Apple has been shipping in recent OS X versions. Serhiy has committed a number of fixes in 3.

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +nadeem.vawda, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread R. David Murray
R. David Murray added the comment: That would probably work for now, but it wouldn't work for the patch gating system. On the other hand, it would sure make it easier to build/check whatsnew. -- ___ Python tracker

[issue18401] Tests for pdb import ~/.pdbrc

2014-04-21 Thread R. David Murray
R. David Murray added the comment: Thanks, Sam. It is more helpful if the NEWS entry is *not* put in the patch given the current state of the tooling. What's needs to be added is an entry in Doc/whatsnew/3.5. For the new test, you can take advantage of the temp_dir and EnvironmentVarGuard h

[issue12916] Add inspect.splitdoc

2014-04-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I will fix this issue asap, but I was too tired with the travel to Belgium. Hope to propose patch during this week. -- ___ Python tracker ___

[issue12916] Add inspect.splitdoc

2014-04-21 Thread R. David Murray
R. David Murray added the comment: It should receive a string. This is parallel to cleandoc, and I think splitdoc should go in the documentation right after cleandoc. -- ___ Python tracker ___

[issue19771] runpy should check ImportError.name before wrapping it

2014-04-21 Thread R. David Murray
R. David Murray added the comment: Hmm. It seems to me that .name not being set is a bug in importlib. It appears that importlib doesn't set it in the 'from x import y' case. After a bit of experimenting at the python prompt, I'm not even sure what that code in runpy is *doing* (find_spec('

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-21 Thread Iñigo Serna
New submission from Iñigo Serna: Pathlib .owner() and .group() methods fail on broken symlinks. They use: return pwd.getpwuid(self.stat().st_uid).pw_name and: return grp.getgrgid(self.stat().st_gid).gr_name It should be self.lstat(). Attached simple fix as unified diff. -- com

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Zachary Ware
Zachary Ware added the comment: Any opinions on which version to update to? 8.5.11 is easy and available and fixes the bug; 8.5.15 is the newest 8.5 but not on svn.python.org; 8.6.1 is available and is also what 3.4 (and currently 3.5) ships with. -- _

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Mon, Apr 21, 2014, at 8:54, Zachary Ware wrote: > > Zachary Ware added the comment: > > >From some testing, this looks like a Tcl/Tk bug, fixed somewhere between > >8.5.9 and 8.5.11: Python 3.2.5 which shipped with Tcl/Tk 8.5.9 shows this > >bug; Python

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Zachary Ware
Zachary Ware added the comment: >From some testing, this looks like a Tcl/Tk bug, fixed somewhere between 8.5.9 >and 8.5.11: Python 3.2.5 which shipped with Tcl/Tk 8.5.9 shows this bug; >Python 3.3.5 which shipped with Tcl/Tk 8.5.11 does not, and Python 2.7 built >with Tcl/Tk 8.5.11 doesn't sh

[issue21320] dict() allows keyword expansion with integer keys, e.g. dict(**{5:'v'})

2014-04-21 Thread R. David Murray
R. David Murray added the comment: 2.7 can't be changed for backward compatibility reasons, and python3 enforces the restriction in dict, as you observe. I don't know if a python2 documentation note is worthwhile, but given the conversations at pycon about adding additional -3 warnings to 2.7,

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread Ezio Melotti
Ezio Melotti added the comment: > Unless one looks carefully, it does not help the problen of merging > maintenance bugfix items into a default list that also contains > enhancement news not in the maintenance list*. What if instead of having sections in Misc/NEWS for core/library/documentati

[issue21283] A escape character is used when a REGEXP is an argument of "strip" string function

2014-04-21 Thread Tito Bouzout
Tito Bouzout added the comment: Thanks guys for the information! Is still weird to me that the escape character is used, but well ! Will remember this bug. Kind regards, -- ___ Python tracker ___

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-21 Thread R. David Murray
R. David Murray added the comment: In order for things to work with a patch gating system, I believe it will be the most practical for the news items to be each in a separate file. -- ___ Python tracker __

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Michael Boldischar
Michael Boldischar added the comment: Windows 7 64-bit: >>> root.tk.eval('info patchlevel') '8.5.2' Debian 7 Linux 64-bit: root.tk.eval('info patchlevel') '8.5.11' -- ___ Python tracker ___

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-21 Thread Anton Afanasyev
Anton Afanasyev added the comment: Added patch for 2.7 version (no need to change '__reduce__()' method since it's not implemented). -- Added file: http://bugs.python.org/file34991/issue21321_2.7_e3217efa6edd.diff ___ Python tracker

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Michael Boldischar
Michael Boldischar added the comment: Windows 7 64-bit: python --version Python 2.7.6 Debian 7 Linux 64-bit: $ python --version Python 2.7.3 -- ___ Python tracker ___ __

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-21 Thread Anton Afanasyev
New submission from Anton Afanasyev: This issue results in redundant memory consumption for e.g. in this case: from itertools import * def test_islice(): items, lookahead = tee(repeat(1, int(1e9))) lookahead = islice(lookahead, 10)

[issue21320] dict() allows keyword expansion with integer keys, e.g. dict(**{5:'v'})

2014-04-21 Thread Cyphase
New submission from Cyphase: Python 2.7.6: Affected Python 3.2.3: Not affected dict() allows keyword expansion using a dict() with integer keys, whereas attempting to do so with most other functions raises a TypeError with the message, "keywords must be strings". The same thing happens with c

[issue1234674] filecmp.cmp's "shallow" option

2014-04-21 Thread Steven Barker
Steven Barker added the comment: A recent Stack Overflow question (http://stackoverflow.com/q/23192359/1405065) relates to this bug. The questioner was surprised that filecmp.cmp is much slower than usual for certain large files, despite the "shallow" parameter being True. It is pretty clear