[issue30608] argparse calculates string widths incorrectly

2017-06-08 Thread Vanessa McHale

New submission from Vanessa McHale:

Currently, python computes string widths based on number of characters. 
However, this will not work in general because some languages have e.g. vowel 
markers: 'བོད' for instance is three characters but its width should be two. 

I have an example repo here: https://github.com/vmchale/argparse-min-example

--
components: Library (Lib)
messages: 295490
nosy: Vanessa McHale
priority: normal
severity: normal
status: open
title: argparse calculates string widths incorrectly
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

User code shouldn't allocate PyInterpreterState and PyThreadState structures, 
it only uses structures created by the interpreter. Changing the size of 
PyInterpreterState should be safe. The only possible breaking compatibility is 
if user code directly access co_extra_user_count, co_extra_freefuncs, 
async_gen_firstiter or async_gen_finalizer rather than using the API: 
_PyEval_RequestCodeExtraIndex(), _PyCode_GetExtra(), _PyCode_SetExtra(), 
_PyEval_GetAsyncGenFirstiter(), _PyEval_SetAsyncGenFirstiter(), 
_PyEval_GetAsyncGenFinalizer() and _PyEval_SetAsyncGenFinalizer().

Nick's idea about _preserve_36_ABI_1 and _preserve_36_ABI_2 should   address 
concerns about direct access to async_gen_firstiter and async_gen_finalizer. 
Direct access to co_extra_user_count and co_extra_freefuncs obviously can't be 
preserved.

PyInterpreterState and PyThreadState are not in the stable ABI. They are opaque 
types when use limited API. May be they should be made opaque for all user code 
(in 3.7+).

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30303] IDLE: Add _utest to textview and add textview tests

2017-06-08 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2084

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30038] Race condition in how trip_signal writes to wakeup fd

2017-06-08 Thread Nathaniel Smith

Nathaniel Smith added the comment:

I guess now would be a good time to decide whether this should be backported to 
3.6, with 3.6.2 coming out in a few days :-). (Or if not, then it can probably 
be closed?)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-06-08 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Looks good to me, thanks Serhiy.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27838] test_os.test_chown() failure on koobs-freebsd-{current, 9}

2017-06-08 Thread Kubilay Kocak

Changes by Kubilay Kocak :


Added file: http://bugs.python.org/file46937/python-sudo.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27838] test_os.test_chown() failure on koobs-freebsd-{current, 9}

2017-06-08 Thread Kubilay Kocak

Kubilay Kocak added the comment:

as per msg280837, this beings to happen when I restart the buildbot worker via 
sudo (does not fail on initial startup, executed/invoked using the same script, 
which does not use sudo) and the environment the worker starts with appears to 
be relevant.

Attached are the environments for the worker at initial startup 
(python-initial) and subsequent service restart using sudo (python-sudo, which 
fails tests).


The delta between the two is:

--- python-initial  2017-06-09 14:35:49.557098000 +1000
+++ python-sudo 2017-06-09 14:35:13.665893000 +1000
@@ -6,17 +6,29 @@
   BLOCKSIZE=K
   EDITOR=vi
   GROUP=buildbot
-  HOME=/
+  HOME=/root
   HOST=CURRENT-amd64
   HOSTTYPE=FreeBSD
-  LOGNAME=buildbot
+  LANG=en_US.UTF-8
+  LC_ALL=en_US.UTF-8
+  LC_CTYPE=en_US.UTF-8
+  LOGNAME=root
   MACHTYPE=x86_64
+  MAIL=/var/mail/root
   OSTYPE=FreeBSD
   PAGER=more
-  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin://bin
+  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
+  PS1=%B[%{%}%n%{%}%b@%B%{%}%m%b%{%}:%~%B]%b
   PWD=/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build
-  RC_PID=23
+  RC_PID=22356
+  SHELL=/bin/csh
   SHLVL=1
