[issue27446] struct: allow per-item byte order

2017-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with the other reviewers. Am going to mark this as closed. If the need arises, just make multiple struct unpacks. -- nosy: +rhettinger stage: -> resolved status: open -> closed ___ Python tracker

[issue29908] Inconsistent crashing with an access violation

2017-03-25 Thread Cameron Mckain
Changes by Cameron Mckain : -- type: -> crash ___ Python tracker ___ ___

[issue29908] Inconsistent crashing with an access violation

2017-03-25 Thread Cameron Mckain
New submission from Cameron Mckain: Almost every time I attempt to run my Django server ("python manage.py runserver") from PyCharm, python.exe crashes with the error "Unhandled exception at 0x7647BD9E (ucrtbase.dll) in python.exe: 0xC005: Access violation reading location 0x03BF8000."

[issue29907] Unicode encoding failure

2017-03-25 Thread Robert Baker
New submission from Robert Baker: Using Python 2.7 (not IDLE) on Windows 10. I have tried to use a Python 2.7 program to print the name of Czech composer Antonín Dvořák. I remembered to add the "u" before the string, but regardless of whether I encode the caron-r as a literal character

[issue29906] Add callback parameter to concurrent.futures.Executor.map

2017-03-25 Thread Aron Bordin
New submission from Aron Bordin: I'm facing some situations where would be helpful to be able to add a default function callback when calling the Executor.map. So, when making calls with this command we could get the executor result easily. I think that we could provide a callback parameter

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +725 ___ Python tracker ___ ___

[issue29903] struct.Struct Addition

2017-03-25 Thread Martin Panter
Martin Panter added the comment: For the native alignment case (prefix code @), perhaps you can already use the “ctypes” module, which supports structures with more complicated embedded fields. For the the unaligned modes (prefixes =, <, > and !), I am a little sympathetic. In the past, I

[issue21071] struct.Struct.format is bytes, but should be str

2017-03-25 Thread Martin Panter
Martin Panter added the comment: A backwards-compatible way forward would be to preserve (and document) the “format” attribute as a byte string, and add a new attribute which is definitely a text string. Not sure of a good name; perhaps “Struct.text_format” or “format_str” is a start.

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +giampaolo.rodola, haypo, josiahcarlson, stutzbach, yselivanov ___ Python tracker ___

[issue29905] TypeErrors not formatting values correctly

2017-03-25 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, in both Lib/async/proactor_events.py and asynchat.py there's a comma where a % should be thereby not formatting the value correctly: TypeError('data argument must be byte-ish (%r)', type(data)) TypeError('data argument must be

[issue27446] struct: allow per-item byte order

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Martin. -- nosy: +mark.dickinson, meador.inge, serhiy.storchaka resolution: -> rejected ___ Python tracker

[issue10030] Patch for zip decryption speedup

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Brian, you requested tests, but PR 550 doesn't add new API and doesn't change the behavior of public API. No new tests are needed. -- nosy: +brian.curtin versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue27446] struct: allow per-item byte order

