[issue16285] Update urllib quoting to RFC 3986

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- stage: needs patch -> patch review ___ Python tracker ___

[issue16285] Update urllib quoting to RFC 3986

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue16285] Update urllib quoting to RFC 3986

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
ProgVal added the comment: Indeed, thanks. I should have done that when I migrated from compiler.parse. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29647] Python 3.6.0

2017-02-25 Thread Boštjan Mejak
New submission from Boštjan Mejak: I managed to create an app that crashes the latest stable version of Python, that is 3.6.0 at the time of this writing. My application is written in Python using wxPython Phoenix 3rd-party GUI library/toolkit. I am running Windows 10 Home 64-bit version OS,

[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Second PR merged with the missing test case. -- stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: `import webbrowser` has heavy side effects. It searches a number of executables. On X Window it also runs external program xdg-settings. Cold start: $ time ./python -c '' real0m1.719s user0m0.088s sys 0m0.036s $ time ./python -c 'import

[issue29644] Importing webbrowser outputs a message on stderr

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: The specific problem reported has been resolved, so closing this one. If anyone's able to figure out a way to defer this to post-import somehow, I think that would make a good enhancement proposal. -- resolution: -> fixed stage: -> resolved status:

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
New submission from ProgVal: Since commit cb41b2766de646435743b6af7dd152751b54e73f (Python 3.7a0), string literals are not parsed the same way. ast.parse("'test'").body used to be a list with one item containing 'test'; but now it is an empty list: Python 3.5.2+ (default, Dec 13 2016,

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread ProgVal
ProgVal added the comment: (Oops, submitted too soon.) I understand the rational of this change, so I am not sure if this is actually a bug. However, if someone wants to parse a simple expression that may be a string, they need to add a special handling in case it's a string interpreted as a

[issue29646] ast.parse parses string literals as docstrings

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If someone wants to parse a simple expression that may be a string he should use the "eval" mode. >>> ast.dump(ast.parse("'test'")) "Module(body=[], docstring='test')" >>> ast.dump(ast.parse("'test'", mode='eval')) "Expression(body=Str(s='test'))"

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-25 Thread Andrei Fokau
Andrei Fokau added the comment: Ok, testing with Django was a bad idea due to compatibility with 3.7. I could apply it to 3.6.x and test Django with it. Is there a better idea how to trial the test discovery? -- ___ Python tracker

[issue9285] Add a profile decorator to profile and cProfile

2017-02-25 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: -fdrake ___ Python tracker ___ ___

[issue29647] Python 3.6.0

2017-02-25 Thread Christoph Reiter
Christoph Reiter added the comment: That sounds like a problem with wxPython which you should report to them: http://trac.wxwidgets.org/ When you do, try to attach a minimal code example with your instructions so others can reproduce the error. -- nosy: +lazka

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Marco Buttu
New submission from Marco Buttu: In the first `versionadded` of the Loader section [1] of Doc/reference/import.rst, there is no reference to `create_module()`: .. versionadded:: 3.4 The create_module() method of loaders. It should be: .. versionadded:: 3.4 The

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +260 ___ Python tracker ___ ___

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Louie Lu
Louie Lu added the comment: What is the different of Cold start and Hot start? It that CPU speed or something else. In Linux 4.9.11 with i7-2k, I can't reproduce the significant real time you gave: # CPU gov powersave $ time ./python -c 'import webbrowser' 0.16s user 0.02s system 93% cpu

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file46667/webbrowser-delayed-initialization.patch ___ Python tracker

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch makes searching of all platform browsers delayed until it is needed. In addition it makes webbrowser.register() thread safe. Cold start: $ time ./python -c 'import webbrowser' real0m2.851s user0m0.224s sys 0m0.056s Hot start:

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What is the different of Cold start and Hot start? Disk caches are dropped before cold start. $ echo 3 | sudo tee /proc/sys/vm/drop_caches -- ___ Python tracker

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +261 ___ Python tracker ___ ___

[issue29650] abstractmethod does not work when deriving from Exception

2017-02-25 Thread chrysn
New submission from chrysn: The "TypeError: Can't instantiate abstract class C with abstract methods x" exception does not get raised when when the involved ABCMeta class is derived from an Exception. The attached file shows that a class without an implementation of an abstractmethod can get

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Subhendu's PR has been merged. -- nosy: +ncoghlan ___ Python tracker ___ ___

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. Using global variable doesn't look good to me. 2. "at offset 1" looks confusing to me. What is offset? Is this an offset of packed item in created bytes object? The you shouldn't get the odd number for the '!h' format. I think it would be better to

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-25 Thread Andrei Fokau
Andrei Fokau added the comment: Testing with Django seems indicated an issue. I did the following with 3.6 patch (cherry-pick to bea9d2f64) on macOS with OpenSSL installed via Homebrew: $ cd /Users/andrei/Python/cpython/ $ export CFLAGS="-I/usr/local/opt/openssl/include" $ export

[issue29649] struct.pack_into check boundary error message didn't respect offset

2017-02-25 Thread Louie Lu
New submission from Louie Lu: For this situation, check boundary error message didn't correctly show out. >>> import struct >>> import ctypes >>> byte_list = ctypes.create_string_buffer(1) >>> struct.pack_into('b', byte_list, 5, 1) Traceback (most recent call last): File "", line 1, in

[issue23578] struct.pack error messages do not indicate which argument was invalid

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

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Louie Lu
Louie Lu added the comment: Adding PyErr_SetString and PyErr_Format wrapper, with a global offset variable to handle this. struct.pack('!h', 0x8) Traceback (most recent call last): File "tests.py", line 5, in struct.pack('!h', 0x8) struct.error: Raise at offset 1, 'h' format

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Nice, this is much cleaner than the current approach! The one thing I would suggest is a new test case that: - asserts webbrowser._tryorder is None - asserts webbrowser._browsers is empty - calls webbrowser.get() - asserts webbrowser._tryorder is non-empty -

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Louie Lu
Louie Lu added the comment: > 1. Using global variable doesn't look good to me. That's true, but I'm not sure if there have other methods to do this. If not using global variable, we will need to change a bunch of the function arguments. Since the arguments didn't contain the information about

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Marco. Your change looks good to me. I'm now wondering if this should have been 'versionchanged' instead of 'versionadded'. Perhaps other core devs can confirm this. Thanks :) -- assignee: -> docs@python components: +Documentation nosy:

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-25 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29647] Python 3.6.0

2017-02-25 Thread R. David Murray
R. David Murray added the comment: Agreed with Christoph. If the wxPython team finds there really is a bug in cpython itself triggering this, they (or you) can open a new issue with specifics. -- nosy: +r.david.murray resolution: -> third party stage: -> resolved status: open ->

[issue27593] Deprecate sys._mercurial and create sys._git

2017-02-25 Thread Brett Cannon
Brett Cannon added the comment: I purposefully left the tag out because I don't think it's useful (a tag is just a conveniently named hash and all of our tags are version numbers and that's already available in other parts of the sys module). --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-25 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +263 ___ Python tracker ___ ___

[issue29647] Python 3.6.0

2017-02-25 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue28663] Higher virtual memory usage on recent Linux versions

2017-02-25 Thread INADA Naoki
INADA Naoki added the comment: I close this issue, because there are no enough evidence it's Python's issue. When hit ulimit is just a OS's detail. Please ping or file a new issue when memory usage is really grown. -- resolution: -> not a bug stage: -> resolved status: open ->

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2017-02-25 Thread Andrei Fokau
Andrei Fokau added the comment: Removing `--with-pydebug` parameter helped to avoid issue with _crypto extension. Testing Django with that build produced result identical to 3.6.0: Ran 11723 tests in 83.897s OK (skipped=1149, expected failures=4) The patch is ready for review. --

[issue29652] Fix evaluation order of keys/values in dict comprehensions

2017-02-25 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Reported from [1] and similar to issue11205 Currently the evaluation order for keys and values in a dictionary comprehension follows that of assignments. The values get evaluated first and then the keys: def printer(v): print(v, end='

[issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs

2017-02-25 Thread Vasiliy Faronov
New submission from Vasiliy Faronov: There is a problem with the standard library's urlsplit and urlparse functions, in Python 2.7 (module urlparse) and 3.2+ (module urllib.parse). The documentation for these functions [1] does not explain how they behave when given an invalid URL. One could

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2017-02-25 Thread Brett Cannon
Brett Cannon added the comment: Closing as this should be a setuptools issue (if it still is). -- nosy: +brett.cannon resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

[issue29653] IDLE - call tips show wrapper's argpsec instead of wrapped

2017-02-25 Thread assume_away
New submission from assume_away: Many wrappers use the famous (*args, **kwargs) argspec, which is less than helpful for a function that uses some positional arguments and maybe a few keyword only arguments, ie (x, y, z=10). Other IDEs have the capability of showing the wrapped functions

[issue29654] SimpleHTTPRequestHandler should support browser cache

2017-02-25 Thread Pierre Quentel
New submission from Pierre Quentel: SimpleHTTPServer send a Last-Modified response header, but doesn't take into account the If-Modified-Since header if it was sent by the user agent. If a url matches a file and this file was not modified after the value of the If-Modified-Since header, the

[issue29654] SimpleHTTPRequestHandler should support browser cache

2017-02-25 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +264 ___ Python tracker ___

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-25 Thread Peter Cawley
New submission from Peter Cawley: In the implementation of the IMPORT_STAR opcode, if the call to PyFrame_FastToLocalsWithError fails, or f_locals is NULL, then control flow jumps to the error handler without performing a decref on the "from" variable. As the "from" variable is initialised by

[issue28587] list.index documentation missing start and stop arguments

2017-02-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +266 ___ Python tracker ___ ___

[issue28587] list.index documentation missing start and stop arguments

2017-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I backported these changes to 3.5 branch. Please let me know if this is ok. Thanks. -- versions: +Python 3.5 ___ Python tracker

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka stage: -> needs patch type: behavior -> resource usage versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-25 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added tests. -- Added file: http://bugs.python.org/file46670/webbrowser-delayed-initialization-2.patch ___ Python tracker

[issue29653] IDLE - call tips show wrapper's argpsec instead of wrapped

2017-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: We usually prefer diffs rather than revised files, but I know not everyone can provide them. Did you change anything other than add the following? elif hasattr(ob, '__wrapped__') and callable(ob.__wrapped__): fob = ob.__wrapped__ I am all for

[issue19903] Idle: Use inspect.signature for calltips

2017-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Several builtin functions have recently gotten the Arg clinic treatment. So I think it is now time to switch. Before closing #29653 as a duplicate, I discovered that inspect.signature also handles functools.partials correctly, while the other inspect

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> low stage: needs patch -> patch review ___ Python tracker

[issue29650] abstractmethod does not work when deriving from Exception

2017-02-25 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. This is the case for builtin types which usually get their own __new__ methods. See #5996. -- dependencies: +abstract class instantiable when subclassing dict nosy: +xiang.zhang versions: +Python 3.5, Python 3.7

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The new GitHub PR workflow still looks cumbersome and unclear to me. It needs using a lot of git commands different for different branches (and some command are failed or don't work as I expected when I try to repeat sequences from the devguide). How to

[issue29655] Certain errors during IMPORT_STAR can leak a reference

2017-02-25 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +267 ___ Python tracker ___

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Patch LGTM. Serhiy, did you want to take this as a chance to run through the new GitHub PR workflow? Current details are at https://docs.python.org/devguide/pullrequest.html -- ___ Python tracker

[issue29656] Change "make patchcheck" to be branch aware

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: Change "make patchcheck" to be branch aware? -> Change "make patchcheck" to be branch aware ___ Python tracker

[issue29656] Change "make patchcheck" to be branch aware?

2017-02-25 Thread Nick Coghlan
New submission from Nick Coghlan: With the switch to a PR based workflow, I'm finding the current incarnation of "make patchcheck" less helpful than it used to be, as it only checks uncommitted changes, rather than all changes relative to the base branch. Looking at

[issue29656] Change "make patchcheck" to be branch aware

2017-02-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +268 ___ Python tracker ___ ___

[issue29648] Missed reference to create_module() in versionadded (import.rst)

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___