[issue33023] Unable to copy ssl.SSLContext

2018-06-06 Thread Ned Deily


Ned Deily  added the comment:

We have a languishing PR here.  What should be done with it?  If I understand 
correctly, Serhiy is proposing a more general cleanup in Issue33138 PR 6239.  
If that is merged, can PR 6099 here be simplified?  What branches should it 
apply to? (retargeting for 3.8 pending comments)

--
nosy: +ned.deily
versions: +Python 3.8 -Python 2.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



[issue21196] Name mangling example in Python tutorial

2018-06-06 Thread Tim Peters


Tim Peters  added the comment:

Berker Peksag's change (PR 5667) is very simple and, I think, helpful.

--
nosy: +tim.peters

___
Python tracker 

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



[issue33790] Decorated (inner/wrapped) function kwarg defaults dont pass through decorator.

2018-06-06 Thread Salomon


New submission from Salomon :

I am seeing an issue when attempting to use default kwargs in decorated 
functions.

I would post reproduction steps, but instead I have written a snippet which 
should showcase the issue.

Snippet:
```python
def decorator():
def inner(f):
def wrapper(*args, **kwargs):
# Zoinks, Scoob!
print('Decorator: {}'.format(''.join(kwargs.values(
print(f(*args, **kwargs))
return wrapper
return inner

@decorator()
def func(foo='wont print in the decorator'):
return 'Func: {}'.format(foo)```

The following calls to 'func' should show you what Im talking about clearly:

```
func()
-> Decorator: 
-> Func: wont print in the decorator
func(foo='will print in the decorator')
-> Decorator: will print in the decorator
-> Func: will print in the decorator
```

I would expect, though correct me if I am wrong, that both of these calls 
should print in the decorator and the function call.

For convenience, some REPL.it links:
3.6.1 -> https://repl.it/@SalomonSmeke/Python3-Decorator-Bug
2.7.10 -> https://repl.it/@SalomonSmeke/Python-Decorator-Bug

Using @wrap from functools:
2.7.10 -> https://repl.it/@SalomonSmeke/Python-Decorator-Bug-using-FuncTools

Thank you for your time.

P.S.
This is my first issue submitted to Python, please let me know if there is 
detail lacking. Im happy to provide what I can.

--
messages: 318892
nosy: ssmeke
priority: normal
severity: normal
status: open
title: Decorated (inner/wrapped) function kwarg defaults dont pass through 
decorator.
type: behavior
versions: Python 2.7, 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



[issue21196] Name mangling example in Python tutorial

2018-06-06 Thread Ned Deily


Ned Deily  added the comment:

What should we do with this issue?  Raymond, it sounds like you think the 
proposed PR should not be merged, is that right?  If so, should the issue and 
PR be closed?  Other opinions?  I would like to resolve this so we can either 
merge or close PR 5667.  Thanks!

--
nosy: +ned.deily

___
Python tracker 

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



[issue30773] async generator receives wrong value when shared between coroutines

2018-06-06 Thread Yury Selivanov


Change by Yury Selivanov :


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

___
Python tracker 

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



[issue33351] Support compiling with clang-cl on Windows

2018-06-06 Thread Ethan Smith


Ethan Smith  added the comment:

I sent my patches to clang-cl upstream [1]. It seems they want to implement 
Hardware Lock Elision (which is used by some MSVC compiler intrinsics in 
pyatomic.h) before implementing the needed intrinsics.

I have found temporary replacements that do not elide locks, but have 
effectively the same functional purpose as those intrinsics, so I should have a 
full PR for CPython ready soon.

[1] https://reviews.llvm.org/D47672

--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Fred L. Drake, Jr.


Fred L. Drake, Jr.  added the comment:


New changeset 5bfa058e65897567889354d7eb34af2b93a20f18 by Fred Drake 
(arikrupnik) in branch 'master':
bpo-33274: Compliance with DOM L1: return removed attribute (#7465)
https://github.com/python/cpython/commit/5bfa058e65897567889354d7eb34af2b93a20f18


--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Fred L. Drake, Jr.


Fred L. Drake, Jr.  added the comment:

I should stop relying on wetware memory; it's not working out.  Sorry for the 
mis-information.

--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ned Deily


Ned Deily  added the comment:

Fred:
> Python 2.7 is in security-fix-only mode

That's not quite the case yet.  We are still accepting bug-fixes for 2.7 
although its end-of-life *is* approaching!

https://devguide.python.org/#status-of-python-branches

--
nosy: +ned.deily

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Fred L. Drake, Jr.


Fred L. Drake, Jr.  added the comment:

Python 2.7 is in security-fix-only mode, and this doesn't fit that.  While I 
wouldn't object to a note in the documentation, see my comments in my patch 
review (there's just no place for it to go).

--

___
Python tracker 

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



[issue31202] Windows pathlib.Path.glob(pattern) fixed part of the pattern changed to lowercase whereas it should be unchanged.

2018-06-06 Thread Ned Deily


Change by Ned Deily :


--
versions: +Python 3.8 -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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Ari Krupnik  added the comment:

My bad. This issue looks like a simple omission to me--albeit one that's been 
in the code a long time. My patch simply brings the code into compliance with 
what the documentation (including in 2.7) already says it does.

--

___
Python tracker 

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



[issue33786] @asynccontextmanager doesn't work well with async generators

2018-06-06 Thread Yury Selivanov


Yury Selivanov  added the comment:

Would be nice to fix this in 3.7.0

--
components: +Interpreter Core -asyncio
nosy: +ned.deily
priority: normal -> release blocker
type:  -> behavior
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

2.7 does not get enhancements.  When a core dev removes a version, don't re-add 
without discussion.

--
versions:  -Python 2.7

___
Python tracker 

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



[issue33786] @asynccontextmanager doesn't work well with async generators

2018-06-06 Thread Yury Selivanov


Change by Yury Selivanov :


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

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Change by Ari Krupnik :


--
pull_requests: +7088

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I unlinked bad PR 6462 (against 3.6). PR 7465 is properly formed and should be 
reviewed.

--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -6157

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Change by Ari Krupnik :


--
pull_requests:  -7086

___
Python tracker 

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



[issue33778] update Unicode database to 11.0

2018-06-06 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Sure, where do you think such documentation belongs?

On Wed, Jun 6, 2018, at 01:46, STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
> Benjamin: would you mind to explain how to update Unicode in Python? I 
> would like to document it, if you are not available for example, or 
> don't want to do it anymore.
> 
> I'm asking for my general idea of having at least two maintainers per 
> "CPython maintenance task":
> http://vstinner.readthedocs.io/cpython_tasks.html
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Ari Krupnik  added the comment:

I added a test case and a News entry per serhiy.storchaka's request.

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

I agree with fdrake's concerns about DOM's usefulness. DOM is not very 
Pythonic. I note that as long as Python has a DOM implementation, it follows 
the spec fairly closely. Element.removeAttributeNode() is the exception. All 
other minidom mutators (unpythonically) return the values that the standard 
requires, including the sister mutator setAttributeNode: 

Node.insertBefore()
Node.appendChild()
Node.replaceChild()
Node.removeChild()

NamedNodeMap.removeNamedItem()
NamedNodeMap.removeNamedItemNS()
NamedNodeMap.setNamedItem()

Element.setAttributeNode()

Document.removeChild()
Document.renameNode()

--
versions: +Python 2.7

___
Python tracker 

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



[issue33778] update Unicode database to 11.0

2018-06-06 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 7c69c1c0fba8c1c8ff3969bce4c1135736a4cc58 by Benjamin Peterson in 
branch 'master':
update to Unicode 11.0.0 (closes bpo-33778) (GH-7439)
https://github.com/python/cpython/commit/7c69c1c0fba8c1c8ff3969bce4c1135736a4cc58


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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Change by Ari Krupnik :


--
pull_requests: +7087

___
Python tracker 

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



[issue33779] Error while installing python 3.6.5 on windows 10

2018-06-06 Thread Siddhartha Bose


Siddhartha Bose  added the comment:

@steve, I tried to install which gave me access denied error and when i checked 
it was there in program and features. Let's check on that when I successfully 
uninstall the two instances already there (3.7.0b5 and 3.6.5)

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Something else. The bug occurs when CancelIoEx() (on the current overlapped 
WSARecv()) fails internally with ERROR_NOT_FOUND. According to overlapped.c, it 
means:

/* CancelIoEx returns ERROR_NOT_FOUND if the I/O completed in-between */

HasOverlappedIoCompleted() returns 0 in that case.

The problem is that currently, Overlapped.cancel() also returns None in that 
case, and later the asyncio IOCP loop ignores the completion event and so drops 
incoming received data.

--

___
Python tracker 

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



[issue33274] minidom removeAttributeNode returns None

2018-06-06 Thread Ari Krupnik


Change by Ari Krupnik :


--
keywords: +patch
pull_requests: +7086
stage: test needed -> patch review

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

_ProactorReadPipeTransport.set_transport():

if self.is_reading():
# reset reading callback / buffers / self._read_fut
self.pause_reading()
self.resume_reading()

This method cancelled the pending overlapped WSARecv(), and then create a new 
overlapped WSARecv().

Even after CancelIoEx(old overlapped), the IOCP loop still gets an event for 
the completion of the recv. Problem: since the Python future is cancelled, the 
even is ignored and so 176 bytes are lost.

I'm surprised that an overlapped WSARecv() cancelled by CancelIoEx() still 
returns data when IOCP polls for events.

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Sorry, the patch to reproduce the issue on Linux is wrong: it introduces a bug 
in the test. Ignore this comment.

--

It seems like I found the root cause: pause_reading() / resume_reading() on the 
transport is not safe. Sometimes, we loose data. See the "TODO" below...

class _ProactorReadPipeTransport(_ProactorBasePipeTransport,
 transports.ReadTransport):
"""Transport for read pipes."""
(...)
def pause_reading(self):
if self._closing or self._paused:
return
self._paused = True

if self._read_fut is not None and not self._read_fut.done():
# TODO: This is an ugly hack to cancel the current read future
# *and* avoid potential race conditions, as read cancellation
# goes through `future.cancel()` and `loop.call_soon()`.
# We then use this special attribute in the reader callback to
# exit *immediately* without doing any cleanup/rescheduling.
self._read_fut.__asyncio_cancelled_on_pause__ = True

self._read_fut.cancel()
self._read_fut = None
self._reschedule_on_resume = True

if self._loop.get_debug():
logger.debug("%r pauses reading", self)


If you remove the "ugly hack", the test no longer hangs...

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

The issue occurs when the server calls start_tls() because the client calls 
start_tls(). In that case, ServerProto.data_received() is called with the 
server TLS handshake and so the client SSLProtocol never this this handshake 
from server...

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Call stack when the asyncio client connects to the server when the bug occurs:

SSLProtocol.connection_made()
-> SSLProtocol._start_handshake()
-> SSLProtocol._process_write_backlog()
-> SSLPipe.do_handshake()
-> SSLPipe.feed_ssldata(b'', only_handshake=True)
-> SSLObject.do_handshake()
-> C SSL_do_handshake() returns immediately because the socket is non-blocking

It seems like SSLObject.do_handshake() is only attempted once and... then 
nothing. The client is supposed to send data, retry the handshake, or 
something, but it does *nothing*. So the handshake never completes and the test 
hangs to later fail with a timeout.

--

___
Python tracker 

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



[issue33783] Use proper class markup for random.Random docs

2018-06-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks, I'll add a separate entry for the random.Random() class.

--
components: +Documentation
priority: normal -> low

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

The bug can be reproduced on Linux using this patch:

diff --git a/Lib/test/test_asyncio/test_sslproto.py 
b/Lib/test/test_asyncio/test_sslproto.py
index 78ab1eb822..735313152c 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -471,6 +471,8 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
 
 self.assertEqual(proto.data, b'')
 
+await asyncio.sleep(1)
+
 new_tr = await self.loop.start_tls(
 tr, proto, server_context,
 server_side=True,

--

___
Python tracker 

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



[issue33780] [subprocess] Better Unicode support for shell=True on Windows

2018-06-06 Thread Eryk Sun


Eryk Sun  added the comment:

> By default, the output of cmd is encoded with the "active" 
> codepage. In Python 3.6, you can decode this using 
> encoding='oem'.

FYI, the actual encoding is not necessarily "oem".

The console codepage may have been changed from the initial value by a 
SetConsoleCP call in the current process or another process (e.g. chcp.com, 
mode.com). For example, a batch script can switch to codepage 65001 to allow 
CMD to read a UTF-8 encoded batch file; or read UTF-8 from an external command 
in a `for /f` loop; or write UTF-8 to a disk file or pipe. 

(Only switch to codepage 65001 temporarily. Using UTF-8 for legacy console I/O 
is buggy. CMD, PowerShell, and Python 3.6+ aren't affected since they use the 
wide-character API for console I/O. But a legacy console application that uses 
the codepage implicitly with ReadFile and WriteFile for byte-based I/O may get 
invalid results such as reading a non-ASCII character as NUL, or the entire 
read failing, or writing garbage to the console after output that contains 
non-ASCII characters.)

To accommodate applications that use the current console codepage for standard 
I/O, Python could add two encodings that correspond to the current value of 
GetConsoleCP and GetConsoleOutputCP (e.g. named "conin" and "conout"). 

Additionally, we can't assume the console codepage is initially OEM. It depends 
on settings in the registry or the shell shortcut for the application that 
allocated the console. In particular, if a new console window is allocated by a 
process (either explicitly via AllocConsole or implicitly for a console app 
that either hasn't inherited a console or was created with the 
CREATE_NEW_CONSOLE or CREATE_NO_WINDOW creation flag), then the console loads 
custom settings from either the registry key "HKCU\Console\" or 
the shell shortcut (LNK file) that started the application. 

If the console uses the window-title registry key, it looks for a "CodePage" 
DWORD value. The key name is the normalized window title, which comes from the 
WindowTitle field of the process parameters. This can be set explicitly using 
the STARTUPINFO lpTitle field that's passed to CreateProcess. Otherwise the 
system uses the executable path as the default window title. The console 
normalizes the title string to create a valid key name by replacing backslash 
with underscore, and it also substitutes "%SystemRoot%" for the Windows 
directory, e.g. the default configuration key for CMD is 
"HKCU\Console\%SystemRoot%_system32_cmd.exe". 

The codepage can also be set in a shell shortcut (LNK file) [1]. When an 
application is started from a shell shortcut, the shell sets the STARTUPINFO 
flag STARTF_TITLEISLINKNAME and the lpTitle string to the fully-qualified path 
of the LNK file. In this case, the console reads the LNK file to load its 
settings, rather than using the window-title subkey in the registry. But the 
"HKCU\Console" root key is still used for the default settings.

Finally, if CMD is run without a console (i.e. using the DETACHED_PROCESS 
creation flag), the default codepage is ANSI, not OEM. This isn't hard-coded in 
CMD. It happens that GetConsoleCP returns 0 (i.e. CP_ACP) in this case.

[1]: https://msdn.microsoft.com/en-us/library/dd891330.aspx

--

___
Python tracker 

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



[issue33780] [subprocess] Better Unicode support for shell=True on Windows

2018-06-06 Thread Eryk Sun


Eryk Sun  added the comment:

> To get the correct output, cmd has a "/u" switch (this switch has 
> probably existed forever - at least since Windows NT 4.0, by my 
> internet search). The output can then be decoded using 
> encoding='utf-16-le', like any native Windows string.

However, the /u switch doesn't affect how CMD reads from stdin when it's a disk 
file or pipe. For example, `set /p` will stop at the first NUL byte. In general 
this is mismatched with subprocess, which provides a single `encoding` value 
for all 3 standard I/O streams. For example:

>>> r = subprocess.run('cmd /d /v /u /c "set /p spam= & echo !spam!"',
... capture_output=True, input='spam', encoding='oem')
>>> r.stdout
's\x00p\x00a\x00m\x00\n\x00\n\x00'

With UTF-16 input, CMD only reads up to "s" instead of reading the entire 
"s\x00p\x00a\x00m\x00" string that was written to stdin:

>>> r = subprocess.run('cmd /d /v /u /c "set /p spam= & echo !spam!"',
... capture_output=True, input='spam', encoding='utf-16le')
>>> r.stdout
's\n'

> 1. A new argument to Popen

This may lead to confusion and false bug reports by people who expect the 
setting to also affect external programs run via the shell (e.g. tasklist.exe). 
It's also not consistent with how CMD reads from stdin, as shown above. 

I can see the use of adding a cross-platform get_shell_path() function that 
returns the fully-qualified path to the shell that's used by shell=True. This 
way programs don't have to figure it out on their own if they need custom shell 
options. 

Common CMD shell options in Windows include /d (skip AutoRun commands), /v 
(enable delayed expansion of environment variables via "!"), /e (enable command 
extensions), /k (remain running after the command), and /u. I'd prefer 
subprocess to use /d by default. It's strange that the CRT's system() command 
doesn't use it.

Currently the shell path can be "/bin/sh" or "/system/bin/sh" in POSIX and 
os.environ.get("COMSPEC", "cmd.exe") in Windows. I'd prefer that Windows 
instead used:

shell_path = os.path.abspath(os.environ.get('ComSpec',
os.path.join(_winapi.GetSystemDirectory(), 'cmd.exe')))

i.e. never use an unqualified, relative path such as "cmd.exe". 

Instead of the single-use GetSystemDirectory function, it could instead use 
_winapi.SHGetKnownFolderPath(_winapi.FOLDERID_System), or 
_winapi.SHGetKnownFolderPath('{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}') if the 
GUID constants aren't added.

--
nosy: +eryksun

___
Python tracker 

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



[issue32676] test_asyncio emits many warnings when run in debug mode

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9f04f0df6fdb27190690bda949d213893d14e807 by Victor Stinner in 
branch 'master':
bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)
https://github.com/python/cpython/commit/9f04f0df6fdb27190690bda949d213893d14e807


--

___
Python tracker 

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



[issue33789] test_asyncio emits ResourceWarning warnings

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd by Victor Stinner in 
branch 'master':
bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
https://github.com/python/cpython/commit/7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd


--

___
Python tracker 

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



[issue33789] test_asyncio emits ResourceWarning warnings

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0eba7c39132614a5730cda6b340e18dfb2d30d14 by Victor Stinner in 
branch 'master':
bpo-33789: test_asyncio: Fix ResourceWarning (GH-7460)
https://github.com/python/cpython/commit/0eba7c39132614a5730cda6b340e18dfb2d30d14


--

___
Python tracker 

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



[issue32676] test_asyncio emits many warnings when run in debug mode

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33789] test_asyncio emits ResourceWarning warnings

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7084

___
Python tracker 

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



[issue33789] test_asyncio emits ResourceWarning warnings

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33789] test_asyncio emits ResourceWarning warnings

