[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Ma Lin for finding the problem! Don't know why you close the PR but anyway, we solve it finally. -- ___ Python tracker

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea by Xiang Zhang in branch '2.7': bpo-29990: Fix range checking in GB18030 decoder (#1509) https://github.com/python/cpython/commit/4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 72e1b61da0920c5607481304879e039b63e2a3d5 by Xiang Zhang in branch '3.6': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1507) https://github.com/python/cpython/commit/72e1b61da0920c5607481304879e039b63e2a3d5 --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 by Xiang Zhang in branch '3.5': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508) https://github.com/python/cpython/commit/f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1611 ___ Python tracker ___ ___

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1610 ___ Python tracker ___ ___

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1609 ___ Python tracker ___ ___

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 9da408d15bdef624a5632182cb4edf98001fa82f by Xiang Zhang in branch 'master': bpo-29990: Fix range checking in GB18030 decoder (#1495) https://github.com/python/cpython/commit/9da408d15bdef624a5632182cb4edf98001fa82f --

[issue30306] release arguments of contextmanager

2017-05-08 Thread Nick Coghlan
Nick Coghlan added the comment: Nice catch. This behaviour is an artifact of the ContextDecorator support in _GeneratorContextManager, where context managers created with `@contextmanager` can be used as function decorators (implicitly wrapping them in a with statement) as well as directly in

[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your report! -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 410d75ab71e2db0fdc8b2016600a3d3d4830f38e by Xiang Zhang in branch '3.6': bpo-30289: remove Misc/python-config.sh when make distclean (#1498) (#1506) https://github.com/python/cpython/commit/410d75ab71e2db0fdc8b2016600a3d3d4830f38e --

[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Brian May
Brian May added the comment: Me getting confused at the newline in the comparison output. -- ___ Python tracker ___

[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1608 ___ Python tracker ___ ___

[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset fa5abac1e6cd74979557d5a6f960a55f40a10b0e by Xiang Zhang in branch 'master': bpo-30289: remove Misc/python-config.sh when make distclean (#1498) https://github.com/python/cpython/commit/fa5abac1e6cd74979557d5a6f960a55f40a10b0e -- nosy:

[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Tim Peters
Tim Peters added the comment: Generally speaking, trying to shuffle a dict D already blows up, unless D's keys are the integers range(len(D)). In that case, D is indistinguishable from a list in the sense that both map range(N) to values via __getitem__. `shuffle()` does no type checks

[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Brian May
Brian May added the comment: I made an attempt at a PR. Unfortunately some of the tests appear to fail on some environments, and the messages produced don't exactly clarify why. -- ___ Python tracker

[issue30181] Correct the parsing of a test case docstring.

2017-05-08 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1606 ___ Python tracker ___

[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Martin Panter
Martin Panter added the comment: It is also pointless to shuffle a list object repeating the same item, but that is no reason to add a special case. Is there a real problem with allowing dictionaries and OrderedDict? It seems to behave sensibly if you give each item a unique value: >>> D =

[issue30311] random.shuffle pointlessly shuffles dicts

2017-05-08 Thread Steven D'Aprano
New submission from Steven D'Aprano: According to the documentation, random.shuffle() should accept a sequence. But it also accepts dicts, in which case it does nothing, expensively: py> x = dict.fromkeys(range(10**6)) py> random.shuffle(x) py> str(x)[:55] + "...}" '{0: None, 1: None, 2: None,

[issue30299] Display the bytecode when compiled a regular expression in debug mode

2017-05-08 Thread Jonathan Goble
Changes by Jonathan Goble : -- nosy: +Jonathan Goble ___ Python tracker ___ ___

[issue30300] asyncio.Controller

2017-05-08 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 08, 2017, at 11:06 PM, Nathaniel Smith wrote: >Looks interesting! What's the advantage over running the server and the test >in the same loop? The ability to use blocking operations in the tests, and to >re-use an expensive-to-start server over multiple

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-05-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: you can list me as a oss-fuzz contact. use my work email address. simplejson is worthy but as both it and the python standard library ship separately people use both so they both ultimately deserve fuzzing and fixing on their own so I'd add it to CPython

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread Martin Panter
Martin Panter added the comment: I understand hash randomization was added after this bug was opened. Here is a demonstration with “video/mp4”, which only has the extension “.mp4” built in. But my /etc/mime.types file lists “mp4 mp4v mpg4”, so after the second initialization the behaviour

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread Martin Panter
Martin Panter added the comment: I suggest to discuss the non-determinism problem in Issue 1043134 (about determining a canonical extension for each content type). I understood this bug (Issue 4963) is about the behaviour of repeated initialization of the same instance of mimetypes. BTW an

[issue30300] asyncio.Controller

2017-05-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: Looks interesting! What's the advantage over running the server and the test in the same loop? The ability to use blocking operations in the tests, and to re-use an expensive-to-start server over multiple tests? (I've mostly used threads in tests to run

[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: * Why not use unittest.mock to test the *random* argument for shuffle? * Try to avoid direct calls to _randbelow(). That method is a non-public implementation detail subject to change. * Also please don't make test_random.py depend on secrets which itself

[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue26543] imaplib noop Debug

2017-05-08 Thread Kostis Anagnostopoulos
Changes by Kostis Anagnostopoulos : -- pull_requests: +1605 ___ Python tracker ___ ___

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread R. David Murray
Changes by R. David Murray : -- stage: test needed -> needs patch versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread R. David Murray
R. David Murray added the comment: @dhess: do you want to work on the OrderedDict + correctly ordered hardcoded lists solution? -- ___ Python tracker ___

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-08 Thread R. David Murray
R. David Murray added the comment: I don't do much with the C API, but since your goal is to remove them from the PyMODINIT_FUNC, I would think you could replace those entries with calls to wrapper functions that issue the deprecation and then call the real function. --

[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-08 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> haypo ___ Python tracker ___ ___

[issue29823] mimetypes guesses XSL mimetype when passed an XML file

2017-05-08 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler
Changes by Marc Culler : Added file: http://bugs.python.org/file46851/JapanesePythonBug.png ___ Python tracker ___

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler
New submission from Marc Culler: And that is a very bad assumption. On Windows 10 in the Japanese locale the default TkFixedFont has family u'\uff2d\uff33 \u30b4\u30b7\u30c3\u30af' (a transliteration of MS Gothic). The error occurs on line 51: 47 def _set(self, kw): 48

[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: Add Mark Dickinson and Raymond Hettinger to nosy list per Brett's suggestion on core-mentorship. -- nosy: +mark.dickinson, rhettinger ___ Python tracker

[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1604 ___ Python tracker ___ ___

[issue30308] Add code coverage for argument in random.shuffle

2017-05-08 Thread Cheryl Sabella
New submission from Cheryl Sabella: Added test cases for `random` argument in random.shuffle for code coverage. Two interesting results (documented within test cases): 1. In the docs, `random` is defined as a function returning a float in the range [0, 1), but negative floats could be

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2017-05-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think it is misleading, because a class is actually an object. This is only misleading *after* you know all the interesting details about Python and metaclasses. Prior to that, it is a reasonable and important distinction that I don't want to get lost

[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Nikolay Kim
Nikolay Kim added the comment: I am fine with any decision. close with "won't fix" is fine too -- ___ Python tracker ___

[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> bob.ippolito ___ Python tracker ___

[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The proposed patch doesn't work with all objects supporting the buffer protocol, for example it doesn't work with array.array('u', '\ufeff[1,2,3]'). This is easy to fix. But I'm not sure that it is worth to complicate the code for adding support of the

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread David Hess
David Hess added the comment: And the underlying problem causing this: $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpeg', '.jpg', '.jpe'] $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpg', '.jpe', '.jpeg'] $

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-05-08 Thread David Hess
David Hess added the comment: Concur with @sivert – the result of guess_extension() is non-deterministic between mimetypes module initialization. $ python Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information.

[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2017-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If tempfile doesn't have special code for supporting path-like objects, and nothing in the documentation points that path-like objects don't work, then the documentation doesn't need changes. This is just a consequence of implementing PEP 519 in low-level

[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> Mariatta nosy: +Mariatta ___ Python tracker ___

[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-08 Thread rohit singh
New submission from rohit singh: The documentation says: >>> '"Isn\'t," she said.' '"Isn\'t," she said.' It should be: >>> '"Isn\'t," she said.' '"Isn't," she said.' -- assignee: docs@python components: Documentation messages: 293246 nosy: docs@python, rohit singh priority: normal

[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2017-05-08 Thread Brett Cannon
Brett Cannon added the comment: The key thing with the docs is that it doesn't say anywhere "takes a string path" or a "path as a string" or something else that suggests path-like objects don't work. If you want to clearly state that path-like objects are acceptable that is fine as well. As

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-08 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Additional question, are tests required to check this behavior? (Also, bumping) -- ___ Python tracker ___

[issue26543] imaplib noop Debug

2017-05-08 Thread R. David Murray
R. David Murray added the comment: That sounds reasonable, if the debug output doesn't pollute the test run output. -- ___ Python tracker ___

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-08 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not sure how to raise the deprecation waning in this case. We use both the Cache and Statement objects as part of the sqlite3 module internal flow. How can I only warn the user when he creates this classes directly and not when the sqlite3 module uses

[issue29956] math.exp documentation is misleading

2017-05-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Eric Lebigot
Eric Lebigot added the comment: Good reference. Another one would be https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations, which explicitly indicates that it only makes sense for integer types (which is useful to keep in mind, as one may think that it

[issue26543] imaplib noop Debug

2017-05-08 Thread Kostis Anagnostopoulos
Kostis Anagnostopoulos added the comment: That is a show-stopper, and the patch works fine. Should I submit a PR with a special test-case with debug >= 3 just for this? -- nosy: +ankostis ___ Python tracker

[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower
Changes by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___

[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower
Steve Dower added the comment: With a few more minutes thought, being able to nicely support PEP 514 here might be too much for this poor launcher to handle, so it may just be best to do that as a separate tool. (In particular, the matching rules would have to change from "enter a Python

[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +1603 ___ Python tracker ___ ___

[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-08 Thread Marco Buttu
Marco Buttu added the comment: Thanks Eric. I think the reference should be added here, as we do for the other operators: https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types -- nosy: +marco.buttu ___ Python tracker

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2017-05-08 Thread Marco Buttu
Marco Buttu added the comment: I also noticed that the howto differentiates between objects and classes: "The details of invocation depend on whether obj is an object or a class." I think it is misleading, because a class is actually an object. IMHO is better to differentiate between classes

[issue30251] Windows Visual Studio solution does not have an install target

2017-05-08 Thread Steve Dower
Changes by Steve Dower : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue30251] Windows Visual Studio solution does not have an install target

2017-05-08 Thread Steve Dower
Steve Dower added the comment: Visual Studio has some deployment concepts, but for multi-project solutions like ours you would generally have a separate project. It's a build tool, not an install tool, and mixing the concepts is generally a bad idea. For building an installer, these projects

[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-08 Thread Steve Dower
Steve Dower added the comment: The actual change I want here is to support Company/Tag pairs as defined in PEP 514. There is no suffix on 64-bit CPython tags, so interpreting "-64" is going outside the PEP. I'd also be okay with a strict mode that requires -32 for 32-bit interpreters, rather

[issue30306] release arguments of contextmanager

2017-05-08 Thread Martin Teichmann
Changes by Martin Teichmann : -- pull_requests: +1602 ___ Python tracker ___ ___

[issue30306] release arguments of contextmanager

2017-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker ___

[issue30306] release arguments of contextmanager

2017-05-08 Thread Martin Teichmann
New submission from Martin Teichmann: The arguments of a function which was decorated to be a context manager are stored inside the context manager, and are thus kept alive. This is a memory leak. Example: @contextmanager def f(a): do_something_with(a) a = None #

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-05-08 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-05-08 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset cc3fa204d357be5fafc10eb8c2a80fe0bca998f1 by Senthil Kumaran (Pierre Quentel) in branch 'master': bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991)

[issue30305] python 2.7.13 join issue

2017-05-08 Thread Ezio Melotti
Ezio Melotti added the comment: I think you are misunderstanding how join works. join is useful when you have a list of strings, and you want to combine them together, possibly specifying a separator. The syntax is separator.join(list_of_strings), for example: >>> '-'.join(['foo', 'bar',

[issue30305] python 2.7.13 join issue

2017-05-08 Thread 方文添
New submission from 方文添: when i use str join , i find some issue, such as str_msg = 'malluin=MTg5Njk2ODIyMA==; Path=/bizmall/; HttpOnly,

[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: Checked with asterite's scripts and it crashes in 3.5 but not in 3.6 and master. Victor, your patch in #26590 seems the resolution of this failure. -- nosy: +xiang.zhang versions: -Python 3.4 ___ Python tracker

[issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7

2017-05-08 Thread Martin Panter
New submission from Martin Panter: In Mercurial revision 6e5b5d1b6714, the documentation for “assertMultiLineEqual” was changed from This method is used by default when comparing Unicode strings with “assertEqual”. to This method is used by default when comparing strings with “assertEqual”.

[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu
Changes by Louie Lu : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list

[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1601 ___ Python tracker ___ ___ Python-bugs-list

[issue30303] IDLE: Add _utest to textview

2017-05-08 Thread Louie Lu
New submission from Louie Lu: Relate to #30290, add _utest to textview to support direct unittest. -- assignee: terry.reedy components: IDLE messages: 293228 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add _utest to textview versions: Python

[issue30289] make distclean and Misc/python-config.sh

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1600 ___ Python tracker ___ ___

[issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments

2017-05-08 Thread Louie Lu
Louie Lu added the comment: Serhiy, though this no need to add versionchanged, should this need to explicit note in doc, that tempfile support os.PathLike? also, I didn't get "add also tests for path-like objects returning bytes path", if `tempfile.mkdtemp(dir=pathlike.Path(''), pre=b'',