-  USER=buildbot
+  SUDO_COMMAND=/usr/local/etc/rc.d/buildslave restart
+  SUDO_GID=1001
+  SUDO_UID=1001
+  SUDO_USER=koobs
+  TERM=screen-256color
+  USER=root
+  USERNAME=root
   VENDOR=amd
  using PTY: False

--
Added file: http://bugs.python.org/file46936/python-initial.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Nick Coghlan

Nick Coghlan added the comment:

It looks like the current right-shift error message is already distinctive 
enough to get people to answers explaining the culprit: 
https://www.google.com.au/search?q=TypeError:+unsupported+operand+type(s)+for+>>:+'builtin_function_or_method'+and+'_io.TextIOWrapper'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, re-reading the comments when reviewing Sanyam's patch, I just remembered 
the problem with the "print >> sys.stderr, output" case, which is that it isn't 
a syntax error, it's a runtime type error:

```
>>> print >> sys.stderr, "message"
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and 
'_io.TextIOWrapper'
```

So if we ever wanted to provide a specialised prompt for that, it would need to 
go into the right-shift operator implementation as a final check before raising 
the type error, rather than here.

That reduces the cases we need to handle here to just the default one and the 
softspace one, where a trailing comma in the statement text gets replaced with 
", end=' '".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Eric, right, I left a couple of logical leaps out of my reply as well. My first 
thought was the same as yours but then I went:

- that means we need to split on commas
- which means we need to track whether or not we're inside a quoted string or 
not
- which is probably more complexity than is warranted just to produce a 
slightly better hint to the user

Result: let's just use "" as a placeholder for "the thing you were trying 
to print"

Although now that I put it that way, "" is probably a better 
user-oriented placeholder, since "expr" (short for expression) is a very 
language-developer-oriented term, while "print()" is closer to 
pseudocode.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30607] Extract documentation theme into a separate package

2017-06-08 Thread Jon Wayne Parrott

Changes by Jon Wayne Parrott :


--
pull_requests: +2083

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30606] Spam

2017-06-08 Thread Berker Peksag

Changes by Berker Peksag :


--
Removed message: http://bugs.python.org/msg295480

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30606] Spam

2017-06-08 Thread Berker Peksag

Changes by Berker Peksag :


--
Removed message: http://bugs.python.org/msg295479

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30606] Spam

2017-06-08 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -Love
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: The reply's additional 'Re' is ok -> Spam

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30607] Extract documentation theme into a separate package

2017-06-08 Thread Jon Wayne Parrott

New submission from Jon Wayne Parrott:

As part of an effort to align the packaging documentation 
(packaging.python.org) with the CPython docs, PyPA has extracted the theme used 
in the CPython documentation into a separate repository and package 
(https://github.com/python/python-docs-theme).

This bug is to track removing the now duplicate theme code from CPython and 
relying on the externalized version.


Context links:
1. https://mail.python.org/pipermail/python-dev/2017-May/148029.html
2. https://github.com/pypa/python-packaging-user-guide/pull/305

--
assignee: docs@python
components: Documentation
messages: 295482
nosy: Jon Wayne Parrott, brett.cannon, docs@python, dstufft, ncoghlan
priority: normal
severity: normal
status: open
title: Extract documentation theme into a separate package
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30606] The reply's additional 'Re' is ok

2017-06-08 Thread Lovelyn

New submission from Lovelyn:

lovecoli...@gmail.com

--
messages: 295479
nosy: Love
priority: normal
severity: normal
status: open
title: The reply's additional 'Re' is ok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-06-08 Thread Ned Deily

Ned Deily added the comment:

As a followup, Nathanial, are you satisfied with the resolution here for the 
upcoming 3.6.2?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30606] The reply's additional 'Re' is ok

2017-06-08 Thread Lovelyn

Lovelyn added the comment:

lovecoli...@gmail.com

On Jun 9, 2017 9:19 AM, wrote:

lovecoli...@gmail.com

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object

2017-06-08 Thread Guido van Rossum

Guido van Rossum added the comment:

Use a lambda instead of partial. It's more pythonic.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30486] Allow setting cell value

2017-06-08 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-08 Thread Ned Deily

Ned Deily added the comment:

See review comments on PR 2015.

--
nosy: +ned.deily
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30486] Allow setting cell value

2017-06-08 Thread Lisa Roach

Lisa Roach added the comment:

Thank you for you guidance, Serhiy!

On Thu, Jun 8, 2017 at 4:45 AM, Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka added the comment:
>
> Thank you for your contribution Lisa!
>
> --
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-06-08 Thread Dino Viehland

Changes by Dino Viehland :


--
pull_requests: +2082

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object

2017-06-08 Thread Curt McDowell

Curt McDowell added the comment:

There are use cases for this. I hit the problem and eventually wound up here, 
so I'd like to make a case to re-open.

My project has a callback registry of asyncio handler routines.

register_callback(condition1, handler1)
register_callback(condition2, handler2)
...

I want to register many callbacks, but use only one handler and an argument to 
differentiate it. I realize our callback systems should provide for a cookie, 
but it doesn't. 

register_callback(condition1, functools.partial(handler, 'detail1'))
register_callback(condition2, functools.partial(handler, 'detail2'))

The callback registry makes sure iscoroutinefunction(handler) because we don't 
want to defer error checking to the distant future. But iscoroutinefunction() 
returns False for the partial function. I was hopeful that this might work, but 
alas, no:

register_callback(condition1,
  asyncio.coroutine(functools.partial(handler, 'detail1')))

--
nosy: +curtmcd

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams

Changes by Roy Williams :


--
pull_requests: +2081

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams

Roy Williams added the comment:

Repro:

```
import re
re.compile(br'^(.*?)$(?m)')
```

