[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Geoff. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 ___ Python tracker

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thanks for this work Martin. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker

[issue19377] Backport SVG mime type to Python 2

2016-04-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag resolution: -> fixed status: open -> closed versions: -Python 2.6 ___ Python tracker

[issue19377] Backport SVG mime type to Python 2

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43a6e7104b78 by Berker Peksag in branch '2.7': Issue #19377: Add .svg to mimetypes.types_map https://hg.python.org/cpython/rev/43a6e7104b78 -- nosy: +python-dev ___ Python tracker

[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e704e0786332 by Berker Peksag in branch '2.7': Issue #13952: Add .csv to mimetypes.types_map https://hg.python.org/cpython/rev/e704e0786332 -- ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ed3cb699be6 by Berker Peksag in branch '2.7': Issue #16329: Add .webm to mimetypes.types_map https://hg.python.org/cpython/rev/6ed3cb699be6 -- ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0327a5a11108 by Berker Peksag in branch '3.5': Issue #16329: Add .webm to mimetypes.types_map https://hg.python.org/cpython/rev/0327a5a11108 New changeset f92e6785b9f0 by Berker Peksag in branch 'default': Issue #16329: Add .webm to

[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 711672506b40 by Berker Peksag in branch '3.5': Issue #13952: Add .csv to mimetypes.types_map https://hg.python.org/cpython/rev/711672506b40 New changeset 5143f86ffe57 by Berker Peksag in branch 'default': Issue #13952: Add .csv to

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks Victor and Serhiy. Сoccinelle looks like a useful tool, but I'm not planning to touch modules that I don't know well enough. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset b72f2d699563 by Berker Peksag in branch 'default': Issue #26687: Use Py_RETURN_NONE macro in sqlite3 module https://hg.python.org/cpython/rev/b72f2d699563 -- nosy: +python-dev ___ Python tracker

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file42408/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Patch with the outstanding change for const, plus an extra fix under the main description. -- Added file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Martin Panter
Martin Panter added the comment: The docs buildbot is complaining: http://buildbot.python.org/all/builders/Docs%203.x/builds/1156/steps/lint/logs/stdio [2] whatsnew/3.6.rst:199: default role used I guess this is complaining about the `__enter__()` syntax with back-ticks. Maybe it should be

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread SilentGhost
Changes by SilentGhost : -- nosy: +brett.cannon type: -> behavior versions: +Python 3.5 ___ Python tracker ___

[issue23397] PEP 431 implementation

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Closing this since the PEP has been withdrawn. See https://www.python.org/dev/peps/pep-0431/#withdrawal for details. -- resolution: -> postponed stage: needs patch -> resolved status: open -> closed ___ Python

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks for your comments Serhiy; here is an update -- Added file: http://bugs.python.org/file42406/split-strip.v2.patch ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Forgot to remove the pyver code (leaning a bit too much on pre-commit) -- Added file: http://bugs.python.org/file42405/patch ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks, this version looks pretty good to me. -- ___ Python tracker ___ ___

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Updates after review. -- Added file: http://bugs.python.org/file42404/patch ___ Python tracker ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread Kevin Modzelewski
New submission from Kevin Modzelewski: The super() __init__ function fills in the fields of a super object without checking if they were already set. If someone happens to call __init__ again, the previously-set references will end up getting forgotten and leak memory. For example: import

[issue13207] os.path.expanduser breaks when using unicode character in the username

2016-04-08 Thread Arkady “KindDragon” Shapkin
Arkady “KindDragon” Shapkin added the comment: At least Python 2.7 should return in locale.getpreferredencoding() encoding -- nosy: +Arkady “KindDragon” Shapkin ___ Python tracker

[issue26257] Eliminate buffer_tests.py

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks for you help with this Serhiy. Instead of your fixfillchartype(), I went with special “if self.type2test is bytearray” checks in the common tests. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Martin Panter
Martin Panter added the comment: I was going to say your original fix was the reverse of a change in r86146. But you seem to be fixing the problems before I express them :) For the fix I would suggest something like unquote(path, "latin-1") would be simpler. I left some other review comments

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2016-04-08 Thread Dan Mick
Dan Mick added the comment: So the original author of the code says it's "likely no longer relevant", and it's clearly wrong, but no one has touched this in six years? Even moving the "linker[i] = self.compiler_cxx[i]" inside the if that checks for "env" would *still* limit the exposure of

[issue1103213] Adding a recvexactly() to socket.socket: receive exactly n bytes

2016-04-08 Thread Paul Sokolovsky
Changes by Paul Sokolovsky : -- nosy: +pfalcon ___ Python tracker ___ ___

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Oops, broke b'/%80'. Here's a better fix that now takes: (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)-> b'\xc2\x80' -(decode latin1)-> u'\xc2\x80' to: (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode latin1) -> b'\x80'

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Brett Cannon
Brett Cannon added the comment: I simplified Wolfgang's patch by simply using os.path.exists(). That eliminated the one place where os.path.isdir() was in use that was too specific to directories where files were reasonable to expect. I also quickly tweaked the docs for the site module in

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 09dc97edf454 by Brett Cannon in branch '3.5': Issue #26587: Remove an incorrect statement from the docs https://hg.python.org/cpython/rev/09dc97edf454 New changeset 94d5c57ee835 by Brett Cannon in branch 'default': Merge w/ 3.5 for issue #26587

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd1af1a97c2e by Brett Cannon in branch 'default': Issue #26587: Allow .pth files to specify file paths as well as https://hg.python.org/cpython/rev/bd1af1a97c2e -- nosy: +python-dev ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: A few typos in my previous comment, pressed enter too quickly, here's an updated comment: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'/\xc2\x80' -- The issue being the latin1 decoded

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
New submission from Anthony Sottile: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as UTF-8 and then decoded as latin1 (on the wire) b'\x80' -(decode

[issue26716] EINTR handling in fcntl

2016-04-08 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +haypo, neologix, twouters versions: +Python 3.6 ___ Python tracker

[issue26716] EINTR handling in fcntl

2016-04-08 Thread Jack Zhou
New submission from Jack Zhou: According to PEP 475, standard library modules should handle EINTR, but this appears to not be the case for the fcntl module. Test script: import fcntl import signal import os def handle_alarm(signum, frame): print("Received alarm in process

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-08 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d214b30e8ef0 by Brett Cannon in branch 'default': Issue #26668: Remove the redundant Lib/test/test_importlib/regrtest.py https://hg.python.org/cpython/rev/d214b30e8ef0 -- nosy: +python-dev ___ Python

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: hah, i should've tested this in an up to date client. :) -- ___ Python tracker ___

[issue26715] can not deactivate venv (deactivate.bat) if the venv was activated by activate.ps1.

2016-04-08 Thread Zachary Ware
Zachary Ware added the comment: Activate.ps1 creates a 'deactivate' function, just like activate.*sh on UNIX. deactivate.bat is an implementation detail, because Windows cmd does not support functions. In any activated venv on any platform, simply doing `deactivate` should work to

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks to everyone for the feedback! I will now go backport this to python/typing on GitHub. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 841a263c0c56 by Brett Cannon in branch 'default': Issue #25609: Introduce contextlib.AbstractContextManager and https://hg.python.org/cpython/rev/841a263c0c56 -- nosy: +python-dev ___ Python tracker

[issue26715] can not deactivate venv (deactivate.bat) if the venv was activated by activate.ps1.

2016-04-08 Thread Giga Image
New submission from Giga Image: Win10/Python 3.5.1 If virtual environment was activated using powershell script, it can not deactivate the environment using only provided deactivate.bat. Pre-condition : Virtual environment already in place. 1. Open elevated Powershell (Administrator access).

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread SilentGhost
SilentGhost added the comment: issue25485 seem to have addressed this. -- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue21048] Index 'as' in import and with statements

2016-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Three -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25544] cleanup temporary files in distutils.has_function

2016-04-08 Thread SilentGhost
SilentGhost added the comment: Here is the review-able patch. -- Added file: http://bugs.python.org/file42400/minrk_issue25544.diff ___ Python tracker

[issue25544] cleanup temporary files in distutils.has_function

2016-04-08 Thread Min RK
Min RK added the comment: update patch to use file context manager on temporary source file it should apply cleanly on current default (778ccbe3cf74) -- Added file: http://bugs.python.org/file42399/0001-cleanup-tempfiles-in-has_function.patch ___

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: Telnet instances should support the context manager protocol so they can be used in with statements. >>> import telnetlib >>> with telnetlib.Telnet('192.168.86.7') as tn: ... pass ... Traceback (most recent call last): File "", line 1, in

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread R. David Murray
R. David Murray added the comment: If it turns out it is just a doc issue we can reopen this to address that. -- ___ Python tracker ___

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with David here, this isn't a bug tracker level issue. But, to the specifics of your example, it already works: Python 3.6.0a0 (default:9095a5787a82+, Feb 5 2016, 18:24:55) [GCC 5.2.1 20151010] on linux Type "help", "copyright", "credits" or "license"

[issue18461] X Error in tkinter

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened Tk ticket: http://core.tcl.tk/tk/tktview/bffa794b1b50745e0cf81c860b0bcbf36ccfb21a . -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread R. David Murray
R. David Murray added the comment: This is not a topic appropriate for the bug tracker. Please bring it up on python-ideas, after reviewing the PEP (which probably addresses the reason the design is the way it is, but there may be additional concerns that arise from practical experience with

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
Changes by flying sheep : -- type: -> behavior versions: +Python 3.6 ___ Python tracker ___

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
New submission from flying sheep: code inside of the braces of an f-literal should have the exact same lexing rules than outside *except* for an otherwise unparsable !, :, or } signifying the end of the replacement field 1. every other language with template literals has it that way 2. it

[issue26693] Exception ignored in: in _shutdown, assert tlock.locked()

2016-04-08 Thread skydoom
Changes by skydoom : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2016-04-08 Thread Erwin Mayer
Erwin Mayer added the comment: Regarding the issues mentioned in https://github.com/simplejson/simplejson/issues/77, they already apply with the current implementation anyway (true is serialized as 'true'), so users must already be careful. The JSONEncoder with default parameters could

[issue22993] Plistlib fails on certain valid plist values

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An issue with out of range timestamps was resolved in issue26709. -- ___ Python tracker ___

[issue26709] Year 2038 problem in plistlib

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Ronald. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26709] Year 2038 problem in plistlib

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba35b0404163 by Serhiy Storchaka in branch '3.5': Issue #26709: Fixed Y2038 problem in loading binary PLists. https://hg.python.org/cpython/rev/ba35b0404163 New changeset 778ccbe3cf74 by Serhiy Storchaka in branch 'default': Issue #26709: Fixed

[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The size of UID data is just tokenL + 1, not self._get_size(tokenL + 1). FYI, the code for support UIDs and other types was proposed in issue14455, but was excluded from the final patch. -- ___ Python tracker

[issue26711] Fix comparison of plistlib.Data

2016-04-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file42398/plistlib_data_eq_2.patch ___ Python tracker ___

[issue26711] Fix comparison of plistlib.Data

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> import plistlib >>> class MyData(bytes): ... def __eq__(self, other): ... if isinstance(other, plistlib.Data): ... return super().__eq__(other.value) ... return False ... >>> plistlib.Data(b'x') == MyData(b'x') True If use

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also https://github.com/simplejson/simplejson/issues/42 https://github.com/simplejson/simplejson/issues/100 https://github.com/simplejson/simplejson/issues/103 And allowing non-string keys leads to other issue:

[issue26711] Fix comparison of plistlib.Data

2016-04-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't understand the explicit use of __eq__ in the bytes case. Why is that needed? -- ___ Python tracker ___

[issue26709] Year 2038 problem in plistlib

2016-04-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26707] plistlib fails to parse bplist with 0x80 UID values

2016-04-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: How can you create plist files that contain UID values using Apple's APIs? The plist library is meant to be interoperable with files created using Apple's APIs for creating plist files, and I didn't find an API that created UID values at the time.

[issue25339] sys.stdout.errors is set to "surrogateescape"

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Making "PYTHONIOENCODING=ascii" to mean "PYTHONIOENCODING=ascii:surrogateescape" is different (and may be more complex) issue. What error handler should use open(name, encoding='ascii')? open(name) in POSIX locale? This issue is about incorrect working of

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2016-04-08 Thread Berker Peksag
Changes by Berker Peksag : -- assignee: docs@python -> components: -Documentation versions: -Python 3.4 ___ Python tracker

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. -- ___ Python tracker ___ ___

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2016-04-08 Thread Erwin Mayer
Erwin Mayer added the comment: Will this be merged? I also believe it is an unexpected behavior to not serialize dictionary keys when the default option is used. -- nosy: +Erwin Mayer ___ Python tracker

[issue25339] sys.stdout.errors is set to "surrogateescape"

2016-04-08 Thread Nick Coghlan
Nick Coghlan added the comment: I believe the problem may be that we can't readily tell the difference between "PYTHONIOENCODING=ascii" and "PYTHONIOENCODING=ascii:strict", and in the former case we'd ideally still end up using "surrogateescape" by default. That said, the real intent of the

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Martin Panter
New submission from Martin Panter: This follows on from Issue 26257, where I moved tests for these string/bytes methods into a more common class. So this patch merges and removes some existing tests from test_bytes.py that cover the same ground. I copied a couple tests to the common class

[issue26703] Socket state corrupts when original socket object goes out of scope in a different thread

2016-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: No need to apologize :) Perhaps we need to make the docs a bit clearer. -- ___ Python tracker ___

[issue26703] Socket state corrupts when original socket object goes out of scope in a different thread

2016-04-08 Thread JoshN
JoshN added the comment: Josh/Martin/Antoine: Thank you for the tips - I was not aware of the underlying mechanics, especially the separate abstraction layers. I did RTFM up and down before posting this, to be sure. My apologies for the inconvenience. --