[issue35559] Optimize base64.b16decode to use compiled regex

2018-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How this affects the import time (use -X importtime)? -- ___ Python tracker ___ ___ Python-bugs

[issue35469] [2.7] time.asctime() regression

2018-12-21 Thread Antti Haapala
Antti Haapala added the comment: C11 specifies the format used by asctime as being exactly "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", which matches the *new* output with space padding, less the newline. As always, Microsoft got it wrong: https://docs.microsoft.com/en-us/cpp/c-runtime-library/

[issue35559] Optimize base64.b16decode to use compiled regex

2018-12-21 Thread Stefan Behnel
Stefan Behnel added the comment: One regex related code pattern that I generally like is to assign bound methods to good names and use those. In this case, I would write _has_non_base16_digits = re.compile(b'[^0-9A-F]').search ... if _has_non_base16_digits(s): raise ... -- nosy:

[issue35559] Optimize base64.b16decode to use compiled regex

2018-12-21 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I came across this as a result of issue35557 and thought to make a new issue to keep the discussion separate. Currently the b16decode function uses a regex with re.search that can be compiled at the module level as a static variable to give up to

[issue35557] Allow lowercase hexadecimal characters in base64.b16decode()

2018-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is compatibility breaking change. Furthermore, it changes the purposed behavior that was from the initial version (4c904d1bf71d01bc22fbb123493f975050560e9c). Since currently there is an option which allows to accept lowercase hexadecimal characters,

[issue35555] IDLE: Gray out Code Context on non-editor windows

2018-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR 11282 should have been listed above. -- stage: -> patch review ___ Python tracker ___ ___ Pyt

[issue22703] Idle Code Context menu entrie(s)

2018-12-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue22703] Idle Code Context menu entrie(s)

2018-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Both pr-11214 and the pr-11286 (3.7 backport, not listed below) have been merged. Tal: I am pretty sure the Options menu should continue to work on Macs, but a test to verify would be helpful. -- nosy: +taleinat

[issue35557] Allow lowercase hexadecimal characters in base64.b16decode()

2018-12-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. A couple of points as below : * This changes the interface of the function by removing a parameter. Thus it will break compatibility with Python 2 and also earlier versions of Python 3. Removing a parameter in the signature

[issue35549] Add globbing to unicodedata.lookup

2018-12-21 Thread Roman Inflianskas
Roman Inflianskas added the comment: I like your proposal with globbing, steven.daprano. I updated the title. -- title: Add partial_match: bool = False argument to unicodedata.lookup -> Add globbing to unicodedata.lookup ___ Python tracker

[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2018-12-21 Thread Vinay Sajip
Vinay Sajip added the comment: See also bpo-35558. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue35558] venv: running activate.bat gives ' parameter format not correct - 65001'

2018-12-21 Thread Vinay Sajip
Vinay Sajip added the comment: This seems related to bpo-32409. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue35530] Counter-intuitive logging API

2018-12-21 Thread Vinay Sajip
Vinay Sajip added the comment: > If this behaviour can't be changed for backwards compatibility reasons, then > so be it. It can't be changed for this reason. > But I think it would be disingenuous to claim it's not a design flaw. Do you think *I'm* being disingenuous, Mark? I don't mean to

[issue35485] Mac: tkinter windows turn black while resized

2018-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, as Ned explains above, there seem to be no really good options for the upcoming releases on Mac. The *ed paragraph below has my best guess at to whether a Mac-IDLE user should install or ignore. --- Basic options A, to hold up the release (indefini

[issue35558] venv: running activate.bat gives ' parameter format not correct - 65001'

2018-12-21 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35558] venv: running activate.bat gives ' parameter format not correct - 65001'

2018-12-21 Thread Nils Lindemann
New submission from Nils Lindemann : Windows 7, Python 3.7.1:260ec2c36a after doing C:\python\python -m venv C:\myvenv and then C:\>myvenv\Scripts\activate.bat it prints parameter format not correct - 65001 However, it activates the venv - the prompt shows (myvenv) C:\>

[issue35557] Allow lowercase hexadecimal characters in base64.b16decode()

2018-12-21 Thread Dylan Houlihan
Change by Dylan Houlihan : -- keywords: +patch pull_requests: +10512 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35557] Allow lowercase hexadecimal characters in base64.b16decode()

2018-12-21 Thread Dylan Houlihan
New submission from Dylan Houlihan : Currently, the `base64` method `b16decode` does not decode a hexadecimal string with lowercase characters by default. To do so requires passing `casefold=True` as the second argument. I propose a change to the `b16decode` method to allow it to accept hexad

[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2018-12-21 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue35549] Add partial_match: bool = False argument to unicodedata.lookup

2018-12-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: Here's my implementation: from unicodedata import name from unicodedata import lookup as _lookup from fnmatch import translate from re import compile, I _NAMES = None def getnames(): global _NAMES if _NAMES is None: _NAMES = [] for i

[issue35549] Add partial_match: bool = False argument to unicodedata.lookup

2018-12-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I love the idea, but dislike the proposed interface. As a general rule of thumb, Guido dislikes "constant bool parameters", where you pass a literal True or False to a parameter to a function to change its behaviour. Obviously this is not a hard rule, there

[issue35548] memoryview needlessly (?) requires represented object to be hashable

2018-12-21 Thread Ilya Kulakov
Ilya Kulakov added the comment: True, but perhaps it's too strict to require both memoryview and the represented object to be immutable? The logic is as follows: Every object in Python can be seen as a view of some outside data (in memory, on disk etc.). And while Python's runtime may atte

[issue35387] Dialogs on IDLE are accompanied by a small black window

