[issue22831] Use "with" to avoid possible fd leaks

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9e4861f52349011cd5916eef8e8344575e8ac426 by Serhiy Storchaka in 
branch 'master':
bpo-22831: Use "with" to avoid possible fd leaks in tests (part 1). (GH-10928)
https://github.com/python/cpython/commit/9e4861f52349011cd5916eef8e8344575e8ac426


--

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5b10b9824780b2181158902067912ee9e7b04657 by Serhiy Storchaka in 
branch 'master':
bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929)
https://github.com/python/cpython/commit/5b10b9824780b2181158902067912ee9e7b04657


--

___
Python tracker 

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



[issue35678] subprocess.check_output(): OSError: [WinError 87]

2019-03-05 Thread Eryk Sun


Eryk Sun  added the comment:

Geoff, we probably need a new issue for this, but first, please report the 
value of len(os.getcwd()) in a case where check_output() fails. 

Prior to Windows 10, the working directory is limited to MAX_PATH - 2 (258) 
characters. (Windows uses the last two characters internally for a trailing 
backslash and a terminating null.) However, even with long-path support enabled 
in Windows 10, CreateProcessW retains the original WINAPI limit, which I assume 
is because the current implementation doesn't know whether the child supports 
long paths. If the inherited current directory exceeds this limit, 
CreateProcessW fails with ERROR_INVALID_PARAMETER (87).

--
nosy: +eryksun

___
Python tracker 

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



[issue36192] Usage of `tmpnam_r` and `tempname` is dangerous, better use `mkstemp`

2019-03-05 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

Hi,

I got these warning messages

/usr/bin/ld: libpython2.7.a(posixmodule.o): in function `posix_tmpnam':
/home/stephane/src/github.com/python/cpython/./Modules/posixmodule.c:7648: 
warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/bin/ld: libpython2.7.a(posixmodule.o): in function `posix_tempnam':
/home/stephane/src/github.com/python/cpython/./Modules/posixmodule.c:7595: 
warning: the use of `tempnam' is dangerous, better use `mkstemp'


Because the EOL of 2.7 is in 2020-01-01, do you think we should fix this issue?

--
components: Library (Lib)
keywords: easy (C)
messages: 337172
nosy: benjamin.peterson, matrixise
priority: normal
severity: normal
status: open
title: Usage of `tmpnam_r` and `tempname` is dangerous, better use `mkstemp`
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



[issue36192] Usage of `tmpnam_r` and `tempname` is dangerous, better use `mkstemp`

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The fix of this issue is Python 3.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36192] Usage of `tmpnam_r` and `tempname` is dangerous, better use `mkstemp`

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

yep, sure and there is a RuntimeWarning exception (tmpnam is a potential 
security risk to your program) when we want to use os.tmpnam().

And in the doc, there is a warning section.

Ok, I close this issue.

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



[issue36085] Enable better DLL resolution

2019-03-05 Thread Paul Moore


Paul Moore  added the comment:

As someone whose work environment is still Windows 7, I'd prefer it if it were 
a soft desupport (i.e., we require users to manually ensure that the KB fix is 
installed, but we don't do anything specific to refuse to install Python on 
Win7).

I'd rather not drop Win7 support in 3.8 completely - I feel like that's a bit 
too aggressive, as Eryk says, there's still a *lot* of Windows 7 usage.

--

___
Python tracker 

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



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Victor,

Should I also fix these tests:

test_urllibnet.py::urlretrieveNetworkTests.test_specified_path
test_urllibnet.py::urlretrieveNetworkTests.test_header
test_urllibnet.py::urlopenNetworkTests.test_fileno

?

--

___
Python tracker 

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



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

> For the backport, should I add support.TEST_HTTP_URL?

Yes

> Should I also fix these tests:

Yes, all urllib and urllib2 tests which use http://www.example.com/

--

___
Python tracker 

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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread Andrius Laukavičius

New submission from Andrius Laukavičius :

It looks like logging library uses always first assigned stderr object and 
won't change it even if it was reset.

capture_output function redirects stdout and stderr to io.StringIO object, 
saves what was captured in string and returns it. And then context manager 
resets back stdout and stderr where it should be originally. Though it seems 
logging library ignores that.

Here is the code I encountered issue with:

import io
import sys
import contextlib
from typing import Optional
import logging

def capture_output(
target: object,
args: Optional[tuple] = None,
kwargs: Optional[dict] = None) -> str:
"""Redirect stdout and stderr into string buffer and capture it.

target object is executed with optional args, kwargs and all stdout/
stderr that is captured, returned in string form.

Args:
target: object to execute, usually a function.
args: target positional arguments (default: {None})
kwargs: target keyword arguments (default: {None})
"""
if not args:
args = ()
if not kwargs:
kwargs = {}
with io.StringIO() as sio:
with contextlib.redirect_stdout(sio), contextlib.redirect_stderr(sio):
target(*args, **kwargs)
output = sio.getvalue()

print(output)


def dummy():
print('dummy test')
logging.warning('dummy test')

def dummy2():
print('dummy2 test')


capture_output(dummy)  # works
capture_output(dummy)  # won't work anymore.

capture_output(dummy2)  # works
capture_output(dummy2)  # works

Here is what I get running this code:

dummy test
WARNING:root:dummy test

dummy test
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.5/logging/__init__.py", line 982, in emit
stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "tt.py", line 43, in 
capture_output(dummy)  # won't work anymore.
  File "tt.py", line 28, in capture_output
target(*args, **kwargs)
  File "tt.py", line 36, in dummy
logging.warning('dummy test')
Message: 'dummy test'
Arguments: ()

dummy2 test

dummy2 test


P.S. here is original question I asked on stack overflow: 
https://stackoverflow.com/questions/54999650/python3-redirected-stderr-not-reset-properly.
 I got suggestion to report it as a bug.

--
components: Library (Lib)
messages: 337178
nosy: Andrius Laukavičius
priority: normal
severity: normal
status: open
title: Redirected stderr not reset properly when using logging
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread SilentGhost


Change by SilentGhost :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

> That's okay, Victor.  Thanks for jumping on this.  I'll take a look when I 
> get a chance.

>From what I saw, your first commit was enough to reproduce the crash.

If I recall correctly, Antoine Pitrou modified the GIL so threads exit 
immediately when Py_Finalize() is called. I'm thinking at:

void
PyEval_RestoreThread(PyThreadState *tstate)
{
...
take_gil(tstate);
/* _Py_Finalizing is protected by the GIL */
if (_Py_IsFinalizing() && !_Py_CURRENTLY_FINALIZING(tstate)) {
drop_gil(tstate);
PyThread_exit_thread();
Py_UNREACHABLE();
}
...
PyThreadState_Swap(tstate);
}

Problem: this code uses tstate, whereas the crash occurred because tstate 
pointed to freed memory:

"""
Thread 1 got the crash

(gdb) p *tstate
$3 = {
  prev = 0xdbdbdbdbdbdbdbdb,
  next = 0xdbdbdbdbdbdbdbdb,
  interp = 0xdbdbdbdbdbdbdbdb,
  ...
}

...

Thread 1 (LWP 100696):
#0  0x00368210 in take_gil (tstate=0x8027e2050) at 
Python/ceval_gil.h:216
#1  0x00368a94 in PyEval_RestoreThread (tstate=0x8027e2050) at 
Python/ceval.c:281
...
"""

https://bugs.python.org/issue36114#msg337090

When this crash occurred, Py_Finalize() already completed in the main thread!

"""
void _Py_NO_RETURN
Py_Exit(int sts)
{
if (Py_FinalizeEx() < 0) {  /* < DONE! */
sts = 120;
}

exit(sts);/* <=== Crash occurred here! */
}
"""

Py_Finalize() is supposed to wait for threads before deleting Python thread 
states:

"""
int
Py_FinalizeEx(void)
{
...

/* The interpreter is still entirely intact at this point, and the
 * exit funcs may be relying on that.  In particular, if some thread
 * or exit func is still waiting to do an import, the import machinery
 * expects Py_IsInitialized() to return true.  So don't say the
 * interpreter is uninitialized until after the exit funcs have run.
 * Note that Threading.py uses an exit func to do a join on all the
 * threads created thru it, so this also protects pending imports in
 * the threads created via Threading.
 */
call_py_exitfuncs(interp);

...

/* Remaining threads (e.g. daemon threads) will automatically exit
   after taking the GIL (in PyEval_RestoreThread()). */
_PyRuntime.finalizing = tstate;
_PyRuntime.initialized = 0;
_PyRuntime.core_initialized = 0;
...

/* Delete current thread. After this, many C API calls become crashy. */
PyThreadState_Swap(NULL);

PyInterpreterState_Delete(interp);

...
}
"""

The real problem for years are *deamon threads* which... BY DESIGN... remain 
alive after Py_Finalize() exit! But as I explained, they must exit as soon at 
they attempt to get GIL.

--

___
Python tracker 

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



[issue35678] subprocess.check_output(): OSError: [WinError 87]

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Geoff, we probably need a new issue for this,

Yes please, this issue is closed.

> Prior to Windows 10, the working directory is limited to MAX_PATH - 2 (258) 
> characters. (...) CreateProcessW fails with ERROR_INVALID_PARAMETER (87).

Geoff: for your bug report, please dump len(os.getcwd()) as Eryk asked, but try 
also to dump all arguments passed to CreateProcess, or at least arguments 
passed to subprocess.

--

___
Python tracker 

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



[issue36183] test_gdb failed on AMD64 FreeBSD CURRENT Shared 3.7 and 3.x

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

Since test_gdb only failed on your buildbot, I close the issue.

As I wrote, I'm unable to reproduce the issue on my FreeBSD 12 VM. It's not 
easy to debug if I don't have a full access (root user) to the issue. Moreover, 
honestly, I'm not really excited to debug this issue :-)

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5a02e0d1c8a526fc4e80a2fb8b4a9d5bc64c7d82 by Victor Stinner in 
branch 'master':
bpo-36142: Add _PyPreConfig.utf8_mode (GH-12174)
https://github.com/python/cpython/commit/5a02e0d1c8a526fc4e80a2fb8b4a9d5bc64c7d82


--

___
Python tracker 

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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

A little simplified reproducer :  

import io, contextlib, logging

message = 'dummy test'

with io.StringIO() as sio:
with contextlib.redirect_stdout(sio), contextlib.redirect_stderr(sio):
logging.warning(message)
output = sio.getvalue()
print(output)

logging.warning(message)


$ python3.7 /tmp/foo.py
WARNING:root:dummy test

--- Logging error ---
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py",
 line 1036, in emit
stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/tmp/foo.py", line 11, in 
logging.warning(message)
Message: 'dummy test'
Arguments: ()

--
nosy: +xtreak

___
Python tracker 

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



[issue36191] pubkeys.txt contains bogus keys

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report but the tracker deals with bugs in CPython. python.org 
website has a Github repo and I think this can be reported at 
https://github.com/python/pythondotorg where it could get a better resolution. 
I would propose closing it as third party.

--
nosy: +xtreak

___
Python tracker 

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



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +12172

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file48188/loc.log

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote C and Python code to check what is the effective encoding used by the 
LC_CTYPE locale before setlocale(LC_CTYPE, "") is called on Python 3.7. Result: 
Windows uses the Latin1 encoding.

See attached files: _testcapi.patch + loc.py produced loc.log (output).

--
Added file: https://bugs.python.org/file48187/loc.py

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file48189/_testcapi.patch

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12173

___
Python tracker 

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



[issue36194] Add "make regen-configure"

2019-03-05 Thread STINNER Victor


New submission from STINNER Victor :

The policy of Fedora is to regenerate generated files in the source code of a 
package. python3.spec runs "autoconf" and "autoheader" to regenerate configure 
and pyconfig.h.

IMHO it would be good to have such recipe upstream, something like "make 
regen-all".

I'm not sure if we can include it in "make regen-all". Currently, the main 
mandatory Linux job on Travis CI runs "make regen-all" and then ensure that no 
file has been modified. Problem: configure changes depending on the autoconf 
version, and usually a Linux distribution only includes a single autoconf 
version... That's why you may have noticed the "rpath dance" in the generated 
configure script... Depending on the autoconf version, you get rpath or not...

Fedora issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1377240

--
components: Build
messages: 337186
nosy: vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Add "make regen-configure"
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



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 84772e0ab49ee09acb44e30551aa5cfc1eafe5dc by Victor Stinner 
(Stéphane Wirtel) in branch '2.7':
[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) 
(GH-12177)
https://github.com/python/cpython/commit/84772e0ab49ee09acb44e30551aa5cfc1eafe5dc


--

___
Python tracker 

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



[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-03-05 Thread STINNER Victor

STINNER Victor  added the comment:

Stéphane Wirtel backported his fix to Python 2.7. I didn't see failures related 
to example.com on 3.7 and master branches, so I think that it's now time to 
close the issue.

Thanks Stéphane!

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Harmandeep Singh


New submission from Harmandeep Singh :

In Python 3.6, the docs for ThreadPoolExecutor mentions the following line:

initializer is an optional callable that is called at the start of each worker 
thread; initargs is a tuple of arguments passed to the initializer. Should 
initializer raise an exception, all currently pending jobs will raise a 
BrokenThreadPool, as well any attempt to submit more jobs to the pool.

But, from my experiment in Python 3.6 and 3.7, I have observed that 
`initializer` and `initargs` were introduced in Python 3.7.

--
messages: 337189
nosy: harman786
priority: normal
severity: normal
status: open
title: initializer is not a valid param in ThreadPoolExecutor
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



[issue36196] sys.executable does not return python3 executable when using uwsgi

2019-03-05 Thread Joris VAN HOUTVEN


New submission from Joris VAN HOUTVEN :

when serving a Flask app with uwsgi, using
`sys.executable`
will provide you the path to your uwsgi executable, not your python executable.
However, the docs specify that it should always return the python interpreter: 
https://docs.python.org/3/library/sys.html#sys.executable

--
assignee: docs@python
components: Documentation
messages: 337190
nosy: Joris VAN HOUTVEN, docs@python
priority: normal
severity: normal
status: open
title: sys.executable does not return python3 executable when using uwsgi
type: behavior

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

gcc -pthread -c -Wno-unused-result -Wsign-compare 
-DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -Og -Wall-std=c99 -Wextra 
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration  -I./Include/internal  -I. -I./Include
-DPy_BUILD_CORE -o Objects/memoryobject.o Objects/memoryobject.c
Objects/memoryobject.c:3112:21: warning: cast between incompatible function 
types from 'PyObject * (*)(PyMemoryViewObject *, PyObject *, PyObject *)' {aka 
'struct _object * (*)(struct  *, struct _object *, struct _object 
*)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * 
(*)(struct _object *, struct _object *)'} [-Wcast-function-type]
 {"tobytes", (PyCFunction)memory_tobytes, METH_VARARGS|METH_KEYWORDS, 
memory_tobytes_doc},


I am preparing a small PR for this issue.

--
assignee: matrixise
messages: 337191
nosy: matrixise
priority: normal
severity: normal
status: open
title: Compilation Warning for memoryview.tobytes
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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Harmandeep Singh


Change by Harmandeep Singh :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +easy (C)

___
Python tracker 

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



[issue36198] Misleading in library/sets document

2019-03-05 Thread Han


New submission from Han :

Doc/library/sets.rst said operation s.update(t)'s result is "return set s with 
elements added from t".
But update()'s return value is None.
I think change it to "set s with elements added from t" would be better.
So are operations intersection_update(), difference_update(), and 
symmetric_difference_update().

--
assignee: docs@python
components: Documentation
messages: 337192
nosy: DeadmanWalking, docs@python
priority: normal
severity: normal
status: open
title: Misleading in library/sets document
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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread Peter Otten


Peter Otten <__pete...@web.de> added the comment:

I see various options to address this.

(1) Change basicConfig() to use __stderr__ instead of stderr to avoid 
redirections from within the script.

(2) Change your script to call basicConfig() explicitly, before the temporary 
redirection takes place. 

In both cases logging output will always go to the "real" stderr.

(3) Write a special handler that fetches sys.stderr lazily. Here's a sketch:

class StderrHandler(logging.StreamHandler):
def __init__(self):
super().__init__()

def get_stream(self):
return sys.stderr

def set_stream(self, _value):
pass

stream = property(get_stream, set_stream)

logging.basicConfig(handlers=[StderrHandler()])

As written this is likely to fail with multiple threads...

My personal favourite is option (2).

--
nosy: +peter.otten

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

@Eryk do you mind if I make a PR with your code(I will of course author you)? 
Regardless from issue17561 I think this is an important fix because without 
IPPROTO_IPV6 is not possible to implement a dual-stack IPv4/6 socket on Windows.

--

___
Python tracker 

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



[issue36191] pubkeys.txt contains bogus keys

2019-03-05 Thread Peter Otten


Change by Peter Otten <__pete...@web.de>:


--
nosy: +peter.otten

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Fix an other warning in the same PR

_collections._tuplegetter.__reduce__

--
title: Compilation Warning for memoryview.tobytes -> Compilation Warning for 
memoryview.tobytes and _collections._tuplegetter.__reduce__

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

I prefer to reuse bpo-33012.

--
nosy: +vstinner
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Invalid function cast warnings with gcc 8 for METH_NOARGS

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-36197 as a duplicate of this issue:

"""
gcc -pthread -c -Wno-unused-result -Wsign-compare 
-DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -Og -Wall-std=c99 -Wextra 
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration  -I./Include/internal  -I. -I./Include
-DPy_BUILD_CORE -o Objects/memoryobject.o Objects/memoryobject.c
Objects/memoryobject.c:3112:21: warning: cast between incompatible function 
types from 'PyObject * (*)(PyMemoryViewObject *, PyObject *, PyObject *)' {aka 
'struct _object * (*)(struct  *, struct _object *, struct _object 
*)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * 
(*)(struct _object *, struct _object *)'} [-Wcast-function-type]
 {"tobytes", (PyCFunction)memory_tobytes, METH_VARARGS|METH_KEYWORDS, 
memory_tobytes_doc},


I am preparing a small PR for this issue.
"""

=> PR 12179

--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +12175

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. You are correct. The parameters were introduced in 
issue21423 in 3.7. It seems that this backported by mistake with PR 10958 where 
minor grammar was fixed with 40a61da40d252626f8b9ff524d76c1f0ccb3a4f7 but 
backporting caused the whole paragraph to be added to 3.6.

3.6 is in security fixes only mode. So I am not sure about the fix being 
merged. I am adding Ned to take a call on this.

--
nosy: +ned.deily, xtreak

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-03-05 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 359a2f3daba49fde0d3a07fb3c7a8b051c450d08 by Victor Stinner 
(Stéphane Wirtel) in branch 'master':
bpo-33012: Fix compilation warnings in memoryobject.c and _collectionsmodule.c 
(GH-12179)
https://github.com/python/cpython/commit/359a2f3daba49fde0d3a07fb3c7a8b051c450d08


--

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 279657bac2856039ba422c18a3d7f227b455e9d6 by Victor Stinner in 
branch '3.7':
[3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12178)
https://github.com/python/cpython/commit/279657bac2856039ba422c18a3d7f227b455e9d6


--

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Ned Deily


Ned Deily  added the comment:

If someone is willing to make a doc fix PR for this, I will merge it for 3.6.

--

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Harmandeep Singh


Harmandeep Singh  added the comment:

I will raise a PR

--

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

ok, I was working on a PR for this issue. but I am going to classify it as easy.

--
nosy: +matrixise

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

I don't understand the relationship with bpo-20087, so I removed the dependency.

I fixed test_re in 3.7 and master branches. I close the issue.

--
dependencies:  -Mismatch between glibc and X11 locale.alias
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +easy

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

harman786 good luck for your PR, if you need a review.

Have a nice day,

--

___
Python tracker 

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



[issue36198] Misleading in library/sets document

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

To add to this is actually present in sets module documentation which has been 
deprecated since 2.6 though the report is true that the methods don't return a 
set.

Link : https://docs.python.org/2/library/sets.html#set-objects

--
nosy: +rhettinger, xtreak

___
Python tracker 

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



[issue36015] streamhandler cannot represent streams with an integer as name

2019-03-05 Thread Riccardo Magliocchetti


Riccardo Magliocchetti  added the comment:

@Vinay Do you have any update on this? thanks

--

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +12176

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is not correct fix for tuplegetter_reduce. tuplegetter_reduce should have 
two parameters, just the second is unused.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36196] sys.executable does not return python3 executable when using uwsgi

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

related uwsgi issue : https://github.com/unbit/uwsgi/issues/670

--
nosy: +xtreak

___
Python tracker 

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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread Andrius Laukavičius

Andrius Laukavičius  added the comment:

Peter Otten thanks for examples,
though with capture_output function, I had a little bit different intentions.

At first I actually did similarly as you described in case 2, where I called 
BasicConfig explicitly. Then I could specify where to redirect stream and what 
to do after I was done with capturing stderr (just reset back where it would be 
on default).

Though I actually wanted to just capture stdout and stderr indirectly, meaning 
I don't want to specifically initiate logging object or modify it.

I mean, I want to just capture any stdout/stderr that would be outputed while 
running some function that was passed via `target` argument (in my 
capture_output function). In this case, some function that I capture output 
from, might have some different way to handle sys.stderr (e.g. different 
basicConfig or some other implementation where sys.stderr is handled?).

So it is not possible to consistently manage stderr when it involves logging 
library without explicitly "manage" it?

P.S. don't know if I'm clear enough, so please ask me to clarify anything if 
its not clear..:)

--

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @serhiy,

Thank you for your PR, I prefer your patch, just because you have just added 
the PyObject *Py_UNUSED(ignored) to the tuplegetter_reduce function. And in 
this case, you don't need to cast to (void(*)(void)).

I will use this tip for the next time.

Thank

--

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is only for methods with METH_NOARGS. The code that calls such method, 
calls it with two arguments, passing NULL as the second argument. So the 
signature of the C function should have two parameters. Functions for methods 
with METH_KEYWORDS or METH_FASTCALL should have different corresponding 
signatures.

--

___
Python tracker 

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



[issue36193] Redirected stderr not reset properly when using logging

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I find issue6333 slightly relatable to this issue where it talks about external 
modules possibly closing sys.stdout/stderr.

--

___
Python tracker 

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



[issue36196] sys.executable does not return python3 executable when using uwsgi

2019-03-05 Thread Inada Naoki


Inada Naoki  added the comment:

I don't think this is a documentation bug.  They insert "uwsgi" to 
"sys.executable" manually.

https://github.com/unbit/uwsgi/blob/3149df02ed443131c54ea6afb29fcbb0ed4d1139/plugins/python/pyutils.c#L398-402

#ifdef PYTHREE
PyDict_SetItemString(sys_dict, "executable", 
PyUnicode_FromString(uwsgi.binary_path));
#else
PyDict_SetItemString(sys_dict, "executable", 
PyString_FromString(uwsgi.binary_path));
#endif

--
nosy: +inada.naoki

___
Python tracker 

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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

I'll re-merge this once this problem in issue #33608 is resolved.

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

___
Python tracker 

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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

Actually, this is independent of that change.  It had to be reverted because 
the PR was based on the earlier PR from #33608.  So I may merge this 
separately...or not, since it would mean having to sort out merge conflicts. :)

--
stage:  -> needs patch

___
Python tracker 

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



[issue35782] Missing whitespace after comma in randrange raise error

2019-03-05 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Assigning to Raymond regarding the question about the backport.

--
assignee: cheryl.sabella -> rhettinger

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

Thanks for taking a look Victor!  That info is helpful.  It will likely be a 
few days before I can sort this out.

Once I have addressed the problem I'll re-merge.  I plan on using the 
"buildbot-custom" branch to make sure the buildbots are happy with the change 
before making that PR.

--
stage: patch review -> 

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12177

___
Python tracker 

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



[issue36177] test_io: test_daemon_threads_shutdown_stdout_deadlock() fails on x86 Windows7 3.x

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

This is resolved with gh-12159, no?

--

___
Python tracker 

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



[issue36114] test_multiprocessing_spawn dumps core in AMD64 FreeBSD CURRENT Shared 3.x

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

This is resolved with gh-12159, no?

--
nosy: +eric.snow

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-03-05 Thread Eric Snow


Eric Snow  added the comment:

This is resolved with gh-12159, no?

--
nosy: +eric.snow

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-05 Thread Steve Dower


Steve Dower  added the comment:

> Would this be a hard drop, i.e. would installing 3.8 be prevented in Windows 
> 7? Or would it install but require users to manually install KB2533623?

That's the question I'm asking :)

Python 3.9 is currently going to be a hard drop, according to our policy, and 
if Python 3.8 slips by 3 months then it will also be a hard drop unless we make 
an exception to the policy.

Paul's comment suggests we should avoid slipping/make the exception, and that 
it's okay to require the update, which is basically where I'm at too (provided 
the buildbot team are willing to keep an EOL'd OS running for as long as 3.8 is 
supported).

--

___
Python tracker 

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



[issue34484] Unicode HOWTO incorrectly refers to Private Use Area for surrogateescape

2019-03-05 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks for the fix. @akuchling: safe to close this issue?

--

___
Python tracker 

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



[issue31652] make install fails: no module _ctypes

2019-03-05 Thread Mr. Pligin


Mr. Pligin  added the comment:

Linux Mint 19.1

sudo make altinstall

Traceback (most recent call last):
  File "/usr/src/Python-3.7.2/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
  File "/usr/src/Python-3.7.2/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/usr/src/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in 
sys.exit(ensurepip._main())
  File "/usr/src/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
  File "/usr/src/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in 
_bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/usr/src/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/__init__.py", 
line 40, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/cli/autocompletion.py",
 line 8, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/cli/main_parser.py",
 line 12, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/commands/__init__.py",
 line 6, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/commands/completion.py",
 line 6, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/cli/base_command.py",
 line 18, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/download.py", 
line 38, in 
  File 
"/tmp/tmpc5nmmwk0/pip-18.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", 
line 3, in 
  File "/usr/src/Python-3.7.2/Lib/ctypes/__init__.py", line 7, in 
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Makefile:1140: recipe for target 'altinstall' failed
make: *** [altinstall] Error 1

--
nosy: +Mr. Pligin

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b35be4b3334fbc471a39abbeb68110867b72e3e5 by Victor Stinner in 
branch 'master':
bpo-36142: Add _PyPreConfig.allocator (GH-12181)
https://github.com/python/cpython/commit/b35be4b3334fbc471a39abbeb68110867b72e3e5


--

___
Python tracker 

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



[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset adfffc7343ce7ebc88ec734a803d3247ba8927fb by Serhiy Storchaka in 
branch 'master':
Fix the C function signature for _collections._tuplegetter.__reduce__. 
(GH-12180)
https://github.com/python/cpython/commit/adfffc7343ce7ebc88ec734a803d3247ba8927fb


--
resolution: duplicate -> fixed

___
Python tracker 

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



[issue36199] libzmq.dll causes uncontrollable screen flickering when accessing windows 2012 R2 server through remote desktop

2019-03-05 Thread Michel Nijs


New submission from Michel Nijs :

My internal Windows team has identified libzmq.dll to be the culprit. When the 
file is renamed and the server restarted, the issue goes away.

The screen/desktop flickers multiple times per second and we cannot click on 
anything or do anything on the server because of it.

--
messages: 337227
nosy: Michel Nijs
priority: normal
severity: normal
status: open
title: libzmq.dll causes uncontrollable screen flickering when accessing 
windows 2012 R2 server through remote desktop
type: behavior
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



[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-03-05 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi @maxtrixise, thanks for PR,

> there is a function for the validation of an address with the netmask

Which one do you want to use?

--

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Eryk Sun


Eryk Sun  added the comment:

> do you mind if I make a PR with your code(I will of course author you)?

Go for it. I prefer no credit, but you're free to do as you wish.

--

___
Python tracker 

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



[issue36200] display index on Index

2019-03-05 Thread Aditya Shankar


Change by Aditya Shankar :


--
nosy: Aditya Shankar
priority: normal
severity: normal
status: open
title: display index on Index

___
Python tracker 

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



[issue36200] display index on IndexError

2019-03-05 Thread Aditya Shankar


Change by Aditya Shankar :


--
components: +Interpreter Core
title: display index on Index -> display index on IndexError
type:  -> enhancement
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



[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-03-05 Thread James Edwards


James Edwards  added the comment:

It may be worth also addressing the fact that IPv6Network makes no restriction 
on it's netmask (when specified as a tuple).

--
nosy: +jedwards

___
Python tracker 

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



[issue36200] display index on IndexError

2019-03-05 Thread Aditya Shankar


New submission from Aditya Shankar :

considering a list of 5 elements, if the 6th element is asked, the Interpreter 
would raise IndexError: list index out of range,
I think It'd be better if it actually said what the invalid index is

Improvement benefits:
*quicker debugging of faulty python code
*person debugging does not need to edit and restart the program to fix issue, 
sometimes at least

--

___
Python tracker 

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



[issue36195] initializer is not a valid param in ThreadPoolExecutor

2019-03-05 Thread Harmandeep Singh


Change by Harmandeep Singh :


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

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


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

___
Python tracker 

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



[issue36200] display index on IndexError

2019-03-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Possibly related issues in the past : 
issue18162, issue1534607 , issue21911, https://www.python.org/dev/peps/pep-0473/

--
nosy: +xtreak

___
Python tracker 

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



[issue36200] display index on IndexError

2019-03-05 Thread Aditya Shankar


Aditya Shankar  added the comment:

closed as this is a duplicate for https://bugs.python.org/issue18162

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2019-03-05 Thread Open Close


Change by Open Close :


--
nosy: +op368

___
Python tracker 

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



[issue36200] display index on IndexError

2019-03-05 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> duplicate
superseder:  -> Add index attribute to IndexError

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2019-03-05 Thread Open Close


Open Close  added the comment:

Am I wrong with something?
But test_start_tls_server_1 in newly made cpython fails on my plain intel linux 
personal PC.

If I comment out the FreeBSD conditional (to apply ssl.OP_NO_TLSv1_3), 
the test passes.

If I change HELLO_MSG to 1*1024*1024 (msg328157),
the test passes.

I reported the details in https://bugs.python.org/issue35998#msg336986 and the 
following.

--

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:

The bug is hard to reproduce even manually. I can test a PR for you once
it's ready.

--
title: [subinterpreters] Add a cross-interpreter-safe mechanism to indicate 
that an object may be destroyed. -> Add a cross-interpreter-safe mechanism to 
indicate that an object may be destroyed.

___
Python tracker 

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



[issue36187] Get rid of NamedStore

2019-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d8b3a98c9098c66a714fd5593e1928af0ffbc631 by Serhiy Storchaka in 
branch 'master':
bpo-36187: Remove NamedStore. (GH-12167)
https://github.com/python/cpython/commit/d8b3a98c9098c66a714fd5593e1928af0ffbc631


--

___
Python tracker 

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



[issue36187] Get rid of NamedStore

2019-03-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34776] Postponed annotations break inspection of dataclasses

2019-03-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm finally getting time to look at this. I'll see what I can do.

--

___
Python tracker 

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



[issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols

2019-03-05 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue35782] Missing whitespace after comma in randrange raise error

2019-03-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Terry that no backport is warranted.

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-03-05 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

./python -m test -W -u network -j0 -r -F test_asyncio

ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"/home/stephane/src/github.com/python/cpython/Lib/test/test_asyncio/test_sslproto.py",
 line 510, in test_start_tls_server_1
self.loop.run_until_complete(run_main())
  File 
"/home/stephane/src/github.com/python/cpython/Lib/asyncio/base_events.py", line 
589, in run_until_complete
return future.result()
  File 
"/home/stephane/src/github.com/python/cpython/Lib/test/test_asyncio/test_sslproto.py",
 line 503, in run_main
await asyncio.wait_for(
  File "/home/stephane/src/github.com/python/cpython/Lib/asyncio/tasks.py", 
line 461, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

--

Ran 2044 tests in 113.604s

openssl 1.1.1b

revision: d8b3a98c9098c66a714fd5593e1928af0ffbc631

--

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

Done:
https://github.com/python/cpython/pull/12183/
This adds quite a bunch of new constants so I would be keen on considering it 
an enhancement rather than a bugfix and land it in 3.8 only. As for 3.7 and 3.6 
(and 2.7?) it may make sense to fix IPPROTO_IPV6 only. Thoughts?

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12180

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a9df651eb4c18a07ec309df190419613e95cba7b by Victor Stinner in 
branch 'master':
bpo-36142: Add _PyMem_GetDebugAllocatorsName() (GH-12185)
https://github.com/python/cpython/commit/a9df651eb4c18a07ec309df190419613e95cba7b


--

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Andrew Brezovsky


Andrew Brezovsky  added the comment:

I lean towards it being considered a bug fix. First, the lack of parity between 
Windows and Linux-based OSs causes confusion. Second, the current workaround to 
hard-code the value in is far from best practice.

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12181

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-03-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Everyone watching, the PR is now ready for review!

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7d2ef3ef5042356aaeaf832ad4204b7dad2e1b8c by Victor Stinner in 
branch 'master':
bpo-36142: _PyPreConfig_Write() sets the allocator (GH-12186)
https://github.com/python/cpython/commit/7d2ef3ef5042356aaeaf832ad4204b7dad2e1b8c


--

___
Python tracker 

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



[issue14385] Support other types than dict for __builtins__

2019-03-05 Thread Kevin Shweh


Kevin Shweh  added the comment:

The patch for this issue changed LOAD_GLOBAL to use PyObject_GetItem when 
globals() is a dict subclass, but LOAD_NAME, STORE_GLOBAL, and DELETE_GLOBAL 
weren't changed. (LOAD_NAME uses PyObject_GetItem for builtins now, but not for 
globals.)

This means that global lookup doesn't respect overridden __getitem__ inside a 
class statement (unless you explicitly declare the name global with a global 
statement, in which case LOAD_GLOBAL gets used instead of LOAD_NAME).

I don't have a strong opinion on whether STORE_GLOBAL or DELETE_GLOBAL should 
respect overridden __setitem__ or __delitem__, but the inconsistency between 
LOAD_GLOBAL and LOAD_NAME seems like a bug that should be fixed.

For reference, in the following code, the first 3 exec calls successfully print 
5, and the last exec call fails, due to the LOAD_GLOBAL/LOAD_NAME inconsistency:

class Foo(dict):
def __getitem__(self, index):
return 5 if index == 'y' else super().__getitem__(index)
 
exec('print(y)', Foo())
exec('global y; print(y)', Foo())
exec('''
class UsesLOAD_NAME:
global y
print(y)''', Foo())
exec('''
class UsesLOAD_NAME:
print(y)''', Foo())

--
nosy: +Kevin Shweh

___
Python tracker 

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



  1   2   >