Results in
```
Traceback (most recent call last):
  File "test_compile.py", line 2, in 
re.compile(br'^(.*?)$(?m)')
  File "/usr/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
  File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.6/sre_parse.py", line 856, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
  File "/usr/lib/python3.6/sre_parse.py", line 415, in _parse_sub
itemsappend(_parse(source, state, verbose))
  File "/usr/lib/python3.6/sre_parse.py", line 741, in _parse
' (truncated)' if len(source.string) > 20 else '',
BytesWarning: str() on a bytes instance
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams

New submission from Roy Williams:

import re
re.compile(br'^(.*?)$(?m)')

--
components: Regular Expressions
messages: 295473
nosy: Roy Williams, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.compile fails when compiling bytes under `-bb` mode
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27645] Supporting native backup facility of SQLite

2017-06-08 Thread R. David Murray

R. David Murray added the comment:

There's a good chance, yes.  You'll have to keep periodically pinging the issue 
(say once a month :), and if you can specifically talk someone into doing a 
review your chances go up :)   For it to go in we need a review from a 
core-dev, but one or more reviews from non-core-devs will help it move along as 
well (less for the core-dev to do when they find the time to do the review).

--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27534] IDLE: Reduce number and time for user process imports

2017-06-08 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Yes, I ran test_idle before I submitted the pull request.  I wasn't sure if I 
was missing something based on your comments of the test failing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27534] IDLE: Reduce number and time for user process imports

2017-06-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, I do want to continue this.  As I explained in msg270522, I shelved (but 
not abandoned) the autocomplete patch because it caused a test failure I did 
not (and do not) understand, and because I found another fix for that issue.  
The reductions I noted above were for the patch I did apply, not this one.

Update: I just created pr_2011 and test_idle passes.  I'm puzzled. I don't 
remember patching autocomplete since last July.  Anyway, if the patch works, I 
can now decide if I really want to go this route.  It makes sense to keep 
related functions together.  It also makes sense to keep functions that run in 
the same process together.  I should see if this patch has any noticeable 
benefit (time and import reduction) and if a similar patch for call tips works 
and has benefit.

--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-08 Thread Dino Viehland

Changes by Dino Viehland :


--
pull_requests: +2080

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Eric.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 570b1c971c31cd08dbf060f4e21636c40aa47786 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. 
(GH-1888) (#2013)
https://github.com/python/cpython/commit/570b1c971c31cd08dbf060f4e21636c40aa47786


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30604] co_extra_freefuncs is stored thread locally and can lead to crashes

2017-06-08 Thread Dino Viehland

New submission from Dino Viehland:

The co_extra_freefuncs are stored in PyThreadState.  When calling 
_PyEval_RequestCodeExtraIndex you are given a thread specific index.  The code 
object can then lose it's last reference on a different thread, and the wrong 
free function can be called if users of the extra space have made calls to get 
their index in different orders.  

This can also lead to crashes if the extra thread hasn't yet requested extra 
indexes either.

--
assignee: dino.viehland
components: Interpreter Core
keywords: patch
messages: 295467
nosy: brett.cannon, dino.viehland, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: co_extra_freefuncs is stored thread locally and can lead to crashes
type: crash
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30603] textwrap: declining indent level has no test case

2017-06-08 Thread Jonathan Eunice

Changes by Jonathan Eunice :


--
pull_requests: +2079

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b319d09ee4427aac1ee8f298692127d34ef57dc0 by Victor Stinner in 
branch '3.6':
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)
https://github.com/python/cpython/commit/b319d09ee4427aac1ee8f298692127d34ef57dc0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 31b950ab86f5c99a18c16dbf1900b854b94e0659 by Victor Stinner in 
branch '3.6':
bpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)
https://github.com/python/cpython/commit/31b950ab86f5c99a18c16dbf1900b854b94e0659


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30603] textwrap: declining indent level has no test case

2017-06-08 Thread Jonathan Eunice

New submission from Jonathan Eunice:

The case where textwrap.dedent() handles a declining indent level, requiring it 
to revise its margin estimate downward, remains untested.

This issue is opened in support of an imminent PR that adds an appropriate test.

--
components: Library (Lib)
messages: 295464
nosy: jonathaneunice
priority: normal
severity: normal
status: open
title: textwrap: declining indent level has no test case
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2078

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2e9cd5825c5ccdbb6f65a57c0c7941078e003c14 by Serhiy Storchaka in 
branch 'master':
bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. 
(#1888)
https://github.com/python/cpython/commit/2e9cd5825c5ccdbb6f65a57c0c7941078e003c14


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-08 Thread Eryk Sun

Eryk Sun added the comment:

The memory leak is in os_spawnv_impl and os_spawnve_impl in 
Modules/posixmodule.c. The call fails with a ValueError when the first argument 
in the argv list is an empty string, in which case these functions both 
mistakenly pass i (0) to free_string_array() as the count of strings to free. 
But the conversion was successful, so it needs to include the current string in 
the count, i.e. `i + 1`.

The fix for this could also address the following two issues, which are mostly 
cosmetic in nature. os_spawnve_impl needs its TypeError message to be special 
cased the same as in os_spawnv_impl, i.e. "spawnve() arg 2 must contain only 
strings". Currently it uses the default message from the failed conversion: 
"expected str, bytes or os.PathLike object, not %.200s". Also, its ValueError 
message needs to reference "spawnve()" instead of "spawnv()".

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30596] Add close() to multiprocessing.Process

2017-06-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

close() wouldn't terminate the underlying process, so the process would still 
exist (and wouldn't easily be stoppable from Python anymore) if you were to 
call close() before terminate() or join().

Perhaps we should instead mandate people call join() before close()?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30596] Add close() to multiprocessing.Process

2017-06-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +asksol

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27534] IDLE: Reduce number and time for user process imports

2017-06-08 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +2077

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27534] IDLE: Reduce number and time for user process imports

2017-06-08 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Terry,

I've applied this patch to 3.7 and made a pull request.  This seemed like a fix 
you wanted to move forward with, so I hope that's helpful.

--
nosy: +csabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30596] Add close() to multiprocessing.Process

2017-06-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +2076

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29237] Create enum for pstats sorting options

2017-06-08 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for checking in, Ethan.

Sorry, since this was first assigned to me, I got pre-occupied with other 
issues and projects in the core-workflow.

Ratnadeep, if you are still interested, please go ahead with this issue. I've 
unassigned myself.

Thanks.

--
assignee: Mariatta -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29237] Create enum for pstats sorting options

2017-06-08 Thread Ethan Furman

Ethan Furman added the comment:

Marriatta, perhaps it is time to let Ratnadeep work on this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-08 Thread Ethan Furman

Ethan Furman added the comment:

No test code has been provided, so lacking any evidence of this problem I am 
closing this issue.

Do not reopen without testable code to show the failure.

--
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Sanyam Khurana

Changes by Sanyam Khurana :


--
pull_requests: +2075

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread Eryk Sun

Eryk Sun added the comment:

Segev included a fix for this leak in PR 1927 for bpo30555, but I suppose it's 
better to fix it separately.

--
nosy: +Segev Finer, eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue27645] Supporting native backup facility of SQLite

2017-06-08 Thread Lele Gaifax

Lele Gaifax added the comment:

Is there any chance this could be accepted for Python 3.7?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e5bdad2201de45c203037e59491e4fea56def56d by Victor Stinner in 
branch '2.7':
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2006)
https://github.com/python/cpython/commit/e5bdad2201de45c203037e59491e4fea56def56d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset df04c088493bdbc2defea5e225a94e9bdd8e759f by Victor Stinner in 
branch '3.5':
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2005)
https://github.com/python/cpython/commit/df04c088493bdbc2defea5e225a94e9bdd8e759f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2074

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c by Victor Stinner in 
branch 'master':
bpo-30601: Fix a refleak in WindowsConsoleIO (#2003)
https://github.com/python/cpython/commit/29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-08 Thread STINNER Victor

New submission from STINNER Victor:

The leak can be reproduced with the minimum attached test_os.py:

C:\haypo\python>PCbuild\amd64\python_d.exe -m test -R 3:3 test_os
Run tests sequentially
0:00:00 [1/1] test_os
beginning 6 repetitions
123456
..
test_os leaked [2, 2, 2] memory blocks, sum=6
test_os failed

1 test failed:
test_os

Total duration: 172 ms
Tests result: FAILURE

--
components: Tests, Windows
files: test_os.py
messages: 295451
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] os.spawn*() tests of test_os leak references on Windows
type: resource usage
versions: Python 3.7
Added file: http://bugs.python.org/file46935/test_os.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I uploaded the wrong version. It should now work.

--
Added file: http://bugs.python.org/file46934/bisect_test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29512] regrtest refleak: implement bisection feature

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Updated script: support Windows, fix cmdline help.

--
Added file: http://bugs.python.org/file46933/bisect_test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2073

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2072

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2071

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d52aa31378ae43e044a300edfe8285954c167216 by Victor Stinner in 
branch 'master':
bpo-30418: Popen.communicate() always ignore EINVAL (#2002)
https://github.com/python/cpython/commit/d52aa31378ae43e044a300edfe8285954c167216


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

With https://github.com/python/cpython/pull/2003 test_winconsoleio doesn't leak 
anymore.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2070

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

The following code leaks one reference:

f = _io._WindowsConsoleIO('CONIO$', 'r')
f.close()
f = None

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30601] [Windows] test_winconsoleio leaks references

2017-06-08 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/22/steps/test/logs/stdio

0:00:12 [  7/405/1] test_winconsoleio failed
beginning 6 repetitions
123456
..
test_winconsoleio leaked [43, 43, 43] references, sum=129

--
components: Tests, Windows
messages: 295445
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] test_winconsoleio leaks references
type: resource usage
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Eric V. Smith

Eric V. Smith added the comment:

That sounds good to me.

Just to elaborate on my earlier message, since it might have been too terse:

I think it would be misleading to give in error at:

print >>sys.stderr, "message"

and say:
Did you mean 'print("message")'?

since they're not equivalent. If you can produce the equivalent text in the 
error message, then that's fine with me:

Did you mean 'print("message", file=sys.stderr)'?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2069

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27321] Email parser creates a message object that can't be flattened

2017-06-08 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

ok, I have tested on 3.6 and 3.5, just with the test. and in this case, we get 
the errors on both.
if we apply the patch of Johannes, the test passes and there is no issues.

+1 the backports for 3.5 and 3.6 is just a git cherry-picking.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27321] Email parser creates a message object that can't be flattened

2017-06-08 Thread R. David Murray

R. David Murray added the comment:

I'm going to try to review this this weekend.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

With https://github.com/python/cpython/pull/2001 test_threaded_import doesn't 
leak anymore.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2068

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed with Serhiy.  test_threaded_import should just re-import a module which 
has less side effects.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Those are easy enough to check with strncmp() even in C, so we could make them 
manageable by just including "" in the error message, rather than the 
full text of the original statement.

That is:

Did you mean 'print()'? # Default 
Did you mean 'print(, file=)'?  # starts with '>>'
Did you mean 'print(, end=' ')'?# ends with ','

That's basically correct even when printing multiple arguments, so I'd avoid 
the temptation to detect commas within the line (particularly since they might 
be inside a string).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We don't have such code currently. The function name containing "()" looks 
silly. But funcname is not always a constant string, you can set it to 
arbitrary string when create a BaseException subclass.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, pleas do this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This make the API and implementation more complex. I prefer making tests not 
creating several instances of the random module. Or do this in a short-living 
subprocess.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

> If add an assertion, the user code could provoke a crash by creating an 
> exception type with a name containing "()": type('E()', (BaseException,), {}).

Right. Do we have such code currently? If not, we can remove the assertion 
later if we want to use such error message.

> Thus this should be a runtime check that raises an exception. What the type 
> of an exception should be raised?

Sorry, I don't understand. funcname is not always a constant string like "func"?

Well, it was just an idea. Ignore it if you see practical issues.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread SylvainDe

SylvainDe added the comment:

Can I give this a try or is anyone working on this already ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30584] test_os fails on non-English (Russian) Windows

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Thanks Denis Osipov for the fix and backports!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch! This issue is similar to issue30534, but caused by generated code.

The solution is easy: make Argument Clinic (Tools/clinic/clinic.py) generating 
_PyArg_NoStackKeywords() before _PyArg_ParseStack() and regenerate all 
generated by Argument Clinic code (make clinic).

--
components: +Argument Clinic
keywords: +easy
nosy: +larry, serhiy.storchaka
stage:  -> needs patch
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] test_threaded_import leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

> The leak was introduced by the commit 
> 346cbd351ee0dd3ab9cb9f0e4cb625556707877e.

This commit "bpo-16500: Allow registering at-fork handlers" adds the following 
code to Lib/random.py:

+if hasattr(_os, "fork"):
+_os.register_at_fork(_inst.seed, when='child')

test_threaded_import creates fresh instance of the random module and so 
os.register_at_fork() is called multiple time with multiple different callbacks.

The problem is that it's not currently possible to remove callbacks. It would 
be nice to be able to unregister callbacks, at least a private for unit tests.

The minimum would be a os.unregister_at_fork() function.

I would prefer to have get/set functions to be able to restore callbacks once 
tests complete, but also to detect when an unexpected callback was registered. 
For example, write a new test in Lib/test/libregrtest/save_env.py for regrtest.

See also bpo-16500 which added the new API.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27321] Email parser creates a message object that can't be flattened

2017-06-08 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27321] Email parser creates a message object that can't be flattened

2017-06-08 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

maybe we could merge the PR, and I could propose a backport for 3.5 and 3.6.

2.7 is affected ?

--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] os.register_at_fork(): allow to unregister callbacks -- test_threaded_import leaks references

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_threaded_import leaks references -> os.register_at_fork(): allow to 
unregister callbacks -- test_threaded_import leaks references

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30584] test_os fails on non-English (Russian) Windows

2017-06-08 Thread Denis Osipov

Changes by Denis Osipov :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30547] [Windows] SubinterpreterTest.test_callbacks_leak() of test_atexit leaks references

2017-06-08 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If add an assertion, the user code could provoke a crash by creating an 
exception type with a name containing "()": type('E()', (BaseException,), {}). 
Thus this should be a runtime check that raises an exception. What the type of 
an exception should be raised?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30547] [Windows] SubinterpreterTest.test_callbacks_leak() of test_atexit leaks references

2017-06-08 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

3.6 is not affected by this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30600] Error message incorrect when index is called with keyword argument ("[].index(x=2)")

2017-06-08 Thread SylvainDe

New submission from SylvainDe:

Issue found while trying to write tests for  https://bugs.python.org/issue30592 
.

Issue related to http://bugs.python.org/issue30534 .

The following code:

[].index(x=2)

should raise the following error:

TypeError: index() takes no keyword arguments

but currently raises:

TypeError: index() takes at least 1 argument (0 given)


This is easily reproduced with the following unit test:

# AssertionError: "^index\(\) takes no keyword arguments$" does not match 
"index() takes at least 1 argument (0 given)"
def test_varargs4_kw(self):
msg = r"^index\(\) takes no keyword arguments$"
self.assertRaisesRegex(TypeError, msg, [].index, x=2)

--
components: Interpreter Core
messages: 295427
nosy: SylvainDe
priority: normal
severity: normal
status: open
title: Error message incorrect when index is called with keyword argument 
("[].index(x=2)")
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Oh no, I don't expect anything smart :-) Just an assertion to catch obvious 
mistakes when the function is called manually (not using Argument Clinic).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30584] test_os fails on non-English (Russian) Windows

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0b901b8fcfda864070335b249071508ee0c by Victor Stinner (Denis 
Osipov) in branch '3.5':
[3.5] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#2000)
https://github.com/python/cpython/commit/a0b901b8fcfda864070335b249071508ee0c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It would be possible to make _PyArg_NoKeywords() adding "()" only if the passed 
argument don't contain them. But since this is a private API, it was easier to 
just remove "()" from arguments. In any case most uses of _PyArg_NoKeywords() 
are generated by Argument Clinic and they don't pass "()" in the argument.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30592] Bad error message 'bool()() takes no keyword arguments'

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

Would it be possible to add an assertion to _PyArg_NoKeywords() to prevent 
regressions? Fail if funcname contains "(" or ")". For example:

/* funcname must not contain ( or ), since "()" suffix is added in the error 
message */
assert(!strchr(funcname, '(') && !strchr(funcname, ')'));

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30584] test_os fails on non-English (Russian) Windows

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:


New changeset ca1b66fd059758bbd6e2cc62c8f2adecefe8f942 by Victor Stinner (Denis 
Osipov) in branch '3.6':
[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
https://github.com/python/cpython/commit/ca1b66fd059758bbd6e2cc62c8f2adecefe8f942


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-08 Thread Eric V. Smith

Eric V. Smith added the comment:

Sorry, I've been busy. I'll get to this soon, though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30599] test_threaded_import leaks references

2017-06-08 Thread STINNER Victor

STINNER Victor added the comment:

The leak was introduced by the commit 346cbd351ee0dd3ab9cb9f0e4cb625556707877e.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >