[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-26 Thread Martin Panter
Martin Panter added the comment: Matthias’s proposal adds support for a new keyword-only “exc” argument: print_exception(exc=exception_instance) I still think it is worth supporting a single positional argument as well: print_exception(exception_instance) Another point is that it may

Re: concurrent futures, async futures and await

2017-02-26 Thread Nagy László Zsolt
>> >> Simply because the concurrent future returned by executor.submit does >> not implement __await__ and so it cannot be awaited for. > I get that, but what happens if you try wrapping the executor.submit > call with tornado.gen.convert_yielded as the tornado docs suggest and > as I suggested

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have different path. It adds the support of path-like objects for all external paths. -- type: behavior -> enhancement versions: -Python 3.6 Added file: http://bugs.python.org/file46672/zipfile-pathlib.patch

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +293 ___ Python tracker ___ ___ Python-bugs-list

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +292 ___ Python tracker ___ ___ Python-bugs-list

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: xiang.zhang components: Documentation nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix wrong indentation of timeit.Timer's documenation ___ Python

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: -> xiang.zhang nosy: +xiang.zhang stage: -> patch review versions: +Python 3.7 ___ Python tracker

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +291 ___ Python tracker ___ ___ Python-bugs-list

dictionary of pickle error when get it in multiprocessing and has name error

2017-02-26 Thread Ho Yeung Lee
before cloususerlogin Unexpected error: after map pool ... passwordlist = pickle.load( open( str(currentworkingdirectory) + "\\decryptedsecret.p", "rb" ) ) def processInput(host): try: decrypt_file(sys.argv[1], str(currentworkingdirectory) + "\\encryptedsecret.p",

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Antony Lee
New submission from Antony Lee: The docstring of timeit.Timer.autorange currently reads | Return the number of loops so that total time >= 0.2. | | Calls the timeit method with *number* set to successive powers of | ten (10, 100, 1000, ...) up to a

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +289 ___ Python tracker ___ ___ Python-bugs-list

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +290 ___ Python tracker ___ ___ Python-bugs-list

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-26 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I've attempted a Pull-request trying to implement what Brett is describing. See https://github.com/python/cpython/pull/327, and opened http://bugs.python.org/issue29660 to document that etype is ignored and decide wether it should emit DeprecationWarning

[issue29660] Document that print/format_exception ignore etype

2017-02-26 Thread Matthias Bussonnier
New submission from Matthias Bussonnier: As far as I can tell, http://bugs.python.org/issue17911 made a couple of function in traceback ignore their first arguments (etype) and infer the type from the second one (evalue). (In git 6bc2c1e7 and 2f0441f0 respectively). At least print_exception

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-02-26 Thread Tyler Goodlet
Changes by Tyler Goodlet : -- pull_requests: +288 ___ Python tracker ___ ___

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-26 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +287 ___ Python tracker ___

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-02-26 Thread tyler
New submission from tyler: It would be handy to be able to pass the `length` default argument defined by `shutil.copyfileobj()` to other public functions througout the module. When copying very large files (1GB +), increasing the memory buffer can divide the copy time in half and currently

[issue26389] Expand traceback module API to accept just an exception as an argument

2017-02-26 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Just came across that with wanting to use print_exception and got the same idea. It seem like in print_exception, and format_exception, etype is already ignored and `type(value)` is used, so I think we could also "just" also ignore tb (unless set) and

Talk Python to Me with GvR

2017-02-26 Thread Terry Reedy
https://player.backtracks.fm/talkpython/m/100-guido-van-rossum Both audio and transcript. There is more discussion of Guido's pre-Python work than I have read before. Discussion of Python 3 migration starts at 37:05. Guido says harder than expected because Python was more popular than he

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Merged and backported to 3.6. Closing this issue :) Thanks. -- nosy: +Mariatta resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +286 ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread Andrew Nester
Andrew Nester added the comment: JFYI, from my perspective as a developer PR 120 is more preferred one. -- ___ Python tracker ___

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +285 ___ Python tracker ___ ___

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-02-26 Thread Andrew Nester
Andrew Nester added the comment: some updates? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Exposing all methods of a class

2017-02-26 Thread Pete Dowdell
I use Python, mainly with Django, for work. I was wondering if anyone has encountered an editor that could display a class with all inherited methods included in the editor's view of the class code. I am kind of envisaging the inherited code would be displayed differently (say, grey vs black),

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

2017-02-26 Thread INADA Naoki
INADA Naoki added the comment: Anyone mind Python 2.7? Since Python 2.7 doesn't have mock and check_no_resource_warning context manager, I can't cherry-pick easily. Backporting is bother to me, and the issue doesn't seem so critical. Can I just close this issue? --

Re: Help debugging code - Negative lookahead problem

2017-02-26 Thread michael . gauthier . uni
WOW, many thanks guys, Peter, and MRAB, for your time, help, and explanations! Peter, yes, you're right, when things get too complicated I should definitely try to split things up, and thus split the difficulties (ah, Descartes... ^^), thanks for the advice! MRAB, your code is now working,

[issue29658] Combining thread and process, process hangs (sometimes)

2017-02-26 Thread djstrong
djstrong added the comment: It is confirmed with other hardware with Python 3.5.2. Process is forked, but method "run" is not executing. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread paul j3
paul j3 added the comment: I should probably give PR 120 more credit. By checking the group's container it in effect eliminates this overlapping action problem. Nested groups aren't used in the usage, just the union xor. Maybe the question is, which is better for the user? To tell them up

Re: Help debugging code - Negative lookahead problem

2017-02-26 Thread MRAB
On 2017-02-26 17:15, michael.gauthier@gmail.com wrote: Hi MRAB, Thanks for taking time to look at my problem! I tried your solution: r"\d{2}\s?(?=(?:years old\s?|yo\s?|yr old\s?|y o\s?|yrs old\s?|year old\s?)(?!son|daughter|kid|child))" but unfortunately it does seem not work. Also, I

Re: Help debugging code - Negative lookahead problem

2017-02-26 Thread Peter Otten
michael.gauthier@gmail.com wrote: > Hi MRAB, > > Thanks for taking time to look at my problem! > > I tried your solution: > > r"\d{2}\s?(?=(?:years old\s?|yo\s?|yr old\s?|y o\s?|yrs old\s?|year > old\s?)(?!son|daughter|kid|child))" > > but unfortunately it does seem not work. Also, I

[issue28718] '*' matches entire path in fnmatch

2017-02-26 Thread Aaron Whitehouse
Aaron Whitehouse added the comment: Note that somebody has forked the standard library to implement this: https://github.com/kianxineki/python-wildcard This shows that the actual changes would be pretty small (though pywildcard is based on 2.x code and does not handle the cross-platform slashes

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-26 Thread paul j3
paul j3 added the comment: The PR117 patch adds an apparent symmetry. There's a if/else for 'start', so shouldn't there also be one for 'end'? if start in inserts: inserts[start] += ' [' else: inserts[start] = '[' But why the '+=' case? It's needed for cases like

[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2017-02-26 Thread paul j3
paul j3 added the comment: Earlier issue on the same topic - passing a mutually exclusive group via parents http://bugs.python.org/issue16807 Can they be consolidated? -- ___ Python tracker

[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Sayan! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-26 Thread eryk sun
On Sun, Feb 26, 2017 at 3:09 PM, ChrisW wrote: > On Saturday, 25 February 2017 07:21:30 UTC, eryk sun wrote: >> On Fri, Feb 24, 2017 at 12:38 PM, ChrisW wrote: >> > However, I've installed Python 3.6 with the 'include PATH' checkbox ticked >> > for my user only, and although

[issue28230] tarfile does not support pathlib

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: Serhiy's patch looks good to me, but it would be nice to document the support for PathLike objects in the tarfile documentation. -- ___ Python tracker

Re: Help debugging code - Negative lookahead problem

2017-02-26 Thread michael . gauthier . uni
Hi MRAB, Thanks for taking time to look at my problem! I tried your solution: r"\d{2}\s?(?=(?:years old\s?|yo\s?|yr old\s?|y o\s?|yrs old\s?|year old\s?)(?!son|daughter|kid|child))" but unfortunately it does seem not work. Also, I tried adding the negative lookaheads after every one of the

[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +284 ___ Python tracker ___ ___

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that it is worth to implement the __bool__() method. This doesn't add much in comparison with checking the returncode attribute. The change can break existing code that uses boolean testing instead of checking for None. --

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: PR 322 should make the example in msg284754 work: >>> import pathlib, zipfile >>> f = pathlib.Path('spam.zip') >>> with zipfile.ZipFile(f) as zf: ... zf.namelist() ... ['LICENSE'] It doesn't implement full PathLike support, but it at least covers the use

[issue28231] zipfile does not support pathlib

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +283 ___ Python tracker ___ ___

Re: Help debugging code - Negative lookahead problem

2017-02-26 Thread MRAB
On 2017-02-26 14:13, michael.gauthier@gmail.com wrote: Hi everyone, So here is my problem. I have a bunch of tweets and various metadata that I want to analyze for sociolinguistic purposes. In order to do this, I'm trying to infer users' ages thanks to the information they provide in

[issue29098] document minimum sqlite version

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Carl! The patch for issue 28518 has been lifted the requirement for sqlite3_stmt_readonly() so you can now use and compile Python 3.6.1 without a warning at compile time. -- resolution: -> out of date stage: -> resolved status:

[issue29355] sqlite3: remove sqlite3_stmt_readonly()

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: The patch for issue 28518 has been merged and it doesn't contain any use of sqlite3_stmt_readonly(). Closing this as 'out of date'. Thanks again Ma! -- resolution: -> out of date stage: -> resolved status: open -> closed

[issue28518] execute("begin immediate") throwing OperationalError

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: Thank you everyone! This should be fixed now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29121] sqlite3 Controlling Transactions documentation not updated

2017-02-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Aviv! -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue22594] Add a link to the regex module in re documentation

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +282 ___ Python tracker ___ ___

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

2017-02-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the clarification, Nick :) Marco, I merged your PR, and backported to 3.5 and 3.6 branches. Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Problem With Tkinter Font

2017-02-26 Thread Wildman via Python-list
On Sun, 26 Feb 2017 09:17:00 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > >> 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 =

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +281 ___ Python tracker ___ ___

[issue29121] sqlite3 Controlling Transactions documentation not updated

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +280 ___ Python tracker ___ ___

[ANN] aioxmpp 0.8 released

2017-02-26 Thread Jonas Wielicki
Dear subscribers, I am pleased to announce the release of aioxmpp 0.8. The current release can be obtained from GitHub [1] (check out the v0.8.0 tag or the master branch) or PyPI [2]. The HTML documentation can be found at [3]. Examples can be found in the GitHub repository, in the examples

[issue22594] Add a link to the regex module in re documentation

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +278 ___ Python tracker ___ ___

[issue28518] execute("begin immediate") throwing OperationalError

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +279 ___ Python tracker ___ ___

[issue22594] Add a link to the regex module in re documentation

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +277 ___ Python tracker ___ ___

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

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +276 ___ Python tracker ___ ___

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

2017-02-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +275 ___ Python tracker ___ ___

Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-26 Thread ChrisW
On Saturday, 25 February 2017 07:21:30 UTC, eryk sun wrote: > On Fri, Feb 24, 2017 at 12:38 PM, ChrisW wrote: > > However, I've installed Python 3.6 with the 'include PATH' checkbox ticked > > for my user only, and although C:\Windows\py.exe exists, it has not been > > added to my PATH. > > > > I

[issue29121] sqlite3 Controlling Transactions documentation not updated

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +274 ___ Python tracker ___ ___

Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-26 Thread ChrisW
On Friday, 24 February 2017 18:09:01 UTC, Irmen de Jong wrote: > On 24-2-2017 13:38, ChrisW wrote: > > The installation guidelines for Python 3.6 say: > > > > "Per-user installations of Python do not add the launcher to PATH unless > > the option was selected on installation." > >

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

2017-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Version added is correct here, as the "create_module()" methods are all new in 3.4, and the traditional granularity for deciding "addition or change?" is that new functions, methods, and attributes are always additions, even if they're being added to a class

Help debugging code - Negative lookahead problem

2017-02-26 Thread michael . gauthier . uni
Hi everyone, So here is my problem. I have a bunch of tweets and various metadata that I want to analyze for sociolinguistic purposes. In order to do this, I'm trying to infer users' ages thanks to the information they provide in their bio, among others. For that I'm using regular expressions

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-26 Thread Sayan Chowdhury
Changes by Sayan Chowdhury : -- pull_requests: +273 ___ Python tracker ___ ___

[issue29658] Combining thread and process, process hangs (sometimes)

2017-02-26 Thread djstrong
djstrong added the comment: Sometimes the output is: Thread-1 RUN Thread-1 STOP B started True 20187 A [INFO/B-1] child process calling self.run() but "print" in "run" method of process is not executed. --

[issue29658] Combining thread and process, process hangs (sometimes)

2017-02-26 Thread djstrong
Changes by djstrong : -- title: Process hangs (sometimes) -> Combining thread and process, process hangs (sometimes) ___ Python tracker

[issue29658] Process hangs (sometimes)

2017-02-26 Thread djstrong
New submission from djstrong: I have this code, which sometimes hangs (1 of 5 runs): # -*- coding: utf-8 -*- import sys import threading import multiprocessing mpl = multiprocessing.log_to_stderr() mpl.setLevel(1) class A(threading.Thread): def __init__(self): super(A,

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Sayan Chowdhury
Changes by Sayan Chowdhury : -- nosy: +sayanchowdhury ___ Python tracker ___

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

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue28961] unittest.mock._Call ignores `name` parameter

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2017-02-26 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +272 ___ Python tracker ___ ___

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

2017-02-26 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +271 ___ Python tracker ___ ___

[issue28961] unittest.mock._Call ignores `name` parameter

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +270 ___ Python tracker ___ ___

[issue28961] unittest.mock._Call ignores `name` parameter

2017-02-26 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +269 ___ Python tracker ___ ___

[issue29598] Write unit tests for pdb module

2017-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And decorate this test class with test.support.cpython_only. -- ___ Python tracker ___

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Xiang Zhang
Xiang Zhang added the comment: I concur the current message is misleading. OSError makes the string "file1 -> file2". This also affects other methods calling `path_error2()` such as os.link(). -- nosy: +xiang.zhang versions: +Python 3.6, Python 3.7

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

2017-02-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> inada.naoki ___ Python tracker ___

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: execute the attached script. It should return FileExistsError: [Errno 17] File exists: 'a_link' -> 'a' but it returns FileExistsError: [Errno 17] File exists: 'a' -> 'a_link' -- components: Library (Lib) files: x.py messages: 288591 nosy:

Re: Problem With Tkinter Font

2017-02-26 Thread Peter Otten
Wildman via Python-list wrote: > 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

[issue29650] abstractmethod does not work when deriving from Exception

2017-02-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: -abstract class instantiable when subclassing dict resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> abstract class instantiable when subclassing dict