[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-07-01 Thread Berker Peksag
Berker Peksag added the comment: The patch needs tests and documentation. > +parser.add_argument('--no-ensure-ascii', action='store_true', > default=False, I'd go with ``action='store_false', default=True``. -- nosy: +berker.peksag stage: -> patch review

[issue27430] Spelling fixes

2016-07-01 Thread Ville Skyttä
Changes by Ville Skyttä : -- files: spelling.patch keywords: patch nosy: scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file: http://bugs.python.org/file43597/spelling.patch ___ Python tracker

[issue27430] Spelling fixes

2016-07-01 Thread SilentGhost
Changes by SilentGhost : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> patch review versions: +Python 3.5, Python 3.6 ___ Python tracker _

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-01 Thread Steve Piercy
Steve Piercy added the comment: Patch attached for review. Notes: - I built the docs using Sphinx 1.4.1, whereas I think 1.3.3 is in use in production. If you upgrade, you will need to specify the language for syntax highlighting, else you will get hundreds of these error messages: /Users/s

[issue27430] Spelling fixes

2016-07-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks. -- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior ___ Python tracker ___

[issue27430] Spelling fixes

2016-07-01 Thread Roundup Robot
New submission from Roundup Robot: New changeset ab6129af2a5c by Berker Peksag in branch '3.5': Issue #27430: Fix typos, patch by scop. https://hg.python.org/cpython/rev/ab6129af2a5c New changeset 97b22fe37af1 by Berker Peksag in branch 'default': Issue #27430: Merge from 3.5 https://hg.python.o

[issue27431] Shelve pickle version error

2016-07-01 Thread Sander Steffann
New submission from Sander Steffann: The "class shelve.Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8')" section still says "By default, version 0 pickles are used to serialize values.". This is incorrect. The default version has been 3 since this commit: https://hg.python.or

[issue27432] Unittest truncating of error message not works

2016-07-01 Thread Camilla Ke
New submission from Camilla Ke: Builtin assert methods output messages no matter how length is the output messages. However, content with exceeding length should be truncated. I found an error in the function. The function is safe_repr() in util.py if len(result) > _MAX_LENGTH, it should r

[issue27431] Shelve pickle version error

2016-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b2c3837f7833 by Berker Peksag in branch '3.5': Issue #27431: Update default protocol version in shelve.Shelf() documentation https://hg.python.org/cpython/rev/b2c3837f7833 New changeset 908b801f8a62 by Berker Peksag in branch 'default': Issue #27431

[issue27431] Shelve pickle version error

2016-07-01 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thanks for the report! 3.2, 3.3 and 3.4 are now in security-fix-only so their docs won't be updated. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior versions: -Python 3.2

[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-01 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue27433] Missing "as err" in Lib/socket.py

2016-07-01 Thread Tobias Burnus (PDF)
New submission from Tobias Burnus (PDF): Cf. https://hg.python.org/cpython/file/tip/Lib/socket.py#l261 In _sendfile_use_sendfile, one has: try: fsize = os.fstat(fileno).st_size except OSError: raise _GiveupOnSendfile(err) # not a regular

[issue27433] Missing "as err" in Lib/socket.py

2016-07-01 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 26384. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> UnboundLocalError in socket._sendfile_use_sendfile type: -> behavior ___

[issue27424] Failures in test.test_logging

2016-07-01 Thread INADA Naoki
INADA Naoki added the comment: Maybe, `socket.getfqdn()` returns non-ASCII string in your environment. smtpd.py has `-u` option which enables utf-8 support. smtpd.SMTPServer has enable_SMTPUTF8 option. test_logging.TestSMTPServer should enable this option. Could you test adding `enable_SMTPUTF8

[issue20770] Inform caller of smtplib STARTTLS failures

2016-07-01 Thread And Clover
And Clover added the comment: This is CVE-2016-0772 and appears to have been fixed properly with an exception here: https://hg.python.org/cpython/rev/d590114c2394 (py3) https://hg.python.org/cpython/rev/b3ce713fb9be (py2) -- resolution: -> fixed status: open -> closed ___

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread koobs
koobs added the comment: 3.3 is supported for security related fixes until September 2017 [1], but only 3.4, 3.5 and 2.7 have received the backport, reopen for outstanding merge [1] https://docs.python.org/devguide/#status-of-python-branches Update summary to reflect the RedHat CVE that was as

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread koobs
Changes by koobs : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26664] Misuse of $ in activate.fish of venv

2016-07-01 Thread László Károlyi
László Károlyi added the comment: +1 here, broken on homebrew cpython > 3.5.1 (a.k.a. 3.5.2) -- nosy: +karolyi ___ Python tracker ___

[issue26110] Speedup method calls 1.2x

2016-07-01 Thread INADA Naoki
INADA Naoki added the comment: Updated, based on 102241:908b801f8a62 -- nosy: +naoki Added file: http://bugs.python.org/file43599/call_method_2.patch ___ Python tracker ___ _

[issue26984] int() can return not exact int instance

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes int() always returning exact int. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43600/int_exact.patch ___ Python tracker

[issue27425] Tests fail because of git's newline preferences on Windows

2016-07-01 Thread R. David Murray
R. David Murray added the comment: Yes .gitattributes looks like the correct solution. The problem is that most of the text files we *want* git to transform per platform, it's just a few that we don't. Mercurial actually added support for this for us when we switched to it. -- nosy:

[issue26110] Speedup method calls 1.2x

2016-07-01 Thread INADA Naoki
INADA Naoki added the comment: Oops, previous patch doesn't update magic number in PC/launcher.c Should I update it? Or don't touch it to avoid additional conflicts? -- Added file: http://bugs.python.org/file43601/call_method_3.patch ___ Python track

[issue27417] Call CoInitializeEx on startup

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller : -- nosy: +theller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller : -- nosy: +theller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Xavier de Gaye
New submission from Xavier de Gaye: Cross-building the 3.6 source with PYTHON_FOR_BUILD using archlinux python 3.5.1 as found in PATH, fails with: _PYTHON_PROJECT_BASE=/home/xavier/src/android/pyona/build/python3.6-android-21-x86 _PYTHON_HOST_PLATFORM=linux-x86 PYTHONPATH=/home/xavier/src/pac

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-07-01 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: > The patch needs tests and documentation. Ok, I'll update it later. >> +parser.add_argument('--no-ensure-ascii', action='store_true', >> default=False, >I'd go with ``action='store_false', default=True``. If I'm not misreading your comment, this will chan

[issue27432] Unittest truncating of error message not works

2016-07-01 Thread R. David Murray
R. David Murray added the comment: This is by design. The short option was introduced to use in specific asserts (assertDictEqual and assertMultilineEqual; see 8b8701551253). These were later enhanced to do an even better job of abbreviating the output usefully, but the short option on safe_

[issue27213] Rework CALL_FUNCTION* opcodes

2016-07-01 Thread Demur Rumed
Demur Rumed added the comment: callfunc3 addresses most feedback. Doesn't address _PyEval_EvalCodeWithName2 code bloat, & I disagree with mentioning BUILD_MAP_UNPACK_WITH_CALL change in magic number update as the ABI of BUILD_MAP_UNPACK_WITH_CALL is unchanged. ie if we were to implement #27358

[issue27424] Failures in test.test_logging

2016-07-01 Thread R. David Murray
R. David Murray added the comment: Domain names should never have non-ascii in them. They should be IDNA encoded. There is a known problem where Windows will return non-ascii domain names if the local hostname is configured naively (see issue 9377). SMTPUTF8 might be a workaround in smtpd's

[issue20770] Inform caller of smtplib STARTTLS failures

2016-07-01 Thread R. David Murray
Changes by R. David Murray : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Matthias Klose
Matthias Klose added the comment: yes, I think we have to limit the choice of the interpreter for the build to the same major version. -- ___ Python tracker ___

[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62375fd21de8 by Serhiy Storchaka in branch 'default': Issue #27007: The fromhex() class methods of bytes and bytearray subclasses https://hg.python.org/cpython/rev/62375fd21de8 -- nosy: +python-dev ___ Py

[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue27435] ctypes and AIX - also for 2.7.X (and later)

2016-07-01 Thread aixtools
New submission from aixtools: I am opening a new issue # - about the same problem described in 26439, but now calling it a bug rather than a behavior change. Then I did not know better - all was new, and as the "new" kid I felt uncomfortable calling it a bug - when maybe it was just behavior I

[issue26765] Factor out common bytes and bytearray implementation

2016-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0087e17cd5e by Serhiy Storchaka in branch 'default': Issue #26765: Moved wrappers for bytes and bytearray methods to common header https://hg.python.org/cpython/rev/b0087e17cd5e -- ___ Python tracker

[issue22724] byte-compile fails for cross-builds

2016-07-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: Adding -E to PYTHON_FOR_BUILD fixes the x86_64 install because in my Android cross-build setup, the native interpreter is built from the same source tree as the cross-build. However, currently the interpreter used for the cross-build may be any interpreter fou

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley
New submission from David Beazley: Not so much a bug, but an observation based on reviewing the implementation of the selectors.KqueueSelector class. In that class there is the select() method: def select(self, timeout=None): timeout = None if timeout is None else max(timeo

[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Zachary Ware
Zachary Ware added the comment: I get one test failure: ERROR: test_u (__main__.Unicode_TestCase) -- Traceback (most recent call last): File "P:\ath\to\cpython\lib\test\test_getargs2.py", line 782, in test_u self.assertEqu

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-01 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Steve! Since this is a bug fix I may take until after 3.6b1 goes out to get reviewed and committed since I need to get any semantic changes in before then (b1 is due out in Sep). So if this patch lingers for a couple months, that will be wh

[issue27079] Bugs in curses.ascii predicates

2016-07-01 Thread Akira Li
Akira Li added the comment: I'm not sure anything should be done (e.g., it is "undefined behavior" to pass a negative value such as CHAR_MIN (if *char* type is signed) to a character classification function in C. Though EOF value (-1 traditionally) should be handled). If you want to explore i

[issue27337] 3.6.0a2 tarball has weird paths

2016-07-01 Thread Nick Timkovich
Nick Timkovich added the comment: In pyenv this was "fixed" by pointing to the .tar.xz archive instead of the .tgz https://github.com/yyuu/pyenv/pull/652, maybe you could implement that for Pythonz? -- nosy: +nicktimko -ned.deily, petere ___ Python

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: With this patch, cross-building the 3.6 source with only python 3.5.1 on the PATH, produces the following configure error: checking for python interpreter for cross build... configure: error: python3.6 interpreter not found -- keywords: +patch s

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang
Xiang Zhang added the comment: EVENT_* and KQ_FILTER_* are two different sets of constants. EVENT_* represent event types of the abstract event and KQ_FILTER_* represent the kevent filter type. EVENT_* can be combined while kevent.filter can only get one type. -- nosy: +xiang.zhang __

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang
Xiang Zhang added the comment: What I am saying is that EVENT_* (1, 2) are bit_masks while KQ_FILTER_* not (-1, -2, -3, -4). So you should use |= with EVENT_* and == with KQ_FILTER_*. It seems not a bug. :) -- ___ Python tracker

[issue20104] expose posix_spawn(p)

2016-07-01 Thread Danek Duvall
Danek Duvall added the comment: Oh, for what it's worth, Solaris added setsid support to posix_spawn a few years ago, as a result of this conversation. I still think it would be worthwhile supporting this in the stdlib, since we keep running into processes which have a lot of memory reserved

[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: An important feature of IDLE is that it has default configuration values in idlelib/config-xyz.def files that can be overriden by user values in $HOME/.idlerc/config-xyz.cfg files. IDLE should run and tests should pass both without and with user overrides. I

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley
David Beazley added the comment: If the KQ_FILTER constants aren't bitmasks, it seems that the code could be simplified to the last version then. At the least, it would remove a few unnecessary calculations.Again, a very minor thing (I only stumbled onto it by accident really). -

[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Being able to force a rereading of user files from the menu could also be useful for manual testing or after a user fixes a problem. -- ___ Python tracker

[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't believe that buildbots have an accessible $HOME that can be written to. In any case, tests of writing user config files should use StringIOs. -- ___ Python tracker __

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang
Xiang Zhang added the comment: But EVENT_* are. If you use =, events can only be either EVENT_READ or EVENT_WRITE, not EVENT_READ & EVENT_WRITE. EVENT_* != KQ_FILTER_*. -- ___ Python tracker __

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley
David Beazley added the comment: I don't see any possible way that you would ever get events = EVENT_READ | EVENT_WRITE if the flag is a single value (e.g., KQ_FILTER_READ) and the flag itself is not a bitmask. Only one of those == tests will ever be True. There is no need to use |=. Unles

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Demur Rumed
Demur Rumed added the comment: Xiang: pause a moment to read the code being discussed. event before the |= is 0. You're saying flag must READ xor WRITE xor neither. Then only one if can be taken. Therefore events |= EVENT_* will always happen with events == 0, therefore it can be events = EVEN

[issue27173] Modern Unix key bindings for IDLE

2016-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Seems to be working correctly now, so I will review the code in detail. I will look into extracting a common get_theme_keys function and editing the long docstring currently attached to CurrentTheme. I want to look at paired functions in configdialog, such a

[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang
Xiang Zhang added the comment: Oh, sorry. My focus seem to be on the wrong place. I thought David is arguing something about the constants are bitmasks or not. It's my fault. But actually the current code looks very clearly and I can tell from it that EVENT_* are bitmasks and KQ_FILTER_* are n

[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30099abdb3a4 by Serhiy Storchaka in branch '2.7': Issue #23908: os functions, open() and the io.FileIO constructor now reject https://hg.python.org/cpython/rev/30099abdb3a4 -- ___ Python tracker

[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Zachary. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27213] Rework CALL_FUNCTION* opcodes

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The ABI of BUILD_MAP_UNPACK_WITH_CALL is changed. oparg=514 meant merging 2 dicts, but with the patch it will mean merging 514 dicts. The INCREF/DECREF calls on function objects surrounding calls are not needed, because the refcount was increased when the fu

[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: In "debug = False+1', I presume the '+1' is just temporary. The debug property and the clinic file refer to _tkinter.tkapp.get/settrace, which do not exist. Did you just forget to include that part? Or does 'preliminary' mean 'do not test yet'? >>> import t

[issue27173] Modern Unix key bindings for IDLE

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After committing the patch for this issue I'm going to refactor the code related to getting/setting theme/keys settings. For now it is too complicated, the logic is scattered between two files, some code is duplicated. -- ___

[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You need to recompile the _tkinter module. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27427] Add new math module tests

2016-07-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +mark.dickinson, rhettinger, stutzbach title: Math tests -> Add new math module tests ___ Python tracker ___

[issue26885] Add parsing support for more types in xmlrpc

2016-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Terry. You can pass an integer in range from -2147483648 to 2147483647, and it is marshalled using the tag. But when you receive tags , , etc, they are unmarshalled to integer values, and these values can be out of range from -214

[issue17128] OS X system openssl deprecated - installer should build local libssl

2016-07-01 Thread Kevin Ollivier
Kevin Ollivier added the comment: The OpenSSL included with OS X, still at 0.9.8, has become very dated and a growing number of servers (including openssl.org) now fail the handshake because they no longer support any of the protocols and ciphers included with that build. It is reaching the po

[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just noticed that the patch includes a patch to _tkinter.c, which however, does not show up on the Rietveld dashboad, where I first reviewed it. Sorry for the mistaken comment. -- ___ Python tracker

[issue27438] Refactot simple iterators implementation

2016-07-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The implementation of iterators for str, bytes, bytearray, tuple and list is virtually the same. Proposed patch moves common code to the template file iterlib.h and parametrizes it with few macros. The patch decreases the number of source lines by 600. M

[issue27438] Refactor simple iterators implementation

2016-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Refactot simple iterators implementation -> Refactor simple iterators implementation ___ Python tracker ___ _