2018-06-06 Thread STINNER Victor


New submission from STINNER Victor :

vstinner@apu$ ./python -X dev -u -m test test_asyncio -v 2>&1
(...)
test_create_connection_ssl_failed_certificate 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ...

Exception in thread test-server:
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 263, in _run
self._handle_client(conn)
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 272, in _handle_client
self._prog(TestSocketWrapper(sock))
  File 
"/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_sslproto.py", 
line 604, in server
server_side=True)
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 153, in start_tls
ssl_sock.do_handshake()
  File "/home/vstinner/prog/python/master/Lib/ssl.py", line 1108, in 
do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/threading.py", line 917, in 
_bootstrap_inner
self.run()
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 232, in run
self._run()
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 269, in _run
self._test._abort_socket_test(ex)
  File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py", 
line 122, in _abort_socket_test
self.fail(ex)
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 680, in 
fail
raise self.failureException(msg)
AssertionError: [Errno 0] Error

/home/vstinner/prog/python/master/Lib/threading.py:951: ResourceWarning: 
unclosed 
  del exc_type, exc_value, exc_tb
ok

(...)

test_start_tls_client_corrupted_ssl 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ...

/home/vstinner/prog/python/master/Lib/test/test_asyncio/functional.py:272: 
ResourceWarning: unclosed 
  self._prog(TestSocketWrapper(sock))
