[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 90b4e49c98dd0ff948e13dd0618240c2294eb23d by Benjamin Peterson in 
branch '2.7':
bpo-38174 follow up: Remove loadlibrary.c from VS9.0. (GH-16411)
https://github.com/python/cpython/commit/90b4e49c98dd0ff948e13dd0618240c2294eb23d


--

___
Python tracker 

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



[issue38163] AsyncMock child mocks should detect their type

2019-09-25 Thread Lisa Roach


Lisa Roach  added the comment:

Lately I have been having my doubts around having MagicMocks also create 
AsyncMocks as children. 

Should a MagicMock really have a __aenter__ magic method? 
Is this too far from the original MagicMock if we change child mocks to default 
not to their parent type, but to their parent type *or* AsyncMock if 
asynchronous?

It makes the using the mocks easier, since you can just use MagicMock or 
AsyncMock for whatever you are doing and not think about when to use which. But 
it also might make the code more confusing, since it isn't as clear when to use 
one or the other.

--

___
Python tracker 

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



[issue38163] AsyncMock child mocks should detect their type

2019-09-25 Thread Lisa Roach

Lisa Roach  added the comment:

This should be simple to do, after https://github.com/python/cpython/pull/16060 
we can add:

elif self._mock_methods and _new_name in self._mock_methods:
# Methods that are not in _spec_asyncs are normal methods
klass = MagicMock

to _get_child_mocks and test with:

def test_normal_methods_on_class(self):
am = AsyncMock(AsyncClass)
self.assertIsInstance(am.async_method, AsyncMock)
self.assertIsInstance(am.normal_method, MagicMock)

This might be starting to make _get_child_mocks too complicated, and no longer 
follows the default "child mocks are the same as their parent". I am not sure 
how to redefine _get_child_mocks without needing to double up a lot of code to 
support MagicMocks having AsyncMock child_mocks as well.

--

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset f0501630b0ba31448c230c756b1027647f4ef100 by Benjamin Peterson in 
branch '3.6':
[3.6] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16410)
https://github.com/python/cpython/commit/f0501630b0ba31448c230c756b1027647f4ef100


--

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset d75bf44a2812a249663f979dc8379d27c1633ba5 by Benjamin Peterson in 
branch '3.8':
[3.8] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16409)
https://github.com/python/cpython/commit/d75bf44a2812a249663f979dc8379d27c1633ba5


--

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 8e4622ea898bdda687eb2fb0747721c0cd8b0d02 by Benjamin Peterson in 
branch '3.7':
[3.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16407)
https://github.com/python/cpython/commit/8e4622ea898bdda687eb2fb0747721c0cd8b0d02


--

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15993
pull_request: https://github.com/python/cpython/pull/16411

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset e73b93ab3e0bc2e5a3591f125f465353e025ecaf by Benjamin Peterson in 
branch '2.7':
[2.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16408)
https://github.com/python/cpython/commit/e73b93ab3e0bc2e5a3591f125f465353e025ecaf


--

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15992
pull_request: https://github.com/python/cpython/pull/16410

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15991
pull_request: https://github.com/python/cpython/pull/16409

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15990
pull_request: https://github.com/python/cpython/pull/16408

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15989
pull_request: https://github.com/python/cpython/pull/16407

___
Python tracker 

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



[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 52b940803860e37bcc3f6096b2d24e7c20a0e807 by Benjamin Peterson in 
branch 'master':
closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16346)
https://github.com/python/cpython/commit/52b940803860e37bcc3f6096b2d24e7c20a0e807


--
nosy: +benjamin.peterson
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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

IIRC there was a debate over allowing top level assignment expression without 
parentheses in original PEP 572 issue and most of the docs and examples follow 
using parentheses to avoid this confusion. I just noticed while reading the PEP 
that list comprehension case is not covered in the exceptional cases section 
that focused mostly on unparenthesized assignment expressions. If this will not 
be supported maybe this also could be added to PEP there since PEP serves as 
reference docs in most cases. The restriction can be lifted in future version 
if there is a simple way to fix this where this can be reopened.

https://www.python.org/dev/peps/pep-0572/#exceptional-cases

--
nosy: +xtreak

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 49d99f01e6e51acec5ca57a02e857f0796bc418b by Victor Stinner in 
branch 'master':
bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)
https://github.com/python/cpython/commit/49d99f01e6e51acec5ca57a02e857f0796bc418b


--

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15988
pull_request: https://github.com/python/cpython/pull/16406

___
Python tracker 

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



[issue26539] frozen executables should have an empty path

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 587 has been implemented in Python 3.8. The new API allows to 
initialize sys.path to a really empty list: sys.path = [].

* https://docs.python.org/dev/c-api/init_config.html
* 
https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.module_search_paths

--
nosy: +vstinner

___
Python tracker 

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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 88feaecd46a8f427e30ef7ad8cfcddfe392a2402 by Victor Stinner in 
branch 'master':
bpo-38234: Complete init config documentation (GH-16404)
https://github.com/python/cpython/commit/88feaecd46a8f427e30ef7ad8cfcddfe392a2402


--

___
Python tracker 

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



