[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-01 Thread Antti Haapala
Changes by Antti Haapala : -- type: -> enhancement ___ Python tracker ___ ___

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread STINNER Victor
STINNER Victor added the comment: > PAYLOAD.decode('utf8') passes in P2.7.* and fails in P3.4 Well, Python 2 decoder didn't respect the Unicode standard. Please see: http://unicodebook.readthedocs.org/issues.html#non-strict-utf-8-decoder-overlong-byte-sequences-and-surrogates Python 3 is now

[issue26219] implement per-opcode cache in ceval

2016-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: Attaching a new version of the patch. Issues #26058 and #26110 need to be merged before we can start reviewing it. -- Added file: http://bugs.python.org/file41776/opcache2.patch ___ Python tracker

[issue9779] argparse.ArgumentParser not support unicode in print help

2016-02-01 Thread Mark Stern
Mark Stern added the comment: This bit me also. For anybody else reading this, argparsenobug.py includes a class that provides a workaround. python argparsebug.py --help works, but: python argparsebug.py --help > python argparsebug.py --help | more give the error. However: python

[issue9779] argparse.ArgumentParser not support unicode in print help

2016-02-01 Thread Mark Stern
Mark Stern added the comment: And here is the source code with the workaround class -- Added file: http://bugs.python.org/file41775/argparsenobug.py ___ Python tracker

[issue26243] zlib.compress level as keyword argument

2016-02-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review. 1. Changed "bytes" to "data". 2. Updated Doc as in issue 26244 (will update the patch if there will be changes there). 3. Added version changed notice but i don't think there is a need for What's new update. -- Added file:

[issue26262] Cannot compile with /fp:strict with MSVC

2016-02-01 Thread Zachary Ware
New submission from Zachary Ware: As reported in msg258685 (issue25934), Python cannot be built with /fp:strict while using MSVC. As Mark showed in msg258686 and msg258689, there are three calculations that could be replaced with suitable constants to allow /fp:strict to be used. (Nosy list

[issue25934] ICC compiler: ICC treats denormal floating point numbers as 0.0

2016-02-01 Thread Zachary Ware
Zachary Ware added the comment: With the buildbots not angry over this, I'm closing the issue. I opened #26262 to follow the possibility of changing the initializers to allow /fp:strict with MSVC. -- assignee: -> zach.ware resolution: -> fixed stage: -> resolved status: open ->

[issue26110] Speedup method calls 1.2x

2016-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: For those interested in reviewing this patch at some point: please wait until I upload a new version. The current patch is somewhat outdated. -- ___ Python tracker

[issue26263] Serialize array.array to JSON by default

2016-02-01 Thread Omer Katz
New submission from Omer Katz: Is there a reason why the JSON module doesn't serialize array.array() instances by default? Currently you need to convert them to tuples but I'm confident that the C API for those types is enough to iterate over the array and serialize it to a JSON list. We

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-01 Thread Jonas Brunsgaard
Jonas Brunsgaard added the comment: In my particular case, I developed an application close to beanstalkd, but with redis as "engine". I did create a callbackback reader class for users to subclass, the callbackreader is checking every second, on every tube(queue.Object). If new data has

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-02-01 Thread Joseph Hackman
Joseph Hackman added the comment: I haven't seen OP in over 30 days, so am posting my own patch. I've added an optional argument that defaults to strict and gets passed along. I've updated the primary test to verify the argument passing, as well as that things get handled as specified in the

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-02-01 Thread Andrew Barnert
Andrew Barnert added the comment: > I did actually mean a version changed notice for the data model change. I see > this as a small expansion of the Python object API. Previously, > __reversed__() had to be a function, now you are also allowed to set it to > None. The collections ABCs are

[issue11597] Can't get ConfigParser.write to write unicode strings

2016-02-01 Thread neo gurb
neo gurb added the comment: In file ConfigParser.py, def write, replace line key = " = ".join((key, str(value).replace('\n', '\n\t'))) by key = " = ".join((key, str(value).decode('utf-8').replace('\n', '\n\t'))) Tested in Windows7 and Ubuntu 15.04. -- nosy: +neo gurb

[issue26264] keyword.py missing async await

2016-02-01 Thread Timo Furrer
New submission from Timo Furrer: I had a look at the *Lib/keyword.py* module. It seems like the auto generated *kwlist* is missing the *await* and *async* keywords. At least according to https://www.python.org/dev/peps/pep-0492/ they are called *keywords*. The keyword module generates the

[issue26264] keyword module missing async and await keywords

2016-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: `async` and `await` are only keywords in the context of an 'async def' function. It will be that way until Python 3.7. That said, I'm not sure what to do about the keywords module. Nick, Victor, thoughts? -- nosy: +haypo, ncoghlan, yselivanov

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-02-01 Thread Martin Panter
Martin Panter added the comment: This is not really my area of expertise, but I would have thought if you defined a __special__ method to something illegal (non-callable, or wrong signature) it would be reasonable for Python to raise an error at class definition (or assignment) time, not just

[issue26254] ssl should raise an exception when trying to load an unusable key (ECC key not using a named curve)

2016-02-01 Thread Evgeny Kapun
Evgeny Kapun added the comment: So, it looks like OpenSSL doesn't support keys using arbitrary curves at all. Then why don't I get an exception when trying to load such a key? Instead it just quietly disables all authenticated ciphersuites (anonymous ciphersuites still work) and then I get a

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-01 Thread Martin Panter
Martin Panter added the comment: Also the doc string could be updated. I guess suggesting “file.name” is even more confusing :) -- nosy: +martin.panter stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue26255] symtable.Symbol.is_referenced() returns false for valid use

