[issue22939] integer overflow in iterator object

2014-12-07 Thread STINNER Victor
STINNER Victor added the comment: You should not rely on undefined behaviour: check if the index is greater or equal than PY_SSIZET_MAX - 1. __setstate__ must implement the same check. You must always raise an error, not hide it in a second call to next (raise StopIteration). Your unit test

[issue22980] C extension naming doesn't take bitness into account

2014-12-07 Thread STINNER Victor
STINNER Victor added the comment: Why not using on Windows the same naming scheme than Unix. It may be useful to also add the debug flag (d) in the name for example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980

[issue22939] integer overflow in iterator object

2014-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: check if the index is greater or equal than PY_SSIZET_MAX - 1. Just PY_SSIZET_MAX. Added other comments on Rietveld (look the email in the Spam folder). -- ___ Python tracker rep...@bugs.python.org

[issue23003] traceback.{print_exc, print_exception, format_exc, format_exception}: Potential AttributeError

2014-12-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch nosy: +berker.peksag stage: - patch review type: - behavior Added file: http://bugs.python.org/file37380/issue23003.diff ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2014-12-07 Thread Steve Dower
Steve Dower added the comment: Why not using on Windows the same naming scheme than Unix. It may be useful to also add the debug flag (d) in the name for example. Windows already puts the debug flag in the name, the fact that it's CPython is in the .pyd extension, and the version number is

[issue23004] mock_open() should allow reading binary data

2014-12-07 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: mock_open(read_data=b'...') gives an error: Traceback (most recent call last): File z.py, line 6, in module print(f.read()) File /usr/local/lib/python3.4/unittest/mock.py, line 896, in __call__ return _mock_self._mock_call(*args, **kwargs) File

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2014-12-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- superseder: - mock_open() should allow reading binary data ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17467 ___

[issue23004] mock_open() should allow reading binary data

2014-12-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- dependencies: +Enhancement: give mock_open readline() and readlines() methods ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23004 ___

[issue23003] traceback.{print_exc, print_exception, format_exc, format_exception}: Potential AttributeError

2014-12-07 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23003 ___ ___

[issue23004] mock_open() should allow reading binary data

2014-12-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - needs patch type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23004

[issue22980] C extension naming doesn't take bitness into account

2014-12-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Windows already puts the debug flag in the name, the fact that it's CPython is in the .pyd extension, and the version number is in the directory for all the standard sys.path locations. The version number would be useful for in-place builds (i.e. when

[issue23005] typos on heapq doc

2014-12-07 Thread Martin Matusiak
New submission from Martin Matusiak: - which are pre-sorted sequences, which size is usually related to the amount of CPU memory whose size - Tournaments are a good way to that. Tournaments are a good way to achieve that. -- components: Library (Lib) files: heapq_docs_typos.diff

[issue22959] http.client.HTTPSConnection checks hostname when SSL context has check_hostname==False

2014-12-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a409a7cd908d by Benjamin Peterson in branch '3.4': HTTPSConnection: prefer the context's check_hostname attribute over the constructor parameter (#22959) https://hg.python.org/cpython/rev/a409a7cd908d New changeset 41021c771510 by Benjamin

[issue22959] http.client.HTTPSConnection checks hostname when SSL context has check_hostname==False

2014-12-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay, I basically applied my patch to 3.4/3.5. I simply removed the check_hostname parameter from 2.7, since it was to be added in 2.7.9. -- resolution: - fixed status: open - closed ___ Python tracker

[issue23005] typos on heapq doc

2014-12-07 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python -ned.deily versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23005

[issue20603] sys.path disappears at shutdown

2014-12-07 Thread Brett Cannon
Brett Cannon added the comment: Since issue #19255 is closed is this still an issue, Antoine? -- assignee: - pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20603 ___

[issue22980] C extension naming doesn't take bitness into account

2014-12-07 Thread Steve Dower
Steve Dower added the comment: The version number would be useful for in-place builds (i.e. when developping) Ah, I see now how that would be useful (I haven't tried to deal with that before). I'll revise the patch to use/allow the version number. --

[issue20603] sys.path disappears at shutdown

2014-12-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know. Not for issue #19255 obviously, so we can probably close :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20603 ___

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2014-12-07 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9536 ___ ___ Python-bugs-list

[issue23006] Improve the doc and indexing of adict.__missing__.

2014-12-07 Thread Terry J. Reedy
New submission from Terry J. Reedy: Currently, the only index entry for __missing__ is __missing__() (collections.defaultdict method). This entry should probably not exist -- see #9536, which inspired this issue. The method is not mentioned in the special-methods doc, and the explanation

[issue9647] os.confstr() does not handle value changing length between calls

2014-12-07 Thread David Watson
David Watson added the comment: On Fri 5 Dec 2014, STINNER Victor wrote: I added an assertion. Can we close this issue? Well, if no one complains about the interpreter dying with SIGABRT, that will suggest that the worries about OS bugs creating infinite loops were unfounded :) If you do want