[issue31349] Embedded initialization ignores Py_SetProgramName()

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34300] gcc 7.3 causes a warning when compiling getpath.c in python 2.7

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is only a compiler warning, you can ignore it.

Python 2.7 is close to its end of life: I close the issue. I don't think that 
it's worth it to spend time trying to fix this old issue in 2.7.

In the master branch, Py_FatalError uses __attribute__((noreturn)).

--
nosy: +vstinner
resolution:  -> wont fix
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



[issue32375] Compilation warnings in getpath.c with gcc on Ubuntu / -D_FORTIFY_SOURCE=2

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

I just recompiled the master branch of Python twice using these flags:

* -D_FORTIFY_SOURCE=2 -Og
* -D_FORTIFY_SOURCE=2 -O3

I got a few warnings, the same that I get without FORTIFY SOURCE.

Using -D_FORTIFY_SOURCE=2 -O3, I get one warning, but it's no longer from 
getpath.c but in socketmodule.c. So I created a new issue: bpo-38282 
"socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()".

I close this issue. It has been fixed in the master branch.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()

2019-09-25 Thread STINNER Victor

New submission from STINNER Victor :

To test bpo-32375, I just recompiled the master branch of Python twice using 
these flags:

* -D_FORTIFY_SOURCE=2 -Og
* -D_FORTIFY_SOURCE=2 -O3

I got a few warnings, the same that I get without FORTIFY SOURCE.

Using -D_FORTIFY_SOURCE=2 -O3, I get one warning, but it's no longer from 
getpath.c:

In file included from /usr/include/string.h:494,
 from ./Include/Python.h:30,
 from /home/vstinner/python/master/Modules/socketmodule.c:103:
In function ‘memset’,
inlined from ‘getsockaddrarg’ at 
/home/vstinner/python/master/Modules/socketmodule.c:2331:9,
inlined from ‘sock_bind’ at 
/home/vstinner/python/master/Modules/socketmodule.c:3113:10:
/usr/include/bits/string_fortified.h:71:10: warning: ‘__builtin_memset’ offset 
[17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced 
subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
  |  ^

The warning comes from the code:

case AF_ALG:
...
struct sockaddr_alg *sa;
sa = (struct sockaddr_alg *)addr_ret;
memset(sa, 0, sizeof(*sa));

called from:

static PyObject *
sock_bind(PySocketSockObject *s, PyObject *addro)
{
sock_addr_t addrbuf;
int addrlen;
int res;

if (!getsockaddrarg(s, addro, SAS2SA(), , "bind")) {
return NULL;
}

--
components: Library (Lib)
messages: 353251
nosy: christian.heimes, pitrou, vstinner
priority: normal
severity: normal
status: open
title: socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of 
getsockaddrarg()
versions: Python 3.9

___
Python tracker 

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



[issue9654] merge PC/getpathp.c into Modules/getpath.c

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

In the implementation of the PEP 587 in Python 3.8, I created 
Python/pathconfig.c and the _PyPathConfig to share code which can be easily 
shared. Right now, remaining code is platform specific.

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



[issue35173] Re-use already existing functionality to allow Python 2.7.x (both embedded and standalone) to locate the module path according to the shared library

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Modules/getpath.c and PC/getpathp.c have been deeply reworked with the 
implementation of the PEP 587 in Python 3.8. Parameters which are already set 
(ex: Py_SetProgramName() or using the new PyConfig API) are no longer 
overriden. I added some tests on the "path configuration".

The most reliable way to configure the path configuration is now to use the new 
initialization API using PyConfig.
https://docs.python.org/dev/c-api/init_config.html

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -Python 2.7

___
Python tracker 

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



[issue31349] Embedded initialization ignores Py_SetProgramName()

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Modules/getpath.c and PC/getpathp.c have been deeply reworked with the 
implementation of the PEP 587 in Python 3.8. Parameters which are already set 
(ex: Py_SetProgramName() or using the new PyConfig API) are no longer 
overriden. I added some tests on the "path configuration".

The most reliable way to configure the path configuration is now to use the new 
initialization API using PyConfig.
https://docs.python.org/dev/c-api/init_config.html

--
nosy: +vstinner
versions: +Python 3.9 -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



[issue31210] Can not import modules if sys.prefix contains DELIM

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

I consider that the current behavior is correct. They are other ways to put a 
path which contains ":" into sys.path. I close the issue.

--
nosy: +vstinner
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25631] Segmentation fault with invalid Unicode command-line arguments in embedded Python

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

This bug has been fixed in the implementation of the PEP 587.

$ gcc x.c -l python3.8 $(pkg-config python-3.8 --cflags --libs) -o x
$ ./x
Fatal Python error: pyinit_main: can't finish initializing sys
ValueError: character U+11 is not in range [U+; U+10]

Current thread 0x7fd23364e6c0 (most recent call first):

=> it doesn't crash anymore, but write a error message and exit.

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -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



[issue38281] "+" ignored when determining file mode in gzip.GzipFile.__init__

2019-09-25 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +15986
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16405

___
Python tracker 

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 587 has been implemented in Python 3.8 with a "Multi-Phase 
Initialization Private Provisional API":
https://docs.python.org/dev/c-api/init_config.html#multi-phase-initialization-private-provisional-api

I suggest to close this issue. When somone will want to work again on the PEP 
432, I would suggest to open a new issue. So it will be more explicit that it 
would be implement on top of the existing PEP 587 implementation.

--

___
Python tracker 

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



[issue38281] "+" ignored when determining file mode in gzip.GzipFile.__init__

2019-09-25 Thread __starrify__


New submission from __starrify__ :

Currently (as of df69e75) it checks only the initial letter (via 
`mode.startswith`) of "mode" in gzip.GzipFile.__init__. See also: 
https://github.com/python/cpython/blob/df69e75/Lib/gzip.py#L183

I'd personally suggest that it takes also "+" into consideration, which shall 
be regarded as writable.

One common (hm.. at least I've observed more than once recently) case where 
people may make mistakes is to use a tempfile.NamedTemporaryFile as the file 
object without specifying explicitly a mode, while expecting the GzipFile to be 
writable.

A quick example (in Python 3.7.11):
```
>>> import tempfile
>>> tempfile.NamedTemporaryFile().mode
'rb+'
>>> import gzip
>>> gzip.GzipFile(fileobj=tempfile.NamedTemporaryFile(mode='rb+')).writable()
False
>>> gzip.GzipFile(fileobj=tempfile.NamedTemporaryFile(mode='wb')).writable()
True
```

Unfortunately this change request may be backward-incompatible, since 
previously modes like "r+b" have been treated as read-only. See also: 
https://github.com/python/cpython/blob/df69e75/Lib/test/test_gzip.py#L464

--
components: Library (Lib)
messages: 353244
nosy: __starrify__
priority: normal
severity: normal
status: open
title: "+" ignored when determining file mode in gzip.GzipFile.__init__
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue18309] Make python slightly more relocatable

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 587 "Python Initialization Configuration" has been implemented in 
Python 3.8. It provides fine control on the "Path Configuration":

* https://docs.python.org/dev/c-api/init_config.html
* https://docs.python.org/dev/c-api/init_config.html#init-path-config

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue15577] Real argc and argv in embedded interpreter

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

