[issue38268] Unclear definition of ceil, floor and trunc in documentation mathmodule.c

2019-09-25 Thread Sophie


New submission from Sophie :

The functions ceil(), floor() and trunc() define their result as an Integral. 
But an Integral is the result of an integration calculation. Better say Integer 
IMHO.

--
assignee: docs@python
components: Documentation
messages: 353151
nosy: Sophie, docs@python
priority: normal
pull_requests: 15958
severity: normal
status: open
title: Unclear definition of ceil, floor and trunc in documentation mathmodule.c
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



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

2019-09-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I now have an access to Windows (I did not have it 5 years ago), so I'm going 
to finish this issue if I have a time.

--

___
Python tracker 

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



[issue38268] Unclear definition of ceil, floor and trunc in documentation mathmodule.c

2019-09-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The word "integral" has also other meaning.

This is a duplicate of issue26512.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Vocabulary: Using "integral" in library/stdtypes.html

___
Python tracker 

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



[issue38269] test_venv failed on AMD64 Debian PGO 3.x

2019-09-25 Thread Dong-hee Na


New submission from Dong-hee Na :

https://buildbot.python.org/all/#/builders/47/builds/3578

This issue was found from GH-16359

The main issue of this failure is the lack of storage space.

OSError: [Errno 28] No space left on device: '/tmp/tmpnmcjxia9/bin/python' -> 
'/tmp/tmpnmcjxia9/bin/python3'

--
components: Tests
messages: 353154
nosy: corona10, steve.dower
priority: normal
severity: normal
status: open
title: test_venv failed on AMD64 Debian PGO 3.x
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



[issue38269] test_venv failed on AMD64 Debian PGO 3.x

2019-09-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I think there was a bug in the past in regrtest or tempfile where the temporary 
files for tests were not deleted and lead to disk space filled up in several 
buildbots.

--
nosy: +pablogsal, vstinner, xtreak

___
Python tracker 

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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15960
pull_request: https://github.com/python/cpython/pull/16380

___
Python tracker 

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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset 17deb16883fa574a86e42551cc37f044182347ad by Miss Islington (bot) 
(Emmanuel Arias) in branch 'master':
bpo-38260: Add Docs on asyncio.run (GH-16337)
https://github.com/python/cpython/commit/17deb16883fa574a86e42551cc37f044182347ad


--
nosy: +miss-islington

___
Python tracker 

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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15959
pull_request: https://github.com/python/cpython/pull/16379

___
Python tracker 

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



[issue36232] Improve error message on dbm.open

2019-09-25 Thread Marco Rougeth


Change by Marco Rougeth :


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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset d3666945d78508970002653c4d46221a4306f55b by Miss Islington (bot) 
in branch '3.7':
bpo-38260: Add Docs on asyncio.run (GH-16337)
https://github.com/python/cpython/commit/d3666945d78508970002653c4d46221a4306f55b


--

___
Python tracker 

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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread miss-islington


miss-islington  added the comment:


New changeset 4633355a063c7bf068bdd72dfdd32f4c22cf382f by Miss Islington (bot) 
in branch '3.8':
bpo-38260: Add Docs on asyncio.run (GH-16337)
https://github.com/python/cpython/commit/4633355a063c7bf068bdd72dfdd32f4c22cf382f


--

___
Python tracker 

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



[issue38260] asyncio.run documentation does not mention its return value

2019-09-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



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

2019-09-25 Thread Carol Willing


Carol Willing  added the comment:

@maggyero Thanks for the PR and working to improve the docs.

For this particular issue, I prefer PR 16368 for its brevity and common use 
case. I'm recommending that it be merged.

--
nosy: +willingc

___
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: +15961
pull_request: https://github.com/python/cpython/pull/16381

___
Python tracker 

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



[issue2454] sha and md5 fixer

2019-09-25 Thread Christian Heimes


Christian Heimes  added the comment:

The issue is already fixed. Python 3.7+ no longer import the md5 module 
directly.

--
nosy: +christian.heimes
resolution:  -> out of date
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



[issue18000] _md5 should be built if _ssl cannot be built

2019-09-25 Thread Christian Heimes


Christian Heimes  added the comment:

Python 2.7 is reaching EOL soon and this bug has been dormant for over six 
years. Since the problem is solved in Python 3, I'm closing this bug as WONTFIX.

--
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



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

2019-09-25 Thread Christian Heimes


New submission from Christian Heimes :

MD5 hash digest algorithm has known security issues and is getting blocked on 
systems with strict security policies.

Python uses MD5 in several unittests. These tests should either avoid MD5 and 
use SHA256 instead. Or tests that really require MD5 should check for the 
availability of MD5 and skip these tests. The latter are network-related tests 
that check for digest auth or CRAM-MD5 auth.

Avoidable use of MD5:
* test_hmac tests for default constructor
* test_tarfile checksum

Tests that require MD5:
* test_urllib2_localnet digest auth
* CRAM-MD5 in test_imaplib, test_poplib, test_smtplib

--
assignee: christian.heimes
components: Tests
messages: 353162
nosy: christian.heimes
priority: high
severity: normal
status: open
title: Tests: Avoid MD5 or check for MD5 availablity
type: resource usage
versions: 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



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

2019-09-25 Thread Christian Heimes


Change by Christian Heimes :


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

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

I contacted Gregory P. Smith, the buildbot worker owner, to ask him to have a 
look.

> I think there was a bug in the past in regrtest or tempfile where the 
> temporary files for tests were not deleted and lead to disk space filled up 
> in several buildbots.

regrtest now has a --cleanup command to remove all build/test_python_xxx 
directories. But this command cannot be run by buildbot on a worker which 
allows multiple jobs in parallel, since the command removes temporary directory 
of parallel jobs...

I fixed many bugs in regrtest recently to reduce the risk of leaving temporary 
files on the disk.

--
nosy: +gregory.p.smith
title: test_venv failed on AMD64 Debian PGO 3.x -> AMD64 Debian PGO 3.x, AMD64 
Clang UBSan 2.7 buildbots: No space left on device

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

https://mail.python.org/archives/list/buildbot-sta...@python.org/message/JCR6FQBUMLMOESWE4IVVUIATX7KTEV7C/

--

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-25 Thread Carol Willing


Carol Willing  added the comment:


New changeset edad4d89e357c92f70c0324b937845d652b20afd by Carol Willing (Yury 
Selivanov) in branch 'master':
bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330)
https://github.com/python/cpython/commit/edad4d89e357c92f70c0324b937845d652b20afd


--
nosy: +willingc

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15963, 15964
pull_request: https://github.com/python/cpython/pull/16383

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15963, 15964, 15965
pull_request: https://github.com/python/cpython/pull/16383

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15963
pull_request: https://github.com/python/cpython/pull/16383

___
Python tracker 

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



[issue38265] Update os.pread to accept the length type as size_t

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.7 and 3.8 also have os.pread(). Why not also fixing these branches?

--

os.pwrite() uses Py_buffer for its argument and supports size_t size.

os.preadv() and os.pwritev() use internally the C structure "struct iovec" 
which uses size_t for its iov_len field.

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

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15966
pull_request: https://github.com/python/cpython/pull/16384

___
Python tracker 

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



[issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters

2019-09-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

On Tue, Sep 24, 2019 at 08:54:49PM +, Arno-Can Uestuensoez wrote:

> Or reduced to the focus of the actual issue and depicted the actual 
> passed parameters. See the following "Case 4 - same as 
> mixin_C_is_B0A1" for the essential question.

> Case 4 - same as mixin_C_is_B0A1
> 
>   B_Without_Arg:C True
>   A_With_Arg:C False
> 
>   success
> 
> Comment:
>   The success is NOT expected and as far as I can see should be treated as an 
> Error so NOK.

Why would it be an error when you override object.__init__ completely? 
object.__init__ doesn't get called at all, because A overrides it:

class A(object):
def __init__(self, propagate=False):
if propagate:
super(A, self).__init__(propagate)
# this section is implied
else:
pass  # override the superclass

B_Without_Arg calls ``super().__init__`` with no arguments, so 
``A.__init__`` fills in the default argument, propagate=False.

[...]
>  This means the call of "super(B, self).__init__()" within 
>  "B.__init__()" defines the call parameters of "A.__init__()". 

Yes, that's how it works in cooperative multiple inheritance.

It may help to read this:

https://www.artima.com/weblogs/viewpost.jsp?thread=281127

The very badly named essay "Super considered harmful" is also worth 
reading. It is badly named because it is not *super* which is painful, 
and the author eventually was forced to admit that super is the best 
available solution to the complications of multiple inheritance.

http://fuhm.net/super-harmful/

Somewhere on Youtube you should be able to find a video of a talk given 
by Raymond where he discusses ways to solve multiple inheritance 
problems. Sorry I don't remember what it is called.

>  Even though I expect the call order as routed by the MRO, 
>  I did not expected the parameters of A to be passed from the
>  sibling class B, but as defined by the base class C. 

I think I've made that same mistake too. Perhaps the documentation 
should make this aspect of multiple inheritance more clear.

I think that we have established that, whether you expected it or not, 
the behaviour you show is the way Python multiple inheritance has worked 
since version 2.3 and is working as designed.

If you want to debate that design, the bug tracker is not the right 
place for it, and you should take it to the Python-Dev mailing list. It 
might be more productive to ask the mailing list why that design choice 
was made, before asserting that it is wrong.

If you aren't fond of mailing lists, you could try the Python Discuss:

https://discuss.python.org/

but either way, I think that this issue should be closed.

--

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, this change has a big (security?) issue:

import subprocess
subprocess.Popen(["/usr/bin/id"], user=1000, group=1000).wait()

gives:

uid=1000(vstinner) gid=1000(vstinner) groupes=1000(vstinner),0(root) 
contexte=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

But:

import subprocess
subprocess.Popen(["/usr/bin/id"], user=1000, group=1000, close_fds=False).wait()

gives:

uid=0(root) gid=0(root) groupes=0(root) 
contexte=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

=> user and group arguments are ignored when using close_fds=False: when 
subprocess uses posix_spawn().


Note: test_subprocess test_group() is skipped on my Fedora 30.


I wrote PR 16384 to fix the bug and enable test_group() on my Fedora (check 
also for "nobody" and "nfsnobody" groups).

--

___
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


Change by STINNER Victor :


--
resolution: fixed -> 
status: closed -> open
title: support dropping privileges when running subprocesses -> subprocess: add 
user, group and extra_groups parameters

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Thanks for the report. There is a policy to report security vulnerabilities 
> in CPython : https://www.python.org/news/security/.

The private security mailing list has been contacted first and we advice to 
open a public issue since we consider that it's not a major security issue.

To exploit this bug, the attacker has to control the XML-RPC server title.

--

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> I've proposed the patch on GitHub which escaping the server_title when the 
> documenter.page is called. (It different point with msg353132.

The attached poc.py seems to show that server name and server documentation are 
not escaped neither.

server.set_server_name('test

[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-09-25 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 468f8a6ee0d83e36795bbab6f20037b0e380f493 by Petr Viktorin in 
branch 'master':
bpo-38140: Document offsets in PyMemberDef (GH-16354)
https://github.com/python/cpython/commit/468f8a6ee0d83e36795bbab6f20037b0e380f493


--

___
Python tracker 

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



[issue38265] Update os.pread to accept the length type as size_t

2019-09-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Because this looks rather as a new feature than a bug fix. We don't add new 
features in maintained versions.

Always there is a risk of introducing a regression. We don't know what bugs are 
contained in 64-bit size support on different platforms. I would not be 
surprised if for example some old macOS versions accept size_t, but work 
correctly only with the 32-bit size.

--

___
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


New submission from Christian Heimes :

test_ssl uses two encrypted private key files to verify the password hook. The 
private key files are currently encrypted with 3DES (DES-EDE3-CBC). The 
algorithm is very old and blocked by some crypto policies. Let's use AES256 
instead. AES is mandatory in all supported OpenSSL versions.

--
components: Tests
messages: 353173
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: test_ssl: replace 3DES with AES encrypted private keys
type: resource usage
versions: 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



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

2019-09-25 Thread Christian Heimes


Change by Christian Heimes :


--
assignee:  -> christian.heimes

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


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

___
Python tracker 

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



[issue38265] Update os.pread to accept the length type as size_t

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Because this looks rather as a new feature than a bug fix. We don't add new 
> features in maintained versions.

Oh ok. That's fair. I close the issue.

The workaround is to use os.preadv() or other functions which accept size_t.

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

___
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

2019-09-25 Thread STINNER Victor


New submission from STINNER Victor :

I bet on a regression caused by bpo-22273, 
commit/16c0f6df62a39f9f7712b1c0577de4eefcb4c1bf.

ARMv7 Debian buster 3.7:
https://buildbot.python.org/all/#/builders/177/builds/396

==
FAIL: test_array_in_struct (ctypes.test.test_structures.StructureTestCase)
--
Traceback (most recent call last):
  File 
"/ssd/buildbot/buildarea/3.7.gps-ubuntu-exynos5-armv7l/build/Lib/ctypes/test/test_structures.py",
 line 478, in test_array_in_struct
self.assertEqual(result, expected)
AssertionError: 3.923919392286974e+252 != 5.85987

--
components: Tests
messages: 353175
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_ctypes: test_array_in_struct() failed on ARMv7 Debian buster 3.7
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



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

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

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

"FAIL: test_array_in_struct (ctypes.test.test_structures.StructureTestCase)" on 
ARMv7.

--
nosy: +vstinner

___
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


New submission from hai shi :

Got an compile error, my OS is gcc version 4.8.5 20150623 (Red Hat 4.8.5-36:
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-g -Og -Wall'   
_TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py  build
python: Objects/typeobject.c:2867: PyType_FromSpecWithBases: Assertion 
`memb->type == 19' failed.
/bin/sh: line 9: 32047 Aborted CC='gcc -pthread' LDSHARED='gcc 
-pthread -shared' OPT='-g -Og -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' 
./python -E ./setup.py $quiet build
make: *** [sharedmods] Error 134

the relevant bpo is https://bugs.python.org/issue38140, i have no enough time 
see the detail, so just report it for now.

--
components: Interpreter Core
messages: 353178
nosy: shihai1991
priority: normal
severity: normal
status: open
title: Got an compile failed info about typeobject.c
type: compile error
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



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

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_ctypes: test_array_in_struct() failed on ARMv7 Debian buster 3.7 -> 
test_ctypes: test_array_in_struct() failed on ARMv7 Debian buster 3.7 and 
PPC64LE Fedora 3.7

___
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

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Similar error on PPC64LE Fedora 3.7:
https://buildbot.python.org/all/#/builders/120/builds/1315

==
FAIL: test_array_in_struct (ctypes.test.test_structures.StructureTestCase)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/ctypes/test/test_structures.py",
 line 478, in test_array_in_struct
self.assertEqual(result, expected)
AssertionError: 2.71828 != 5.85987

--

___
Python tracker 

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



[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-09-25 Thread hai shi


hai shi  added the comment:

Got an compile error, i have not check the detail for now:

python: Objects/typeobject.c:2867: PyType_FromSpecWithBases: Assertion 
`memb->type == 19' failed.

i report it in bpo 38273

--
nosy: +shihai1991

___
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 Petr Viktorin


Petr Viktorin  added the comment:

How are you building Python? Could you share your configure/make commands?

--
nosy: +petr.viktorin

___
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 STINNER Victor


STINNER Victor  added the comment:

Hi, can you please try to rebuild from scratch? For example, if you cloned the 
Git repository, revert all changes and remove all untracked files using:

  git checkout master .
  git clean -fdx

Otherwise, try:

  make distclean

Then try a new build.

--
nosy: +vstinner

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-25 Thread Carol Willing


Carol Willing  added the comment:


New changeset 16cec136b75daf438080a5b6685d2679dfa406af by Carol Willing (Miss 
Islington (bot)) in branch '3.8':
bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) 
(GH-16383)
https://github.com/python/cpython/commit/16cec136b75daf438080a5b6685d2679dfa406af


--

___
Python tracker 

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



[issue38265] Update os.pread to accept the length type as size_t

2019-09-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Or call pread() multiple times and concatenate results.

--

___
Python tracker 

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



[issue38274] sementic errors?

2019-09-25 Thread Derbe Ejere


New submission from Derbe Ejere :

a = "hello"
b = "4.3" 

1.Both variables a  and b are type of object String (can be checked with type()
2.Change both to float using float(). 
variable a cannot be changed to float since it is str object. However,
variable b can be changed to float giving 4.3 eventhough it is also a str 
object. 

CONTRADICTION?!

Thanks,

Derbe Ejere

--
messages: 353184
nosy: dejere
priority: normal
severity: normal
status: open
title: sementic errors?

___
Python tracker 

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



[issue38274] sementic errors?

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Sorry but the Python bug tracker is not the right place to ask questions on the 
Python language. See https://www.python.org/community/lists/ instead, like 
https://mail.python.org/mailman/listinfo/tutor

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



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

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1dc1acbd73f05f14c974b7ce1041787d7abef31e by Victor Stinner 
(PatrikKopkan) in branch 'master':
bpo-37064: Add option -a to pathfix.py tool (GH-15717)
https://github.com/python/cpython/commit/1dc1acbd73f05f14c974b7ce1041787d7abef31e


--

___
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 Géry

Géry  added the comment:

Alright, I am fine with @rhettinger's alternative PR too. I am closing this.

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



[issue36576] Some test_ssl and test_asyncio tests fail with OpenSSL 1.1.1 on Python 3.4 and 3.5

2019-09-25 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.4 reached end of life. Python 3.5 is fixed. I close the issue.

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

___
Python tracker 

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



[issue38275] test_ssl: skip tests for disabled TLS/SSL versions

2019-09-25 Thread Christian Heimes


New submission from Christian Heimes :

test_ssl has some checks for TLS/SSL versions that are not available or 
disabled during compile-time of Python and OpenSSL. It's missing run-time 
checks and checks for TLS 1.0 and 1.1. Several test scenarios assume that TLS 
1.0 and 1.1 are always available and properly working. These tests fail when 
e.g. TLS 1.0 is disabled.

Further more compile-time checks for ssl.HAS_TLSv1 or ssl.PROTOCOL_TLSv1 are 
not sufficient. OpenSSL 1.1.0+ got more flexible. TLS/SSL versions can be 
disabled at runtime with a crypto policy. Recent Debian, Fedora, and RHEL 8 
systems have TLS 1.0 and 1.1 disabled by default.

--
assignee: christian.heimes
components: Tests
messages: 353189
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: test_ssl: skip tests for disabled TLS/SSL versions
type: resource usage
versions: 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



[issue38275] test_ssl: skip tests for disabled TLS/SSL versions

2019-09-25 Thread Christian Heimes


Change by Christian Heimes :


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

___
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


Change by STINNER Victor :


--
pull_requests: +15969
pull_request: https://github.com/python/cpython/pull/16387

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

I wrote PR 16387 to backport pathfix changes from Python 3.8. The changes add 
tests which make me confident that it's safe to backport the changes. 
Currently, pathfix has no test at all in Python 3.8.

--

___
Python tracker 

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



[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-09-25 Thread Petr Viktorin


Petr Viktorin  added the comment:

This line in _tesctcapimodule.c:
{"__dictoffset__", T_PYSSIZET, -sizeof(void*), READONLY},

gives a legitimate-sounding warning on a Windows buildbot:

 
d:\buildarea\3.x.ware-win81-release.nondebug\build\modules\_testcapimodule.c(6409):
 warning C4146: unary minus operator applied to unsigned type, result still 
unsigned 
[D:\buildarea\3.x.ware-win81-release.nondebug\build\PCbuild\_testcapi.vcxproj]

--

___
Python tracker 

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



[issue38276] test_asyncio: test_cancel_make_subprocess_transport_exec() failed on RHEL7 LTO + PGO 3.x

2019-09-25 Thread STINNER Victor


New submission from STINNER Victor :

test_asyncio failed once, but then passed when re-run in verbose mode.

RHEL7 LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/258/builds/31

running: test_asyncio (9 min 21 sec)
running: test_asyncio (9 min 51 sec)
running: test_asyncio (10 min 21 sec)
running: test_asyncio (10 min 51 sec)
running: test_asyncio (11 min 21 sec)
running: test_asyncio (11 min 51 sec)
running: test_asyncio (12 min 21 sec)
running: test_asyncio (12 min 51 sec)
running: test_asyncio (13 min 21 sec)
running: test_asyncio (13 min 51 sec)
running: test_asyncio (14 min 21 sec)
running: test_asyncio (14 min 51 sec)
0:15:57 load avg: 0.01 [419/419/1] test_asyncio crashed (Exit code 1)
Timeout (0:15:00)!
Thread 0x7f76b16ad740 (most recent call first):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/selectors.py",
 line 468 in select
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/asyncio/base_events.py",
 line 1837 in _run_once
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/asyncio/base_events.py",
 line 589 in run_forever
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/asyncio/base_events.py",
 line 621 in run_until_complete
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/test_asyncio/test_subprocess.py",
 line 440 in test_cancel_make_subprocess_transport_exec
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/case.py",
 line 616 in _callTestMethod
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/case.py",
 line 659 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/case.py",
 line 719 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/unittest/runner.py",
 line 176 in run
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/support/__init__.py",
 line 1996 in _run_suite
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/support/__init__.py",
 line 2092 in run_unittest
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest.py",
 line 209 in _test_module
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest.py",
 line 234 in _runtest_inner2
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest.py",
 line 270 in _runtest_inner
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest.py",
 line 140 in _runtest
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest.py",
 line 193 in runtest
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/runtest_mp.py",
 line 67 in run_tests_worker
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/main.py",
 line 651 in _main
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/main.py",
 line 631 in main
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/libregrtest/main.py",
 line 704 in main
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/regrtest.py",
 line 43 in _main
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/test/regrtest.py",
 line 47 in 
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/runpy.py",
 line 85 in _run_code
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto-pgo/build/Lib/runpy.py",
 line 192 in _run_module_as_m

[issue38276] test_asyncio: test_cancel_make_subprocess_transport_exec() failed on RHEL7 LTO + PGO 3.x

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Tests
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



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

2019-09-25 Thread Vinay Sajip


Change by Vinay Sajip :


--
pull_requests: +15970
pull_request: https://github.com/python/cpython/pull/16388

___
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 c71c54c62600fd721baed3c96709e3d6e9c33817 by Victor Stinner in 
branch '3.8':
bpo-37064: Add -k and -a options to pathfix.py tool (GH-16387)
https://github.com/python/cpython/commit/c71c54c62600fd721baed3c96709e3d6e9c33817


--

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

Thanks Patrik Kopkan for your contributions! It's now part of 3.8 and master 
branches. Your work will be part of the incoming Python 3.8.0 final release.

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



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

2019-09-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15971
pull_request: https://github.com/python/cpython/pull/16389

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


New changeset faca8553425c231d867dcabf6a69a9dd21118b6c by T. Wouters (Victor 
Stinner) in branch 'master':
bpo-36046: posix_spawn() doesn't support uid/gid (GH-16384)
https://github.com/python/cpython/commit/faca8553425c231d867dcabf6a69a9dd21118b6c


--

___
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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

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

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



[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



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



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



[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



[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



[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



[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



[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



[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


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



[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



[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



[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



  1   2   >