[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the patch is not acceptable as is. The public attribute *defaultdict* should be explicitly documented as it is now, so that it is indexed. On the other hand, users should not directly call .__missing__, and it is not normal to document the

[issue22939] integer overflow in iterator object

2014-12-07 Thread Clement Rouault
Clement Rouault added the comment: Thanks for the comments. I corrected the patch and updated the test. I also added a test that check the behavior of setstate with negative indice. Just one question: __setstate__ must implement the same check. Why should __setstate__ check for

[issue9647] os.confstr() does not handle value changing length between calls

2014-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think that assert() is appropriate solution here. assert() is used to check internal logic, it shouldn't check conditions which rely on external world. Raising RuntimeError looks more appropriate to me. -- versions: -Python 2.6

[issue22939] integer overflow in iterator object

2014-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: __setstate__ should check that an index is not negative. All values from 0 to PY_SSIZE_T_MAX are acceptable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939

[issue22939] integer overflow in iterator object

2014-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, __setstate__ already handles negative indices. Then the patch LGTM. -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939

[issue23006] Improve the doc and indexing of adict.__missing__.

2014-12-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- keywords: +patch Added file: http://bugs.python.org/file37383/__missing__.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23006 ___

[issue23006] Improve the doc and indexing of adict.__missing__.

2014-12-07 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23006 ___ ___ Python-bugs-list

[issue23007] Unnecessary big intermediate result in Lib/bisect.py

2014-12-07 Thread Sergey Litvinov
New submission from Sergey Litvinov: Bisection algorithms use mid = (lo+hi)//2 Textbook formula is mid = (hi-lo)//2 + lo See http://en.wikipedia.org/w/index.php?title=Binary_search_algorithmoldid=634658510#Arithmetic For vanilla lists and integers it is not a problem but one can run into

[issue1225584] crash in gcmodule.c on python reinitialization

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing since the initial problem has been fixed and there is no known current problem to fix. If someone does discover one, they can reopen or, probably better, open a new issue. -- resolution: - fixed stage: test needed - resolved status:

[issue1425127] os.remove OSError: [Errno 13] Permission denied

2014-12-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - out of date stage: test needed - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1425127 ___

[issue18305] [patch] Fast sum() for non-numbers

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sergey, please stop calling the current documented behavior a bug. https://docs.python.org/3/library/functions.html#sum says 'The iterable‘s items are normally numbers ... To concatenate a series of iterables, consider using itertools.chain(). To make a

[issue19451] urlparse accepts invalid hostnames

2014-12-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - wont fix stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19451 ___

[issue22959] http.client.HTTPSConnection checks hostname when SSL context has check_hostname==False

2014-12-07 Thread zodalahtathi
zodalahtathi added the comment: Thank you -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22959 ___ ___ Python-bugs-list mailing list

[issue19846] Python 3 raises Unicode errors with the C locale

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since Viktor's alternative in #19977 has been applied, should this issue be closed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___

[issue20866] segfailt with os.popen and SIGPIPE

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does anyone disagree with closing this as Won't fix'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866 ___

[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: May we close this as superceded by pep467? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___

[issue21427] Windows installer: cannot register 64 bit component

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am following Martin's suggestion that there is no actionable issue here and that new issues be opened with new details if and when available. -- components: +Installation, Windows resolution: - third party stage: - resolved status: open - closed

[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2014-12-07 Thread Ethan Furman
Ethan Furman added the comment: Superseded by PEP467. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___

[issue9882] abspath from directory

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://mail.python.org/pipermail/python-ideas/2014-July/028382.html is the thread. No surge of support. -- resolution: - rejected stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23007] Unnecessary big intermediate result in Lib/bisect.py

2014-12-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +mark.dickinson, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23007 ___ ___

[issue20866] segfailt with os.popen and SIGPIPE

2014-12-07 Thread R. David Murray
R. David Murray added the comment: I agree it should be closed. Rewrite the IO system was done, and it was even backported to 2.x...it just isn't the default there. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2014-12-07 Thread Steve Dower
Steve Dower added the comment: Added cp35 (and later cp36, etc.) to the tag, so now it looks similar to PEP 425 without the ABI tag (ironically, since there's fundamentally no difference between the Python version and the ABI). cp3 is also accepted for stable ABI extensions that still need a

[issue23008] pydoc enum.{,Int}Enum fails

2014-12-07 Thread Antony Lee
New submission from Antony Lee: Not a big deal, but $ pydoc enum.Enum and $ pydoc enum.IntEnum fail to retrieve the docstrings, while they are visible with $ pydoc enum. -- components: Library (Lib) messages: 232298 nosy: Antony.Lee priority: normal severity: normal status: open title: