[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-11 Thread Louie Lu

Louie Lu added the comment:

Additional info for Windows platform: when creating autocompletewindow, it will 
bind "" to winconfig, this cause a problem, when showing up the acw, 
it will misbehavior calling multiple times about .

The result is, tk will not able to response to Double-ButtonRelease.

--

___
Python tracker 

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



[issue30287] cpython and Clang Static Analyzer

2017-05-11 Thread Mark Dickinson

Mark Dickinson added the comment:

> I guess return -1 instead of bits=0 will silent both gcc and the static 
> analyzer warning.

That's a possibility, though we should also set an exception in that case 
(since returning an error value without setting an exception is also something 
that might be picked up by a CPython-oriented static analyser in the future).

--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

> Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7.

PCbuild/rt.bat doesn't work on VS9.0 since VS9.0 creates python(_d).exe in 
PC/VS9.0/{amd64,x86}/, not in PCbuild/{amd64,x86}/.

My new https://github.com/python/cpython/pull/1541 patch serie now starts with 
a fix for this issue.

--

___
Python tracker 

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



[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch makes the regular expression parser produce more optimal tree, 
mainly due to getting rid of non-capturing groups. This allows to apply an 
optimization that was forbidden before and makes the regular expression 
compiler producing more efficient code.

For example following expressions are transformed in more optimal form:

'(?:x|y)+' -> '[xy]+'
'(?:ab)|(?:ac)' -> 'a[bc]'
r'[a-z]|\d' -> r'[a-z\d]'

This can speed up matching by 10-25 times.

$ ./python -m timeit -s "import re; p = re.compile(r'(?:x|y)+'); s = 'x'*1" 
 "p.match(s)"
Unpatched:  500 loops, best of 5: 865 usec per loop
Patched:5000 loops, best of 5: 84.5 usec per loop

$ ./python -m timeit -s "import re; p = re.compile(r'(?:[a-z]|\d)+'); s = 
'x'*1"  "p.match(s)"
Unpatched:  100 loops, best of 5: 2.19 msec per loop
Patched:5000 loops, best of 5: 84.5 usec per loop

--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
messages: 293477
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Optimize out non-capturing groups
type: performance
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



[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in 
branch '2.7':
[2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() 
(#1541)
https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd


--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in 
branch '2.7':
[2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() 
(#1541)
https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd


--

___
Python tracker 

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



[issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

Another issue with Python built using VS 2008, test_regrtest has to check two 
tests in that case, see:
http://bugs.python.org/issue30283#msg293476

--

___
Python tracker 

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



[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

$ ./python -m timeit -s "import re; p = re.compile(r'[a-z]|[0-9]'); s = ' 
'*1+'x'"  "p.search(s)"
Unpatched:  500 loops, best of 5: 732 usec per loop
Patched:1000 loops, best of 5: 279 usec per loop

--

___
Python tracker 

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



[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1641

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

-@unittest.skipUnless(sysconfig.is_python_build(),
- 'test.bat script is not installed')

I had to remove this decorator from test_tools_buildbot_test() since 
sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my 
Windows VM, whereas I didn't install Python!? I don't know why.

Moreover, the decorator was missing on test_pcbuild_rt(), likely a mistake in 
the backport from master.

--

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

-@unittest.skipUnless(sysconfig.is_python_build(),
- 'test.bat script is not installed')

I had to remove this decorator from test_tools_buildbot_test() since 
sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my 
Windows VM, whereas I didn't install Python!? I don't know why.

Moreover, the decorator was missing on test_pcbuild_rt(), likely a mistake in 
the backport from master.

--

___
Python tracker 

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



[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread Charalampos Stratakis

Changes by Charalampos Stratakis :


--
pull_requests: +1642

___
Python tracker 

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



[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-11 Thread Xiang Zhang

New submission from Xiang Zhang:

Studying how trashcan works I get puzzled about why increasing 
trash_delete_nesting in _PyTrash_thread_destroy_chain.  I asked Antoine 
privately (thought he was the author).  Antoine told me the reason and 
suggested add a comment here to help understand.

--
assignee: pitrou
messages: 293484
nosy: pitrou, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Add an explaining comment in _PyTrash_thread_destroy_chain()
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



[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor

New submission from STINNER Victor:

When Python 2.7 is compiled by VS 2008 using PC/VS9.0/ solution, the executable 
is PC/VS9.0/{amd64,x86}/python(_d).exe. sysconfig.is_python_build() handles 
PC/VS7.1/ and PCbuild/ builds, but not PC/VS9.0/ builds.

Attached PR fixes is_python_build() for VS 2008.

--
components: Build, Library (Lib), Windows
messages: 293485
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [2.7] sysconfig.is_python_build() doesn't work if Python is built with 
VS 2008
versions: Python 2.7

___
Python tracker 

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



[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

See also bpo-30313: Tests of Python 2.7 VS9.0 buildbots must be run with -uall 
-rwW options.

The PR also contains a fix for test_regrtest, see: 
http://bugs.python.org/issue30283#msg293476

--

___
Python tracker 

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



[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1643

___
Python tracker 

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



[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-11 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1644

___
Python tracker 

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



[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a4465a5bd08f232cf097893006118c82975c3402 by Victor Stinner 
(stratakis) in branch '3.6':
[3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543)
https://github.com/python/cpython/commit/a4465a5bd08f232cf097893006118c82975c3402


--

___
Python tracker 

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



[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

Thank you Charalampos, I merged your fixes for branches 3.6 and master (3.7).

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

> I had to remove this decorator from test_tools_buildbot_test() since 
> sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my 
> Windows VM, whereas I didn't install Python!? I don't know why.

I opened bpo-30342 for this bug.

> Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7.

With my third commit a5bb62436e25614276ac4b8e252a87f3fcc946cd, test_regrtest 
pass again on x86 Windows XP VS9.0 2.7 buildbot:

http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/146

--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread desbma

desbma added the comment:

Why do you think this isn't a good idea?

As a user, what am supposed to do with that warning:
* about a program I have no idea I was calling (the webbrowser module 
abstraction is here so I don't have to think about it)
* I have no control about it's invocation
* the output comes asynchronously in my program and may be hard to link the the 
webbrowser.open call

Also the specific example of this issue is a xdg-open deprecation warning, but 
it could be any other output that is hard for the user to take action on or 
understand where it's coming from.

My understanding of the *current* code is that  all graphical browsers are 
already started with their output tossed away 
(https://hg.python.org/cpython/file/tip/Lib/webbrowser.py#l196). It seems weird 
to keep it only for all the command line wrappers (xdg-open, gnome-open, etc.).
Of course the TTY interactive browsers have a good reason to keep it, obviously.

--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

> Why do you think this isn't a good idea?

If the command fails, you simplify have no idea of what happened. For example, 
thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the 
warning should be hidden.

webbrowser is already able to detect that GNOME is running and uses gvfs-open 
in that case. Maybe we should exchange these two blocks of code to prefer 
gvfs-open over xdg-open on GNOME?

# use xdg-open if around
if shutil.which("xdg-open"):
register("xdg-open", None, BackgroundBrowser("xdg-open"))

# The default GNOME3 browser
if "GNOME_DESKTOP_SESSION_ID" in os.environ and shutil.which("gvfs-open"):
register("gvfs-open", None, BackgroundBrowser("gvfs-open"))

Do you get the warning if you use gvfs-open?

--

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

INADA Naoki added the comment:


New changeset 991adca012f5e106c2d4040ce619c696ba6f9c46 by INADA Naoki in branch 
'master':
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097)
https://github.com/python/cpython/commit/991adca012f5e106c2d4040ce619c696ba6f9c46


--

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +1645

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +1646

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

INADA Naoki added the comment:


New changeset 3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2 by INADA Naoki in branch 
'3.6':
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)
https://github.com/python/cpython/commit/3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2


--

___
Python tracker 

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



[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2017-05-11 Thread Arthur Gutman

Changes by Arthur Gutman :


--
nosy: +archibald

___
Python tracker 

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



[issue30343] Subclassed json.JSONEncoder does not respect default method for supported types

2017-05-11 Thread Christopher Harrison

New submission from Christopher Harrison:

If you subclass `json.JSONEncoder` to enable serialisation of custom types 
beyond those supported, you are meant to transform values of said type into a 
serialisable version within an overridden `default` method. For example:

class MyJSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, MyType):
return str(o)

# Raise TypeError when we have a type we can't serialise
super().default(o)

This, however, won't work if your custom type is an instance of one of the 
supported types. This is because, in Lib/json/encoder.py, the `_iterencode` 
function (defined in `_make_iterencode`) type checks against supported types 
before it delegates to the `default` method.

The reason this came up is because I wanted to serialise a named tuple into a 
JSON object, with keys corresponding to the named tuple's field names. Ignoring 
the merits (or otherwise) of this desired outcome, this can't work because a 
named tuple is still a tuple and thus the `default` method is never called.

In Python 2.7, the `_iterencode` method was part of the `JSONEncoder` class, so 
you could override it in a subclass; even if doing so is somewhat brittle. In 
Python 3, this method has been moved out into the module namespace (tested in 
3.6; looking through the repo, it looks like this change was made in Python 
3.1), so it can't easily be monkey-patched without it affecting other things.

I believe this to be a bug. It seems reasonable to subclass at least named 
tuples, dictionaries and lists in such a way that you'd want a different JSON 
serialisation to their defaults.

--
components: Library (Lib)
messages: 293494
nosy: Christopher Harrison
priority: normal
severity: normal
status: open
title: Subclassed json.JSONEncoder does not respect default method for 
supported types
type: behavior
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



[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein

Changes by Sam Silberstein :


--
components: +Library (Lib) -Documentation
versions:  -Python 2.7

___
Python tracker 

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



[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein

Sam Silberstein added the comment:

Hi there! 

This is my first submission to the bug tracker, so I apologize if I'm missing 
some formatting here.

I've found what's either vague documentation for the 'prefix' parameter of 
`pgkutil.walk_packages` or a bug. The method implies that it will only import 
submodules of the provided path, but if the prefix parameter is not filled, 
this method will import a module with the same name from outside the path -- so 
long as it exists in `sys.modules`. I'm unsure if this is due to the 
documentation not specifying that prefix should always be used when path is 
set, or if this is a bug (I can provide a fix if it's a bug).

Steps to reproduce:

Create a directory with a nested package with the same name as a package 
outside that directory, e.g.:

├── test1
│   ├── __init__.py
│   └── should_not_be_included.py
└── test2
├── __init__.py
└── test1
├── __init__.py
└── should_be_included.py

`list(pkgutil.walk_packages(['test2']))` will contain 
'should_not_be_included.py' instead of 'should_be_included.py'.

Thank you!

Sam Silberstein

--

___
Python tracker 

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



[issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7

2017-05-11 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/150/steps/test/logs/stdio

0:19:29 [214/402/1] test_multiprocessing crashed -- running: test_mmap (43 sec)

[0, 0.0]
[76985 refs]
test test_multiprocessing failed -- Traceback (most recent call last):
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_multiprocessing.py",
 line 844, in test_notify_all
self.assertReturnsIfImplemented(6, get_value, woken)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_multiprocessing.py",
 line 149, in assertReturnsIfImplemented
return self.assertEqual(value, res)
AssertionError: 6 != 5

Traceback (most recent call last):
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\runpy.py", 
line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\runpy.py", 
line 72, in _run_code
exec code in run_globals
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\regrtest.py", 
line 1882, in 
main_in_temp_cwd()
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\regrtest.py", 
line 1869, in main_in_temp_cwd
main()
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\contextlib.py", line 
35, in __exit__
self.gen.throw(type, value, traceback)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 769, in temp_cwd
rmtree(name)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 293, in rmtree
_rmtree(path)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 249, in _rmtree
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 202, in _waitfor
func(pathname)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 249, in 
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py",
 line 197, in _force_run
return func(*args)
WindowsError: [Error 32] The process cannot access the file because it is being 
used by another process: 
'd:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windows\\build\\build\\test_python_2512'

--
components: Tests, Windows
keywords: buildbot
messages: 293496
nosy: davin, haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 
Windows XP 2.7
versions: Python 2.7

___
Python tracker 

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



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

2017-05-11 Thread asterite

asterite added the comment:

Sorry if I misunderstood how the bug tracker works, but why did you delete 
version 3.4 ? Python 3.4 is also affected.

--

___
Python tracker 

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



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

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:


New changeset f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 by Raymond Hettinger 
(csabella) in branch 'master':
bpo-30308: Code coverage for argument in random.shuffle (#1504)
https://github.com/python/cpython/commit/f111fd2e65ef7aefd4ebeadbb48e84d609bf3733


--

___
Python tracker 

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



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

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thank you for the patch.

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



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

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

> Sorry if I misunderstood how the bug tracker works, but why did you delete 
> version 3.4 ? Python 3.4 is also affected.

Right, but Python 3.4 doesn't accept bug fixes anymore:
https://docs.python.org/devguide/#status-of-python-branches

--

___
Python tracker 

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



[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Josh Rosenberg

Josh Rosenberg added the comment:

The PR includes defining and using a _uniq function that is actually a no-op 
function (it doesn't uniquify, the first line returns the argument, so the rest 
is skipped). Was that supposed to be removed, or should it actually uniqify?

--
nosy: +josh.r

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think it would be unusual for tab completion to work on non-strings and would 
create a weird feel to the API.

--

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor

New submission from STINNER Victor:

cstratak reported the following test failure on Fedora 24 when building Python 
3.6 with LTO + PGO:

==
FAIL: test_threads (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates threads that are waiting for the GIL
--
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.1/Lib/test/test_gdb.py", line 783, in 
test_threads
cmds_after_breakpoint=['thread apply all py-bt'])
  File "/builddir/build/BUILD/Python-3.6.1/Lib/test/test_gdb.py", line 218, in 
get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception  Va[95 
chars]nd."] != []
First list contains 2 additional elements.
First extra element 0:
"Python Exception  Variable 'func_obj' not found.: "
+ []
- ["Python Exception  Variable 'func_obj' not found.: ",
-  "Error occurred in Python command: Variable 'func_obj' not found."]
--

--
components: Build, Tests
messages: 293503
nosy: haypo
priority: normal
severity: normal
status: open
title: test_gdb fails on Python 3.6 when built with LTO+PGO
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



[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Josh! This return was temporary added for debugging, the function 
should actually uniqify.

--

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Full build log

--
nosy: +cstratak
Added file: http://bugs.python.org/file46856/build.log

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

All the dependencies dragged.

gdb is of version 7.11. The failures do not happen with gdb 7.12 (which exists 
in later Fedora releases).

--
Added file: http://bugs.python.org/file46857/root.log

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1647

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor

STINNER Victor added the comment:

I created https://github.com/python/cpython/pull/1549 to update test_gdb.py and 
python-gdb.py in Python 3.6. I don't know if it will fix the issus, but it 
shouldn't hurt :-)

--

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Note: test_gdb is skipped on later Fedora's actually (possibly due to gdb 
package no being dragged at the minimal buildroot) so the issue might still be 
there, so the gdb version might have no effect on that. Will investigate 
further.

--

___
Python tracker 

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



[issue30338] LC_ALL=en_US + io.open() => LookupError: (osx)

2017-05-11 Thread Ronald Oussoren

Ronald Oussoren added the comment:

On macOS 10.12:

ronald$ LC_ALL=en_US python2.7 -c 'import locale; 
print(repr(locale.getpreferredencoding()))'
''
ronald$ LC_ALL=en_US python3.6 -c 'import locale; 
print(repr(locale.getpreferredencoding()))'
'UTF-8'

getpreferredencoding uses the CODESET path on macOS, with means the result 
above is explained by this session (python 2.7):

>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'en_US'
>>> locale.nl_langinfo(locale.CODESET)
''

Note that _pyio uses locale.getpreferedencoding(), not 
locale.getpreferredencoding(False). The latter would use US-ASCII as the 
encoding:

>>> import locale
>>> locale.nl_langinfo(locale.CODESET)
'US-ASCII'


I guess the empty string for the encoding is explained by the following shell 
session that looks at the locale information:

$ LC_ALL=en_US.UTF-8 locale -ck LC_ALL | charmap
charmap="UTF-8"

$ LC_ALL=en_US locale -ck LC_ALL | grep charmap
charmap=

In python3 locale.getpreferredencoding (or rather, the same function in 
_bootlocale) was tweaked to deal with this problem:

if not result and sys.platform == 'darwin':
 # nl_langinfo can return an empty string
 # when the setting has an invalid value.
 # Default to UTF-8 in that case because
 # UTF-8 is the default charset on OSX and
 # returning nothing will crash the
 # interpreter.
 result = 'UTF-8'

Backporting this to 2.7 would IMHO be the best way to fix this issue.

--

___
Python tracker 

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



[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon

Changes by Brett Cannon :


--
pull_requests: +1648

___
Python tracker 

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



[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon

Brett Cannon added the comment:

I agree with Victor since that's why I set up the Travis file that way. :)

Thanks to this issue, though, I have added a comment to .travis.yml to explain 
why the version is what it is.

--

___
Python tracker 

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



[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> not a bug
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



[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Matt Gilson

New submission from Matt Gilson:

There is some odd behavior when unpacking the groups from an itertools.groupby 
result.  For example:

from itertools import groupby
from operator import itemgetter

inputs = ((x > 5, x) for x in range(10))
(_, a), (_, b) = groupby(inputs, key=itemgetter(0))
print(list(a))
print(list(b))

On CPython, this results in:

[]
[(True, 9)]

I would expect it to print out 2 empty lists since the second group would have 
to be consumed to make sure that there isn't another value yielded from groupby 
(If there was another value to yield, we'd get a ValueError since we couldn't 
unpack the correct number of items).

This is the behavior that PyPy had prior to re-implementing to be consistent 
with CPython in 
https://bitbucket.org/pypy/pypy/commits/6093ff1a44e6b17f09db83aa80aea562a738c286

--
messages: 293511
nosy: Matt Gilson
priority: normal
severity: normal
status: open
title: Odd behavior when unpacking `itertools.groupby`
type: behavior
versions: Python 3.3, Python 3.5

___
Python tracker 

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



[issue22559] [backport] ssl.MemoryBIO

2017-05-11 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

For what it's worth, it would still be great if this could be merged.  It could 
help a lot with 2/3 migrations of async code that uses Twisted and wants to 
adopt some asyncio parts.  Right now the stdlib SSL module is de-facto useless 
in those scenarios and depending on pyOpenSSL is pretty much the only choice, 
and the lack of availability of a memory BIO on 2.x is the biggest blocker.

--
nosy: +glyph

___
Python tracker 

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



[issue30336] Pull Requests need more detail

2017-05-11 Thread Brett Cannon

Brett Cannon added the comment:

OK, since Victor has verified my thinking wasn't totally off-target, I'm going 
to close this.

Thanks for the idea and taking the time for the PR, Jensen. If you do want to 
file issues or PRs against the devguide, the repo is at 
https://github.com/python/devguide.

--
resolution:  -> rejected
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



[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread desbma

desbma added the comment:

> For example, thanks to stdout/stderr, you noticed the warning. Without 
> stdout/stderr, the warning should be hidden.

That is true, but as a Python user, it don't need to see that warning, only the 
xdg-utils developers do.
I would have never seen it, and it would never have been a problem because 
xdg-util would have been updated to call gio open (with the commit mentioned 
above) long before gvfs-open is completely removed.

> Do you get the warning if you use gvfs-open?

Of course, because gvfs-open is precisely the cause of the deprecation warning

$ cat /usr/bin/gvfs-open
#!/bin/sh

replacement="gio open"
help="gio help open"

>&2 echo "This tool has been deprecated, use '$replacement' instead."
>&2 echo "See '$help' for more info."
>&2 echo

if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
  exec $help "$@:2"
else
  exec $replacement "$@"
fi

--

___
Python tracker 

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



[issue22559] [backport] ssl.MemoryBIO

2017-05-11 Thread Geert Jansen

Geert Jansen added the comment:

Glyph, if this is just for Twisted you could ship the "sslcompat" module that 
I'm shipping with Gruvi. It backports the async IO stuff and a few other pieces 
through an extension module.

https://github.com/geertj/gruvi/blob/master/src/sslcompat.c

and

https://github.com/geertj/gruvi/blob/master/lib/gruvi/sslcompat.py

But having this in the stdlib itself is much cleaner of course.

--

___
Python tracker 

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



[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

So the issue wasn't restricted to a specific gdb version or distro release, as 
due to some issues dependency issues the gdb binary wasn't pulled in the 
buildroot which makes test_gdb to get skipped.

So I was able to reproduce it on my system by installing gdb (version 7.12.1), 
compiling python 3.6 from sources with
--enable-optimizations and --with-lto flags enabled and running 'make test'

Also applied the relevant PR however it didn't fix the issue.

Attaching the full log of 'make test'

--
Added file: http://bugs.python.org/file46858/pgo-lto-gdb-errors-build

___
Python tracker 

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



[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Armin Rigo

New submission from Armin Rigo:

This triggers an assert() failure on debug-mode Python (or a leak in release 
Python):

from itertools import groupby

def f(n):
print("enter:", n)
if n == 5:
list(b)
print("leave:", n)
return n != 6

for (k, b) in groupby(range(10), f):
print(list(b))

With current trunk we get: python: ./Modules/itertoolsmodule.c:303: 
_grouper_next: Assertion `gbo->currkey == NULL' failed.

--
components: Interpreter Core
messages: 293517
nosy: arigo
priority: normal
severity: normal
status: open
title: itertools.groupby() can fail a C assert()
type: crash
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger
components: +Extension Modules -Interpreter Core
nosy: +rhettinger, serhiy.storchaka
stage:  -> needs patch
versions: +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



[issue30019] IDLE freezes when opening a file with astral characters

2017-05-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Eryk> I tried print(transurrogate(s)) from editor and it worked!, printing '🔫 
🔪' (though not near as pretty as here in Firefox.

I have previously thought of scanning strings before inserting into Text 
widgets and converting astral chars to \U000n form, with a color tag to 
distinguish such displays from the literal ten chars.   This should work fine 
for read-only output to Shell but not easily in Editor.  On Windows, I would 
just use transurrogate instead, and that would also work for loading files into 
the editor.

I believe transurrogate could potentially solve pasting on Windows by 
intercepting <> events.

Serhiy, are you aware of Eryk's astral char workaround for Windows?  Could it 
be incorporated into _tkinter, where a string's kind is accessible?

--
nosy: +serhiy.storchaka
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



[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Do you have a suggested fix?

--

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

IDLE currently completes global names, attributes after ., and filename 
segments after / or \ within a string.  In the later two cases, a box will pop 
up automatically after a user selected time after typing . or /\ and nothing 
thereafter.  The filename segments are not quoted in the list box.

These completions work within subscripts.
d[a pops up global name completion box
d['/ pops up filename completion box

Raymond proposes that IDLE complete 'dictionary [string] keys'.  To properly 
code and test, we need a more complete specification.  For instance, "a string 
key box should open after an opening quote that follows '[' that follows a dict 
expression".  Any opening quote should work, just as for filename completion.

This is similar "a calltip opens after a '(' that follows a callable 
expresssion".  For calltips, the expression cannot contain a function call, 
because calls can take an indeterminant amount of time.  If 
"expression.find('(') != -1", the calltip is aborted and the same should be 
true here.  Also, calltips.get_entity(expression) should be reused to get the 
dict object.  (test_calltips should but does not test that 'f()(' is ignored 
and get_entity not called.  The same should be true for "f()['".)

Nice (?) but not necessary: delayed auto-popup after typing "d[".  
This seems that it would be more difficult than the current auto popups.  And 
see the following.

This proposal conflicts with filename completion for subscripts.  When one is 
accessing an existing value, one would want key completion.  If one is 
assigning a value to a new filename key, one would want filename completion.  
The simplest solution I can think of is to not auto pop up key completion but 
to require  before typing (/\) and waiting.

Lastly, should the string keys be quoted in the box?
| long key  |
| short key |
or
|'long key' |
|'short key'|
?

Selecting key objects by their representation is tempting, but it is 
conceptually different from completing names.  Objects may have one canonical 
representation, but many possible representations.  So clicking on a list  
(which currently does not work) or using movement keys is more sensible than 
typing chars that have to match one of many possibilities.  String keys would 
have to be quoted.

So I would only consider this as a separate issue, depending on a fix for 
clicks.  It should only be accessed by  immediately after '[', and I might 
want to disable selection by character matching.

Even then, I would be dubious.  I grepped idlelib for "\w\[".  A majority of 
subscripts are names, handled by current name completion or not (if the names 
are local, which they often are).  The rest are either list indexes and slices 
involving literal ints or string keys, which this proposal would handle for 
accessible dicts.  I am pretty sure there are no keys other than names and 
strings.

But the sparsity of use cases is my problem even with this proposal. Calltips 
are useful because there are many globally accessible callables, including 
builtins and imports.  But other than class __dicts__, there are few globally 
accessible dicts, except perhaps in toy beginner code.  Raymond, have I missed 
something?

The idlelib grep had 763 hits and I believe more that half are for dicts.  But 
they may all be locals or self attributes.  I would love to be able, for 
instance, to type "local_dict['" and fill in 'background', but that will 
not work.

--
stage: test needed -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.7, Python 3.5

___
Python tracker 

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



[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FYI, the CPython behavior matches the pure python implementation show in the 
docs:

Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> class groupby:
# [k for k, g in groupby('BBBCCDAABBB')] --> A B C D A B
# [list(g) for k, g in groupby('BBBCCD')] -->  BBB CC D
def __init__(self, iterable, key=None):
if key is None:
key = lambda x: x
self.keyfunc = key
self.it = iter(iterable)
self.tgtkey = self.currkey = self.currvalue = object()
def __iter__(self):
return self
def __next__(self):
while self.currkey == self.tgtkey:
self.currvalue = next(self.it)# Exit on StopIteration
self.currkey = self.keyfunc(self.currvalue)
self.tgtkey = self.currkey
return (self.currkey, self._grouper(self.tgtkey))
def _grouper(self, tgtkey):
while self.currkey == tgtkey:
yield self.currvalue
try:
self.currvalue = next(self.it)
except StopIteration:
return
self.currkey = self.keyfunc(self.currvalue)

>>> from operator import itemgetter
>>> inputs = ((x > 5, x) for x in range(10))
>>> (_, a), (_, b) = groupby(inputs, key=itemgetter(0))
>>> print(list(a))
[]
>>> print(list(b))
[(True, 9)]

--

___
Python tracker 

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



[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low

___
Python tracker 

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



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

2017-05-11 Thread Ben Finney

Ben Finney added the comment:

Apparently there is some consternation about my bugs.python.org identity. This 
is Ben Finney of WSP Digital, in Melbourne, Australia.

A GitHub account is wholly irrelevant to this account. A GitHub account is 
wholly irrelevant to accepting the PSF CLA.

This bugs.python.org account `benf_wspdigital` does not mention a GitHub 
account, and that's the way I want to keep it.

--

___
Python tracker 

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



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

2017-05-11 Thread Ben Finney

Ben Finney added the comment:

> No, your contribution will not be rejected by "you don't maintain the repo on 
> GitHub", everyone can send the patch (PR) to python/cpython.

I am glad to know that. I won't be maintaining a GitHub account because I 
disagree with the terms of service.

> Ben, if you have any problem about how to get on with GitHub, I can help you 
> […]

Thank you for the offer. My problem with how to get on with GitHub is I don't 
accept their terms of service :-) How do we proceed?

Git is a *decentralised* VCS, it should not be a barrier that I make the 
contribution from a different repository host.

--

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

INADA Naoki added the comment:


New changeset 5e94dedcddf5e09164bf20f18a3c701eeb96c71e by INADA Naoki in branch 
'3.5':
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1547)
https://github.com/python/cpython/commit/5e94dedcddf5e09164bf20f18a3c701eeb96c71e


--

___
Python tracker 

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



[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki

Changes by INADA Naoki :


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



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

2017-05-11 Thread R. David Murray

R. David Murray added the comment:

Our tooling and workflow is indeed dependent on github.  We should repurpose 
the current 'remote hg repo' to allow the entry of a non-github git repo, but 
someone will have to write that code.  In the meantime, if you upload a patch 
generated from your branch here, someone else will create the github PR so we 
can get it processed.  If you generate the patch using 'git show -v', the 
authorship information should get imported into the github PR that gets 
generated.

--

___
Python tracker 

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



[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I suppose that when the input iterator is exhausted, we could poison the 
currkey to make the subordinate iterator ends as well:

def __next__(self):
while self.currkey == self.tgtkey:
try:
self.currvalue = next(self.it)
except StopIteration:
self.currkey = object()
raise StopIteration from None
self.currkey = self.keyfunc(self.currvalue)
self.tgtkey = self.currkey
return (self.currkey, self._grouper(self.tgtkey))

--

___
Python tracker 

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