[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

[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

[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 ___

Problem With Tkinter Font

2017-02-25 Thread Wildman via Python-list
Python 3.4.2 Tkinter 8.6 Linux I want to set the font in a GUI program I am working on. Here is the pertinent code I am using... from tkinter import font myfont = font.Font(family='Helvetica', size=10, weight='bold') Here is the error I get... Traceback (most recent call last): File

[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

RE: Python application launcher (for Python code)

2017-02-25 Thread Deborah Swanson
breamore...@gmail.com wrote, on February 25, 2017 4:49 AM > > On Friday, February 24, 2017 at 1:54:39 AM UTC, Deborah Swanson wrote: > > Michael Torrie wrote, on February 23, 2017 7:43 AM > > > > > > On 2017-02-22 09:49 PM, Deborah Swanson wrote: > > > > Didn't even look. Visual Studio has

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

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

Re: any one used moviepy please come in!!! I need help, thanks!

2017-02-25 Thread Santhosh Kumar
Thanks a lot , I got this solution after installing ghostscript Regards sandy On Thu, Feb 23, 2017 at 6:15 PM, Billy Earney wrote: > imagemagick (ie, convert) has a policy.xml file that stops you from > accessing any resource that starts with '@'. > > type 'identify

Re: Python application launcher (for Python code)

2017-02-25 Thread breamoreboy
On Friday, February 24, 2017 at 1:54:39 AM UTC, Deborah Swanson wrote: > Michael Torrie wrote, on February 23, 2017 7:43 AM > > > > On 2017-02-22 09:49 PM, Deborah Swanson wrote: > > > Didn't even look. Visual Studio has always been pricey, and it never > > > > occurred to me that they might

[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

[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

[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 ___

[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

[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

RE: Python application launcher (for Python code)

2017-02-25 Thread Deborah Swanson
Wanderer wrote, on February 25, 2017 2:07 PM > > If you want to turn internet access on and off more easily in > Windows 7, go to Control Panel\ Network and Sharing Center > and in the left hand menu click on Change Adapter Settings. > Create a shortcut to Local Area Connect and put it on your

Re: Python application launcher (for Python code)

2017-02-25 Thread Wanderer
On Saturday, February 25, 2017 at 1:03:40 PM UTC-5, Deborah Swanson wrote: > Dennis Lee Bieber wrote, on February 25, 2017 4:50 AM > > > > On Fri, 24 Feb 2017 22:26:15 -0800, "Deborah Swanson" > > declaimed the following: > > > > > > > >Well rats. Skull duggery on

[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 ___ ___

[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

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

2017-02-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +266 ___ 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

[issue29654] SimpleHTTPRequestHandler should support browser cache

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

RE: Python application launcher (for Python code)

2017-02-25 Thread Deborah Swanson
> -Original Message- > From: Python-list > [mailto:python-list-bounces+python=deborahswanson.net@python.o > rg] On Behalf Of Dennis Lee Bieber > Sent: Saturday, February 25, 2017 12:58 PM > To: python-list@python.org > Subject: Re: Python application launcher (for Python code) > > >

[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

[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

[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

Re: Python replace multiple strings (m*n) combination

2017-02-25 Thread Cem Karan
Another possibility is to form a suffix array (https://en.wikipedia.org/wiki/Suffix_array#Applications) as an index for the string, and then search for patterns within the suffix array. The basic idea is that you index the string you're searching over once, and then look for patterns within

[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

[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. --

Re: Python replace multiple strings (m*n) combination

2017-02-25 Thread INADA Naoki
If you can use third party library, I think you can use Aho-Corasick algorithm. https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm https://pypi.python.org/pypi/pyahocorasick/ On Sat, Feb 25, 2017 at 3:54 AM, wrote: > I have a task to search for multiple patterns

[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 ->

[issue29647] Python 3.6.0

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

[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 ___ ___

[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). --

RE: Python application launcher (for Python code)

2017-02-25 Thread Deborah Swanson
Dennis Lee Bieber wrote, on February 25, 2017 4:50 AM > > On Fri, 24 Feb 2017 22:26:15 -0800, "Deborah Swanson" > declaimed the following: > > > > >Well rats. Skull duggery on the net is a lot more sophisticated than > >when I saw it last (15 years ago). Getting up

[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 ->

[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 ___

[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:

[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

[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

[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

[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 ___ ___

[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

[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

[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 -

[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

[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

[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

[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 ___ ___

[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

[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 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

[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 ___ ___

[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

[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

[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 ___ ___

[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

[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,

[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

[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'))"

[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 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,

[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:

[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

[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 ___

[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 : -- stage: needs patch -> patch review ___ Python tracker ___

[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