[issue27099] IDLE: turn built-in extensions into regular modules

2017-09-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I expect to polish the General page in a follow-up.  I expect it will soon need 
to be split.

--

___
Python tracker 

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



[issue27099] IDLE: turn built-in extensions into regular modules

2017-09-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe PR2494 is about ready to merge.  It is a big, complicated patch, so 
before merging, I would prefer to have it pass a full -uGUI test on something 
other than Windows.

--
dependencies:  -IDLE: configdialog - add tests for ConfigDialog GUI.

___
Python tracker 

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



[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-01 Thread Antony Lee

New submission from Antony Lee:

The doc for argparse.RawTextHelpFormatter states that it "maintains whitespace 
for all sorts of help text, including argument descriptions."  But the 
following example (which outputs "Foo", "Bar", and "Baz", each separated by 
exactly one empty line) shows that paragraphs separated by more than one empty 
line will only be separated in the output text by a single empty line.


import argparse
parser = argparse.ArgumentParser(
prog='PROG',
formatter_class=argparse.RawTextHelpFormatter,
description='''\
Foo

Bar


Baz''')
parser.print_help()

--
components: Library (Lib)
messages: 301158
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: argparse.RawTextHelpFormatter does not maintain lines separated by more 
than one newline
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



[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

2017-09-01 Thread Eryk Sun

Changes by Eryk Sun :


--
stage:  -> needs patch
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue29996] Use terminal width by default in pprint

2017-09-01 Thread Éric Araujo

Éric Araujo added the comment:

I was about to open the same issue!  I tend to print nested data structures for 
debugging; having lists take up a lot of vertical screen estate and leave 
unused all the horizontal space is an annoyance, so that I regularly have to go 
back and add the width param.

Contrary to Fred, I think my tools tend to use the available width, but then I 
think that auto-width is a good behaviour for a tool, but maybe not a good 
change for a general library.  Raymond’s note about students is also an 
important point.  I don’t like adding envvars to control the behaviour of a 
module function at a distance, or magic constants; if I can pass a constant, I 
can pass a number (for quick debugging) or handle getting the terminal width at 
a higher layer (in a real command-line program).  For my debugging use case, 
maybe it’s time I switch to q (on PyPI) and save even more typing.

Even though I was about to request the same feature, I’m now -0.

--
nosy: +merwok

___
Python tracker 

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



[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 868710158910fa38e285ce0e6d50026e1d0b2a8c by Victor Stinner in 
branch 'master':
bpo-31323: Fix reference leak in test_ssl (#3263)
https://github.com/python/cpython/commit/868710158910fa38e285ce0e6d50026e1d0b2a8c


--

___
Python tracker 

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



[issue31250] test_asyncio leaks dangling threads

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e8a533fbc734af6eeb389202ba6c6e9c2548027f by Victor Stinner in 
branch 'master':
bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)
https://github.com/python/cpython/commit/e8a533fbc734af6eeb389202ba6c6e9c2548027f


--

___
Python tracker 

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



[issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b713adf27a76b5df95e3ee5f85f9064a2763ae35 by Victor Stinner in 
branch 'master':
bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)
https://github.com/python/cpython/commit/b713adf27a76b5df95e3ee5f85f9064a2763ae35


--

___
Python tracker 

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



[issue31329] Add idlelib module entry to doc

2017-09-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

See also:  http://bugs.python.org/issue31319

A cleaner command-line startup would be:  python -m idle

--
nosy: +rhettinger

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-09-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

There was a typo in my previous message.  The instantiation code should be:

   entry.req_rate = RequestRate(int(numbers[0]), int(numbers[1]))

--

___
Python tracker 

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



[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

os.cpu_count() is specified to return the total number of processors, not the 
number of usable processors.  See e.g. https://bugs.python.org/issue26692

--

___
Python tracker 

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



[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread tzickel

tzickel added the comment:

One should be careful with this modification because of the Windows definition 
of process groups.

For example, if multi-threaded code thinks that by reading the value of the new 
os.cpu_count() it can use all the cores returned, by default it cannot as in 
windows processes by default can run only in a single process group (how it 
worked before).

We can see such code builtin python stdlib itself:
https://github.com/python/cpython/blob/bc61315377056fe362b744d9c44e17cd3178ce54/Lib/concurrent/futures/thread.py#L102

I think even .NET still uses the old way that python did until now:
https://github.com/dotnet/corefx/blob/aaaffdf7b8330846f6832f43700fbcc060460c9f/src/System.Runtime.Extensions/src/System/Environment.Windows.cs#L71

Although some of this stuff is used in code for python multiprocess code which 
that might actually get a boost (since different process can get scheduled to 
different groups)

https://msdn.microsoft.com/en-us/library/windows/desktop/dd405503(v=vs.85).aspx

--
nosy: +tzickel

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-01 Thread Łukasz Langa

Łukasz Langa added the comment:

Good catch. Supporting bytes passed as a path is a reasonable request since the 
builtin `open()` supports this, too. Go ahead and create a pull request! We 
only need to modify line 690 to also list `bytes`.

--

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-09-01 Thread Berker Peksag

Berker Peksag added the comment:

Good catch and thank you for turning the bug report in the HN thread to a pull 
request! I agree with all of Raymond's comments.

I have two more comments:

* Please follow our commit style at 
https://devguide.python.org/committing/#commit-messages
* We need a NEWS entry. You can find details at 
https://devguide.python.org/committing/#what-s-new-and-news-entries (we don't 
need to add an entry in Doc/whatsnew/ so you can safely ignore it)

--
stage:  -> patch review

___
Python tracker 

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



[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Backport merged. Thanks Chris!

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

___
Python tracker 

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



[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 58521fdba1657f6553a1ead5cbaa100967a167b3 by Antoine Pitrou 
(Christopher Wilcox) in branch '3.6':
bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) 
(#3267)
https://github.com/python/cpython/commit/58521fdba1657f6553a1ead5cbaa100967a167b3


--

___
Python tracker 

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



[issue31329] Add idlelib module entry to doc

2017-09-01 Thread Terry J. Reedy

New submission from Terry J. Reedy:

If this were a new section in idle.rst, it would appear with the IDLE doc 
displayed by Help IDLE. Being present there has its +s and -s.  Would have to 
see how it works here as well as online.

In any case, it would be good to have something indexed under I in Modules 
index.

Content: Document python -m idlelib as command line start up.  List other entry 
points.  Otherwise describe as 'private implementation modules', as in 
idlelib.__init__.

--
messages: 301145
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Add idlelib module entry to doc
type: enhancement
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



[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread Chris Wilcox

Changes by Chris Wilcox :


--
pull_requests: +3312

___
Python tracker 

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



[issue31328] _sha3 is missing from Setup.dist

2017-09-01 Thread Segev Finer

Changes by Segev Finer :


--
pull_requests: +3311

___
Python tracker 

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



[issue31328] _sha3 is missing from Setup.dist

2017-09-01 Thread Segev Finer

New submission from Segev Finer:

_sha3 is missing a commented out line from Setup.dist like the rest of the 
modules. It's really only used if someone wants to edit Setup.dist to build 
with the _sha3 module statically. Mostly a trivial change to add it in.

--
components: Build, Extension Modules
messages: 301144
nosy: Segev Finer
priority: normal
severity: normal
status: open
title: _sha3 is missing from Setup.dist
type: behavior
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



[issue31327] bug in dateutil\tz\tz.py

2017-09-01 Thread Jerry Kramskoy

New submission from Jerry Kramskoy:

Running python 3.6.2 on Windows 10.

The following method causes presents a timetstamp value of -3600 (i.e. DST 
adjustment of one hour) which causes time.localtime() to raise an OS Errno 22.


def _naive_is_dst(self, dt):
timestamp = _datetime_to_timestamp(dt)
return time.localtime(timestamp + time.timezone).tm_isdst



Reproduce with python shell...

import time
z=time.localtime(-3600)
Traceback (most recent call last):
  Python Shell, prompt 7, line 1
builtins.OSError: [Errno 22] Invalid argument



The documentation doesn't specify a legal value range for input to localtime.


Unfortunately,this causes AWS boto3 support for dynamodb to crash.

Cheers, Jerry

--
components: Library (Lib)
messages: 301143
nosy: jerrykramskoy
priority: normal
severity: normal
status: open
title: bug in dateutil\tz\tz.py
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



[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've merged the PR to master and backported it to 3.6.  Thank you Grzegorz for 
contributing this!

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

___
Python tracker 

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



[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset ea767915f7476c1fe97f7b1a53304d57f105bdd2 by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-27144: concurrent.futures as_complete and map iterators do not keep 
reference to returned object (GH-1560) (#3266)
https://github.com/python/cpython/commit/ea767915f7476c1fe97f7b1a53304d57f105bdd2


--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

_match_test1 = re.compile('|'.join(map(fnmatch.translate, match_tests)), 
re.I).match

def _match_test(test):
test_id = test.id()
return bool(_match_test1(test_id) or any(map(_match_test1, 
test_id.split(".")))

--

___
Python tracker 

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



[issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

See also bpo-31249 and commit bc61315377056fe362b744d9c44e17cd3178ce54: "Fix 
ref cycle in ThreadPoolExecutor".

--

___
Python tracker 

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



[issue31301] Python 2.7 SIGSEGV

2017-09-01 Thread Jakub Wilk

Jakub Wilk added the comment:

I can't reproduce it here:

Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> s = open('id%3A00,sig%3A11,src%3A00,op%3Ahavoc,rep%3A32').read()
>>> ast.parse(s)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes

--
nosy: +jwilk

___
Python tracker 

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



[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +3310

___
Python tracker 

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



[issue31319] Rename idlelib to just idle

2017-09-01 Thread Éric Araujo

Éric Araujo added the comment:

What about adding a simple Lib/idle.py that imports and runs the main function 
from idlelib?

--
nosy: +merwok

___
Python tracker 

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



[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9 by Antoine Pitrou 
(Grzegorz Grzywacz) in branch 'master':
bpo-27144: concurrent.futures as_complete and map iterators do not keep 
reference to returned object (#1560)
https://github.com/python/cpython/commit/97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9


--
nosy: +pitrou

___
Python tracker 

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



[issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3309

___
Python tracker 

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



[issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread

2017-09-01 Thread STINNER Victor

New submission from STINNER Victor:

concurrent.futures.ProcessPoolExecutor.shutdown(wait=True) doesn't wait for the 
call queue thread, and so test_concurrent_futures randomly emits warnings about 
dangling threads, especially with PR 3138 of bpo-31234.

Attached PR fixes the issue.

--
messages: 301135
nosy: haypo
priority: normal
severity: normal
status: open
title: concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait 
for the call queue thread
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



[issue31325] req_rate is a namedtuple type rather than instance

2017-09-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

* The named tuple class should begin with a capital letter and be fully 
self-documenting: "RequestRate".

* The creation of the named tuple class should be done only once, not on every 
call.  Instead only a new instance should be creating on every call:

 entry.req_rate = req_rate(RequestRate)

* There needs to be a test.

* The docstring should be updated to include the name of the class refer to the 
term named tuple instead of the namedtuple() factory function:

 - Returns the contents of the ``Request-rate`` parameter from
 - ``robots.txt`` in the form of a :func:`~collections.namedtuple`
 - ``(requests, seconds)``.  If there is no such parameter or it doesn't

 + Returns the contents of the ``Request-rate`` parameter from
 + ``robots.txt`` as a :term:`named tuple` ``RequestRate(requests, 
seconds)``.
 + If there is no such parameter or it doesn't

--
assignee:  -> berker.peksag
nosy: +berker.peksag, rhettinger

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-09-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue30403] PEP 547: Running extension modules using -m switch

2017-09-01 Thread Marcel Plch

Marcel Plch added the comment:

Sorry for not responding for so long, I didn't work on Python through the 
summer because of some other matters.

Re-execution of the module is not possible, because there is a check on the C 
level, If you call exec_in_module() on an already initialized module, it'll 
raise ImportError.

Also, because of this check, there is the restriction for py_mod_create. 
"Modules" defining this slot might not be module objects at all, so they might 
not have the module state pointer (which is used to flag if the module was 
initialized).

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Remaining issues:

* test_asyncio: https://github.com/python/cpython/pull/3264 of bpo-31250

* test_thread: test_forkinthread() spawns a thread using 
thread.start_new_thread() without waiting until the thread completes

* test_concurrent_futures: warnings raised when running "./python -u -m test 
-j0 -rW -u all --fail-env-changed", but not when running only 
test_concurrent_futures. It looks like a race condition.

--

___
Python tracker 

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



[issue31250] test_asyncio leaks dangling threads

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3308

___
Python tracker 

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



[issue31250] test_asyncio leaks dangling threads

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Hum, EventLoopTestsMixin.tearDown() still has a bug. I reopen the issue.

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

___
Python tracker 

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



[issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util'

2017-09-01 Thread elmar

elmar added the comment:

thank you Steve for the explanation!

I was not aware that I should import sub modules explicitly like this.
especial because it worked on my development machine without doing so.
now I know.

Elmar

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Oops. Ignore my previous comment, I was using my temporary workaround! 
(msg301126)

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Oh, by the way, -m test -m TestCaseName doesn't work fully on test_asyncio. It 
only works if I pass the full test identifier.

With TestCaseName, no test is run:

haypo@selma$ ./python -m test -u all test_asyncio --fail-env-changed -m 
PollEventLoopTests 
Run tests sequentially
0:00:00 load avg: 6.97 [1/1] test_asyncio
1 test OK.

Total duration: 458 ms
Tests result: SUCCESS


With a full test identifier, a test is run:


haypo@selma$ ./python -m test -u all test_asyncio --fail-env-changed -m 
test.test_asyncio.test_events.PollEventLoopTests.test_create_datagram_endpoint_sock
Run tests sequentially
0:00:00 load avg: 7.06 [1/1] test_asyncio
Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2)
test_asyncio failed (env changed)

1 test altered the execution environment:
test_asyncio

Total duration: 561 ms
Tests result: ENV CHANGED

--

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-09-01 Thread Robin

New submission from Robin:

> Finally, urllib/robotparser.py appears to contain a bug in the
> following:
>
>   req_rate = collections.namedtuple('req_rate',
>'requests seconds')
>   entry.req_rate = req_rate
>   entry.req_rate.requests = int(numbers[0])
>   entry.req_rate.seconds = int(numbers[1])
> 
> As I read it, this should fail as the req_rate is immutable.

Ref: https://news.ycombinator.com/item?id=15136961

They are mistaken in the nature of the bug, which is that req_rate is
a namedtuple type, rather than an instance. As such, it is actually
mutable, causing the assignments to not fail. Every entry creates a
separate req_rate type, so it all works, but not in the way it should.

--
components: Library (Lib)
messages: 301127
nosy: gvx
priority: normal
pull_requests: 3307
severity: normal
status: open
title: req_rate is a namedtuple type rather than instance
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, 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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Workaround to run test.bisect on test_asyncio:

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 522804be60..201d0665b2 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1911,15 +1911,7 @@ def _match_test(test):
 if match_tests is None:
 return True
 test_id = test.id()
-
-for match_test in match_tests:
-if fnmatch.fnmatchcase(test_id, match_test):
-return True
-
-for name in test_id.split("."):
-if fnmatch.fnmatchcase(name, match_test):
-return True
-return False
+return (test_id in match_tests)
 
 
 def run_unittest(*classes):


With this patch, running 756 tests takes 12 seconds, as expected.

--

___
Python tracker 

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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Pritish Patil

Pritish Patil added the comment:

Yes. copy.deepcopy() works. 

Didn't think of it!

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Example of the performance issue:

$ ./python -m test.bisect --fail-env-changed -o bisect test_asyncio

[+] Iteration 1: run 756 tests/1512
(...)

The first iteration takes forever because it runs tests with 
support.match_tests which contains 756 patterns.

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +louielu

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-09-01 Thread STINNER Victor

New submission from STINNER Victor:

support._match_test() uses a nested loop calling fnmatch.fnmatchcase(). This 
function creates a temporary regular expression object. The cache of the re 
module works around the performance... if the length of support.match_tests 
fits into the cache. But when the list is longer, the function becomes dead 
slow...

def _match_test(test):
global match_tests

   
if match_tests is None:
return True 
test_id = test.id() 
   

for match_test in match_tests:
if fnmatch.fnmatchcase(test_id, match_test):
   
return True

   
for name in test_id.split("."): 
   
if fnmatch.fnmatchcase(name, match_test):   
   
return True
return False

Maybe we should build a giant regex matching test_id at each, but cache the 
regex since support.match_tests can be modified anytime. I implemented this 
once, but I lost the code :-)

Currently, it's possible to match 3 things:

* test method name: test_exit
* test class name: SysModuleTest
* full test id: test.test_sys.SysModuleTest.test_exit

It's also possible to use "*" joker character in a test name. I would like to 
keep these convenient CLI.

--
messages: 301122
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: support._match_test() used by test.bisect is very inefficient
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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Eric Snow

Eric Snow added the comment:

Hmm.  What problems are you seeing with deep copies?  copy.deepcopy() should 
work since SimpleNamespace is picklable. [1][2]  I don't have any problems:

>>> import types, copy
>>> ns = types.SimpleNamespace(x=1, y=2)
>>> copied = copy.deepcopy(ns)
>>> copied
namespace(x=1, y=2)
>>> ns = types.SimpleNamespace(x=types.SimpleNamespace(a=1),
   y=types.SimpleNamespace(b=2))
>>> copied = copy.deepcopy(ns)
>>> copied
namespace(x=namespace(a=1), y=namespace(b=2))
>>> ns.x is copied.x
False

[1] issue #15022
[2] https://docs.python.org/3/library/copy.html

--
nosy: +eric.snow

___
Python tracker 

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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Steven D'Aprano

Steven D'Aprano added the comment:

> When using nested SimpleNamespaces, a making a copy by using 
> 
> new_NS=SimpleNamespace(**namespace.__dict__.copy())

In general, you shouldn't call or directly access dunder attributes. 
There are exceptions, but generally they're for Python's use only. For 
example, the public interface for getting __dict__ is to call 
vars(namespace).

But there's no need to do this by hand. Use the copy module instead.

copy.copy(namespace)  # copy one level only

copy.deepcopy(namespace)  # copy all the way down

seem to work for me.

Does this solve your problem? If so, we'll close this issue.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue31320] test_ssl logs a traceback

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

I'm running Fedora 26:

haypo@selma$ ./python -m test.pythoninfo|grep -E 'ssl|platform'
platform.architecture: 32bit ELF
platform.platform: Linux-4.12.5-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six
platform.python_implementation: CPython
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.0f-fips  25 May 2017
ssl.OPENSSL_VERSION_INFO: (1, 1, 0, 6, 15)
ssl.OP_ALL: -0x7fac
ssl.OP_NO_TLSv1_1: 0x1000
sys.platform: linux

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

test_ssl still emits a warning: see bpo-31323.

--

___
Python tracker 

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



[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3306

___
Python tracker 

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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

See bpo-31323 where I wanted to use traceback.clear_frames() to manually break 
a reference cycle.

--

___
Python tracker 

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



[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler

2017-09-01 Thread STINNER Victor

New submission from STINNER Victor:

While testing bpo-31234 fix, I noticed that some test_ssl tests using 
ThreadedEchoServer create reference cycles with ConnectionHandler: 
ConnectionHandler fills ThreadedEchoServer.conn_errors with exceptions, but 
exceptions keep an alive traceback object which contains frame locals.

I tried to use traceback.clear_frames(), but this function is broken: see 
bpo-31321.

Attached PR works around the issue by storing errors are text rather than 
objects.

The PR prevents warnings about dangling threads.

--
components: Tests
messages: 301116
nosy: haypo
priority: normal
severity: normal
status: open
title: test_ssl: reference cycle between ThreadedEchoServer and its 
ConnectionHandler
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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file47116/clear_frames_bug.py

___
Python tracker 

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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Pritish Patil

Changes by Pritish Patil :


--
nosy: +yselivanov -docs@python

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

traceback.clear_frames() doesn't really clear all frames: see bpo-31321.

--

___
Python tracker 

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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

traceback.clear_frames() was added by bpo-1565525: commit 
173a157e725579eec1f28f8c9d53d6761ba6c79f.

--

___
Python tracker 

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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Pritish Patil

Changes by Pritish Patil :


--
components: +Extension Modules -Documentation, Library (Lib)

___
Python tracker 

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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Would it be ok to backport such change to Python 3.6? It's a bugfix, no?

--

___
Python tracker 

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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3305

___
Python tracker 

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



[issue31322] SimpleNamespace deep copy

2017-09-01 Thread Pritish Patil

New submission from Pritish Patil:

I am new here and not sure how I can suggest this properly.


When using nested SimpleNamespaces, a making a copy by using 

new_NS=SimpleNamespace(**namespace.__dict__.copy())

only copies the highest level namespace. This is expected in python as shallow 
copies are preferred. But, a nested deep copy function would be nice, and will 
allow easier use.

I suggest a simple

def my_namespace_copy(namespace):
'''Recursively deep copies nested namespaces'''
new_NS=SimpleNamespace(**namespace.__dict__.copy())
for i in new_NS.__dict__.keys():
if(type(new_NS.__dict__[i]) == types.SimpleNamespace):
new_NS.__setattr__(i, my_namespace_copy(new_NS.__getattribute__(i)))
return new_NS

I am not sure of the exact implementation of the class and guess this would 
need some appropriate modifications.

I suggest this be added at SimpleNameSpace.__copy__ or at 
SimpleNameSpace.__deepcopy__

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 301112
nosy: Pritish Patil, docs@python
priority: normal
severity: normal
status: open
title: SimpleNamespace deep copy
type: enhancement
versions: Python 3.5, 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



[issue31321] traceback.clear_frames() doesn't clear *all* frames

2017-09-01 Thread STINNER Victor

New submission from STINNER Victor:

traceback.clear_frames():
"Clears the local variables of all the stack frames in a traceback tb by 
calling the clear() method of each frame object."
https://docs.python.org/dev/library/traceback.html#traceback.clear_frames

That's wrong: it only calls frame.clear() on the top frame of each traceback 
object.

Output of attached clear_frames_bug.py script:
---
locals:
frame locals {'z': 3}
frame locals {'y': 2}
frame locals {'x': 1}

clear_frames()

locals:
frame locals {}
frame locals {'y': 2}
frame locals {'x': 1}

---

As you can see, only the locals of the func3() frame, where the exception was 
raised, is clear. Locals of other frames are not cleared.

Attached PR fixes the issue.

Output with the fix:
---
locals:
frame locals {'z': 3}
frame locals {'y': 2}
frame locals {'x': 1}

clear_frames()

locals:
frame locals {}
frame locals {}
frame locals {}

---

--
messages: 30
nosy: haypo
priority: normal
severity: normal
status: open
title: traceback.clear_frames() doesn't clear *all* frames
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



[issue31320] test_ssl logs a traceback

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't get such traceback here (Ubuntu 16.04, OpenSSL 1.0.2g).

--
nosy: +pitrou

___
Python tracker 

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



[issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string

2017-09-01 Thread Eric Snow

Eric Snow added the comment:

On Thu, Aug 31, 2017 at 1:32 PM, Brett Cannon  wrote:
> I think throwing a TypeError is valid if it's triggering an assertion error 
> that is already there.

+1

> P.S. Thanks for all the fuzz testing you're doing, Oren!

Also a big +1. :)

--

___
Python tracker 

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



[issue31320] test_ssl logs a traceback

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Python 2.7 doesn't seem to be affected.

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



[issue31320] test_ssl logs a traceback

2017-09-01 Thread STINNER Victor

New submission from STINNER Victor:

It would be nice to not log such traceback:

haypo@selma$ ./python -m test test_ssl -m test.test_ssl.ThreadedTests.test_echo
Run tests sequentially
0:00:00 load avg: 0.69 [1/1] test_ssl
Exception in thread Thread-16:
Traceback (most recent call last):
  File "/home/haypo/prog/python/master/Lib/threading.py", line 917, in 
_bootstrap_inner
self.run()
  File "/home/haypo/prog/python/master/Lib/test/test_ssl.py", line 1936, in run
if not self.wrap_conn():
  File "/home/haypo/prog/python/master/Lib/test/test_ssl.py", line 1881, in 
wrap_conn
self.sock, server_side=True)
  File "/home/haypo/prog/python/master/Lib/ssl.py", line 401, in wrap_socket
_context=self, _session=session)
  File "/home/haypo/prog/python/master/Lib/ssl.py", line 808, in __init__
self.do_handshake()
  File "/home/haypo/prog/python/master/Lib/ssl.py", line 1061, in do_handshake
self._sslobj.do_handshake()
  File "/home/haypo/prog/python/master/Lib/ssl.py", line 683, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error

1 test OK.

Total duration: 205 ms
Tests result: SUCCESS

--
components: Tests
messages: 301107
nosy: alex, christian.heimes, dstufft, haypo, janssen
priority: normal
severity: normal
status: open
title: test_ssl logs a traceback
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



[issue31319] Rename idlelib to just idle

2017-09-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

idlelib.__main__ was added in 3.3: Patch was 
d543f2b8b0b66af330aae6764e53495cda48fd4e
Author: Andrew Svetlov 
Date: 3/26/2012 3:11:46 PM
Message: IDLE can be launched as python -m ildelib [misspelled]

#24212 was about backporting the addition to 2.7.  I opened it after PEP 434 
clearly made this permitted.  The attempt had the problems described therein.
---

I quite agree that 'python -m idle' would be nicer than 'python -m idlelib', 
just as the latter is nicer than idlelib.idle or  idlelib.pyshell.  However, 
switching would break every text (and program) that tell people about any of 
the latter three. That would include many of my (and other people's) 
Stackoverflow comments and answers.  I am therefore neither inclined to do 
this, nor do I think I am allowed to by out back-compatibility policies.

My impression is that the directory name linking needed to make both work 
without two copies is OS specific and not something that can be done in the 
repository.  I don't even know how to do it properly on Windows.  I am not 
going to try to get all installer makers to agree to make a change.

--
superseder: Idle, 2.7, backport idlelib.__main__, enable py -m idlelib -> 

___
Python tracker 

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



[issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

https://docs.python.org/dev/using/cmdline.html#envvar-PYTHONMALLOC

--

___
Python tracker 

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



[issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Set PYTHONMALLOC=debug environment variable to try to detect stack overflows ;-)

--
nosy: +haypo

___
Python tracker 

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



[issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Judging by the stacktrace, the stack smashing occurs in Meinheld, so you should 
report the issue to the Meinheld developers.

--
nosy: +pitrou
resolution:  -> third party
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



[issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

The commit 6c2feabc5dac2f3049b15134669e9ad5af573193 of bpo-31217 fixed a major 
random bug in the memory block check. So maybe we can start again to look to 
detect more bugs by replacing all() with any() again.

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

Ok, this issue was really insane. Thank you very much Antoine Pitrou for 
explaning me the root bug ("int - int") and for the fix. The bug is now fixed 
in Python 3.6 and master (3.7). I checked manually the applied fix on the 
Gentoo Refleak 3.x buildbot using test_code and test_sys run in a loop: no 
failure after 30 runs.

*Hopefully*, it was a bug in the test, not in the code ;-)

The fix should help to detect real memory leaks, and maybe we can now replace 
again all() with any() in libregrtest/refleak.py to detect more leaks: see 
bpo-30776.

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 98c849a2f32f6727239b4cce38b8f0ff8adeef22 by Victor Stinner in 
branch '3.6':
bpo-31217: Fix regrtest -R for small integer (#3260) (#3261)
https://github.com/python/cpython/commit/98c849a2f32f6727239b4cce38b8f0ff8adeef22


--

___
Python tracker 

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



[issue31250] test_asyncio leaks dangling threads

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:

I picked the safe option: only modify unit tests.

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



[issue31249] test_concurrent_futures leaks dangling threads

2017-09-01 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



[issue31249] test_concurrent_futures leaks dangling threads

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 60f3f1fb5cbf5354c3081138be806c56cb04153f by Victor Stinner in 
branch '3.6':
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3253)
https://github.com/python/cpython/commit/60f3f1fb5cbf5354c3081138be806c56cb04153f


--

___
Python tracker 

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



[issue31250] test_asyncio leaks dangling threads

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 16432beadb8eba079c9786cc0c0eaacfd9fd2f7b by Victor Stinner in 
branch 'master':
bpo-31250, test_asyncio: fix dangling threads (#3252)
https://github.com/python/cpython/commit/16432beadb8eba079c9786cc0c0eaacfd9fd2f7b


--

___
Python tracker 

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



[issue30102] improve performance of libSSL usage on hashing

2017-09-01 Thread Gustavo Serra Scalet

Gustavo Serra Scalet added the comment:

Is there any news on this issue? The PR 3112 also seems to be frozen at the 
moment. Is there some kind of code freeze happening at the moment that no 
reviews are taking place?

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3304

___
Python tracker 

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



[issue24212] Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

2017-09-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#27099 converts extensions, including autocomplete and calltips, to features.  
Buggy versions of the patch had similar import problems.  After the PR is 
merged, I may try this again, and perhaps try moving the __main__ import into 
the functions that use it.

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 6c2feabc5dac2f3049b15134669e9ad5af573193 by Victor Stinner in 
branch 'master':
bpo-31217: Fix regrtest -R for small integer (#3260)
https://github.com/python/cpython/commit/6c2feabc5dac2f3049b15134669e9ad5af573193


--

___
Python tracker 

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



[issue11410] Use GCC visibility attrs in PyAPI_*

2017-09-01 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Was this actually fixed, or did everyone just get tired and give up on the 
original patch?

--
nosy: +njs

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3303

___
Python tracker 

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



[issue31313] Feature Add support of os.chflags() on Linux platform

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Uh, of course, we care about SETFLAGS here.  Which gives:
EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_SETFLAGS = 0x40086602

--

___
Python tracker 

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



[issue31313] Feature Add support of os.chflags() on Linux platform

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

On Ubuntu 16.04 I get the following values:
EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_GETFLAGS = 0x80086601

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x

2017-09-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> It makes sure that you get a single object in memory for the same integer, 
> and not only for Python "small integer singletons"?

Yes.

> About the -1000..1000 range: if a function leaks more than 1 memory block or 
> more than 1 reference, there is already something wrong no?

Well, the current code can still hide it, for example if a function leaks 
[1000, 0, 1000, 1000, 1000] references, the code says it's ok.

--

___
Python tracker 

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



[issue31313] Feature Add support of os.chflags() on Linux platform

2017-09-01 Thread Марк Коренберг

Марк Коренберг added the comment:

Well, it seems, you are right.

But there are another ioctls (maybe they are the same, I haven't checked):

FS_IOC_SETFLAGS
FS_IOC_GETFLAGS

http://man7.org/tlpi/code/online/book/files/chiflag.c.html  (also attached)

--
Added file: http://bugs.python.org/file47115/chiflag.c

___
Python tracker 

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



[issue31319] Rename idlelib to just idle

2017-09-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I would also like Terry to consider renaming or aliasing idlelib to idle.  That 
would further simplify the startup and it is a more appropriate name given that 
IDLE is used as an application rather than as a library.

--
resolution: duplicate -> 
stage: resolved -> 
status: closed -> open
title: Add __main__.py to IDLE -> Rename idlelib to just idle

___
Python tracker 

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



[issue31319] Add __main__.py to IDLE

2017-09-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue24212.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

___
Python tracker 

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



[issue31319] Add __main__.py to IDLE

2017-09-01 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Currently, I start IDLE with:

  $ python -m idlelib.idle

It would be nice add __main__.py to simplify this to:

  $ python -m idlelib

And perhaps, more boldly rename the directory so that we get:

  $ python -m idle

--
assignee: terry.reedy
components: IDLE
messages: 301086
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: Add __main__.py to IDLE
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



[issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util'

2017-09-01 Thread Steve Dower

Steve Dower added the comment:

util is a submodule of importlib, and so it should always be imported before 
using it.

Other platforms may import it for various other reasons, but that is not part 
of the API. You should fix it by typing (note that the first line is different 
from yours):

>>> import importlib.util
>>> importlib.util.find_spec("re")

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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