[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 0bcba372bcd564555c98a65be4fb1309ff1ae5d5 by Serhiy Storchaka in 
branch '2.7':
bpo-32482: Improve syntax and grammar tests. (#5085)
https://github.com/python/cpython/commit/0bcba372bcd564555c98a65be4fb1309ff1ae5d5


--

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 0cc99c8cd70d422e4b345837a907db30e9180ab9 by Serhiy Storchaka in 
branch 'master':
bpo-32482: Fix suspicious code in tests for syntax and grammar. (#5086)
https://github.com/python/cpython/commit/0cc99c8cd70d422e4b345837a907db30e9180ab9


--

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4964

___
Python tracker 

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



[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset fbb490fd2f38bd817d99c20c05121ad0168a38ee by Serhiy Storchaka in 
branch 'master':
bpo-32308: Replace empty matches adjacent to a previous non-empty match in 
re.sub(). (#4846)
https://github.com/python/cpython/commit/fbb490fd2f38bd817d99c20c05121ad0168a38ee


--

___
Python tracker 

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



[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 1e6d8525f9dd3dcdc83adb93b164082c8b95d17a by Serhiy Storchaka in 
branch '3.6':
bpo-32211: Document the existing bug in re.findall() and re.finditer(). (#4695)
https://github.com/python/cpython/commit/1e6d8525f9dd3dcdc83adb93b164082c8b95d17a


--

___
Python tracker 

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



[issue31778] ast.literal_eval supports non-literals in Python 3

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d8ac4d1d5ac256ebf3d8d38c226049abec82a2a0 by Serhiy Storchaka in 
branch 'master':
bpo-31778: Make ast.literal_eval() more strict. (#4035)
https://github.com/python/cpython/commit/d8ac4d1d5ac256ebf3d8d38c226049abec82a2a0


--

___
Python tracker 

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



[issue31778] ast.literal_eval supports non-literals in Python 3

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4965

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a70d5ff992e5e123a3fa6f0e7f672026db8ed1f7 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-32482: Fix suspicious code in tests for syntax and grammar. (GH-5086) 
(#5095)
https://github.com/python/cpython/commit/a70d5ff992e5e123a3fa6f0e7f672026db8ed1f7


--

___
Python tracker 

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



[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue26528] NameError for built in function open when re-raising stored exception from yielded function

2018-01-04 Thread Maciej Urbański

Maciej Urbański  added the comment:

Reproduced in both v3.6.4 and v3.7.0a3

--
nosy: +rooter
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



[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ca54740f257086393106d242644d450485180b96 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). 
(GH-4695). (#5096)
https://github.com/python/cpython/commit/ca54740f257086393106d242644d450485180b96


--

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4966

___
Python tracker 

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



[issue31506] Improve the error message logic for object_new & object_init

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Error messages "object.__init__() takes no arguments" and "object.__new__() 
takes no arguments" are wrong. They contradicts the following error messages:

>>> object.__init__()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: descriptor '__init__' of 'object' object needs an argument
>>> object.__new__()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object.__new__(): not enough arguments

--
stage:  -> needs patch

___
Python tracker 

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



[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I see, so I should be able to reuse tp_cache for this PR.

--

___
Python tracker 

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



[issue17972] inspect module docs omits many functions

2018-01-04 Thread R. David Murray

R. David Murray  added the comment:

I think adding an __all__ in 3.7 would be reasonable.  You are right that we 
can't simply rename them for backward compatibility reasons.  We could rename 
them, and leave a stub function (that calls the renamed function) but issues a 
deprecation warning.  We've done that for other old internal APIs that we 
wanted to mark as private elsewhere in the stdlib.  The question is, is it 
worth the trouble to do it?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread WildCard65

WildCard65  added the comment:

Adding onto this issue, I believe I tracked down the change that caused the 
issue: 
https://github.com/python/cpython/commit/c0a23e63207984304027f298eefc738b6b3c94b1

This issue also affects the test with Python 3.6

--
nosy: +WildCard65

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4967

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 5099 reverts in 3.7 a subtle behavior change made by the fix for this issue. 
Before merging the fix setting flags to 0 in a Template subclass made the 
default pattern matching only lower case letters. Currently setting flags to 0 
doesn't have any effect.

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

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Can this issue be closed now?

--
status: open -> pending

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread WildCard65

WildCard65  added the comment:

I believe I found the issue, might be an issue between sending the request + 
calling get_response() and the time it takes for server to process response, my 
print cases:

test_err (test.test_httpservers.RequestHandlerLoggingTestCase) ... Creating a 
new connection to 127.0.0.1:50141
Connecting to server
Sending ERROR request, captured stderr instance is <_io.StringIO object at 
0x05E5EC00>
HANDLING AN ERROR REQUEST! SENDING RESPONSE!
Request sent, starting to read response

RESPONSE SENT!
Response obtained, err should be set, <_io.StringIO object at 0x05E5EC00>
Running test's assert
ok
test_get (test.test_httpservers.RequestHandlerLoggingTestCase) ... Creating a 
new connection to 127.0.0.1:50143
Connecting to server
Sending GET request, captured stderr instance is <_io.StringIO object at 
0x05E5EC00>
Request sent, starting to read response
HANDLING A GET REQUEST! SENDING RESPONSE!
RESPONSE SENT! ENDING HEADERS!
HEADERS ENDED!

--

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2018-01-04 Thread STINNER Victor

STINNER Victor  added the comment:

Ah yes, it can be closed. I was waiting 3.4 and 3.5 fixes to be fixed, which is 
now the case.

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

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 87be28f4a1c5b76926c71a3d9f92503f9eb82d51 by Serhiy Storchaka in 
branch 'master':
bpo-31672: Restore the former behavior when override flags in Template. (#5099)
https://github.com/python/cpython/commit/87be28f4a1c5b76926c71a3d9f92503f9eb82d51


--

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread William Pickard

William Pickard  added the comment:

Scratch the previous message about the possible cause, I found the true cause, 
getresponse() is waiting for a specific header, one that 
BaseHTTPRequestHandler.send_error sends and 
BaseHTTPRequestHandler.send_response() doesn't, that header is "Connection" 
with message "close" (http.server#450), adding that to 
RequestHandlerLoggingTestCase.request_handler.do_GET before self.end_headers() 
fixes the deadlock.

--

___
Python tracker 

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



[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread INADA Naoki

INADA Naoki  added the comment:

In my environment, python -X importtime -c 'import asyncio' speed up from 
53.2ms to 51ms.
While I like faster startup time, I don't know 4% speed up is worth enough for
this complexity.

--

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Results.

There are 4 cases:

1) default idpattern and flags
2) overridden only idpattern
3) overridden only flags
4) overridden both idpattern and flags

The case 1 was the one that was broken when this issue was opened. The initial 
Inada's version fixed the case 1, but broke the case 2. His final version 
(applied also to 3.6) fixed the case 1, but broke the case 3. This is a win, 
because cases 1 and 2 look much more common than the case 3. And finally PR 
5099 has fixed also the case 3. The case 4 obviously is not affected by any 
changes of default values.

Now all four cases are correct in 3.7 and the only broken case in 3.6 is the 
uncommon case 3.

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



[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> While I like faster startup time, I don't know 4% speed up is worth enough 
> for this complexity.

There's no magic bullet that I know of to reduce startup time by a large 
amount.  So we're left with optimizing progressively.  For comparison, 
https://github.com/python/cpython/pull/3279 had an even smaller effect on 
startup time.

This change has the nice property that it's a genuine speed-up on a generic 
operation, and it reduces the cost of adding slots as well as the cost of 
having long inheritance chains.

--

___
Python tracker 

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



[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger

New submission from Raymond Hettinger :

Attribute access for named tuples can be made as fast as attribute access of 
instances of classes with slots.  All that is needed is a C subclass of 
property with it own __get__ that directly look's up the tuple field using 
PyTuple_GET_ITEM using an index stored in a C struct rather than as an integer 
object.

--
components: Extension Modules
messages: 309477
nosy: rhettinger
priority: normal
severity: normal
status: open
title: C Fast path for namedtuple's property/itemgetter pair
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



[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +4968
stage:  -> patch review

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread William Pickard

Change by William Pickard :


--
keywords: +patch
pull_requests: +4969
stage:  -> patch review

___
Python tracker 

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



[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Alternatively we could consider the way of optimizing property or itemgetter 
(or both). This may be more complex solution, but if the added complexity is 
not too large, this solution may be more preferable because it will speed up 
not only namedtuple.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32493] UUID Module - FreeBSD build failure

2018-01-04 Thread David Carlier

New submission from David Carlier :

UUID module build fails on FreeBSD since it supports uuid_create function.

--
components: FreeBSD
messages: 309479
nosy: David Carlier, koobs
priority: normal
pull_requests: 4970
severity: normal
status: open
title: UUID Module - FreeBSD build failure
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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you for tracking down the problem, William! I just took a quick look at 
your patch and it seems reasonable to me.

Setting protocol_version to 'HTTP/1.1' means setting the close_connection 
attribute of BaseHTTPRequestHandler to False which is expected and a feature of 
HTTP/1.1 (persistent connections)

Quoting RFC 2616:

HTTP/1.1 defines the "close" connection option for the sender to
signal that the connection will be closed after completion of the
response.

HTTP/1.1 applications that do not support persistent connections MUST
include the "close" connection option in every message.

So I think it's OK to send a "Connection: close" header in the test (it would 
be nice to add a comment though)

--
components:  -Library (Lib)
nosy: +berker.peksag

___
Python tracker 

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



[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Joe Jevnik at already worked through attempts optimize property/itemgetter.   
There isn't much fruit left there.

What I've outlined here should be several times faster.  The code will end-up 
being very similar to the __get__ for member objects which is currently the 
fastest form of attribute access.

--

___
Python tracker 

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



[issue12706] timeout sentinel in ftplib and poplib documentation

2018-01-04 Thread Greg

Greg  added the comment:

Completely forgot about this, please take my patch and submit a pr

On Fri, Dec 29, 2017 at 10:55 AM, Marcel Widjaja 
wrote:

>
> Marcel Widjaja  added the comment:
>
> Greg, I wonder if you are planning to submit a PR for your patch? If not,
> I'm plan to take your patch, make some minor adjustment and submit a PR.
>
> --
> nosy: +mawidjaj
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32494] interface to gdbm_count

2018-01-04 Thread sds

New submission from sds :

gdbm offers a function to quickly find number of records: gdbm_count()
http://www.gnu.org/software/gdbm/manual/html_node/Count.html
It would be nice to be able to call it.

--
components: Library (Lib)
messages: 309483
nosy: sam-s
priority: normal
severity: normal
status: open
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ce5b0e9db1b9698e6ffc43ae41cf3a22ca5a6ba6 by Serhiy Storchaka in 
branch 'master':
bpo-32226: Make __class_getitem__ an automatic class method. (#5098)
https://github.com/python/cpython/commit/ce5b0e9db1b9698e6ffc43ae41cf3a22ca5a6ba6


--

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Please don't forgot to document this feature.

--

___
Python tracker 

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



[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Ah, right. property already is hardy optimized, and specialized version of 
itemgetter gives only around 35% of maximal speed up.

--

___
Python tracker 

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



[issue32495] Adding Timer to multiprocessing

2018-01-04 Thread Jay Crotts

New submission from Jay Crotts :

I wanted to propose the addition of a Timer class to the multiprocessing 
library similar to the one that exists in the Threading module.

Timer provides an example of how to extend the Process class that might be 
helpful to beginners. 

The current lack of a Timer in the multiprocessing library could encourage 
newer programmers to use threads where processes would be more appropriate.

In the implementation below I have added the ability to specify a # of 
iterations that the timed function should execute, and an additional infinite 
argument that would make the process execute the given function until the Timer 
is explicitly stopped.

--
components: Library (Lib)
files: Timer.py
messages: 309487
nosy: davin, jcrotts, pitrou
priority: normal
severity: normal
status: open
title: Adding Timer to multiprocessing
type: enhancement
versions: Python 3.7
Added file: https://bugs.python.org/file47364/Timer.py

___
Python tracker 

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



[issue32496] lib2to3 fails to parse a ** of a conditional expression

2018-01-04 Thread Gregory P. Smith

New submission from Gregory P. Smith :

see the attached sample code demonstrating the problem.

basically lib2to3 fails to parse:

  dummy(**kwargs if kwargs else dict())

with an error like:

raise ParseError("bad input", type, value, context)
lib2to3.pgen2.parse.ParseError: bad input: type=1, value='if', context=(' ', 
(3, 21))

--
components: 2to3 (2.x to 3.x conversion tool)
files: repro_2to3_prob.py
messages: 309488
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: lib2to3 fails to parse a ** of a conditional expression
versions: Python 2.7, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47365/repro_2to3_prob.py

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-04 Thread William Pickard

Change by William Pickard :


--
title: test_httpservers hangs on 3.5.0, win 7 -> test_httpservers hangs since 
Python 3.5
type: crash -> performance

___
Python tracker 

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



[issue32496] lib2to3 fails to parse a ** of a conditional expression

2018-01-04 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2018-01-04 Thread Sabuj Pattanayek

Sabuj Pattanayek  added the comment:

I can confirm that this does happen if you don't install as admin. I confirmed 
that I didn't have PYTHONHOME or PYTHONPATH set and I still got a similar error 
(except it was for the site module) for the python 3.4.4 installer. setting 
pythonhome and pythonpath to blank does make it work, but so does just 
installing the exe/msi as admin.

Note this error does not happen with the python 2.7 installers even if you 
don't install as admin.

--
nosy: +Sabuj Pattanayek

___
Python tracker 

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



[issue32486] tail optimization for 'yield from'

2018-01-04 Thread Brett Cannon

Change by Brett Cannon :


--
type: resource usage -> enhancement

___
Python tracker 

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



[issue32486] tail optimization for 'yield from'

2018-01-04 Thread Brett Cannon

Change by Brett Cannon :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-04 Thread David Bolen

David Bolen  added the comment:

Apologies if this is obvious and already in progress, but the issue with 
Windows and this change appears to be that the "utf-8.file" file is being 
treated as text rather than binary.

So the line ending is expanding to CRLF.  The working copy of utf-8.file on my 
Windows workers is actually 21 bytes, not 20.

--
nosy: +db3l

___
Python tracker 

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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-04 Thread Steve Dower

Steve Dower  added the comment:

I agree that explicitly normalizing in PC/getpathp.c is the correct approach.

As far as I'm aware, GetModuleFileNameW(NULL) can never fail other than a 
buffer that is too small, so that whole function can probably be simplified to 
abort if it happens and just remove the PATH search.

Also, we should use a similar process for PathCchCanonicalizeEx as we already 
use for PathCchCombineExW in this file to avoid failing on earlier OS versions.

--

___
Python tracker 

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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-04 Thread Steve Dower

Change by Steve Dower :


--
stage:  -> needs patch
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue29237] Create enum for pstats sorting options

2018-01-04 Thread Marcel Widjaja

Change by Marcel Widjaja :


--
keywords: +patch
pull_requests: +4972
stage: needs patch -> patch review

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

Issue 32206 covers doing this for `pdb`. It relies on directly accessing 
private APIs in the `runpy` module, but we can live with that, since `pdb` is 
part of the standard library.

--
dependencies: +Run modules with pdb, cProfile command-line should accept "-m 
module_name" as an alternative to script path

___
Python tracker 

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



[issue32206] Run modules with pdb

2018-01-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

Linking back to the overall RFE for improved executable module support for 
standard library modules that run other scripts: 
https://bugs.python.org/issue9325

--
nosy: +ncoghlan

___
Python tracker 

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