2016-02-01 Thread Luke Schubert
New submission from Luke Schubert: If the following function is saved in listcomp.py: def encode(inputLetters): code = {'C':'D', 'F':'E'} return set(code[x] for x in inputLetters) and the following code is used to create a symtable for this function: import symtable if __name__ ==

[issue26256] Fast decimalisation and conversion to other bases

2016-02-01 Thread Jurjen N.E. Bos
New submission from Jurjen N.E. Bos: Inspired by the recently new discovered 49th Mersenne prime number I wrote a module to do high speed long/int to decimal conversion. I can now output the new Mersenne number in 18.5 minutes (instead of several hours) on my machine. For numbers longer than

[issue23735] Readline not adjusting width after resize with 6.3

2016-02-01 Thread Tiago Peixoto
Changes by Tiago Peixoto : -- nosy: +count0 ___ Python tracker ___ ___ Python-bugs-list

[issue26257] Eliminate buffer_tests.py

2016-02-01 Thread Martin Panter
New submission from Martin Panter: This sort of follows on from other cleanup of test_bytes.py in Issue 19587. Currently buffer_tests defines one base test class, MixinBytesBufferCommonTests, which is used by test_bytes.py to test bytearray (but not bytes!). However there are other tests

[issue26255] symtable.Symbol.is_referenced() returns false for valid use

2016-02-01 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules, Library (Lib) nosy: +benjamin.peterson ___ Python tracker ___

[issue26255] symtable.Symbol.is_referenced() returns false for valid use

2016-02-01 Thread Xiang Zhang
Changes by Xiang Zhang <18518281...@126.com>: -- nosy: +xiang.zhang ___ Python tracker ___ ___

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-02-01 Thread Berker Peksag
Berker Peksag added the comment: Victor committed this in 97c80e317ab8 (3.5) and c7f1acdd8be1 (default). Closing as "fixed". -- resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.4

[issue26257] Eliminate buffer_tests.py

2016-02-01 Thread Martin Panter
Martin Panter added the comment: I didn’t end up merging test_ljust/rjust/center() from test_bytes. Those tests are more specific to bytes and bytearray, so they are better left as-is. -- keywords: +patch stage: needs patch -> patch review Added file:

[issue19587] Remove empty tests in test_bytes.FixedStringTest

2016-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22c2dd04a3d3 by Martin Panter in branch '3.5': Issue #19587: Remove masked and redundant tests in test_bytes https://hg.python.org/cpython/rev/22c2dd04a3d3 New changeset 8545a082fcaa by Martin Panter in branch 'default': Issue #19587: Merge

[issue19587] Remove empty tests in test_bytes.FixedStringTest

2016-02-01 Thread Martin Panter
Martin Panter added the comment: Thanks Serhiy for reviewing. You are right that buffer_tests is only run on bytearray; I must have gotten mixed up. I fixed the comment in the version I committed. Yes I think I agree with eliminating buffer_tests.py, which is only run for bytearray. I opened

[issue26256] Fast decimalisation and conversion to other bases

2016-02-01 Thread Mark Dickinson
Mark Dickinson added the comment: Very nice. I'd suggest posting it as a recipe or as a Python package on PyPI for others to use. It's not really something that it would be appropriate to add to the Python core: Python isn't really intended for super-efficient high-precision arithmetic, and

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-01 Thread Antti Haapala
New submission from Antti Haapala: The documentation for NamedTemporaryFile is a bit vague. It says [--] That name can be retrieved from the name attribute of the file object. [--] The returned object is always a file-like object whose file attribute is the underlying true file object. This

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: I think this is expected behavior when you do a lot of get() calls that are cancelled by a timeout. Each call leaves a cancelled Future in the deque self._getters; these are removed only when _wakeup_next() is called (by put or put_nowait). Why is your app

[issue26110] Speedup method calls 1.2x

2016-02-01 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : -- nosy: +alecsandru.patrascu ___ Python tracker ___

[issue26258] readline module for python 3.x on windows

2016-02-01 Thread STINNER Victor
STINNER Victor added the comment: The Python readline is a thin wrapper on top of the UNIX readline library. You need a port of the readline library to Windows. There are some ports, but I don't think that Python can take the responsability to endorse them, ports seem unofficial. Example:

[issue26248] Improve scandir DirEntry docs, especially re symlinks and caching

2016-02-01 Thread Ben Hoyt
Ben Hoyt added the comment: Thanks, Victor! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread Jim Jin
Jim Jin added the comment: Thank you very much for your help! -- ___ Python tracker ___ ___ Python-bugs-list

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-02-01 Thread Martin Panter
Martin Panter added the comment: The documentation about double-underscore names: . It says any undocumented usage may be broken. The technique with __hash__() is already documented:

[issue26238] httplib use wrong hostname in https request with SNI support

2016-02-01 Thread lirenke
lirenke added the comment: In RFC6066, literal IPv4 is not allowed as hostname indeed. Actually, many requests still use the format of "IP+PORT" to access the server, and it seems Python don't prohibit this action explicitly. The explorer Chrome also use literal IP address to access for

[issue26219] implement per-opcode cache in ceval

2016-02-01 Thread Yury Selivanov
Changes by Yury Selivanov : -- hgrepos: +333 ___ Python tracker ___ ___

[issue26244] zlib.compressobj level default value documentation

2016-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 650cf38fba28 by Martin Panter in branch '2.7': Issue #26244: Clarify default zlib compression level in documentation https://hg.python.org/cpython/rev/650cf38fba28 New changeset 950e0bfe94ae by Martin Panter in branch '3.5': Issue #26244: Clarify

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26238] httplib use wrong hostname in https request with SNI support

2016-02-01 Thread lirenke
lirenke added the comment: We use Python 2.7.9, and I have checked the httplib.py in 2.7.11 version same time. Notice that in set_tunnel(), self._tunnel_host have already updated by calling _get_hostport(), just like you said. It's different between 2.7.9 and 2.7.11. Then, I replace the file

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: > This is not really my area of expertise, but I would have thought if you > defined a __special__ method to something illegal (non-callable, or wrong > signature) it would be reasonable for Python to raise an error at class > definition (or assignment)

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks correct. -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7dabb94bdf63 by Raymond Hettinger in branch '3.5': Issue #26194: Inserting into a full deque to raise an IndexError https://hg.python.org/cpython/rev/7dabb94bdf63 -- ___ Python tracker

[issue26110] Speedup method calls 1.2x

2016-02-01 Thread Eric Fahlgren
Changes by Eric Fahlgren : -- nosy: +eric.fahlgren ___ Python tracker ___ ___

[issue26255] symtable.Symbol.is_referenced() returns false for valid use

2016-02-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: The genexp implicitly creates a nested function in which *code* is referenced. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue26264] keyword module missing async and await keywords

2016-02-01 Thread Martin Panter
Martin Panter added the comment: What happened in cases like “with” and “yield”, when these names were turned into reserved keywords depending on a __future__ statement? -- nosy: +martin.panter ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-02-01 Thread Andrew Barnert
Andrew Barnert added the comment: > This is not really my area of expertise, but I would have thought if you > defined a __special__ method to something illegal (non-callable, or wrong > signature) it would be reasonable for Python to raise an error at class > definition (or assignment) time,

[issue24421] Race condition compiling Modules/_math.c

2016-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76624d47ee99 by Martin Panter in branch 'default': Issue #24421: Compile _math.c separately to avoid race condition https://hg.python.org/cpython/rev/76624d47ee99 -- nosy: +python-dev ___ Python tracker

[issue26264] keyword module missing async and await keywords

2016-02-01 Thread Timo Furrer
Changes by Timo Furrer : -- title: keyword.py missing async await -> keyword module missing async and await keywords ___ Python tracker

[issue26243] zlib.compress level as keyword argument

2016-02-01 Thread Martin Panter
Martin Panter added the comment: Thanks, it looks good to me. I think “data” is a better name than “bytes”. About What’s New, I thought the general idea was to document all enhancements, though I admit this is about as small as they come. There is precedent with the compile() builtin (Issue

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: > The easy solution was to check if the queue was empty and skip the read (get > call) if there was nothing in the queue. There's an API for that -- get_nowait(). I'm happy to review a fix if you come up with one. But I currently don't have time to devise a

[issue26258] readline module for python 3.x on windows

2016-02-01 Thread Ali Razmjoo
New submission from Ali Razmjoo: Hello, I using python 2.7.10 on windows and there isn't any problem with this readline module, but it's not exist in python3.x on windows, is it possible to add it ? how? -- messages: 259322 nosy: Ali Razmjoo priority: normal severity: normal status:

[issue26256] Fast decimalisation and conversion to other bases

2016-02-01 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: Thanks for the tip. I'll consider making it a recipe. - Jurjen -- ___ Python tracker ___

[issue26110] Speedup method calls 1.2x

2016-02-01 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: Yury, thank you for the heads up! Here at Intel, in the Dynamic Scripting Languages Optimization Team, we can help the community with reviewing and measuring this patch in our quiet and stable environment, the same one that we use to provide public

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-01 Thread Jonas Brunsgaard
New submission from Jonas Brunsgaard: When making repeated calls to queue.get, memory is building up and is not freed until queue.push is called. I wrote this little program to show my findings. The program will perform a lot of calls to queue.get and once every 60 seconds a queue.push is

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread Jim Jin
New submission from Jim Jin: PAYLOAD1 = b'\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5' PAYLOAD2 = b'\xed\xa0\x80' PAYLOAD3 = b'\x65\x64\x69\x74\x65\x64' PAYLOAD = PAYLOAD1 + PAYLOAD2 + PAYLOAD3 PAYLOAD.decode('utf8') passes in P2.7.* and fails in P3.4 Thank you for reading.

[issue26252] Add an example to importlib docs on setting up an importer

2016-02-01 Thread jan matejek
Changes by jan matejek : -- nosy: +matejcik ___ Python tracker ___ ___ Python-bugs-list