2017-03-25 Thread Martin Panter
Martin Panter added the comment: This seems too obscure to be worth supporting in the built-in library IMO. The use case loses one line of code but gains a more complicated structure format string. -- nosy: +martin.panter ___ Python tracker

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +724 ___ Python tracker ___ ___

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: I have two use cases for this feature: 1. struct a { int a; #ifdef VER2 unsigned int b; #endif } Now I may do: >>> ver1 = Struct("i") >>> ver2 = ver1 + Struct("I") 2. struct a { int a; union inner { int b; unsigned int c; }

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Sure, Serhiy, I'll make a PR in a bit. -- ___ Python tracker ___

[issue29904] Fix a number of error message typos

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to create a pull request? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2017-03-25 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Additional instances of this: - function indexOf of operator.py. - function _PySequence_IterSearch of abstract.c -- ___ Python tracker

[issue29904] Fix a number of error message typos

2017-03-25 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, the list I've currently found in .py files: - _pyio.py: ValueError("flush of closed file") ValueError("flush of closed file") "of" -> "on" for both. - configparser.py: ValueError("Required argument `source' not given.")

[issue29903] struct.Struct Addition

2017-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy that this proposal is likely to cause more problems than it solves. -- nosy: +rhettinger ___ Python tracker

[issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented

2017-03-25 Thread Steve Dower
Steve Dower added the comment: Sure, but you're proposing a change to a correctly documented (apart from the variable name) and released behavior. It can't be changed in 3.6, and I don't see a compelling reason to have different behavior in 3.7. --

[issue29903] struct.Struct Addition

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the purpose of this feature? Note that the layout of the structure consisting of two structures is not the same as the layout of the structure consisting of the same fields as separate structures. struct { struct { char a; short

[issue29720] potential silent truncation in PyLong_AsVoidPtr

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think there is a bug. There are several ways to get the integer representation of the pointer. PyLong_FromVoidPtr() is the most straightforward. From Python side id() uses it. printf("%p") is a way of getting string representation of the pointer,

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +723 ___ Python tracker ___ ___

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
New submission from Aviv Palivoda: I would like to suggest that the struct.Struct class will support addition. For example you will be able to do: >>> s1 = Struct(">L") >>> s2 = Struct(">B") >>> s3 = s1 + s2 >>> s3.format b">LB" -- components: Extension Modules messages: 290486 nosy:

[issue29899] zlib missing when --enable--optimizations option appended

2017-03-25 Thread Ned Deily
Ned Deily added the comment: --enable-optimizations does not exist in Python 3.4.x so any failures there must be due to something else. Are there any build errors? Can you show exactly where the message comes from? -- nosy: +ned.deily ___ Python

[issue29902] copy breaks staticmethod

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Copying and pickling of staticmethod objects are not supported. Starting from 3.6 this raises an exception (see issue22995). >>> bar.y = copy(staticmethod(foo)) Traceback (most recent call last): File "", line 1, in File

[issue18059] Add multibyte encoding support to pyexpat

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue18059] Add multibyte encoding support to pyexpat

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Marc-Andre, there are at least two issues about supporting East Asian encodings (issue13612 and issue15877). I think this means that that encodings are used in XML in wild. Current support of encodings (8-bit + UTF-8 + UTF-16) is enough for my needs, but I

[issue29533] urllib2 works slowly with proxy on windows

2017-03-25 Thread Julia Dolgova
Julia Dolgova added the comment: Could someone look into my PR, please... -- ___ Python tracker ___ ___

[issue29902] copy breaks staticmethod

2017-03-25 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: Doing a copy on a staticmethod breaks it: Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from copy import copy >>> def foo(): pass ... >>> class bar:

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 62a99515301fa250feba1a2e0f2d8ea2a29d700e by Serhiy Storchaka in branch 'master': bpo-29900: Simplify pathlib implementation. (#814) https://github.com/python/cpython/commit/62a99515301fa250feba1a2e0f2d8ea2a29d700e --

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Louie Lu added the comment: Add unittest. Since IPv6 do not support prefix netmask (':ff00::'), it have only test like this: >>> a = ipaddress.ip_interface(('dead:beaf::', '32')) >>> b = ipaddress.ip_interface('dead:beaf::/32') >>> str(a) == str(b) --

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4aec9a8be2f2574f249008eb8be76c070fea37eb by Serhiy Storchaka in branch 'master': bpo-29901: Improve support of path-like objects in zipapp. (#815) https://github.com/python/cpython/commit/4aec9a8be2f2574f249008eb8be76c070fea37eb --

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can monkey-patch os.mkdir and pathlib._NormalAccessor.mkdir. Without tests we can't be sure that the patch fixes the issue and that the bug will be not reintroduced by future changes. Tests are required for this change. --

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I merged Mandeep's PR and backported it into 3.5 and 3.6. Thanks all :) -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 55717b4b487a9ccc119ca501fad71937fa01d1f6 by Mariatta in branch '3.5': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-812) https://github.com/python/cpython/commit/55717b4b487a9ccc119ca501fad71937fa01d1f6 --

[issue29862] Fix grammar typo in importlib.reload() exception

2017-03-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 8b82236952619c3838865ff535e5ce77b59b4a78 by Mariatta in branch '3.6': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-811) https://github.com/python/cpython/commit/8b82236952619c3838865ff535e5ce77b59b4a78 --

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks! Yes, we'll need tests. I'm out of town most of the weekend, but I'll look at this as soon as I can. -- ___ Python tracker

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Louie Lu added the comment: Eric: I made the patch, reference to which IPv*Network dealing with tuple. Should I also add the unittest for it? Also, can you help me code review this, thanks. -- ___ Python tracker

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +722 ___ Python tracker ___ ___ Python-bugs-list

[issue29737] Optimize concatenating empty tuples

2017-03-25 Thread STINNER Victor
STINNER Victor added the comment: I like the change. It prevents to duplicate tuples and so reduce the memory footprint. PGO compilation helps branch prediction anyway. -- ___ Python tracker

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +721 ___ Python tracker ___ ___

[issue29901] Support path-like objects in zipapp

2017-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch simplifies support of pathlib.Path in zipapp. As a side effect zipapp now supports other path-like objects, not just pathlib.Path. -- components: Library (Lib) messages: 290470 nosy: paul.moore, serhiy.storchaka priority: normal

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: While an IPv4Interface may be a subclass of an IPv4Address, it definitely has more information attached to it: the netmask of the network it's on. So an interface (like a network) needs to allow additional parameters to specify the netmask. It should be true

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +720 ___ Python tracker ___ ___

[issue29900] Remove unneeded wrappers in pathlib

2017-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since functions in the os module support path-like objects, the code of the pathlib module can be simplified. The wrappers that explicitly convert Path to str no longer needed. -- components: Library (Lib) messages: 290468 nosy: pitrou,

[issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented

2017-03-25 Thread Eryk Sun
Eryk Sun added the comment: I prefer the name PYTHONLEGACYWINDOWSIOENCODING for symmetry with both PYTHONIOENCODING and PYTHONLEGACYWINDOWSFSENCODING, but I suppose you changed it to make it more visually distinguished from the latter. I discovered this issue due to the modified behavior of

[issue29737] Optimize concatenating empty tuples

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The PR already was merged when you wrote your comment Raymond. If you insist I can revert it. But 0f7b0b397e12514ee213bc727c9939b66585cbe2 depends on it. -- ___ Python tracker