/home/vstinner/prog/python/master/Lib/asyncio/sslproto.py:322: ResourceWarning: 
unclosed transport 
  source=self)
ok

(...)


I'm working on a fix.

--
components: asyncio
messages: 318864
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio emits ResourceWarning warnings
versions: Python 3.8

___
Python tracker 

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



[issue13153] IDLE 3.x on Windows crashes when pasting non-BMP unicode

2018-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -JBernardo, Ramchandra Apte, Rosuav, THRlWiTi, William.Schwartz, 
asvetlov, loewis, python-dev, roger.serwy

___
Python tracker 

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



[issue13153] IDLE 3.x on Windows crashes when pasting non-BMP unicode

2018-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg318863

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into IDLE on Windows

2018-06-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a duplicate of the remaining part of #13153.  The error message 
displayed in a console used to start IDLE is the same, ending with 
"UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: 
invalid continuation byte"  In the previous issue, Ezio explained the message 
and Serhiy submitted patches at yet untested.  So I am closing this.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE crashes when pasting non-BMP unicode char on Py3
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



[issue32493] UUID Module - FreeBSD build failure

2018-06-06 Thread Michael Felt


Change by Michael Felt :


--
pull_requests: +7082

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

test_io hangs often on Gentoo Refleaks 2.7 buildbot: Zachary Ware, who owns the 
builder, has to interrupt the test regularly. So I disabled test_io in regrtest 
when --huntrleaks is used, since at least one bug has been identified in 
test_io in test_interrupted*().

--

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 02b4d67a38b0c17d87749eeefc51e91baef10857 by Victor Stinner in 
branch '2.7':
bpo-31731: test_io hangs with --huntrleaks: exclude it (GH-7459)
https://github.com/python/cpython/commit/02b4d67a38b0c17d87749eeefc51e91baef10857


--

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33788] Argument clinic: use path_t in _winapi.c

2018-06-06 Thread Giampaolo Rodola'


New submission from Giampaolo Rodola' :

There currently are different functions in Modules/_winapi.c that deals with 
paths: CreateFile, CreateJunction, CreateNamedPipe and I'm currently working on 
a patch which will add 3 more. For those functions it would be convenient to be 
able to use path_t which is currently defined in Modules/posixmodule.c. I 
started playing with argument clinic only recently so I'm not sure if there's a 
way to avoid path_t definition.

--
components: Argument Clinic
messages: 318858
nosy: giampaolo.rodola, larry
priority: normal
severity: normal
status: open
title: Argument clinic: use path_t in _winapi.c
versions: Python 3.8

___
Python tracker 

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



[issue33787] Argument clinic and Windows line endings

2018-06-06 Thread Giampaolo Rodola'


New submission from Giampaolo Rodola' :

If I use "Tools\clinic\clinic.py Modules\somemodule.c" on Windows argument 
clinic will modify the whole file and use Windows line endings (  "\r\n"). It 
would be good to use "\n" instead.

--
assignee: larry
components: Argument Clinic
messages: 318857
nosy: giampaolo.rodola, larry
priority: normal
severity: normal
status: open
title: Argument clinic and Windows line endings
versions: Python 3.8

___
Python tracker 

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



[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2018-06-06 Thread Brett Cannon


Change by Brett Cannon :


--
components: +Library (Lib) -Interpreter Core

___
Python tracker 

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



[issue33780] [subprocess] Better Unicode support for shell=True on Windows

2018-06-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Windows
nosy: +giampaolo.rodola, paul.moore, steve.dower, tim.golden, vstinner, 
zach.ware

___
Python tracker 

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



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2018-06-06 Thread Stefan Krah


Stefan Krah  added the comment:

I would not mind backporting this. Let's think about it for a while.

--
assignee: skrah -> 
resolution: fixed -> 
stage: resolved -> backport needed
status: closed -> open
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



[issue33783] Use proper class markup for random.Random docs

2018-06-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> rhettinger
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue33786] @asynccontextmanager doesn't work well with async generators

2018-06-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2018-06-06 Thread Aaron Meurer


Aaron Meurer  added the comment:

I would suggest adding this to the what's new document 
https://docs.python.org/3.7/whatsnew/3.7.html. The change affects user-facing 
code (the exact_type attribute of TokenInfo is OP for ... and -> tokens prior 
to this patch). 

I would also point out that this directly contradicts the documentation (from 
https://docs.python.org/3/library/tokenize.html, "To simplify token stream 
handling, all operator and delimiter tokens and Ellipsis are returned using the 
generic OP token type. The exact type can be determined by checking the 
exact_type property on the named tuple returned from tokenize.tokenize()."), so 
I don't see why it can't be backported.

--
nosy: +Aaron.Meurer

___
Python tracker 

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



[issue33786] @asynccontextmanager doesn't work well with async generators

2018-06-06 Thread Valentin Lavrinenko


Valentin Lavrinenko  added the comment:

Sorry, `async with ctx()` in main() is not needed.

--

___
Python tracker 

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



[issue33786] @asynccontextmanager doesn't work well with async generators

2018-06-06 Thread Valentin Lavrinenko


New submission from Valentin Lavrinenko :

```
@asynccontextmanager
async def ctx():
yield


async def gen():
async with ctx():
yield 'hello'
yield 'world'


async def main():
async with ctx():
async for value in gen():
print(value)
raise RuntimeError()
```

Running main() leads to `RuntimeError: generator didn't stop after throw()`. 
This happens because async gernerator's `.athrow()` method doesn't re-throw 
`GeneratorExit` exception; probably, this is wrong.

--
components: asyncio
messages: 318853
nosy: Valentin Lavrinenko, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: @asynccontextmanager doesn't work well with async generators
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



[issue33785] Crash caused by pasting ̖̈ into IDLE on Windows

2018-06-06 Thread STINNER Victor

Change by STINNER Victor :


--
title: Crash caused by pasting ̖̈ into python -> Crash caused by pasting ̖̈ 
into IDLE on Windows

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Romaji Milton Amulo


Romaji Milton Amulo  added the comment:

It doesn't crash in Powershell, only shows up as the ? in a box character
The issue must be with IDLE, most likely the BMP lack of support

--

___
Python tracker 

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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

I updated the documentation in 3.7 and master branches.

--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cebd4b009adca6611e92eb337747f59818e941a6 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-28240: timeit: Update repeat() doc (GH-7419) (GH-7457)
https://github.com/python/cpython/commit/cebd4b009adca6611e92eb337747f59818e941a6


--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 67b7158d53f33ed644cc11ef394470a859ea8bad by Victor Stinner in 
branch '2.7':
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421) (GH-7456)
https://github.com/python/cpython/commit/67b7158d53f33ed644cc11ef394470a859ea8bad


--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, fbound() is now better in all branches. I also fixed all compiler warnings 
in 2.7. I close the issue.

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Zachary Ware


Zachary Ware  added the comment:

Depending on PowerShell's support for Unicode (I'm not familiar with it :)), 
yes; running python from PowerShell would probably be fine in this case.

The BMP: https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane

--
nosy:  -mrabarnett

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Matthew Barnett


Matthew Barnett  added the comment:

For clarity, the first is '\U00010308\U00010316' and the second is 
'\U00010306\U00010300\U0001030B'.

The BMP is the Basic Multilingual Plane, which covers the codepoints in the 
range U+ to U+. Some software has a problem dealing with codepoints 
outside the BMP.

--
nosy: +mrabarnett

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Romaji Milton Amulo


Romaji Milton Amulo  added the comment:

Would running it in Powershell avoid the issue?
What is the BMP, by the way?

--

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Zachary Ware


Zachary Ware  added the comment:

I suspect this is the old issue of Tcl/Tk's lack of support for Unicode 
characters outside the BMP.  If I'm correct, there's nothing we can do about it.

--
assignee:  -> terry.reedy
components: +IDLE
nosy: +serhiy.storchaka, terry.reedy, zach.ware

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread miss-islington


miss-islington  added the comment:


New changeset 97fe1b493df979956c66c57095bc7fce22104faf by Miss Islington (bot) 
in branch '3.6':
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421)
https://github.com/python/cpython/commit/97fe1b493df979956c66c57095bc7fce22104faf


--

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Romaji Milton Amulo


Romaji Milton Amulo  added the comment:

IDLE

On Wed, Jun 6, 2018, 11:56 STINNER Victor  wrote:

>
> STINNER Victor  added the comment:
>
> Are you using cmd.exe, PowerShell or IDLE?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread miss-islington


miss-islington  added the comment:


New changeset 016aff77cbf5f63ed051a98ac628522a1cfd40a4 by Miss Islington (bot) 
in branch '3.7':
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421)
https://github.com/python/cpython/commit/016aff77cbf5f63ed051a98ac628522a1cfd40a4


--
nosy: +miss-islington

___
Python tracker 

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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7080

___
Python tracker 

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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3ef769fcd378a7f1cda19c0dfec2e79613d79e48 by Victor Stinner in 
branch 'master':
bpo-28240: timeit: Update repeat() doc (GH-7419)
https://github.com/python/cpython/commit/3ef769fcd378a7f1cda19c0dfec2e79613d79e48


--

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Are you using cmd.exe, PowerShell or IDLE?

--

___
Python tracker 

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



[issue33785] Crash caused by pasting ̖̈ into python

2018-06-06 Thread Romaji Milton Amulo

New submission from Romaji Milton Amulo :

On Windows 10, 64 bit, "Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) 
[MSC v.1900 64 bit (AMD64)] on win32" crashes if ̖̈ is pasted into the 
interpreter window, closing the window immediately.
Also ̆̀̋ crashes it too, suggesting the bug might be in text processing of 
Etruscan runes.

--
components: Unicode
messages: 318839
nosy: ezio.melotti, romaji, vstinner
priority: normal
severity: normal
status: open
title: Crash caused by pasting ̖̈ into python
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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e5b79c546370521764457ea2ec809303e580f5ea by Victor Stinner in 
branch '2.7':
bpo-19418: audioop.c: Fix warnings on -0x8000 (GH-7453)
https://github.com/python/cpython/commit/e5b79c546370521764457ea2ec809303e580f5ea


--

___
Python tracker 

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



[issue19418] audioop.c giving signed/unsigned warnings on Windows

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e5b79c546370521764457ea2ec809303e580f5ea by Victor Stinner in 
branch '2.7':
bpo-19418: audioop.c: Fix warnings on -0x8000 (GH-7453)
https://github.com/python/cpython/commit/e5b79c546370521764457ea2ec809303e580f5ea


--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7079

___
Python tracker 

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



[issue33784] hash collision in instances of ipaddress.ip_network

2018-06-06 Thread Francois Schneider


New submission from Francois Schneider :

>>> import ipaddress
>>> hash(ipaddress.ip_network(u'20.0.2.3/32')) == 
>>> hash(ipaddress.ip_network(u'20.0.2.0/30'))
True

--
components: Library (Lib)
messages: 318835
nosy: Francois Schneider
priority: normal
severity: normal
status: open
title: hash collision in instances of ipaddress.ip_network
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue33784] hash collision in instances of ipaddress.ip_network

2018-06-06 Thread Francois Schneider


Change by Francois Schneider :


--
versions: +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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7078

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7077

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 492d6424a7ca907c8ec1df21e51062e8f3d88e32 by Victor Stinner in 
branch 'master':
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421)
https://github.com/python/cpython/commit/492d6424a7ca907c8ec1df21e51062e8f3d88e32


--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2bc1946fb02e140f5f5ac21a1afa2763615ad16b by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
bpo-33781: audioop: enhance rounding double as int (GH-7447) (GH-7451)
https://github.com/python/cpython/commit/2bc1946fb02e140f5f5ac21a1afa2763615ad16b


--

___
Python tracker 

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



[issue19418] audioop.c giving signed/unsigned warnings on Windows

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7075

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7076

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset b17d409bc0458e3981987c2358da661f228f5891 by Victor Stinner in 
> branch '2.7':
> bpo-33781: audioop: enhance rounding double as int (GH-7447) (GH-7452)

I checked AppVeyor logs: this change fixed the audioop.c warning that I wanted 
to fix ;-)

--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b17d409bc0458e3981987c2358da661f228f5891 by Victor Stinner in 
branch '2.7':
bpo-33781: audioop: enhance rounding double as int (GH-7447) (GH-7452)
https://github.com/python/cpython/commit/b17d409bc0458e3981987c2358da661f228f5891


--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

Note: I chose to not add a NEWS entry, because even if my change might enhance 
the rounding, I don't think that it has any effect in practice :-)

--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7074

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread miss-islington


miss-islington  added the comment:


New changeset 5c022f13ab6db8929e092ad035b3dc61701e3198 by Miss Islington (bot) 
in branch '3.7':
bpo-33781: audioop: enhance rounding double as int (GH-7447)
https://github.com/python/cpython/commit/5c022f13ab6db8929e092ad035b3dc61701e3198


--
nosy: +miss-islington

___
Python tracker 

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



[issue33783] Use proper class markup for random.Random docs

2018-06-06 Thread Nick Coghlan


New submission from Nick Coghlan :

Talking to Berker on http://psf.upfronthosting.co.za/roundup/meta/issue644 I 
noticed that docs for random.Random are currently embedded in the module 
preamble text for https://docs.python.org/3/library/random.html and hence 
really easy to miss.

It would be good if they were broken out into a proper Sphix class directive so 
that the fact you can create your own dedicated pseudorandom number generators 
for specific purposes is easier to see on a quick scan of the docs.

--
keywords: easy
messages: 318827
nosy: berker.peksag, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Use proper class markup for random.Random docs
type: enhancement
versions: 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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

> But since it is always used with floor(), it is better to move floor() inside 
> it.

Yeah, that's what I did ;-) I will backport the change to 3.7, 3.6 and 2.7. My 
final goal is just to fix a compiler warning in 2.7 :-D

--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It was my mistake. fbound() should be return double.

But since it is always used with floor(), it is better to move floor() inside 
it.

--
nosy: +serhiy.storchaka
pull_requests: +7073

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7072

___
Python tracker 

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



[issue33782] VSTS Windows-PR: internal error

2018-06-06 Thread Steve Dower


Steve Dower  added the comment:

Right. This build failed to start, which is why there's only one section on the 
left hand side (normally you'll see all the build steps there, and clicking on 
them will show their logs).

I think it'll be an internal race condition. I'll pass back whatever info I can 
as I find out more.

--

___
Python tracker 

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



[issue33781] audioop.c: fbound() casts double to int for its return value

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 45e4efba7fa2abe61d25e4f8b5bf482e19ff1280 by Victor Stinner in 
branch 'master':
bpo-33781: audioop: enhance rounding double as int (GH-7447)
https://github.com/python/cpython/commit/45e4efba7fa2abe61d25e4f8b5bf482e19ff1280


--

___
Python tracker 

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



[issue33782] VSTS Windows-PR: internal error

2018-06-06 Thread STINNER Victor


STINNER Victor  added the comment:

> The "build not retained" state just means it'll get cleaned up after seven 
> days.

Oh ok. But I'm confused, I don't see where are the logs. I clicked on Timeline, 
Code coverage, Tests: all are empty. In the logs ZIP, I cannot see any command 
related to Python (like building the C code or run tests). The build is failed 
but didn't run anything?

--

___
Python tracker 

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



[issue33774] Document that @lru_cache caches based on exactly how the function arguments are specified

2018-06-06 Thread Al-Scandar Solstag


Al-Scandar Solstag  added the comment:

Hi Raymond, I think I understand what you mean, and would suggest something 
along the lines of:

"""
Note that lru_cache only guarantees cache matches on the exact way function 
arguments are specified, so the following ways of calling 'def f(a, b=7)' are 
not guaranteed to cache each other: f(1), f(a=1), f(1, 7), f(1, b=7), f(a=1, 
b=7).
"""

--

___
Python tracker 

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



  1   2   >