[issue29927] Unnecessary code in the c-api/exceptions.c

2017-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue29927] Unnecessary code in the c-api/exceptions.c

2017-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
status: open -> closed

___
Python tracker 

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



[issue29927] Unnecessary code in the c-api/exceptions.c

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Since the unnecessary codes have no semantic effect, I think they only need to 
go in 3.7. Thanks for your report and patch!

--
resolution:  -> fixed
stage:  -> resolved

___
Python tracker 

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



[issue29927] Unnecessary code in the c-api/exceptions.c

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset c431854a0963d4ec2875efab2d2425a738895280 by Xiang Zhang (Louie 
Lu) in branch 'master':
bpo-29927: Remove duplicate BufferError init and unnecessary semicolons (GH-866)
https://github.com/python/cpython/commit/c431854a0963d4ec2875efab2d2425a738895280


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Thanks. We should probably just unsupport gcc 3.x.

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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:


New changeset 83371f4f7f70406ea5d08c5fa8dbdbbcc0355ee1 by Benjamin Peterson 
(Niklas Fiekas) in branch 'master':
bpo-29936: fix typo __GNU*C*_MINOR__ (#878)
https://github.com/python/cpython/commit/83371f4f7f70406ea5d08c5fa8dbdbbcc0355ee1


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 9f8e0904580cae3b99f8d343569b76e1be7e6092 by Xiang Zhang in branch 
'3.5':
bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-884)
https://github.com/python/cpython/commit/9f8e0904580cae3b99f8d343569b76e1be7e6092


--

___
Python tracker 

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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 346dcd65e6b832a35b4cfc15b7309b51a38e9ca2 by Xiang Zhang in branch 
'3.6':
bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-882)
https://github.com/python/cpython/commit/346dcd65e6b832a35b4cfc15b7309b51a38e9ca2


--

___
Python tracker 

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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +786

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +785

___
Python tracker 

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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +784

___
Python tracker 

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



[issue28699] Imap from ThreadPool behaves unexpectedly

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 794623bdb232eafd8925f76470209afcdcbcdcd2 by Xiang Zhang in branch 
'master':
bpo-28699: fix  abnormal behaviour of pools in multiprocessing.pool (GH-693)
https://github.com/python/cpython/commit/794623bdb232eafd8925f76470209afcdcbcdcd2


--

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-03-28 Thread Kinebuchi Tomohiko

Changes by Kinebuchi Tomohiko :


--
pull_requests: +783

___
Python tracker 

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



[issue19225] lack of PyExc_BufferError doc

2017-03-28 Thread Kinebuchi Tomohiko

Kinebuchi Tomohiko added the comment:

I will create a pull request based on the patch created by beng94.
In addition, I will have its contents up-to-date.

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



[issue29938] subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE

2017-03-28 Thread SLAPaper

New submission from SLAPaper:

print(subprocess.run("bash -c ls", shell=True, stdout=subprocess.PIPE, 
encoding='utf_16_le').stdout)
# 错误: 0x80070057
# error: 0x80070057

And the returncode is 4294967295.

OS: Simp-Chinese Win10; Bash on Windows(Ubuntu 14.04 LTS).
Python 3.5 and Python 3.6 produce the same issue.

While not capture stdout, the command works just fine and output the result 
onto screen.

--
components: Windows
messages: 290762
nosy: SLAPaper, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: subprocess.run calling bash on windows10 cause 0x80070057 error when 
capture stdout with PIPE
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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Eryk Sun

Eryk Sun added the comment:

> Even is IDLE is started from a console, the user execution process 
> is not attached to one.

Actually, the execution process is attached to a console, but it doesn't use it 
for sys.std*. Try

open('con', 'w').write('spam\n')

> It is much like closing a terminal Window with [X], and restarting 
> the terminal and python, instead of using ^C.

There's no default handler for SIGBREAK, so when working in the console it's 
typically better to use Ctrl+Break to kill Python. This preserves the console's 
arrow-key & F7 input history and scrollback buffer.

--

___
Python tracker 

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



[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread Rémi Cardona

Rémi Cardona added the comment:

Got hit by this too, many times as I'm working with 3G devices (slow write 
speeds).

As for "drain()", I'd say it should work like a fence/barrier: to let you know 
that the bytes in the buffer up to when the call was issued have been 
successfully written on the socket.

I'll see what I can cook up.

Cheers

--
nosy: +RemiCardona

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Completely agree, Mariatta. I just wanted to clarify my initial position :-)

--

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Since this ticket is about adding f-strings to the Glossary, let's keep this as 
discussions about the inclusion of f-strings in the Glossary.

If others want to add (byte|raw|unicode)-strings into the Glossary, they can 
open another ticket. 

Thanks :)

P.S: I like David's quote "..f-string. It's a term of art"

--
assignee: docs@python -> Mariatta

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

I was probably misunderstood, too, in hindsight, it's my fault for not being 
more clear :-). 

In my first sentence I was merely pointing out the oddity of -string 
not being a very popular term until f-string came along.

As for my second sentence (adding the other prefixed strings to the glossary) I 
was thinking of using the names people currently use. Entries for 
(byte|raw|unicode)-strings, seeing as they don't already exist, might be a good 
addition now that f-strings are up for inclusion.

--

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread R. David Murray

R. David Murray added the comment:

Agreed with Brett.  What I was trying to say was that we aren't going to get 
people to change to a different term, nor are the other 'x-string' 
abbreviations interesting, so we should document just f-string. But I wasn't 
exactly clear that that was my point :).

--

___
Python tracker 

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



[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2017-03-28 Thread Matthew McCormick

Matthew McCormick added the comment:

I have created a pull request for this issue,

  https://github.com/python/cpython/pull/880

that addresses extension builds for both MinGWPy and the Microsoft Visual C++ 
Compiler for Python 2.7.

--
nosy: +thewtex

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread Brett Cannon

Brett Cannon added the comment:

I think we're getting bogged down in a larger scope than this issue is about. 
All we should be discussing in this issue is whether adding an entry in the 
glossary for "f-string" as it's already being used in the community is bad 
(which I don't think it is since it's seeing use "in the wild"). No one is 
suggesting we change all the documentation to start using the shorthand/slang 
term, nor to introduce entries for other types of string literals where the 
community has not started using such terms (e.g. r-strings for raw strings). 
Heck, the docs already use "f-string" internally as a link target, i.e. 
https://docs.python.org/3/reference/lexical_analysis.html#f-strings (notice the 
intra-page link target).

IOW this is just making it easier for someone who comes across the term 
"f-string" to know what it means when they see it on e.g. Twitter, not trying 
to come up with a more accurate shorthand.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2017-03-28 Thread Matthew McCormick

Changes by Matthew McCormick :


--
pull_requests: +780

___
Python tracker 

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



[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-28 Thread Brett Cannon

Changes by Brett Cannon :


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



[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-28 Thread Brett Cannon

Brett Cannon added the comment:


New changeset ec1f5df46ed37aa3e839d20298c4b361a9a74bc4 by Brett Cannon 
(Vajrasky Kok) in branch 'master':
bpo-19791: Use functions from test support to check the symlink support. 
(GH-822)
https://github.com/python/cpython/commit/ec1f5df46ed37aa3e839d20298c4b361a9a74bc4


--
nosy: +brett.cannon

___
Python tracker 

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



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-03-28 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +778

___
Python tracker 

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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Even is IDLE is started from a console, the user execution process is not 
attached to one.

What I want, from an IDLE perspective, is for ^C in IDLE's shell to work as 
well as it does in a terminal.  That means either fixing _thread.interrupt_main 
to always do what it usually does (from a user perspective), or to be given 
something else to use in .interrupt_the_server() that does so.

The current workaround for stopping runaway code in interactive mode, 
restarting the shell with cntl-F6 or the menu entry Shell => Restart Shell, is 
a) obscure and not known to most beginners, and b) does too much in that it 
throws away the workspace.  It is much like closing a terminal Window with [X], 
and restarting the terminal and python, instead of using ^C.

Viktor, I am nosying you because of your posts to #21895.  Do you have any 
comments on this issue?

--

___
Python tracker 

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



[issue29937] argparse mutex group should allow mandatory parameters

2017-03-28 Thread Mark Nolan

New submission from Mark Nolan:

I see elsewhere, and from use, that a mutex group will not support mandatory 
positional parameters.

TBH, I don't understand why this should be any different from any other option, 
but if it must, then I think it should follow the 'required' parameter of the 
mutex.

So, it should be possible to have a mutex group where one option must be chosen 
and that option must have positional parameters.

(My first post here. Not sure of any other way to discuss with the argparse 
development group. Point me somewhere else if appropriate).

--
components: Library (Lib)
messages: 290750
nosy: Mark Nolan
priority: normal
severity: normal
status: open
title: argparse mutex group should allow mandatory parameters
type: enhancement
versions: Python 3.3, Python 3.4, 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



[issue29935] list and tuple index methods should accept None parameters

2017-03-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Eryk Sun

Eryk Sun added the comment:

Nathaniel's suggestion to update the implementation to work with raise(SIGINT) 
sounds like a good idea.

Fpr Windows, GenerateConsoleCtrlEvent is definitely a non-starter. 
PyErr_SetInterrupt shouldn't depend on having an attached console. IDLE 
generally runs without one. Even if the process has a console, there's no way 
to limit GenerateConsoleCtrlEvent to just the current process. It works with 
process groups, like POSIX killpg(). Typically a process is created in the 
session's Winlogon process group unless a new group was created by calling 
CreateProcess with the flag CREATE_NEW_PROCESS_GROUP. If you call 
GenerateConsoleCtrlEvent on a process ID that's not a group ID, the console 
behaves as if you passed group ID 0, which broadcasts to all processes attached 
to the console.

--

___
Python tracker 

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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Jeffrey Armstrong

Changes by Jeffrey Armstrong :


--
nosy:  -Jeffrey.Armstrong

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Error messages should use repr(). For example str() of bytes object emits a 
warning or error.

See issue26090 for the issue with truncated reprs.

--

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Could use `%.100S` instead of `%.100R` but I'm not sure of the downsides that 
might entail.

--

___
Python tracker 

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



[issue23487] argparse: add_subparsers 'action' broken

2017-03-28 Thread paul j3

paul j3 added the comment:

I'm going to close this.  At most it calls for a documentation change.  But 
saying something like

   It must be compatible with argparse._SubParsersAction.

will just confuse the average user.  Any customization of this action class is 
an advanced topic, that requires familiarity with the code, not just the 
documentation.

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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Nathaniel Smith

Nathaniel Smith added the comment:

(oh, in case it wasn't obvious: the advantage of raise() over kill() and 
pthread_kill() is that raise() works everywhere, including Windows, so it would 
avoid platform specific logic. Or if you don't like raise() for some reason 
then you can get the same effect by doing handler = PyOS_getsig(SIGINT); if 
(handler) handler(SIGINT); )

(Also, this is all assuming the python 3 logic on Windows. On Windows versions 
of python 2 I can't see any way to make time.sleep interruptible without 
significant rewriting. The problem is that on py2 the special Event used to 
signal the arrival of a control-C is a private variable that gets hooked up 
directly to Windows's low-level control-C logic, and there's effectively no way 
to get at it from outside. You might think GenerateConsoleCtrlEvent would help, 
but it is broken in too many ways for me to fit in this text box.)

--

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Yes, that does look like too much. My rationale for adding quotes around the 
value was in order to make it more clear in cases where the repr exceeds 100 
characters. 

Instead of:

   Traceback (most recent call last):
 File "", line 1, in 
   ValueError: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 
18, 19, 20, 21, 22, 23, 24, 25, 26, 2 not in list

Have it clearly distinguished by using "":

   Traceback (most recent call last):
 File "", line 1, in 
   ValueError: "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 
18, 19, 20, 21, 22, 23, 24, 25, 26, 2" not in list

I'm not sure if there's a trivial way to not display so many quotes in the case 
you supplied, you're better suited to decide if this can be done somehow.

--
versions: +Python 3.7 -Python 3.3

___
Python tracker 

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2017-03-28 Thread paul j3

Changes by paul j3 :


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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Nathaniel Smith

Nathaniel Smith added the comment:

If you want to trigger the standard signal handling logic, then raise(SIGINT) 
is also an option. On unix it probably won't help because of issue 21895, but 
using raise() here + fixing 21895 by using pthread_kill in the c level signal 
handler would together give a pretty simple and robust way to pretend that the 
user hit control-C.

But... interrupt_main isn't documented to raise a SIGINT, it's documented to 
raise KeyboardInterrupt. These are very different, e.g. if the user has 
installed a custom handler or even set SIGINT to SIG_IGN or masked it. (In the 
later two cases, using pthread_kill to send a signal to the main thread *won't* 
interrupt any ongoing syscall.) This is *much* more difficult to make work 
correctly. And actually what IDLE wants is a fake control-C anyway!

So I'd suggest either redefining the semantics of interrupt_main to be "acts as 
if SIGINT was received" or else abandoning interrupt_main to its slightly-buggy 
semantics and adding a new function that does raise(SIGINT) and switching IDLE 
to use this new function. And fix issue 21895 in either case.

--
nosy: +njs

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>>> [1, 2, 3].index("'")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: ""'"" not in list

Aren't too much quotes?

--

___
Python tracker 

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

INADA Naoki added the comment:


New changeset 6a04ef7ceddae0930eba6cc57ba2ebfcef00abab by INADA Naoki in branch 
'2.7':
bpo-29643: Fix check for --enable-optimizations (GH-873)
https://github.com/python/cpython/commit/6a04ef7ceddae0930eba6cc57ba2ebfcef00abab


--

___
Python tracker 

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



[issue22049] argparse: type= doesn't honor nargs > 1

2017-03-28 Thread paul j3

Changes by paul j3 :


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



[issue29935] list and tuple index methods should accept None parameters

2017-03-28 Thread George King

Changes by George King :


--
type:  -> enhancement

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset c4021af50526f488c0c280e7c7eaa83ef80ae1df by Mariatta in branch 
'3.6':
bpo-16011: clarify that 'in' always returns a boolean value (GH-874)
https://github.com/python/cpython/commit/c4021af50526f488c0c280e7c7eaa83ef80ae1df


--

___
Python tracker 

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



[issue29935] list and tuple index methods should accept None parameters

2017-03-28 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
components: +Interpreter Core
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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Niklas Fiekas

Changes by Niklas Fiekas :


--
components: +Build -Interpreter Core
nosy: +Jeffrey.Armstrong, christian.heimes
type:  -> compile error

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 0957f262c5e47167efd520624557aebdc61bfda8 by Mariatta in branch 
'3.5':
bpo-16011: clarify that 'in' always returns a boolean value (GH-152) (GH-875)
https://github.com/python/cpython/commit/0957f262c5e47167efd520624557aebdc61bfda8


--
nosy: +Mariatta

___
Python tracker 

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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Niklas Fiekas

Changes by Niklas Fiekas :


--
pull_requests: +777

___
Python tracker 

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



[issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x

2017-03-28 Thread Niklas Fiekas

New submission from Niklas Fiekas:

The patch in http://bugs.python.org/issue16881 disables the nicer macro for gcc 
3.x due to a small typo.

The build is not failing. The guard just unnescessarily evaluates to false.

--
components: Interpreter Core
messages: 290738
nosy: niklasf
priority: normal
severity: normal
status: open
title: Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x
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



[issue29677] clarify docs about 'round()' accepting a negative integer for ndigits

2017-03-28 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +776

___
Python tracker 

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



[issue29935] list and tuple index methods should accept None parameters

2017-03-28 Thread George King

New submission from George King:

As of python3.6, passing None to the start/end parameters of `list.index` and 
`tuple.index` raises the following exception:
"slice indices must be integers or None or have an __index__ method"

This suggests that the intent is to support None as a valid input. This would 
be quite useful for the end parameter, where the sensible default is len(self) 
rather than a constant. Note also that str, bytes, and bytearray all support 
None.

I suggest that CPython be patched to support None for start/end. Otherwise, at 
the very least the exception message should be changed.

Accepting None will make the optional start/end parameters for this method more 
consistent across the types, which is especially helpful when using type 
annotations / checking.

--
messages: 290737
nosy: gwk
priority: normal
severity: normal
status: open
title: list and tuple index methods should accept None parameters

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-03-28 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
pull_requests: +775

___
Python tracker 

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



[issue29908] Inconsistent crashing with an access violation

2017-03-28 Thread Steve Dower

Steve Dower added the comment:

Thanks for the link! I've reported it to the C Runtime team and they'll get it 
fixed. (Because this is an operating system component, the fix will come 
through normal Windows Updates and apply to any version of Python 3.5+, so I'd 
rather not build a workaround into the product for it.)

--

___
Python tracker 

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



[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray

R. David Murray added the comment:

Oops.  I merged the patch without coming back here first :(.  Still getting 
used to the new workflow.

It turns out that format has a parameter, monetary, that isn't supported by 
format_string.  So what we did was add that parameter to format_string and 
deprecate format.

If there is objection to this solution I will revert the merge.

--

___
Python tracker 

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



[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray

R. David Murray added the comment:


New changeset 1cf93a76c2cf307f2e1e514a8944864f746337ea by R. David Murray 
(Garvit Khatri) in branch 'master':
bpo-10379: add 'monetary' to format_string, deprecate format
https://github.com/python/cpython/commit/1cf93a76c2cf307f2e1e514a8944864f746337ea


--

___
Python tracker 

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



[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping again.

--

___
Python tracker 

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



[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread Aymeric Augustin

Aymeric Augustin added the comment:

For context, websockets calls `yield from self.writer.drain()` after each write 
in order to provide backpressure.

If the output buffer fills up, calling API coroutines that write to the 
websocket connection becomes slow and hopefully the backpressure will propagate 
(in a correctly implemented application).

This is a straightforward application of the only use case described in the 
documentation.



I would find it annoying to have to serialize calls to drain() myself. It 
doesn't feel like something the "application" should care about. (websockets is 
the application from asyncio's perspective.)

I'm wondering if it could be a problem if a bunch of corountines were waiting 
on drain() and got released simultaneously. I don't think it would be a problem 
for websockets. Since my use case seems typical, there's a good chance this 
also applies to other apps.

So I'm in favor of simply allowing an arbitrary number of coroutines to wait on 
drain() in parallel, if that's feasible.

--
nosy: +aymeric.augustin

___
Python tracker 

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

INADA Naoki added the comment:


New changeset e6a49531568561fe5aaf662259ecb7b4bc2426be by INADA Naoki in branch 
'3.5':
bpo-29643: Fix check for --enable-optimizations (GH-871)
https://github.com/python/cpython/commit/e6a49531568561fe5aaf662259ecb7b4bc2426be


--

___
Python tracker 

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

INADA Naoki added the comment:


New changeset f01de61a8efea8319c65365898982f929d59a895 by INADA Naoki in branch 
'3.6':
bpo-29643: Fix check for --enable-optimizations (GH-869)
https://github.com/python/cpython/commit/f01de61a8efea8319c65365898982f929d59a895


--

___
Python tracker 

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



[issue11913] sdist refuses README.rst

2017-03-28 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

FWIW, I opened a PR for this: https://github.com/python/cpython/pull/563

--
nosy: +refi64

___
Python tracker 

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



[issue29904] Fix a number of error message typos

2017-03-28 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Eryk Sun

Eryk Sun added the comment:

For Windows the event should be set after trip_signal(SIGINT). That way the 
flag is guaranteed to be tripped when PyErr_CheckSignals is called from the 
time module's pysleep() function. This in turn calls the default SIGINT handler 
that raises a KeyboardInterrupt.

--

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Sorry, the fix is for 3.6.2 so 3.6.1 would still suffer from it. :-(

--

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes, this is a regression in 3.6.0 and it has been fixed in #29714 for 3.6.1. 
Try the new version. :-)

--
nosy: +xiang.zhang
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> can't interpolate byte string with \x00 before replacement 
identifier

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread R. David Murray

R. David Murray added the comment:

Thanks,

--
stage: patch review -> backport needed

___
Python tracker 

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



[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray

Changes by R. David Murray :


--
stage: backport needed -> needs patch

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Mert Bora Alper

Changes by Mert Bora Alper :


--
components: +Interpreter Core

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Mert Bora Alper

New submission from Mert Bora Alper:

Hello,

In Python 3.6.0, % formatting fails to find formatting code after a null byte 
in bytes type.

Example:
>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not all arguments converted during bytes formatting

In contrast, the exact same code works as expected in Python 3.5:

>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
b'hello_\x00world'

I used Python 3.6.0 that I installed using pyenv 1.0.8 on Kubuntu 16.04 x86_64.

--
messages: 290724
nosy: boramalper
priority: normal
severity: normal
status: open
title: % formatting fails to find formatting code in bytes type after a null 
byte
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



[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray

Changes by R. David Murray :


--
stage: needs patch -> backport needed

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +772

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +773

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-03-28 Thread Armin Rigo

Armin Rigo added the comment:

Changes including a test.  The test should check all combinations of 
"concurrent" creation of the directory.  It hacks around at 
pathlib._normal_accessor.mkdir (patching "os.mkdir" has no effect, as the 
built-in function was already extracted and stored inside 
pathlib._normal_accessor).

--
Added file: http://bugs.python.org/file46764/x2.diff

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

The abstract of PEP 498 states:
```
In this PEP, such strings will be referred to as "f-strings", taken from the 
leading character used to denote such strings, and standing for "formatted 
strings".
```

--

___
Python tracker 

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



[issue29921] datetime validation is stricter in 3.6.1 than previous versions

2017-03-28 Thread Ned Deily

Ned Deily added the comment:

FTR, there is now a pywin32 issue (opened by the OP) on this:  
https://sourceforge.net/p/pywin32/bugs/748/

--
nosy: +ned.deily

___
Python tracker 

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



[issue16011] "in" should be consistent with return value of __contains__

2017-03-28 Thread R. David Murray

R. David Murray added the comment:


New changeset 0ae7c8bd614d3aa1fcaf2d71a10ff1148c80d9b5 by R. David Murray (Amit 
Kumar) in branch 'master':
bpo-16011 clarify that 'in' always returns a boolean value
https://github.com/python/cpython/commit/0ae7c8bd614d3aa1fcaf2d71a10ff1148c80d9b5


--

___
Python tracker 

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



[issue20314] Potentially confusing formulation in 6.1.4. Template strings

2017-03-28 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue20314] Potentially confusing formulation in 6.1.4. Template strings

2017-03-28 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


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



[issue19824] string.Template: Rewrite docs to emphasize i18n use case

2017-03-28 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue12518] In string.Template it's impossible to transform delimiter in the derived class

2017-03-28 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


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



[issue19824] string.Template: Rewrite docs to emphasize i18n use case

2017-03-28 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:


New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in 
branch 'master':
Improve the documentation for template strings (#856)
https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb


--

___
Python tracker 

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



[issue20314] Potentially confusing formulation in 6.1.4. Template strings

2017-03-28 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:


New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in 
branch 'master':
Improve the documentation for template strings (#856)
https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb


--

___
Python tracker 

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



[issue12518] In string.Template it's impossible to transform delimiter in the derived class

2017-03-28 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:


New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in 
branch 'master':
Improve the documentation for template strings (#856)
https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb


--

___
Python tracker 

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



[issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters

2017-03-28 Thread STINNER Victor

STINNER Victor added the comment:

It would also be nice to:

* link to set_write_buffer_limits() from drain()
* link to set_write_buffer_limits() from pause_writing() / resume_writing()
* mention asyncio default values for set_write_buffer_limits(): low=16 kB, 
high=64 kB (kb? kib? i never know :-/)

--

___
Python tracker 

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



[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Eryk, would the addition go before or after "trip_signal(SIGINT);"

I posted "Issue with _thread.interrupt_main (29926)" on pydev list.  Steven 
D'Aprano verified delayed response on *nix.

Martin Panter said
"Looking at the implementation, _thread.interrupt_main just calls 
PyErr_SetInterrupt. It doesn’t appear to send a signal. I played with “strace” 
and couldn’t see any evidence of a signal. I guess it just sets a flag that 
will be polled. To actually interrupt the “sleep” call, you might need to use 
“pthread_kill” or similar (at least on Unix)."

--

___
Python tracker 

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



[issue29929] Eliminate implicit __main__ relative imports

2017-03-28 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue29932] Missing word ("be") in error message ("first argument must a type object")

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

..and another one here 
https://github.com/python/cpython/blob/master/Modules/arraymodule.c#L2145:

"__reduce_ex__ argument should an integer" -> ".. should be .."

--

___
Python tracker 

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



[issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters

2017-03-28 Thread STINNER Victor

STINNER Victor added the comment:

See also https://github.com/asyncio-doc/asyncio-doc/issues/17 for a more 
general documentation request on asyncio parameters (on the external asyncio 
doc).

--

___
Python tracker 

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



[issue29928] Add f-strings to Glossary

2017-03-28 Thread R. David Murray

R. David Murray added the comment:

"raw" and "byte" are one syllable names, and thus as easy and more meaningful 
to say than "r-string" or "b-string".  "unicode string" is more descriptive and 
not much longer, but "u-string" does occasionally get used, though mostly in a 
python3 context where you want to differentiate it from normal unadorned 
unicode strings.  If you want to replace 'f-string' in the vernacular, you need 
a one or two syllable word that is descriptive.  The only real candidate is 
"format string", and we already use that for the older types of format strings. 
 If those were to fall out of use, I'd expect "format string" to come to mean 
what f-string does now.  But by the time that happens, f-string will be more 
entrenched than it is now.  We could try for "format expression", but that is 
more syllables, and faces headwind because the f prefix obviously makes it a 
"string"-like object, and that's how we think about it: a string with 
expressions inside it, instead of as an expression itself.

In summary, I think we're stuck with f-string.  It's a term of art: a short 
expression that encapsulates a non-trivial concept for which there are no 
precise existing words.

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



[issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters

2017-03-28 Thread STINNER Victor

New submission from STINNER Victor:

The asyncio set_write_buffer_limits() documentation doesn't specify unit of 
high and low parameters. Moreover, it would to explain better the effect of 
high and low:

* pause_writing() is called when the buffer size becomes larger or equal to high
* (if writing is pause) resume_writing() is called when the buffer size becomes 
smaller or equal to low

--
assignee: docs@python
components: Documentation, asyncio
keywords: easy
messages: 290712
nosy: docs@python, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: set_write_buffer_limits() doc doesn't specify unit of the 
parameters
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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +771

___
Python tracker 

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



[issue29932] Missing word ("be") in error message ("first argument must a type object")

2017-03-28 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Indeed, quickly glancing over the error messages there's another small typo in 
https://github.com/python/cpython/blob/master/Modules/arraymodule.c#L2371:

"array indices must be integer" -> "array indices must be integers"

might as well fix that in your PR too (maybe also change the title to: "Fix 
small error message typos in arraymodule.c"?)

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue29921] datetime validation is stricter in 3.6.1 than previous versions

2017-03-28 Thread m-parry

m-parry added the comment:

pywin32 is not my code. It is a ubiquitous Python library on Windows that 
cannot be used under Python 3.6.1.

--

___
Python tracker 

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



[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-03-28 Thread STINNER Victor

Changes by STINNER Victor :


--
title: asyncio.StreamWriter.drain raises an AssertionError under heavy use -> 
Waiting for asyncio.StreamWriter.drain() twice in parallel raises an 
AssertionError when the transport stopped writing

___
Python tracker 

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



[issue29100] datetime.fromtimestamp() doesn't check min/max year anymore: regression of Python 3.6

2017-03-28 Thread STINNER Victor

STINNER Victor added the comment:

m-parry reported the issue #29921 "datetime validation is stricter in 3.6.1 
than previous versions". He is right, the C API of Python 3.6.1 is now stricter 
than Python 2.7 and 3.5. The C API doesn't allow anymore to create datetime 
objects outside the [datetime.datetime.min; datetime.datetime.max] range (what 
I would call "invalid" datetime objects). I closed the bug as NOT A BUG since I 
consider that it's a deliberate design choice and not a regression.

--

___
Python tracker 

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



[issue29921] datetime validation is stricter in 3.6.1 than previous versions

2017-03-28 Thread STINNER Victor

STINNER Victor added the comment:

> Again, under <3.6.1, that was accepted. (And again, I am making no argument 
> about the validity of this code, just with regards to backwards 
> compatibility.)

You are right that I modified the C API of datetime in Python 3.6.1 to make it 
stricter and reject invalid dates.

I disagree that the "backward incompatibility" part: I consider that it's a 
bugfix, and not a behaviour change.

The datetime module was enhanced in Python 3.6 with the PEP 495 to handle 
better DST changes: a new "fold" attribute was added. Computing this attribute 
requires to handle valid dates in the [datetime.datetime.min; 
datetime.datetime.max] range. Otherwise, you get strange errors like 
OverflowError: see issue #29100.

If Python older than 3.6.1 allowed creating invalid dates, it was a bug, and 
now this bug can lead to new bugs because of the implementation of the PEP 495.

Please fix you code. I now close this issue as NOTABUG. Stricter input 
validation was a deliberate choice.

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +770

___
Python tracker 

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +769

___
Python tracker 

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



[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +768

___
Python tracker 

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



  1   2   >