[issue24117] Wrong range checking in GB18030 decoder.

2016-01-02 Thread Ezio Melotti
Ezio Melotti added the comment: Did you hear anything back from them? -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue24024] str.__doc__ needs an update

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python stage: -> needs patch type: -> enhancement versions: -Python 3.4 ___ Python tracker

[issue25959] tkinter - PhotoImage.zoom() causes segfault

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is enough just to update a docstring. Adding comprehensive RST documentation for Tkinter widgets is different issue. -- keywords: +patch Added file: http://bugs.python.org/file41473/tkinter_photo_zoom_doc.patch

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-02 Thread Richard PALO
Richard PALO added the comment: curiously enough, I was able to test with python3.5. The same errors result, and the same workaround seems to get over it. -- ___ Python tracker

[issue13814] Document why generators don't support the context management protocol

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: needs patch -> patch review versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker

[issue24117] Wrong range checking in GB18030 decoder.

2016-01-02 Thread Ma Lin
Ma Lin added the comment: I posted in a Taiwanese forum: https://groups.google.com/forum/#!forum/pythontw no reply yet. -- ___ Python tracker ___

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The similar problem in Python 3 was addressed in issue24230. But this was a new feature. As for lxml tests, I suggest to use bytes names compatible with all Windows OEM encodings (consisting of ASCII +

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that adding this new feature to list adds a pressure to add this feature to other mutable sequences (deque, ElementTree.Element, etc). This is a burden for maintainers. array already supports this feature as well as bytearray. It may be a difference

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2016-01-02 Thread desbma
desbma added the comment: Can this patch be merged, or is there something I can do to improve it? -- ___ Python tracker ___

[issue23560] Group the docs of similar methods in stdtypes.rst

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: -Python 3.4 ___ Python tracker ___ ___

[issue16927] Separate built-in types from functions and group similar functions in functions.rst

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: needs patch -> patch review versions: +Python 3.6 ___ Python tracker ___

[issue25993] Crashed when call time.time() after using _mm_xor_si64

2016-01-02 Thread Xiongzhi Gao
New submission from Xiongzhi Gao: The version of windows is Windows 7 Service Pack 1. The version of Python is 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32. The version of compiler in visual studio 10 is 16.00.40219.01 for 80x86. I try to use SWIG to

[issue4709] Mingw-w64 and python on windows x64

2016-01-02 Thread Ralf Gommers
Ralf Gommers added the comment: Hi all, There is now a much more concrete plan for the static MinGW-w64 based toolchain, and the first funding has materialized. Please see the announcement on the Numpy mailing list (http://article.gmane.org/gmane.comp.python.numeric.general/62207), the

[issue20008] Clean up/refactor/make discoverable test_decimal

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. The patch is slightly outdated, so I can't test it. -- ___ Python tracker ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-02 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: -petri.lehtinen ___ Python tracker ___ ___

[issue25983] Add tests for multi-argument type()

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is test_class, but it tests different things. There is test_metaclass, it contains doctests for class statements with metaclasses. -- ___ Python tracker

[issue16544] Add external link to ast docs

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: docs@python -> ezio.melotti versions: +Python 3.6 -Python 3.3, Python 3.4 ___ Python tracker

[issue24036] GB2312 codec is using a wrong covert table

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review ___ Python tracker ___ ___

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-02 Thread Richard PALO
Richard PALO added the comment: This turns out to be related to the locale environment set to 'C'. A UTF-8 locale seems to get over the issue. A fellow pkgsrc colleague filed an issue with lxml already relating to that fact for the test suite (https://bugs.launchpad.net/lxml/+bug/1522052)

[issue25596] regular files handled as directories in the glob module

2016-01-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Avoid using private function glob.glob1() in msi module and tools ___ Python tracker

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2016-01-02 Thread Alessandro Cucci
Changes by Alessandro Cucci : Added file: http://bugs.python.org/file41476/doc.patch ___ Python tracker ___

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: loewis -> serhiy.storchaka ___ Python tracker ___

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For now there is only one place left that uses glob1(). Here is a patch that inlines glob1() in that place. -- components: -Demos and Tools, Windows stage: needs patch -> patch review versions: +Python 3.6 -Python 3.5 Added file:

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch for issue25596 removes glob1(), so we should get rid of its usage. -- priority: low -> normal ___ Python tracker

[issue25596] regular files handled as directories in the glob module

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general the patch LGTM. It allows to speed up glob by 5-10% in warn test. But much more gain we can achieve by using os.scandir(). Here are results of microbenchmarks: $ ./python -m timeit -s "from glob import glob" -- "glob('**/*', recursive=True)"

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread R. David Murray
R. David Murray added the comment: Mark, please don't close the issue. You raised a valid point, it got overlooked, but like I said I think Yuri will be interested in looking at it. This is a volunteer operation. -- ___ Python tracker

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread Mark Lawrence
Mark Lawrence added the comment: For the final time, *I* am the OP and not one of you could be bothered before so this remains closed. -- ___ Python tracker

[issue21815] imaplib truncates some untagged responses

2016-01-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54b36229021a by R David Murray in branch 'default': #21815: violate IMAP RFC to be compatible with, e.g., gmail https://hg.python.org/cpython/rev/54b36229021a -- nosy: +python-dev ___ Python tracker

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Lasse Schuirmann
New submission from Lasse Schuirmann: You can see this when importing the Flask `request` object in a file that is doctested. The `request` object will throw a RuntimeError when one tries to access any attribute. Doctest tries to `inspect.unwrap` all objects in the file in order to find out

[issue24104] Use after free in xmlparser_setevents (2)

2016-01-02 Thread Martin Panter
Martin Panter added the comment: Serhiy, you mentioned your Issue 24103 patch also fixes this. Should we close this one now as well, or is there more to do? -- nosy: +martin.panter ___ Python tracker

[issue1753718] base64 "legacy" functions violate RFC 3548

2016-01-02 Thread Martin Panter
Martin Panter added the comment: I was waiting for you to finish here to avoid any new merge conflicts. Now that you have committed your patch, I will try and work on mine in the next few days, and I am happy to update the doc strings at the same time. --

[issue21075] fileinput should use stdin.buffer for "rb" mode

2016-01-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset ded1336bff49 by R David Murray in branch '3.5': #22709: Use stdin as-is if it does not have a buffer attribute. https://hg.python.org/cpython/rev/ded1336bff49 -- ___ Python tracker

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread R. David Murray
R. David Murray added the comment: I think Yuri might be interested. -- assignee: docs@python -> yselivanov nosy: +r.david.murray, yselivanov stage: needs patch -> status: closed -> open type: enhancement -> ___ Python tracker

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread R. David Murray
R. David Murray added the comment: I'll leave it closed, but I don't think that is best for the community. -- assignee: yselivanov -> ___ Python tracker

[issue25996] Add support of file descriptor in os.scandir()

2016-01-02 Thread STINNER Victor
STINNER Victor added the comment: Supporting file descriptor was also discussed when pathlib.Path was designed, but there was similar questions on the lifetime of the file descriptor. (Who is able to close it? When? Is it ok to close it using os.close? etc.) --

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2016-01-02 Thread Martin Panter
Martin Panter added the comment: At the bottom of it suggests that this four-digit field width specifier is not portable. Does that also hold for the datetime version? It seems like a bad idea to recommend an unportable workaround

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Did anyone consider moving these near the “types” module, either directly > inside, or as a “types.abc” submodule? In my mind, these ABCs would fit > reasonably well there. They are related to built-in types, but do not have > built-in names. Big -1.

[issue25944] Type confusion in partial_setstate and partial_repr leads to control flow hijack

2016-01-02 Thread Martin Panter
Martin Panter added the comment: I presume you meant Issue 25945, also about partial_setstate(). Issue 25943 is about the bsddb module. -- nosy: +martin.panter superseder: Integer overflow in _bsddb leads to heap corruption -> Type confusion in partial_setstate and partial_call leads

[issue24024] str.__doc__ needs an update

2016-01-02 Thread Martin Panter
Martin Panter added the comment: Slightly easier to read version: >>> pprint(str.__doc__) ("str(object='') -> str\n" 'str(bytes_or_buffer[, encoding[, errors]]) -> str\n' '\n' 'Create a new string object from the given object. If encoding or\n' 'errors is specified, then the object must

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> needs patch status: closed -> open type: -> enhancement versions: +Python 3.5 ___ Python tracker

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread Mark Lawrence
Mark Lawrence added the comment: I am the OP, this stays closed. If you couldn't be bothered to reply before please raise a new issue. -- status: open -> closed ___ Python tracker

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: doctest doesn't crash -- it is a regular exception, not a crash. "Crash" means "Hard crashes of the Python interpreter – possibly with a core dump or a Windows error box." In other words, a segmentation fault or other low-level crash, not an exception. I'm

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread Mark Lawrence
Mark Lawrence added the comment: Clearly nobody is interested so closing. -- status: open -> closed versions: -Python 3.5 ___ Python tracker ___

[issue25609] Add a ContextManager ABC and type

2016-01-02 Thread Martin Panter
Martin Panter added the comment: What would your context manager base class do? I presume you supply a default __enter__() that does nothing, or perhaps just returns self. You mentioned having a default __exit__() but I am having trouble seeing how it would be useful. A context manager is

[issue21815] imaplib truncates some untagged responses

2016-01-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 53271aa4d84c by R David Murray in branch 'default': #21815: Make the doc change match what I actually did. https://hg.python.org/cpython/rev/53271aa4d84c -- ___ Python tracker

[issue10757] zipfile.write, arcname should be allowed to be a byte string

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: This bug is very old, any development on the subject. This issue is hitting me trying to port my project (rdiffweb) to python3. It received a lot of broken filename with invalid encoding and I need to create a meaningful Zip archive with it. Currently, it

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-02 Thread Martin Panter
Martin Panter added the comment: Did anyone consider moving these near the “types” module, either directly inside, or as a “types.abc” submodule? In my mind, these ABCs would fit reasonably well there. They are related to built-in types, but do not have built-in names. -- nosy:

[issue25994] File descriptor leaks in os.scandir()

2016-01-02 Thread STINNER Victor
STINNER Victor added the comment: Hi, If I recall correctly, this issue was discussed in the long review of os.scandir(): issue #22524. "os.scandir() opens a file descriptor and closes it only in its destructor." Hopefully, it's incorrect: it's closed when the iterator is exhausted. See how

[issue21815] imaplib truncates some untagged responses

2016-01-02 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue21815] imaplib truncates some untagged responses

2016-01-02 Thread R. David Murray
R. David Murray added the comment: I rewrote the comments, and I changed the name of the test helper class from GmailHandler to BracketFlagHandler, since this is not gmail specific. (There was a review comment about that that was missed, I guess). I've applied this only to 3.6 because there

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Lasse Schuirmann
Lasse Schuirmann added the comment: (Closed) issue at the flask repository of this: https://github.com/mitsuhiko/flask/issues/1680 Also IIRC this worked back with Python 3.4 but do not consider this a fact yet. (At least the tests ran on Fedora...) --

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: > Is the tarfile module designed to support bytes for file names in general? > The documentation doesn’t seem to mention bytes anywhere relevant. This seems > more like a new feature rather than a bug to me. I'm using bytes in Unix to represent a path. From

[issue22709] restore accepting detached stdin in fileinput binary mode

2016-01-02 Thread R. David Murray
R. David Murray added the comment: Hopefully 'better late than never' applies to this. Sigh. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue25813] co_flags section of inspect module docs out of date

2016-01-02 Thread Mark Lawrence
Changes by Mark Lawrence : -- status: open -> closed ___ Python tracker ___ ___

[issue6500] urllib2 maximum recursion depth exceeded

2016-01-02 Thread Berker Peksag
Berker Peksag added the comment: Thank you Ezio, I'll commit this tomorrow. -- assignee: jhylton -> berker.peksag ___ Python tracker ___

[issue25996] Add support of file descriptor in os.scandir()

2016-01-02 Thread STINNER Victor
STINNER Victor added the comment: Yeah, it was discussed when the PEP 471 was designed, but it was already hard to design os.scandir() without supporting fd as os.scandir() parameter. It's more complex because we have to handle the lifetime of the file descriptor especially if it's exposed in

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Martin Panter
Martin Panter added the comment: Is the tarfile module designed to support bytes for file names in general? The documentation doesn’t seem to mention bytes anywhere relevant. This seems more like a new feature rather than a bug to me. -- nosy: +martin.panter title: Tarfile.add with

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Martin Panter
Martin Panter added the comment: It looks like surrogate-escaped bytes should be supported thanks to Issue 8390, although this is not so useful if you use the “pax” format (which always uses UTF-8 internally). To generate a surrogate-escaped string, you can “decode” it with the following

[issue25994] File descriptor leaks in os.scandir()

2016-01-02 Thread Ben Hoyt
Ben Hoyt added the comment: I'm not sure this is actually a leak, because (looking at the code) ScandirIterator_close() is called not just in the destructor, but also at the end of iterating, just before raising StopIteration. Is the issue that if an exception is raised or you stop iterating

[issue21592] Make statistics.median run in linear time

2016-01-02 Thread Upendra Kumar
Upendra Kumar added the comment: This is my first attempt to contribute. I have used the Median of Medians with n/5 groups of 5 elements each. It has linear time complexity. But, still I am not sure about it, because constants may be high. Therefore, if anyone can please benchmark it with

[issue25994] File descriptor leaks in os.scandir()

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it's what I mean. Add methods close, __enter__ and __exit__ to the iterator. The scandir iterator is not just iterator, it is like file object. And as in file object, we perhaps have to emit a ResourceWarning in the destructor if close() or __exit__()

[issue23942] Explain naming of the patch files in the bug tracker

2016-01-02 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I use e.g. issue1234.diff and if further patches are needed I add an increasing suffix: issue1234-2.diff, issue1234-3.diff, etc. Since the name doesn't matter too much, I'm not sure it's worth documenting and/or enforcing a specific convention. --

[issue25348] Update pgo_build.bat to use --pgo flag for regrtest

2016-01-02 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch that folds PGO into PCbuild\build.bat (removing PCbuild\build_pgo.bat) and defaults to using "python -m test --pgo" for training. This should apply to all branches, but will need some slight adjustment for 2.7 (namely, s/-m test/-m

[issue23951] Update devguide style to use a similar theme as Docs

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue22623] Port Python to 3DS: micro kernel, homebrew, newlib (Missing guards for some POSIX functions)

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- status: open -> pending versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue21592] Make statistics.median run in linear time

2016-01-02 Thread Upendra Kumar
Upendra Kumar added the comment: This method can also be further used to implement multiselect functionality with slight changes in the nth-order function. -- ___ Python tracker

[issue24104] Use after free in xmlparser_setevents (2)

2016-01-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Use after free in xmlparser_setevents (1) ___ Python tracker

[issue23890] assertRaises increases reference counter

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch versions: +Python 3.6 ___ Python tracker

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2016-01-02 Thread Ezio Melotti
Ezio Melotti added the comment: > Also, using %4Y seems to consistently produce zero-padded values across > different platforms. Actually I was wrong. Based on some more testing I did on Linux and Windows 8 and the previous comments in this thread, it seems that, with 1 as year: * '%4Y' does

[issue22831] Use "with" to avoid possible fd leaks

2016-01-02 Thread Ezio Melotti
Ezio Melotti added the comment: Serhiy, what's the status of this? -- ___ Python tracker ___ ___

[issue25992] test_gdb fails

2016-01-02 Thread Ned Deily
Ned Deily added the comment: As you may know, GNU gcc and gdb have not been included in the standard development tools shipped with Apple as part of Xcode and the Command Line Tools for a number of releases, in favor of llvm/clang and lldb. So test_gdb is typically automatically skipped on

[issue25944] Type confusion in partial_setstate and partial_repr leads to control flow hijack

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, thank you Martin. -- ___ Python tracker ___ ___ Python-bugs-list

[issue22831] Use "with" to avoid possible fd leaks

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only the most important patch for the stdlib was committed. Patches for distutils, tests and tools are not committed still. fd_leaks_distutils.patch fd_leaks_tools1_2.patch fd_leaks_tools2_2.patch fd_leaks_tests1_2.patch fd_leaks_tests2_2.patch --