[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

> _Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable, 
> but also private.

Understood; thanks. I agree that there shouldn't be a guarantee for private 
undocumented calls.

--

___
Python tracker 

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



[issue39606] Regression: it should be possible to close async iterators multiple times

2020-02-12 Thread Nathaniel Smith


Change by Nathaniel Smith :


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

___
Python tracker 

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



[issue39386] Prevent double awaiting of async iterator

2020-02-12 Thread Nathaniel Smith


Change by Nathaniel Smith :


--
pull_requests: +17844
pull_request: https://github.com/python/cpython/pull/18475

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue37373] Configuration of windows event loop for libraries

2020-02-12 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17846
pull_request: https://github.com/python/cpython/pull/18476

___
Python tracker 

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



[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2020-02-12 Thread Steve Dower


Steve Dower  added the comment:

> I run into this issue when embedding CPython in a Windows app, and want to 
> use some pre-installed Python, which is not part of the install package...

You'll run into many more issues if you keep doing this...

The way to use a pre-installed Python on Windows is to follow PEP 514 to find 
and run "python.exe" (or force your users to learn how to configure PATH, which 
is pretty hostile IMHO, but plenty of apps do it anyway).

If you really need to embed, then add the embeddable package (available from 
our downloads page) into your distribution and refer to that. Then you can also 
bundle whatever libraries you need and set up sys.path using the ._pth file.

--

___
Python tracker 

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



[issue37413] Deprecate sys._enablelegacywindowsfsencoding()

2020-02-12 Thread Steve Dower


Steve Dower  added the comment:

I think we can deprecate it but leave it there - the original idea (courtesy of 
Guido) was to enable apps to transition to the change on their timeline, but it 
certainly should not be considered a core CPython feature for the rest of time.

I don't have a problem with Mercurial using it, though. The risk was that 
libraries would use it, which is somewhat helped by the fact that it doesn't 
work reliably if you don't call it early enough :)

On the console encoding, I haven't heard of any issues either. Deprecating that 
environment variable is also fine, in my opinion.

Neither of these flags need to be their own special initialisation option. 
Embedders have always had other (better) ways to change these settings - 
unfortunately, PEP 587 didn't spend long enough gathering requirements before 
being implemented to avoid committing these design flaws...

--

___
Python tracker 

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



[issue36792] [Windows] time: crash on formatting time with de_DE locale

2020-02-12 Thread Steve Dower


Steve Dower  added the comment:

> Will Python support a release for as long as it's supported by the enterprise 
> version? For example, support for 1709 enterprise ends on 2020-04-14, so if 
> we followed that, then Python 3.9 would require Windows 10 1803 or higher. 
> That seems wrong while we're still supporting Windows 8.1, but what will the 
> stance be when Python supports only Windows versions that use the modern 
> lifecycle?

This needs a separate discussion on python-dev, but for issues like this I 
think it's fine to blame the underlying platform and recommend getting their 
updates. We don't have to work around every Windows bug for all time.

I'll read the rest of what's been happening on this issue when I'm less tired, 
but not quite up to it right now ;)

--

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f4f445b69306c68a2ba8ce8eb8c6cb3064db5fe7 by Serhiy Storchaka in 
branch 'master':
bpo-39567: Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob(). 
(GH-18372)
https://github.com/python/cpython/commit/f4f445b69306c68a2ba8ce8eb8c6cb3064db5fe7


--

___
Python tracker 

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



[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17848
pull_request: https://github.com/python/cpython/pull/18478

___
Python tracker 

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



[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-02-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 0cc6b5e559b8303b18fdd56c2befd900fe7b5e35 by Serhiy Storchaka in 
branch 'master':
bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)
https://github.com/python/cpython/commit/0cc6b5e559b8303b18fdd56c2befd900fe7b5e35


--

___
Python tracker 

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



[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17849
pull_request: https://github.com/python/cpython/pull/18479

___
Python tracker 

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



[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2020-02-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 8c579b1cc86053473eb052b76327279476740c9b by Serhiy Storchaka in 
branch 'master':
bpo-32856: Optimize the assignment idiom in comprehensions. (GH-16814)
https://github.com/python/cpython/commit/8c579b1cc86053473eb052b76327279476740c9b


--

___
Python tracker 

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



[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2020-02-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset efd878cdb46d9c7038d93fb36eb1ff7dc5baf9ec by Miss Islington (bot) 
in branch '3.8':
bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)
https://github.com/python/cpython/commit/efd878cdb46d9c7038d93fb36eb1ff7dc5baf9ec


--
nosy: +miss-islington

___
Python tracker 

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



[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-02-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2020-02-12 Thread Łukasz Langa

Łukasz Langa  added the comment:

Unfortunately, we released 3.8.0, 3.8.1, and 3.8.2rc1 without this change. It 
seems too late in the release cycle to introduce this change. I'd feel better 
seeing it in 3.9 only. Sorry that we didn't act in time to include this in 
3.8.0.

--

___
Python tracker 

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



[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-02-12 Thread Amir Mohamadi


Change by Amir Mohamadi :


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

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

I've written an "Absolute paths" section based on the knowledge I found in the 
various threads.

Any review is appreciated.

https://github.com/florisla/cpython/tree/pathlib-chapter-absolute-paths

With some related documentation changes:

https://github.com/florisla/cpython/tree/absolute-path-related-improvements

--
nosy: +florisla

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Paul Moore


Paul Moore  added the comment:

You've provided links to your branches, but not to the specific text you're 
proposing to add. Can you link to a diff or something that shows what you've 
added more precisely?

--

___
Python tracker 

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



[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Do these new audit events have to be documented?

--
nosy: +xtreak

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


New submission from Peter Eisentraut :

Some inline functions use mixed declarations and code.  These end up visible in 
third-party code that includes Python.h, which might not be using a C99 
compiler.

Example:

In file included from 
/Users/peter/python-builds/3.9/include/python3.9/abstract.h:843,
 from 
/Users/peter/python-builds/3.9/include/python3.9/Python.h:147,
 from plpython.h:59,
 from plpy_typeio.h:10,
 from plpy_cursorobject.h:8,
 from plpy_cursorobject.c:14:
/Users/peter/python-builds/3.9/include/python3.9/cpython/abstract.h:74:5: 
warning: ISO C90 forbids mixed declarations and code 
[-Wdeclaration-after-statement]
   74 | Py_ssize_t offset = tp->tp_vectorcall_offset;
  | ^~

--
components: Interpreter Core
messages: 361880
nosy: petere
priority: normal
severity: normal
status: open
title: cpython/abstract.h not compatible with C90
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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


Change by Peter Eisentraut :


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

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17855
pull_request: https://github.com/python/cpython/pull/18483

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd by Victor Stinner in 
branch 'master':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd


--
nosy: +vstinner

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17856
pull_request: https://github.com/python/cpython/pull/18483

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17854
pull_request: https://github.com/python/cpython/pull/18482

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd by Victor Stinner in 
branch 'master':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd


--

___
Python tracker 

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



[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-12 Thread Steve Dower


Steve Dower  added the comment:

Yes, they should be.

They can also be backported to 3.8 - it was deliberate in the original PEP that 
adding new events is not a breaking change or a new feature.

--

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

PEP 7 says that this is allowed:

Python versions greater than or equal to 3.6 use C89 with several select C99 
features:
...
- intermingled declarations

So I don't think these changes should be accepted.

--
nosy: +eric.smith

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

This is the new chapter:

https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

--

___
Python tracker 

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



[issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size

2020-02-12 Thread Maximilian Peters


Maximilian Peters  added the comment:

Ran into the same issue using Python 3.6.8 [GCC 5.4.0 20160609] on Linux.

The same code worked on Windows 10 with Python 3.7 32-bit and 64-bit.

--
nosy: +Maximilian Peters

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset ca133e53fafdec1aa77613fcb7558deed959383f by Miss Islington (bot) 
in branch '3.7':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/ca133e53fafdec1aa77613fcb7558deed959383f


--
nosy: +miss-islington

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset ca133e53fafdec1aa77613fcb7558deed959383f by Miss Islington (bot) 
in branch '3.7':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/ca133e53fafdec1aa77613fcb7558deed959383f


--
nosy: +miss-islington

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458 by Miss Islington (bot) 
in branch '3.8':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458


--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458 by Miss Islington (bot) 
in branch '3.8':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
https://github.com/python/cpython/commit/ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458


--

___
Python tracker 

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



[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Ben Boeckel for the bugfix. Sorry for the delay (6 years)! But it's now 
fixed in 3.7, 3.8 and master branches.

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2020-02-12 Thread Ville Skyttä

New submission from Ville Skyttä :

Doc says "Whether to match the peer cert’s hostname with match_hostname() in 
SSLSocket.do_handshake()." but match_hostname() is no longer used to do that in 
the first place, OpenSSL is used for that. check_hostname affects the OpenSSL 
usage, too.

--
assignee: docs@python
components: Documentation
messages: 361892
nosy: docs@python, scop
priority: normal
severity: normal
status: open
title: SSLContext.check_hostname description is inaccurate wrt match_hostname
type: enhancement

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2020-02-12 Thread Ville Skyttä

Change by Ville Skyttä :


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

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor

STINNER Victor  added the comment:

Summary:

* This issue is mostly about pushing a 16-years old patch from Fedora and SuSE 
to Python upstream. Other Linux distributions use different solutions to 
support multiple architectures in the same filesystem. For example, Debian and 
Ubuntu uses "Multiarch" which continues to use /usr/lib/ for 32-bit and 64-bit 
x86 architecture (x86 and x86-64).

* I pushed the non controversial part of PR 3698: fix pydoc and trace modules 
to use sysconfig to get the stdlib path

* CI tests pass on PR 18381.

* Matthias Klose asked to not add another sys attribute, but Jan Matějek 
explained that the option value is needed to import the sysconfig module. 
Moreover, the option value is needed in the site module and we are trying to 
avoid "import sysconfig" in site since it would slowdown Python startup time.

* I chose "./configure --with-python-libdir" and "sys.python_libdir" names. PR 
3698 uses "./configure --with-custom-platsubdir" and 
sysconfig.get_config_var('platsubdir') names. Other proposed names: sys.lib, 
os.lib_dir. It was proposed to drop "custom" from "./configure 
--with-custom-platsubdir" option name.

Python use many paths. The sysconfig module is a good starting point to 
discover them all in the _INSTALL_SCHEMES directories. PR 18381 changes the 
following paths:

* posix_prefix: stdlib, platstdlib, platlib
* posix_user: stdlib, platstdlib, platlib


Examples on Fedora:

* pure Python: /usr/lib64/python3.7/os.py
* C extension: 
/usr/lib64/python3.7/lib-dynload/_multiprocessing.cpython-37m-x86_64-linux-gnu.so

Examples on SuSE:

* pure Python: /usr/lib64/python3.7/os.py

Ubuntu 16.04:

* pure Python: /usr/lib/python3.5/os.py
* C extension: 
/usr/lib/python3.5/lib-dynload/_multiprocessing.cpython-35m-x86_64-linux-gnu.so

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

Default with prefix=/usr:

* posix_prefix:

  * stdlib: '/usr/lib/python3.9'
  * platstdlib: '/usr/lib/python3.9'
  * platlib: '/usr/lib/python3.9/site-packages'
 
* posix_user:

  * stdlib: '~/.local/lib/python3.9'
  * platstdlib: '~/.local/lib/python3.9'
  * platlib: '~/.local/lib/python3.9/site-packages'

Customized with prefix=/usr and python_libdir=lib64, PR 18381:

* posix_prefix:

  * stdlib: '/usr/lib64/python3.9'
  * platstdlib: '/usr/lib64/python3.9'
  * platlib: '/usr/lib64/python3.9/site-packages'

* posix_user:

  * stdlib: '~/.local/lib64/python3.9'
  * platstdlib: '~/.local/lib64/python3.9'
  * platlib: '~/.local/lib64/python3.9/site-packages'

--

___
Python tracker 

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



[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-02-12 Thread Amir Mohamadi


Change by Amir Mohamadi :


--
pull_requests: +17858
pull_request: https://github.com/python/cpython/pull/18485

___
Python tracker 

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



[issue25753] Reference leaks in test_smtplib

2020-02-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

+1 for me to close this issue.
On the master branch, this issue is not reproducible.
I am closing this issue, if someone wants to open this issue, please re-open 
this :)

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-12 Thread hai shi


Change by hai shi :


--
pull_requests: +17859
pull_request: https://github.com/python/cpython/pull/18486

___
Python tracker 

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



[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-02-12 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Welcome to work on the patch, Amir.

* We shouldn't be encoding anything.
* Create reject for Unicode control characters and reject the request if the 
request contains any control character. Write tests for this.

It will similar to one of the examples Victor has shared.

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread Matej Cepl


Matej Cepl  added the comment:

> posix_user:
> 
> * stdlib: '~/.local/lib64/python3.9'
> * platstdlib: '~/.local/lib64/python3.9'
> * platlib: '~/.local/lib64/python3.9/site-packages'

I am still not sure about the this one. I know that I have mentioned a 
possibility of multiplatform $HOME on NFS, but it seems too far fetched idea to 
break the current not-completely-standard.

--

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Are you going to work on a patch then, Batuhan?

Serhiy already submitted a PR, which looks great.

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread Miro Hrončok

Miro Hrončok  added the comment:

Also note that the extension modules have archful suffix, so they will not 
collide in $HOME, unless they are installed as name.so.

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

> posix_user:
> 
> * stdlib: '~/.local/lib64/python3.9'
> * platstdlib: '~/.local/lib64/python3.9'
> * platlib: '~/.local/lib64/python3.9/site-packages'

Honestly, I have no idea how posix_user is used.

~/.local/lib64/ directory doesn't exist on my work machine, whereas I'm 
installed various Python modules and applications.

In practice, ~/.local/lib/ is used on Fedora, even if posix_user scheme uses 
~/.local/lib64/. Examples:

* pure Python: ~/.local/lib/python3.7/site-packages/pip/__main__.py
* C extension: 
~/.local/lib/python3.7/site-packages/typed_ast/_ast3.cpython-37m-x86_64-linux-gnu.so

So changing posix_user should have no impact on end users.


I also tested a legacy "python3 setup.py install" to install a C extension, it 
also lands into ~/.local/lib:

~/.local/lib/python3.7/site-packages/test_cext-0.0.0-py3.7-linux-x86_64.egg/test_cext.cpython-37m-x86_64-linux-gnu.so

The setup.py uses setuptools.


Miro:
> Also note that the extension modules have archful suffix, so they will not 
> collide in $HOME, unless they are installed as name.so.

Yeah, it seems like pip install adopted Debian multiarch naming: 
"x86_64-linux-gnu" triplet in "_ast3.cpython-37m-x86_64-linux-gnu.so" filename.

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread Miro Hrončok

Miro Hrončok  added the comment:

> > Also note that the extension modules have archful suffix, so they will not 
> > collide in $HOME, unless they are installed as name.so.
> 
> Yeah, it seems like pip install adopted Debian multiarch naming: 
> "x86_64-linux-gnu" triplet in "_ast3.cpython-37m-x86_64-linux-gnu.so" 
> filename.

For reference: issue22980

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

SuSE currently uses this patch for lib64 in the Python 3 package:
https://build.opensuse.org/package/view_file/devel:languages:python:Factory/python3/F00102-lib64.patch?expand=1

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

Ooops, SuSE has 2 patches.

SuSE currently uses these patches for lib64 in the Python 3 package:

(1) 
https://build.opensuse.org/package/view_file/devel:languages:python:Factory/python3/F00102-lib64.patch?expand=1

(2) 
https://build.opensuse.org/package/view_file/devel:languages:python:Factory/python3/SUSE-FEDORA-multilib.patch?expand=1

--

___
Python tracker 

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



[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

FYI, I am working on to add Py_IS_TYPE macro. :)

--
nosy: +corona10

___
Python tracker 

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



[issue24916] In sysconfig, don't rely on sys.version format

2020-02-12 Thread Daniel Bengtsson


Change by Daniel Bengtsson :


--
pull_requests: +17860
pull_request: https://github.com/python/cpython/pull/18487

___
Python tracker 

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



[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-12 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17861
pull_request: https://github.com/python/cpython/pull/18488

___
Python tracker 

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



[issue39617] max_workers argument to concurrent.futures.ProcessPoolExecutor is not flexible enough

2020-02-12 Thread sds


New submission from sds :

The number of workers (max_workers) I want to use often depends on the server 
load.
Imagine this scenario: I have 64 CPUs and I need to run 200 processes.
However, others are using the server too, so currently loadavg is 50, thus I 
will set `max_workers` to (say) 20. 
But 2 hours later when those 20 processes are done, loadavg is now 0 (because 
the 50 processes run by my colleagues are done too), so I want to increase the 
pool size max_workers to 70.
It would be nice if it were possible to adjust the pool size depending on the 
server loadavg when a worker is started.
Basically, the intent is maintaining a stable load average and full resource 
utilization.

--
components: Library (Lib)
messages: 361905
nosy: sam-s
priority: normal
severity: normal
status: open
title: max_workers argument to concurrent.futures.ProcessPoolExecutor is not 
flexible enough
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue39617] max_workers argument to concurrent.futures.ProcessPoolExecutor is not flexible enough

2020-02-12 Thread sds


sds  added the comment:

cf https://github.com/joblib/joblib/issues/1006

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

lib64_tests.py: test suite hardcoded for Fedora, SuSE and PR 18381 with 
--with-python-libdir=lib64. I wrote it to help me to understand differences 
between Fedora, SuSE and PR 18381.

On Fedora, the test fails because we have an additional patch on distutils to 
install packages in /usr/local instead of /usr when using pip:

==
FAIL: test_distutils_install (__main__.Lib64Tests)
--
Traceback (most recent call last):
  File "lib64_tests.py", line 81, in test_distutils_install
self.assertEqual(cmd.install_platlib, PLATLIB)
AssertionError: '/usr/local/lib64/python3.7/site-packages' != 
'/usr/lib64/python3.7/site-packages'
- /usr/local/lib64/python3.7/site-packages
? --
+ /usr/lib64/python3.7/site-packages

--
Added file: https://bugs.python.org/file48892/lib64_tests.py

___
Python tracker 

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



[issue39618] logger.exception with default message

2020-02-12 Thread Denis Vieira


New submission from Denis Vieira :

On my Python projects i like to use the logger.exception() method without any 
other message. 

I'm forced to send an empty string on every call.
logger.exception('')

It would be nice the exception method have the expected parameter "msg" with an 
default value ('').

--
messages: 361908
nosy: Denis Vieira
priority: normal
severity: normal
status: open
title: logger.exception with default message
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

Links on Debian Multiarch:

* https://wiki.debian.org/Multiarch/HOWTO
* https://lwn.net/Articles/711199/

--

___
Python tracker 

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



[issue1294959] Problems with /usr/lib64 builds.

2020-02-12 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue39618] logger.exception with default message

2020-02-12 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue24916] In sysconfig, don't rely on sys.version format

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

The "py_version" variable of sysconfig is discussed since 2015 but... it's 
unused. It is supposed to build paths. Does it really make sense to build a 
path which contains "+"? It can confuse some application which may associate a 
special meaning to "+".

What about simply removing this variable? Does anyone know if it's used in the 
wild?

To me it sounds surprising to have a different path for alpha, beta and release 
candidate releases. Usually, Python paths only contain MAJOR.MINOR versions, no 
alpha, beta or rc marker. Nor "+" marker.

--

___
Python tracker 

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



[issue18819] tarfile fills devmajor and devminor fields even for non-devices

2020-02-12 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 674935b8caf33e47c78f1b8e197b1b77a04992d2 by William Chargin in 
branch 'master':
bpo-18819: tarfile: only set device fields for device files (GH-18080)
https://github.com/python/cpython/commit/674935b8caf33e47c78f1b8e197b1b77a04992d2


--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17862
pull_request: https://github.com/python/cpython/pull/18489

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17863
pull_request: https://github.com/python/cpython/pull/18490

___
Python tracker 

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



[issue37685] Fix equality checks for some types

2020-02-12 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Łukasz. I considered this as a bug fix, but was not sure that we 
should fix these bugs. They were here from the beginning.

Josh, as for using total_ordering, I think it is a different issue. I did not 
want to change the behavior except fixing bugs (and raising an error or not 
supporting comparison with objects which support comparison when used at LHS 
looks like a bug). Feel free to open separate issues for using total_ordering 
or changing its semantic.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.7, Python 3.8

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6e619c48b8e804ece9521453fc8da0640a04d5b1 by Serhiy Storchaka in 
branch 'master':
bpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)
https://github.com/python/cpython/commit/6e619c48b8e804ece9521453fc8da0640a04d5b1


--

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17864
pull_request: https://github.com/python/cpython/pull/18491

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17865
pull_request: https://github.com/python/cpython/pull/18492

___
Python tracker 

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



[issue39613] IsolatedAsyncioTestCase closes default event loop

2020-02-12 Thread Zsolt Dollenstein


Change by Zsolt Dollenstein :


--
nosy: +zsol

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


Peter Eisentraut  added the comment:

That's fair for code internal to CPython itself, but these are header files 
included by third-party code that is embedding Python, so a bit more 
flexibility and adaptability would be welcome there.

--

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread miss-islington


miss-islington  added the comment:


New changeset 2076d4f97ef514bb4dc4ca768fbaa3f538ce7f1f by Miss Islington (bot) 
in branch '3.8':
bpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)
https://github.com/python/cpython/commit/2076d4f97ef514bb4dc4ca768fbaa3f538ce7f1f


--
nosy: +miss-islington

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'd suggest mentioning this on python-dev, if you want to change the policy.

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 45876a90e2663f12b90c2090ec3e48bd97841aae by Victor Stinner in 
branch 'master':
bpo-35081: Move bytes_methods.h to the internal C API (GH-18492)
https://github.com/python/cpython/commit/45876a90e2663f12b90c2090ec3e48bd97841aae


--

___
Python tracker 

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



[issue39298] add BLAKE3 to hashlib

2020-02-12 Thread Jack O'Connor


Jack O'Connor  added the comment:

Version 0.2.0 of the BLAKE3 repo includes optimized assembly implementations. 
These are behind the "c" Cargo feature for the `blake3` Rust crate, but 
included by default for the internal bindings crate. So the easiest way to 
rerun our favorite benchmark is:

git clone https://github.com/BLAKE3-team/BLAKE3
cd BLAKE3
git fetch
# I rebased this branch on top of version 0.2.0 today.
git checkout origin/bench_406668786
cd c/blake3_c_rust_bindings
# Nightly is currently broken for unrelated reasons, so
# we use stable with this internal bootstrapping flag.
RUSTC_BOOTSTRAP=1 cargo bench 406668786

Running the above on my machine, I get 2888 MB/s, up another 12% from the 0.1.3 
numbers. As a bonus, we don't need to worry about the difference between GCC 
and Clang.

These new assembly files are essentially drop-in replacements for the 
instruction-set-specific C files we had before, which are also still supported. 
The updated C README has more details: 
https://github.com/BLAKE3-team/BLAKE3/blob/master/c/README.md

--

___
Python tracker 

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



[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks!

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



[issue35081] Move internal headers to Include/internal/

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e9e7d284c434768333fdfb53a3663eae74cb995a by Victor Stinner in 
branch 'master':
bpo-35081: Move dtoa.h header to the internal C API (GH-18489)
https://github.com/python/cpython/commit/e9e7d284c434768333fdfb53a3663eae74cb995a


--

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17866
pull_request: https://github.com/python/cpython/pull/18493

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-02-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17867
pull_request: https://github.com/python/cpython/pull/18494

___
Python tracker 

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



[issue39619] os.chroot is not enabled on HP-UX builds

2020-02-12 Thread Ian Norton


New submission from Ian Norton :

When building on HP-UX using:

The configure stage fails to detect chroot().  This is due to setting  
_XOPEN_SOURCE to a value higher than 500.

The fix for this is to not set _XOPEN_SOURCE when configuring for HP-UX

--
components: Interpreter Core
messages: 361921
nosy: Ian Norton
priority: normal
severity: normal
status: open
title: os.chroot is not enabled on HP-UX builds
type: enhancement
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



[issue39619] os.chroot is not enabled on HP-UX builds

2020-02-12 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 98921aeaf5879b51e2dd1870c9285cfa8d1a52c7 by Victor Stinner in 
branch 'master':
bpo-35134: Add Include/cpython/bytesobject.h file (GH-18494)
https://github.com/python/cpython/commit/98921aeaf5879b51e2dd1870c9285cfa8d1a52c7


--

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8c3aee65ed3aff3668da330ccd6f9ba7b2aa4567 by Victor Stinner in 
branch 'master':
bpo-35134: Add Include/cpython/fileutils.h header file (GH-18493)
https://github.com/python/cpython/commit/8c3aee65ed3aff3668da330ccd6f9ba7b2aa4567


--

___
Python tracker 

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



[issue39584] multiprocessing.shared_memory: MacOS crashes by running attached Python code

2020-02-12 Thread Davin Potts


Davin Potts  added the comment:

My sense is that it would be nice if we can catch this before ftruncate does 
something nasty.

Where else is ftruncate used in CPython that this could similarly trigger a 
problem?  How is it handled there (or not)?

--

___
Python tracker 

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



[issue39298] add BLAKE3 to hashlib

2020-02-12 Thread Larry Hastings


Larry Hastings  added the comment:

Personally I'm enjoying these BLAKE3 status updates, and I wouldn't mind at all 
being kept up-to-date during BLAKE3's development via messages on this issue.  
But, given the tenor of the conversation so far, I'm guessing Python is gonna 
hold off until BLAKE3 reaches 1.0.

--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-02-12 Thread Éric Araujo

Éric Araujo  added the comment:

Allow me to ask a maybe very naive question:

Wouldn't it be possible to fix the problem at the source, that is, use 
`open(filename, "rU")` in the two spots you found rather than doing ad-hoc line 
ending translation?

(I get that the second one uses `rb` at the moment, so switching from bytes to 
str is not just a one-liner there)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-02-12 Thread Éric Araujo

Éric Araujo  added the comment:

Ah, I got it wrong, get_data itself uses `rb`, not default `r`.
It makes sense given that package data could be any kind of file, not 
necessarily text.  Too bad there isn’t a `get_text(encoding)` method in the 
loader API!

With Python 3’s rich IO system, isn’t there a quick and correct way to get a 
text file from a bytes stream?  TextIOWrapper?

--

___
Python tracker 

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



[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-12 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +17870
pull_request: https://github.com/python/cpython/pull/18496

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

C99 is not disallowed in headers.

--
nosy: +benjamin.peterson
resolution:  -> not a bug
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



[issue39620] PyObject_GetAttrString and tp_getattr do not agree

2020-02-12 Thread Andy Lester


New submission from Andy Lester :

PyObject_GetAttrString(PyObject *v, const char *name)

typedef PyObject *(*getattrfunc)(PyObject *, char *)

The outer PyObject_GetAttrString takes a const char *name, but then casts away 
the const when calling the underlying tp_getattr.  This means that an 
underlying function would be free to modify or free() the char* passed in to 
it, which might be, for example, a string literal, which would be a Bad Thing.

The setattr function pair has the same problem.

The API doc at https://docs.python.org/3/c-api/typeobj.html says that the 
tp_getattr and tp_setattr slots are deprecated.  If they're not going away 
soon, I would think this should be addressed.

Fixing this in the cPython code by making tp_getattr and tp_setattr take const 
char * pointers would be simple.  I don't have any idea how much outside code 
it would affect.

--
components: C API
messages: 361929
nosy: petdance
priority: normal
severity: normal
status: open
title: PyObject_GetAttrString and tp_getattr do not agree
type: enhancement

___
Python tracker 

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



[issue39620] PyObject_GetAttrString and tp_getattr do not agree

2020-02-12 Thread Ammar Askar


Ammar Askar  added the comment:

Note that there was an earlier attempt to make it const
https://github.com/python/cpython/commit/af68c874a6803b4e90b616077a602c0593719a1d

but this was reverted as part of 
https://github.com/python/cpython/commit/15e62742fad688b026ba80bf17d1345c4cbd423b

--
nosy: +ammar2, loewis

___
Python tracker 

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



[issue39620] PyObject_GetAttrString and tp_getattr do not agree

2020-02-12 Thread Andy Lester


Andy Lester  added the comment:

Do you know why it was reverted?  (Granted, it was 15 years ago...)

It looks like the original changeset is trying to address at least two 
different problems with non-const string literals.  My ticket here is focusing 
only on getattrfunc and setattrfunc.  The handling of all the kwlist is a 
separate issue, that I'm about to write up as a different ticket.

--

___
Python tracker 

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



[issue39621] md5_compress() in Modules/md5module.c can take a const buf

2020-02-12 Thread Andy Lester


New submission from Andy Lester :

The function md5_compress does not modify its buffer argument.

static void md5_compress(struct md5_state *md5, unsigned char *buf)

buf should be const.

--
components: Extension Modules
messages: 361932
nosy: petdance
priority: normal
severity: normal
status: open
title: md5_compress() in Modules/md5module.c can take a const buf
type: enhancement

___
Python tracker 

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



[issue39621] md5_compress() in Modules/md5module.c can take a const buf

2020-02-12 Thread Andy Lester


Change by Andy Lester :


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

___
Python tracker 

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



  1   2   >