2018-12-21 Thread Ned Deily
Ned Deily added the comment: Using the current tip of Tk core-8-6-branch, I also now see the problem of the extra blank (not necessarily black) window appearing (also it looks like a blank window at least sometimes briefly appears and disappears when IDLE launches). This problem hasn't been

[issue35556] See if frozen modules can use relative imports

2018-12-21 Thread Brett Cannon
New submission from Brett Cannon : https://gregoryszorc.com/blog/2018/12/18/distributing-standalone-python-applications/ claims it doesn't work. -- components: Library (Lib) messages: 332314 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: See if

[issue35485] Mac: tkinter windows turn black while resized

2018-12-21 Thread Ned Deily
Ned Deily added the comment: At the moment, I am holding the 3.7.2 and 3.6.8 final releases for this and another unrelated regression. I don't want to hold up these releases for all platforms just for issues related to use of Tk, tkinter, and/or IDLE on macOS. There doesn't seem to be any

[issue33610] IDLE: Make multiple improvements to CodeContext

2018-12-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: For M3 - #3. -- dependencies: +IDLE: Gray out Code Context on non-editor windows ___ Python tracker ___ _

[issue35555] IDLE: Gray out Code Context on non-editor windows

2018-12-21 Thread Cheryl Sabella
New submission from Cheryl Sabella : M3 from #33610. Gray out menu entry when not applicable. -- assignee: terry.reedy components: IDLE messages: 332311 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Gray out Code Context on non-editor win

[issue35485] Mac: tkinter windows turn black while resized

2018-12-21 Thread Ned Deily
Ned Deily added the comment: Based on the discussion here and in Issue35387, I built and tested macOS installers for 3.7.2rc1+ and 3.6.8rc1+ using the current tip of the Tk core-8-6-branch (https://core.tcl.tk/tk/info/deb6ecc05e4202e3); I continued to build Tcl from the Tcl 8.6.9 release tar

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

2018-12-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: The OP commented on the PR that a feature close enough to the original request was being implemented in PEP562, so I will close this issue with that one as a superseder. -- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: o

[issue35554] Test

2018-12-21 Thread Ernest W. Durbin III
Change by Ernest W. Durbin III : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue35554] Test

2018-12-21 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: Test Reply On December 21, 2018 at 6:13:30 PM, Ernest W. Durbin III (rep...@bugs.python.org) wrote: New submission from Ernest W. Durbin III : Testing mailgateway -- messages: 332307 nosy: EWDurbin priority: normal severity: normal sta

[issue35554] Test

2018-12-21 Thread Ernest W. Durbin III
New submission from Ernest W. Durbin III : Testing mailgateway -- messages: 332307 nosy: EWDurbin priority: normal severity: normal status: open title: Test ___ Python tracker

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2018-12-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Mario, I will convert the unit test as a PR before closing the issue since I feel the test is a good one for inclusion and can help if dict order guarantee is changed in future. I will raise a backport PR to cabal's mock repo where the fix w

[issue35547] email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers

2018-12-21 Thread Martijn Pieters
Martijn Pieters added the comment: While RFC2047 clearly states that an encoder MUST not split multi-byte encodings in the middle of a character (section 5, "Each 'encoded-word' MUST represent an integral number of characters. A multi-octet character may not be split across adjacent 'encoded

[issue35552] Do not read memory past the specified limit in PyUnicode_FromFormat() and PyBytes_FromFormat()

2018-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +10510 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue35552] Do not read memory past the specified limit in PyUnicode_FromFormat() and PyBytes_FromFormat()

2018-12-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Format characters %s and %V in PyUnicode_FromFormat() and %s PyBytes_FromFormat() allow to limit the number of bytes read from the argument. For example PyUnicode_FromFormat("must be string, not '%.50s'", obj->ob_type->tp_name) will use not more than 50

[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2018-12-21 Thread twisteroid ambassador
twisteroid ambassador added the comment: Also I believe it's a good idea to change the arguments of _ensure_resolved() from (address, *, ...) to (host, port, *, ...), and go through all its usages, making sure we're not mixing host + port with address tuples everywhere in asyncio. -

[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2018-12-21 Thread twisteroid ambassador
twisteroid ambassador added the comment: I think the root cause of this bug is a bit of confusion. The "customer-facing" asyncio API, create_connection(), takes two arguments: host and port. The lower-level API that actually deal with connecting sockets, socket.connect() and loop.sock_connec

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2018-12-21 Thread Mario Corchero
Mario Corchero added the comment: I would suggest applying the fix with the latest version in mind to keep the codebase clean. If you want to backport it to previous versions of Python you can do it manually through a PR targetting the right branch. I think the process is to set up a label an

[issue35550] Some define guards for Solaris are wrong

2018-12-21 Thread Jakub Kulik
Change by Jakub Kulik : -- keywords: +patch pull_requests: +10509 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue35551] Encoding and alias issues

2018-12-21 Thread BLKSerene
New submission from BLKSerene : There're some minor issues about encodings supported by Python. 1. "tis260" is the alias for "tactis", where "tis260" might be a typo, which should be tis620. And "tactis" is not a supported encoding by Python (and I can't find any information about this encodin

[issue35550] Some define guards for Solaris are wrong

2018-12-21 Thread Jakub Kulik
New submission from Jakub Kulik : Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used. Our recent Solaris python build ended up skipping these sections resulting in some obvious problems. Defines s

[issue35549] Add partial_match: bool = False argument to unicodedata.lookup

2018-12-21 Thread Roman Inflianskas
New submission from Roman Inflianskas : I propose to add partial_match: bool = False argument to unicodedata.lookup so that the programmer could search Unicode symbols using partial_names. -- components: Unicode messages: 332283 nosy: ezio.melotti, rominf, vstinner priority: normal sev