I only saw one request (this issue) for this feature, in 2012. So it doesn't 
sound really important. I close the issue.

--
nosy: +vstinner
resolution:  -> out of date
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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15985
pull_request: https://github.com/python/cpython/pull/16404

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8bf39b606ef7b02c0279a80789f3c4824b0da5e9 by Victor Stinner in 
branch 'master':
bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)
https://github.com/python/cpython/commit/8bf39b606ef7b02c0279a80789f3c4824b0da5e9


--

___
Python tracker 

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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

@xtreak do you think we need to keep this issue open then?

--

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15984
pull_request: https://github.com/python/cpython/pull/16402

___
Python tracker 

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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Arne Recknagel


Arne Recknagel  added the comment:

Nothing in particular, only that I expected it to follow the same rules as 
regular if-blocks. It would be nice to have, since it'd be one less thing to 
keep in mind.

> There are some tricky issues in this particular bit of syntax [...]

It looks like there are good reasons to keep it this way or wait with 
potentially misleading docu updates. Then this issue can just serve to point 
out that it might be something to fix in either way, since I can see people 
stumbling over it.

--

___
Python tracker 

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



[issue37958] Adding get_profile_dict to pstats

2019-09-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue38142] Make _hashlib extension module PEP-384 compatible

2019-09-25 Thread Christian Heimes


Change by Christian Heimes :


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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread Christian Heimes


Change by Christian Heimes :


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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset b92b8c53f63d2e805288ac2c665bf5887d1b7ca6 by Vinay Sajip in branch 
'3.8':
[3.8] bpo-22273: Changed conditions for ctypes array-in-struct handling. 
(GH-16381) (GH-16401)
https://github.com/python/cpython/commit/b92b8c53f63d2e805288ac2c665bf5887d1b7ca6


--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Let me know when pr 111 is deployed on the build master so I can log in and 
> cleanup the current typo names.

Done ( https://github.com/python/buildmaster-config/pull/111 )

--

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Change by Vinay Sajip :


--
pull_requests: +15983
pull_request: https://github.com/python/cpython/pull/16401

___
Python tracker 

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



[issue38142] Make _hashlib extension module PEP-384 compatible

2019-09-25 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset df69e75edcc08475bc9a57a5a76df8a45bfc3c34 by Christian Heimes in 
branch 'master':
bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant (#16071)
https://github.com/python/cpython/commit/df69e75edcc08475bc9a57a5a76df8a45bfc3c34


--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

It's already explained that the build directories are duplicated, however it 
could be more verbose indeed. When a config is being used alongside a config 
which inherits from the previous one, then buildbot aborts with an error as it 
tries to compile cpython in the same directory.

--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Let me know when pr 111 is deployed on the build master so I can log in and 
cleanup the current typo names.

otherwise, things are probably running fine for the moment.

--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

>From a yet another one of a plethora of reasons to hate buildbot point of 
>view...  A _log message_ saying "i'm not using this anymore, you can delete 
>it" is infinitely worse than just going ahead and automatically deleting it.  
>I shouldn't, as a human, have needed to be involved for this one. :P

--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I'm not going to spend time manually deleting the unused build directories 
until the typo in the new buildsuffix that caused the disk to fill up is fixed.

https://github.com/python/buildmaster-config/pull/111

I don't even understand why the buildsuffix entries were added.  It doesn't 
matter on these systems and the original PR doesn't link to any issue 
describing why.

--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Yep that was my change as some jobs couldn't be run on the same worker due to 
the configs using the same directory.

--
nosy: +cstratak

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://github.com/python/buildmaster-config/pull/108 is to blame.

--

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

It appears that something in the buildbot configuration (typo?) has changed 
which caused an entire new set of directories for the builder to be created:

@clang-ubsan:/var/lib/buildbot/clang-ubsan$ ls -al
total 68056
drwxr-xr-x 14 buildbot buildbot 4096 Sep 19 14:33 .
drwxr-xr-x  5 buildbot buildbot 4096 Sep 24 02:36 ..
drwx--  3 buildbot buildbot 4096 May 20  2018 2.7.gps-clang-ubsan
drwx--  3 buildbot buildbot 4096 Sep 24 02:43 
2.7.gps-clang-ubsan.clang-usban
drwx--  3 buildbot buildbot 4096 May 20  2018 3.6.gps-clang-ubsan
drwx--  3 buildbot buildbot 4096 May 20  2018 3.7.gps-clang-ubsan
drwx--  3 buildbot buildbot 4096 Sep 19 16:41 
3.7.gps-clang-ubsan.clang-usban
drwx--  3 buildbot buildbot 4096 Jun  4 20:30 3.8.gps-clang-ubsan
drwx--  3 buildbot buildbot 4096 Sep 19 16:05 
3.8.gps-clang-ubsan.clang-usban
drwx--  3 buildbot buildbot 4096 May 20  2018 3.x.gps-clang-ubsan
drwx--  3 buildbot buildbot 4096 Sep 19 14:39 
3.x.gps-clang-ubsan.clang-usban
-rw---  1 buildbot buildbot 1333 May 20  2018 buildbot.tac
drwx--  3 buildbot buildbot 4096 Jun  2  2018 custom.gps-clang-ubsan
drwx--  2 buildbot buildbot 4096 Sep 19 14:33 
custom.gps-clang-ubsan.clang-usban
drwxr-xr-x  2 buildbot buildbot 4096 May 20  2018 info
-rw---  1 buildbot buildbot   12 May 15 22:14 twistd.hostname
-rw-r--r--  1 buildbot buildbot  9574124 Sep 25 20:39 twistd.log
-rw-r--r--  1 buildbot buildbot 1179 Jul 30 18:35 twistd.log.1
-rw-r--r--  1 buildbot buildbot 1101 Jun  2 22:17 twistd.log.2
-rw-r--r--  1 buildbot buildbot 1025 Mar  9  2019 twistd.log.3
-rw-r--r--  1 buildbot buildbot 1056 Dec 10  2018 twistd.log.4
-rw-r--r--  1 buildbot buildbot 1014 Oct  9  2018 twistd.log.5
-rw-r--r--  1 buildbot buildbot 1168 Jul 24  2018 twistd.log.6
-rw---  1 buildbot buildbot3 May 15 22:14 twistd.pid


Notice the directories named -clang-ubsan.clang-usban that appeared on 
September 19th.  From twistd.log:

2019-09-19 14:33:20+ [Broker,client] Lost connection to 
buildbot.python.org:9020
2019-09-19 14:33:20+ [Broker,client]  will retry in 3 seconds
2019-09-19 14:33:20+ [-] Stopping factory 
2019-09-19 14:33:23+ [-] Starting factory 
2019-09-19 14:33:23+ [-] Connecting to buildbot.python.org:9020
2019-09-19 14:33:23+ [Uninitialized] Connection to buildbot.python.org:9020 
failed: Connection Refused
2019-09-19 14:33:23+ [Uninitialized]  will retry in 8 seconds
2019-09-19 14:33:23+ [-] Stopping factory 
2019-09-19 14:33:32+ [-] Starting factory 
2019-09-19 14:33:32+ [-] Connecting to buildbot.python.org:9020
2019-09-19 14:33:32+ [Uninitialized] Connection to buildbot.python.org:9020 
failed: Connection Refused
2019-09-19 14:33:32+ [Uninitialized]  will retry in 22 seconds
2019-09-19 14:33:32+ [-] Stopping factory 
2019-09-19 14:33:54+ [-] Starting factory 
2019-09-19 14:33:54+ [-] Connecting to buildbot.python.org:9020
2019-09-19 14:33:55+ [Broker,client] message from master: attached
2019-09-19 14:33:55+ [Broker,client] Peer will receive following PB 
traceback:
2019-09-19 14:33:55+ [Broker,client] Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/spread/banana.py", 
line 173, in gotItem
self.callExpressionReceived(item)
  File "/usr/lib/python2.7/dist-packages/twisted/spread/banana.py", 
line 136, in callExpressionReceived
self.expressionReceived(obj)
  File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 
575, in expressionReceived
method(*sexp[1:])
  File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 
896, in proto_message
self._recvMessage(self.localObjectForID, requestID, objectID, 
message, answerRequired, netArgs, netKw)
---  ---
  File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 
913, in _recvMessage
netResult = object.remoteMessageReceived(self, message, netArgs, 
netKw)
  File "/usr/lib/python2.7/dist-packages/twisted/spread/flavors.py", 
line 118, in remoteMessageReceived
raise NoSuchMethod("No such method: remote_%s" % (message,))
twisted.spread.flavors.NoSuchMethod: No such method: 
remote_getWorkerInfo

2019-09-19 14:33:55+ [Broker,client] message from master: buildbot-slave 
detected, failing back to deprecated buildslave API. (I
gnoring missing getWorkerInfo method.)
2019-09-19 14:33:55+ [Broker,client] changing builddir for builder AMD64 
Clang UBSan 2.7 from 2.7.gps-clang-ubsan to 2.7.gps-clang-ubsan.clang-usban
2019-09-19 14:33:55+ [Broker,client] changing builddir for builder AMD64 
Clang UBSan 3.8 from 3.8.gps-clang-ubsan to 3.8.gps-clang-ubsan.clang-usban
2019-09-19 14:33:55+ [Broker,client] changing 

[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset d015714f89af5c57b7071a74eeca618577b3dfe4 by Vinay Sajip in branch 
'3.7':
[3.7] bpo-22273: Changed conditions for ctypes array-in-struct handling. 
(GH-16381) (GH-16400)
https://github.com/python/cpython/commit/d015714f89af5c57b7071a74eeca618577b3dfe4


--

___
Python tracker 

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



[issue38279] multiprocessing example enhancement

2019-09-25 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +davin

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Change by Vinay Sajip :


--
pull_requests: +15982
pull_request: https://github.com/python/cpython/pull/16400

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset cc28ed2421bf3953efc0fbde387f28722f3801e2 by Vinay Sajip in branch 
'master':
bpo-22273: Removed temporary test skipping on PPC platforms. (GH-16399)
https://github.com/python/cpython/commit/cc28ed2421bf3953efc0fbde387f28722f3801e2


--

___
Python tracker 

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



[issue38272] test_ctypes: test_array_in_struct() failed on ARMv7 Debian buster 3.7 and PPC64LE Fedora 3.7

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:

Yes, sorry for the noise - I'm fixing it, and will close this issue once all 
done.

--
nosy: +vinay.sajip

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:

> Please check if bpo-38272 regression is caused by this issue.

Yes, it is. Being worked on right now. Sorry for the noise.

--

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Change by Vinay Sajip :


--
pull_requests: +15981
pull_request: https://github.com/python/cpython/pull/16399

___
Python tracker 

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



[issue38280] Feature request: Add support to compile to native binary like as golang

2019-09-25 Thread WHK Yan


New submission from WHK Yan :

It would be very useful to be able to compile at a low level a complete Python 
functional script and generate a native binary for each type of operating 
system and architecture just like golang does.

For example:

Run script: $ go run script.go
Compile script: $ GOOS=linux GOARCH=amd64 go build -o test test.go

The generated binary does not require goland installed to be executed and does 
not require complex dependencies. This allows me to distribute applications in 
binary are an excellent performance without requiring the installation of the 
entire interpreter.

Golang's problem is that it is not an intuitive language and the learning curve 
is very long, they had a very good idea but they carried it out in a horrible 
way.

On the other hand, python is very flexible and very intuitive, the learning 
curve is very short, I learned python in less than a week and I have been 
creating python applications for several years, instead I have been trying to 
learn golang for months and it is excessively strange.

Why not combine the best of both worlds? Unite non-dependence and 
cross-platform distribution without relying on the interpreter and the most 
versatile and intuitive language?

For example:

Run script: $ python script.py
Compile pyc $ python -m compileall
Compile native: $ python -m ncompileall -k linux -a amd_64

When compileall generate the pyc files and ncompileall generate a native 
binaries without complex dependencies or python dependencies.

This would be a great advantage in equipment that does not require additional 
installation of components.

For example, on servers of some companies they do not allow you to install 
something that can affect the entire environment or ecosystem, in addition, in 
many cases the scripts require a specific version of python and cause problems 
when different versions are required to other applications, the complete 
compilation at low level would allow to resolve this conflict.

There are currently few projects that allow you to translate a python script to 
binary but most do not have support or do not have a good performance, if 
python already brought it integrated it would increase its use even more since 
it would not depend on the interpreter to be able to distribute a complete 
application that already include all its modules and others.

--
components: Cross-Build
messages: 353224
nosy: Alex.Willmer, WHK Yan
priority: normal
severity: normal
status: open
title: Feature request: Add support to compile to native binary like as golang
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

We're intentionally holding back on the places where we allow unparenthesized 
walrus operators.

There are some tricky issues in this particular bit of syntax -- look at this 
line in the grammar:
https://github.com/python/cpython/blob/bfd0c963d88f3df69489ee250655e2b8f3d235bd/Grammar/Grammar#L190

Because of that I would like to hold back on supporting this.

Is there a specific part of the docs that made you think this should be allowed?

--

___
Python tracker 

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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device

2019-09-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue38279] multiprocessing example enhancement

2019-09-25 Thread Max


Change by Max :


--
keywords: +patch
pull_requests: +15979
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16398

___
Python tracker 

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



[issue38279] multiprocessing example enhancement

2019-09-25 Thread Max Voss


New submission from Max Voss :

Hello all,

I've been trying to understand multiprocessing for a while, I tried multiple 
times. The PR is a suggested enhancement to the example that made it "click" 
for me. Or should I say, produced a working result that made sense to me.

Details for each change in the PR. It's short too.

The concept of multiprocessing is easy enough, but the syntax is so unlike 
regular python and so much happens "behind the curtain" so to speak, it took me 
a while. When I looked for multiprocessing advice online, many answers seemed 
unsure if or how their solution worked.

Generally I'd like to help write documentation. So this is a test to see how 
good your issue handling process is too. :)

--
assignee: docs@python
components: Documentation
messages: 353222
nosy: BMV, docs@python
priority: normal
severity: normal
status: open
title: multiprocessing example enhancement
versions: Python 3.7

___
Python tracker 

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



[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-25 Thread Ethan Furman


Ethan Furman  added the comment:

Excellent, thanks for checking!

--

___
Python tracker 

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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset 4267e8f72a7d8fe0433819511a5ae45d45e1c67b by Miss Islington (bot) 
in branch '3.8':
bpo-38271: encrypt private key test files with AES256 (GH-16385)
https://github.com/python/cpython/commit/4267e8f72a7d8fe0433819511a5ae45d45e1c67b


--

___
Python tracker 

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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset 585798fb0eac38f32b54f1b8a86e418d76147d99 by Miss Islington (bot) 
in branch '3.7':
bpo-38271: encrypt private key test files with AES256 (GH-16385)
https://github.com/python/cpython/commit/585798fb0eac38f32b54f1b8a86e418d76147d99


--

___
Python tracker 

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



[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset ca14f047b068cd0fb81ef3d5e7bea19fe8af1b58 by Miss Islington (bot) 
in branch '3.8':
bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)
https://github.com/python/cpython/commit/ca14f047b068cd0fb81ef3d5e7bea19fe8af1b58


--
nosy: +miss-islington

___
Python tracker 

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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15977
pull_request: https://github.com/python/cpython/pull/16395

___
Python tracker 

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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15978
pull_request: https://github.com/python/cpython/pull/16396

___
Python tracker 

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



[issue38271] test_ssl: replace 3DES with AES encrypted private keys

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset bfd0c963d88f3df69489ee250655e2b8f3d235bd by Miss Islington (bot) 
(Christian Heimes) in branch 'master':
bpo-38271: encrypt private key test files with AES256 (GH-16385)
https://github.com/python/cpython/commit/bfd0c963d88f3df69489ee250655e2b8f3d235bd


--
nosy: +miss-islington

___
Python tracker 

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



[issue38270] Tests: Avoid MD5 or check for MD5 availablity

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset 66cd041df8dfadd001ae298292e16f0271c0d139 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382) 
(GH-16393)
https://github.com/python/cpython/commit/66cd041df8dfadd001ae298292e16f0271c0d139


--

___
Python tracker 

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



[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15976
pull_request: https://github.com/python/cpython/pull/16394

___
Python tracker 

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



[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 543a3951a1c96bae0ea839eacec71d3b1a563a10 by Serhiy Storchaka in 
branch 'master':
bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)
https://github.com/python/cpython/commit/543a3951a1c96bae0ea839eacec71d3b1a563a10


--

___
Python tracker 

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



[issue38255] Replace "method" with "attribute" in the description of super()

2019-09-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 3b5e9241142d6b7c22059115c0e68a8912753818 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-38255: super() can search attributes as well as methods (GH-16368) 
(GH-16392)
https://github.com/python/cpython/commit/3b5e9241142d6b7c22059115c0e68a8912753818


--

___
Python tracker 

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



[issue38255] Replace "method" with "attribute" in the description of super()

2019-09-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 7444a5a402bbac4268b95958a9578a9e3dae33e0 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-38255: super() can search attributes as well as methods (GH-16368) 
(GH-16391)
https://github.com/python/cpython/commit/7444a5a402bbac4268b95958a9578a9e3dae33e0


--

___
Python tracker 

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



[issue38270] Tests: Avoid MD5 or check for MD5 availablity

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15975
pull_request: https://github.com/python/cpython/pull/16393

___
Python tracker 

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



[issue38255] Replace "method" with "attribute" in the description of super()

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15973
pull_request: https://github.com/python/cpython/pull/16391

___
Python tracker 

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



[issue38255] Replace "method" with "attribute" in the description of super()

2019-09-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 15ccc4fac09b866d61b069c6c136aabfe4bac09c by Raymond Hettinger in 
branch 'master':
bpo-38255: super() can search attributes as well as methods (GH-16368)
https://github.com/python/cpython/commit/15ccc4fac09b866d61b069c6c136aabfe4bac09c


--

___
Python tracker 

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



[issue38255] Replace "method" with "attribute" in the description of super()

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15974
pull_request: https://github.com/python/cpython/pull/16392

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

I also suggest you to not focus on such micro-benchmarks. It's not relevant to 
make a whole application faster. Use PyPy if you care about performances. PyPy 
has a very efficient implementation for dictionary and it's JIT compiler can go 
way further than CPython. In some cases, PyPy can even replace hash table 
lookup with array access:
https://twitter.com/cfbolz/status/1175493837516627968

--

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread Ben Spiller


Ben Spiller  added the comment:

Thanks... yep I realise method calls are slower than operators, am hoping we 
can still find a cunning way to speed up this use case nonetheless. :D For 
example by having a configuration option on dict (or making a new subclass) 
that gives the (speedy!) [] operator the same no-exception semantics you'd get 
from calling get(). As you can see from my timeit benchmarks none of the 
current workarounds are very appealing for this use case, and a 2.2x slowdown 
for this common operation is a shame.

--

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Lots of solutions are possible - maybe some kind of peephole optimization to 
> make dict.get() itself perform similarly to the [] operator, or if that's 
> challenging perhaps providing a class or option that behaves like defaultdict 
> but without the auto-adding behaviour and with comparable [] performance to 
> the "dict" type - for example dict.raiseExceptionOnMissing=False, or perhaps 
> even some kind of new syntax (e.g. dict['key', default=None]). Which option 
> would be easiest/nicest?

This issue doesn't propose any concrete solution, but discuss ideas. I suggest 
you to open a thread on the python-ideas mailing list instead. I suggest to 
close this issue.

I bet that defaultdict is *not* faster once you will manage to write a fair 
micro-benchmark.

--

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

>python -m timeit -s "import collections; d=collections.defaultdict(lambda: 
>None); d['abc']=123; " "x=d['XXX']"
500 loops, best of 5: 34.3 nsec per loop

This benchmark is not a fair comparison: the 'XXX' key is created at the first 
access. In short, this benchmark measure the performance of a dict lookup:

>python -m timeit -s "d={'abc':123}" "x=d['abc']"
500 loops, best of 5: 33 nsec per loop

--

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

dict.get() is a method call wheras "key in dict" and "dict[key]" are operators. 
Method calls are still slower than operators, even after past optimizations. 
For example, when dict.get was converted to METH_FASTCALL, it was around 20 ns 
faster:
https://vstinner.github.io/fastcall-microbenchmarks.html

See also closed bpo-17170 "string method lookup is too slow".

--
nosy: +serhiy.storchaka, vstinner

___
Python tracker 

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



[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread Ben Spiller


New submission from Ben Spiller :

In performance-critical python code, it's quite common to need to get an item 
from a dictionary, falling back on a default (e.g. None, 0 etc) if it doesn't 
yet exist. The obvious way to do this based on the documentation is to call the 
dict.get() method:

> python -m timeit -s "d={'abc':123}" "x=d.get('abc',None)"
500 loops, best of 5: 74.6 nsec per loop

... however the performance of natural approach is very poor (2.2 times 
slower!) compared to the time really needed to look up the value:
>python -m timeit -s "d={'abc':123}" "x=d['abc']"
500 loops, best of 5: 33 nsec per loop

There are various ways to do this more efficiently, but they all have 
significant performance or functional drawbacks:

custom dict subclass with __missing__() override: promising approach, but use 
of a custom class instead of dict seems to increase [] cost significantly:
>python -m timeit -s "class mydict(dict):" -s "  def 
>__missing__(self,key):return None" -s "d = mydict({'abc':123})" "x=d['abc']"
500 loops, best of 5: 60.4 nsec per loop

get() with caching of function lookup - somewhat better but not great:
>python -m timeit -s "d={'abc':123}; G=d.get" "x=G('abc',None)"
500 loops, best of 5: 59.8 nsec per loop

[] and "in" (inevitably a bit slow due to needing to do the lookup twice):
>python -m timeit -s "d={'abc':123}" "x=d['abc'] if 'abc' in d else None"
500 loops, best of 5: 53.9 nsec per loop

try/except approach: quickest solution if it exists, but clunky syntax, and 
VERY slow if it doesn't exist
>python -m timeit -s "d={'abc':123}" "try:" "   x=d['abc']" "except KeyError: 
>pass"
500 loops, best of 5: 41.8 nsec per loop
>python -m timeit -s "d={'abc':123}" "try:" "   x=d['XXX']" "except KeyError: 
>pass"
100 loops, best of 5: 174 nsec per loop

collections.defaultdict: reasonable performance if key exists, but unwanted 
behaviour of adding the key if missing (which if used with an unbounded 
universe of keys could produce a memory leak):
>python -m timeit -s "import collections; d=collections.defaultdict(lambda: 
>None); d['abc']=123; " "x=d['XXX']"
500 loops, best of 5: 34.3 nsec per loop

I bet we can do better! 

Lots of solutions are possible - maybe some kind of peephole optimization to 
make dict.get() itself perform similarly to the [] operator, or if that's 
challenging perhaps providing a class or option that behaves like defaultdict 
but without the auto-adding behaviour and with comparable [] performance to the 
"dict" type - for example dict.raiseExceptionOnMissing=False, or perhaps even 
some kind of new syntax (e.g. dict['key', default=None]). Which option would be 
easiest/nicest?

--
components: Interpreter Core
messages: 353206
nosy: benspiller
priority: normal
severity: normal
status: open
title: Need a more efficient way to perform dict.get(key, default)
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 00508a7407d7d300b487532e2271534b20e378a7 by Victor Stinner in 
branch 'master':
bpo-38234: Fix test_embed pathconfig tests (GH-16390)
https://github.com/python/cpython/commit/00508a7407d7d300b487532e2271534b20e378a7


--

___
Python tracker 

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



[issue38270] Tests: Avoid MD5 or check for MD5 availablity

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset c64a1a61e6fc542cada40eb069a239317e1af36e by Miss Islington (bot) 
(Christian Heimes) in branch 'master':
bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382)
https://github.com/python/cpython/commit/c64a1a61e6fc542cada40eb069a239317e1af36e


--
nosy: +miss-islington

___
Python tracker 

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



[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

2019-09-25 Thread Arne Recknagel


New submission from Arne Recknagel :

All code is run on python build from the current 3.8 branch.

The following doesn't work:

  >>> [x for x in 'foo' if y := True]
File "", line 1
  [x for x in 'foo' if y := True]
 ^
  SyntaxError: invalid syntax

While this does:

  >>> [x for x in 'foo' if (y := True)]
  ['f', 'o', 'o']

Since assignment expressions work without parentheses in normal if-clauses and 
there being no mention on it explicitly being disallowed, this seems to either 
be a bug or an oversight in the documentation (with my own opinion, for what 
it's worth, being that it's a bug).

--
messages: 353203
nosy: arne, emilyemorehouse
priority: normal
severity: normal
status: open
title: Allowing conditions with assignment expressions in comprehensions 
without parantheses
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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-09-25 Thread Ned Deily


Change by Ned Deily :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-09-25 Thread Ned Deily


Ned Deily  added the comment:


New changeset e4be8c984d035da30f9ed051aa6f3f762f0e9060 by Ned Deily (Michael 
Felt) in branch '3.8':
bpo-36210: correct logic in setup.py for optional extensions for AIX (GH-12202) 
(GH-16376)
https://github.com/python/cpython/commit/e4be8c984d035da30f9ed051aa6f3f762f0e9060


--
nosy: +ned.deily

___
Python tracker 

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



[issue37064] Feature request: option to keep/add flags to pathfix.

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2e566bf35e96f0d6ca6fe291f179e832d1c32186 by Victor Stinner in 
branch '3.8':
bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705) (GH-16389)
https://github.com/python/cpython/commit/2e566bf35e96f0d6ca6fe291f179e832d1c32186


--

___
Python tracker 

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



[issue38234] The value of Py_SetPath is not used to populate the configuration

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15972
pull_request: https://github.com/python/cpython/pull/16390

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-09-25 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 417089e88bd4ea146b9497e06e8edeb58a59cd65 by Vinay Sajip in branch 
'master':
bpo-22273: Re-enabled ctypes test on ARM machines. (GH-16388)
https://github.com/python/cpython/commit/417089e88bd4ea146b9497e06e8edeb58a59cd65


--

___
Python tracker 

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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-09-25 Thread Ned Deily


Change by Ned Deily :


Removed file: https://bugs.python.org/file48241/name of the past

___
Python tracker 

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



[issue36046] subprocess: add user, group and extra_groups parameters

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

The posix_spawn() bug is now fixed, I close again the issue.

Feel free to open a new issue if you want to follow-up on reworking the 
posix_spawn() code path ;-)

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



[issue36046] subprocess: add user, group and extra_groups parameters

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> As mentioned in the code review for Victor's fix, it feels like the big 
> conditional on the use of self._posix_spawn in Popen._execute_child should 
> perhaps be pulled into _posix_spawn, or at least refactored so it's closer to 
> _posix_spawn, with some explanation about what is or isn't supported by 
> _posix_spawn and why. 

Maybe, yes. But having tests in the caller avoids to pass the very long list of 
arguments. Especially, it avoids to pass arguments which are not supposed by 
posix_spawn() :-)

_execute_child() has 21 arguments... is that really reasonable? Maybe we should 
put these stuff into a temporary object?

--

___
Python tracker 

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



[issue38273] Got an compile failed info about typeobject.c

2019-09-25 Thread hai shi


hai shi  added the comment:

oh, thanks, guys. This error info is disappeared when i followed victor's 
advice. It must be i changed the configure/make file by accident.

Sorry for this noisy info

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue36046] subprocess: add user, group and extra_groups parameters

2019-09-25 Thread Thomas Wouters


Thomas Wouters  added the comment:

As mentioned in the code review for Victor's fix, it feels like the big 
conditional on the use of self._posix_spawn in Popen._execute_child should 
perhaps be pulled into _posix_spawn, or at least refactored so it's closer to 
_posix_spawn, with some explanation about what is or isn't supported by 
_posix_spawn and why.

--

___
Python tracker 

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



  1   2   >