[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Paul Bryan


Change by Paul Bryan :


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



[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 1e3c68246ee738b5ec5450b1eb39af2fca300cb9 by Paul Bryan in branch 
'master':
bpo-43345: Enhance TypedDict documentation. (#24668)
https://github.com/python/cpython/commit/1e3c68246ee738b5ec5450b1eb39af2fca300cb9


--

___
Python tracker 

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



[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Paul Bryan


Change by Paul Bryan :


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

___
Python tracker 

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



[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Paul Bryan


Change by Paul Bryan :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Paul Bryan


New submission from Paul Bryan :

>From Typing-sig list:

On Thu, Feb 11, 2021 at 10:54 PM Paul Bryan  wrote:
> I don't think __required_keys__ or __optional_keys__ are documented, at least 
> not in https://docs.python.org/3.10/library/typing.html. Is there any reason 
> we can't codify them in 3.10 docs?

On Fri, 2021-02-12 at 14:23 -0800, Guido van Rossum wrote:
> Nobody got to it yet? Maybe you'd be willing to submit a small PR for this?

--
assignee: docs@python
components: Documentation
messages: 387802
nosy: docs@python, pbryan
priority: normal
severity: normal
status: open
title: Add __required_keys__ and __optional_keys__ to TypedDict documentation
versions: Python 3.10

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Carol Willing


Carol Willing  added the comment:

Folks, The What's New PR is open now. I've tried to focus more on the data 
type/shape examples over literal example.

--

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Carol Willing


Change by Carol Willing :


--
pull_requests: +23452
pull_request: https://github.com/python/cpython/pull/24667

___
Python tracker 

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thank you Daniel for reporting and suggestion!

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread miss-islington


miss-islington  added the comment:


New changeset 132e31f4bf20818a469cbcdba75068f26cb19a65 by Miss Islington (bot) 
in branch '3.9':
bpo-43335: Update macro to check gcc version (GH-24662)
https://github.com/python/cpython/commit/132e31f4bf20818a469cbcdba75068f26cb19a65


--

___
Python tracker 

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions: +Python 3.10

___
Python tracker 

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +23451
pull_request: https://github.com/python/cpython/pull/24665

___
Python tracker 

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset bf9de7ab24d9d7068645b202bc47146b9a4f2726 by Dong-hee Na in branch 
'master':
bpo-43335: Update macro to check gcc version (GH-24662)
https://github.com/python/cpython/commit/bf9de7ab24d9d7068645b202bc47146b9a4f2726


--

___
Python tracker 

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



[issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong)

2021-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This is a bit out of date.  The isinstance() docs now specify that the 
predicate tests for direct, indirect, and virtual inheritance. Likewise, the 
super() docs already specify that only the __mro__ is searched.  So those docs 
are already precise.

Am thinking of adding a FAQ entry about when direct inheritance is required and 
include the OP's example.  FWIW, this isn't really about super().  It affects 
any attribute lookup or any other property of inheritance.  A true result from 
instance() doesn't imply that actual inheritance has occurred.

--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Daniel Moisset


Change by Daniel Moisset :


--
pull_requests: +23450
pull_request: https://github.com/python/cpython/pull/24664

___
Python tracker 

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



[issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values.

2021-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'll add a note to this effect in the tutorial.

Also, in the FAQ, we could have an entry about the three circumstances when 
"is" can relied upon:  1) variable assignment doesn't change identity, 2) 
containers that use references don't change identity, and 3) singletons don't 
change identity.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Normally, we don't (or can't) enumerate all possible exceptions.  But
in this case, it is worth expanding the documentation so that person can know 
which of two common input errors they need to catch:

"If the data being deserialized is not valid UTF-8 a UnicodeDecodeError will be 
raised, and if the decoded file is not 
a valid JSON document, a JSONDecodeError will be raised".

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-02-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

As a rule we don't try and document every exception that can be raised. I could 
go either way on documenting encoding errors with the json module, although it 
seems pretty clear that an encoding error would be possible in this case.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, eric.smith
versions:  -Python 3.6, Python 3.7

___
Python tracker 

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



[issue43344] RotatingFileHandler breaks file type associations

2021-02-27 Thread Kevin Hollingshead


New submission from Kevin Hollingshead :

The filenames generated by logging.RotatingFileHandler breaks the ability to 
associate a program (e.g. notepad++, sublime text, etc.) with the log files 
using Windows or OSX file associations because the extension is overridden by 
the added suffix. For example, if I specify the filename as "test.log" for a 
TimeBasedRotatingFileHandler with a suffix of "%Y%m%d", rolled over files are 
named test.log.MMDD. There is no way to associate a program with this type 
of file extension. A good non-breaking fix would be to add a parameter 
"extension" to RotatingFileHandler, and if specified would be applied to all 
filenames. Thus if I specify filename="test" and "extension="log" for my 
handler it would give "test.log" for the initial file and "test.MMDD.log" 
for rollover files.

--
components: Extension Modules
files: logger_bug.py
messages: 387793
nosy: kh14821
priority: normal
severity: normal
status: open
title: RotatingFileHandler breaks file type associations
type: behavior
Added file: https://bugs.python.org/file49840/logger_bug.py

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2021-02-27 Thread Tim Peters


Tim Peters  added the comment:

I'm very sorry for not keeping up with this - my health has been poor, and I 
just haven't been able to make enough time.

Last time I looked to a non-trivial depth, I was quite happy, and just 
quibbling about possible tradeoffs.

I can't honestly commit to doing better in the near future, so where does that 
leave us? I'd personally "risk it".

I just added Raymond to the nosy list, on the off chance he can make some 
"emergency time" to give a more informed yes/no. He's routinely sucked up weeks 
of my life with random review requests, so I figure turnabout is fair play ;-)

--
nosy: +rhettinger

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2021-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

If Tim approves we might get it into alpha 6 which goes out Monday.

--

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2021-02-27 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Any chance PR 22904 can make it into 3.10 before the May 03 feature freeze? The 
text document in that PR has some notes on how the algorithm works, so that may 
be a good place to start reviewing if anyone is interested.

--

___
Python tracker 

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



[issue43342] Error while using Python C API

2021-02-27 Thread Piyush Patel


Piyush Patel  added the comment:

So upon further investigation, it seems all the built-in functions are not 
working. 

def func():
max(10,20)

this code errors out saying "name 'max' is not defined"

so when python installation is in custom location or parent folder name is 
"python", the embedded python in C++ application behavior is bad and 
inconsistent.

--

___
Python tracker 

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



[issue43060] Convert _decimal C API from pointer array to struct

2021-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> In my opinion, an array of pointers is a bad API;

The existing code is how types were made for most of Python's history.  It is 
not "bad"; it is just more wordy.  Given that the current code is correct, I 
don't see any strong reason to churn the code.

--
nosy: +rhettinger

___
Python tracker 

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



[issue43341] functools.partial missing __weakref__ descriptor?

2021-02-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue31030] sys.executable can be not normalized

2021-02-27 Thread Eryk Sun


Eryk Sun  added the comment:

> If it was the tests, they seem to have been fixed elsewhere.

The cited tests haven't been changed to work with non-normalized 
sys.executable, sys.prefix, etc. But it's not common to run the test suite with 
a non-normalized path such as "Lib/../build/python".

> you stated above that on Windows a \\?\ path is possible but 
> will not work for startup, and that you would open an issue 

Sorry, I don't remember the details of the bug that I mentioned. But it became 
a non-issue in 3.6+, which canonicalizes the executable path. For example:

>>> exe = r'\\?\C:\Program Files\Python36\python.exe'
>>> cmd = 'python -c "import sys; print(sys.executable)"'
>>> subprocess.call(cmd, executable=exe)
C:\Program Files\Python36\python.exe
0

Compare the latter to the output of GetModuleFileNameW(NULL, ...) in this case, 
which returns a \\?\ extended (verbatim) path:

>>> exe = r'\\?\C:\Program Files\Python36\python.exe'
>>> cmd = 'python -c "import _winapi; print(_winapi.GetModuleFileName(0))"'
>>> subprocess.call(cmd, executable=exe)
\\?\C:\Program Files\Python36\python.exe
0

> Do any of the non-normalized Linux (or *nix) executable paths fail for 
> startup?

Not that I'm aware of. AFAIK, it's just about the particular tests failing in 
this case.

--

___
Python tracker 

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



[issue43343] argparse.REMAINDER missing in online documentation for 3.9.x

2021-02-27 Thread Chigozirim Chukwu


New submission from Chigozirim Chukwu :

Since 3.9.0, the online documentation for the argparse module is missing 
reference for argparse.REMAINDER.

If the feature has been deprecated, can we get atleast a mention in the 
deprecation notes as to what one should now prefer.

If it was just a mistake, then I guess I'm just here to bring some attention to 
it.

Thanks

--
components: Library (Lib)
messages: 387786
nosy: smac89
priority: normal
severity: normal
status: open
title: argparse.REMAINDER missing in online documentation for 3.9.x
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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2021-02-27 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

I agree -- as a user, it wasn't clear to me from looking at the documentation 
that mkdtemp was the right way to go to not delete directories. I had expected 
that NamedTemporaryDirectory would also support delete=False, just like 
NamedTemporaryFile.


Given that we say in the documentation that "mkstemp() and mkdtemp() are 
lower-level functions which require manual cleanup", it seems to make sense to 
allow Python users who don't care / know about mkstemp / mkdtemp to just use 
the more user-friendly NamedTemporaryDirectory / NamedTemporaryFile classes. 
This would make the language more accessible.

Would we be fine with reopening this issue so someone can contribute a patch?

--
nosy: +epicfaace

___
Python tracker 

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



[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2021-02-27 Thread Eryk Sun


Change by Eryk Sun :


--
components: +Library (Lib), Windows -Interpreter Core
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout

2021-02-27 Thread Eryk Sun


Eryk Sun  added the comment:

Issue 37424 fixed this for Python 3.7+ in POSIX. It's still broken in Windows, 
for which I'm leaving issue 31447 open.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> subprocess.run timeout does not function if shell=True and 
capture_output=True

___
Python tracker 

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



[issue43342] Error while using Python C API

2021-02-27 Thread Piyush Patel


New submission from Piyush Patel :

Hi,
I am facing a very strange issue.
I am working on a C++ application which embeds a python.
As per documentation i have the dependencies added from python (/libs and 
/include directories) to C++ application.
I am using Py_RunString() to run simple python code.

Python code is simple:

import os
def Func():
return 10.0

The application run smoothly when i have python installation in directory like 
"C:\PythonXY\"

but if python installation is in directory like "C:\MyPython\" or default 
installation path AppData\local\program\python\pythonxy\ , python code errors 
out.

the error i am getting is "__import__ not found".

I have used PyErr_Fetch to retrieve error.

It's really strange that the python installation directory affects how Python  
code is run.

It seems it have a problem running "import os" statement or any "import" 
statement.


Could you help me how i can resolve this issue? 

Thanks,
Piyush

--
components: C API
messages: 387783
nosy: piyush115
priority: normal
severity: normal
status: open
title: Error while using Python C API
type: compile error
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue31030] sys.executable can be not normalized

2021-02-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issue was opened with 2 related facts of 2017:
a) sys.executable is not normalized
b) as a result, two tests failed
Serhiy then said "I don't know what is wrong: the value of sys.executable or 
the test."  If it was the tests, they seem to have been fixed elsewhere.

If it is the non-normalization of sys.executable, my concern for IDLE is that 
it starts the execution subprocess with subprocess.Popen([sys.executable, 
...]).  Could this be a reason for mysterious IDLE failures?

Eryk, you stated above that on Windows a \\?\ path is possible but will not 
work for startup, and that you would open an issue for this.  Have you?

Do any of the non-normalized Linux (or *nix) executable paths fail for startup?

--

___
Python tracker 

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



[issue43341] functools.partial missing __weakref__ descriptor?

2021-02-27 Thread Dan Snider


New submission from Dan Snider :

The only way to lookup weak references to functools.partial objects is with 
weakref.getweakrefs. I don't know if it's normal for extension types that 
define tp_weaklistoffset to not add a __weakref__ descriptor, but I figured at 
the very least a subtype specifying "__weakref__" in its __slots__ could get 
one. Instead, it fails with the partially true TypeError: __weakref__ slot 
disallowed: either we already got one, or __itemsize__ != 0.

--
messages: 387781
nosy: bup
priority: normal
severity: normal
status: open
title: functools.partial missing __weakref__ descriptor?
type: behavior
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



[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-02-27 Thread Matthew Woodcraft

New submission from Matthew Woodcraft :

The documentation for json.load() and json.loads() says:

« If the data being deserialized is not a valid JSON document, a 
JSONDecodeError will be raised. »

But this is not currently entirely true: if the data is provided in bytes form 
and is not properly encoded in one of the three accepted encodings, 
UnicodeDecodeError is raised instead.

(I have no opinion on whether the documentation or the behaviour should be 
changed.)

--
components: Library (Lib)
messages: 387780
nosy: mattheww
priority: normal
severity: normal
status: open
title: json.load() can raise UnicodeDecodeError, but this is not documented
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6)

2021-02-27 Thread DANIEL VILLENEUVE


DANIEL VILLENEUVE  added the comment:

I'll let you do so if it's ok for you, since I'm not equipped with Python dev 
tools.

Regards

--

___
Python tracker 

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



[issue24650] Error in yield expression documentation

2021-02-27 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 4.0 -> 5.0
pull_requests: +23449
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24663

___
Python tracker 

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



[issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set

2021-02-27 Thread Samuel Marks

Samuel Marks  added the comment:

Nevermind it actually was that missing `PKG_CONFIG_PATH` line…

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



[issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set

2021-02-27 Thread Samuel Marks


New submission from Samuel Marks :

I was on 3.10a4 on macOS 11.1 for ages, finally decided to upgrade to a5, 
building from source. With latest `brew install openssl zlib`.
```
$ export LDFLAGS='-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/zlib/lib'
$ export CPPFLAGS='-I/usr/local/opt/openssl@1.1/include 
-I/usr/local/opt/zlib/include'
$ ./configure --enable-optimizations --prefix /opt/python3.10
```

I suppose I could set this which I forgot, but I doubt it's the problem, unless 
pkg_config is how the CPython build system find OpenSSL?
```
export PKG_CONFIG_PATH='/usr/local/opt/openssl@1.1/lib/pkgconfig'
```

Error:
```
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_hashlib  _ssl  ossaudiodev
spwd   
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  pwd   time   


Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with 
X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, 
https://github.com/libressl-portable/portable/issues/381
```

Happy to test alternative configurations

--
components: Build
messages: 38
nosy: samuelmarks
priority: normal
severity: normal
status: open
title: Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set
versions: Python 3.10

___
Python tracker 

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



[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-27 Thread Inada Naoki


Change by Inada Naoki :


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



[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c71d24f55828e7f0f2c8750d2e1b04d04539beff by Inada Naoki in branch 
'master':
bpo-43321: Fix SystemError in getargs.c (GH-24656)
https://github.com/python/cpython/commit/c71d24f55828e7f0f2c8750d2e1b04d04539beff


--

___
Python tracker 

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



[issue31030] sys.executable can be not normalized

2021-02-27 Thread Eryk Sun


Eryk Sun  added the comment:

In Python 3.10 in POSIX, it's still the case that executable, prefix, 
exec_prefix, base_prefix, and base_exec_prefix in the sys module do not get 
normalized. For example, in Linux:

$ .local/bin/../bin/python3.10 -c "import sys; print(sys.executable)"
/home/someone/.local/bin/../bin/python3.10

In test/test_sys.py, assertEqual(os.path.abspath(sys.executable), 
sys.executable) fails. In test/test_venv.py, assertIn('home = %s' % path, data) 
and assertEqual(out.strip(), expected.encode()) both fail, respectively in 
test_defaults and test_prefixes.

In Windows, prior to Python 3.6, this can be a problem if Python is run via 
CreateProcessW using a non-normalized path in lpApplicationName (rare, but 
possible) instead of letting the system search for the executable in 
lpCommandLine. For example:

>>> cmd = 'python -c "import sys; print(sys.executable)"'
>>> exe = r'C:\Program Files\Python35\..\Python35\python.exe'
>>> subprocess.call(cmd, executable=exe)
C:\Program Files\Python35\..\Python35\python.exe
0

It's no longer an issue in Windows with Python 3.6 and above. When getting the 
program path while initializing, the GetModuleFileNameW(NULL, ..) result gets 
canonicalized (e.g. via PathCchCanonicalizeEx). For example:

>>> exe = r'C:\Program Files\Python36\..\Python36\python.exe'
>>> subprocess.call(cmd, executable=exe)
C:\Program Files\Python36\python.exe
0

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 
3.7

___
Python tracker 

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



[issue43338] [feature request] Please provide offical installers for security releases

2021-02-27 Thread Zhang Boyang


New submission from Zhang Boyang :

Hello,

Thanks for developing Python! I noticed there is no offical installers for 
security releases of old python version. This looks a little strange to me. As 
a python user & developer, it's often to stay with some old version of python, 
because some package's version constraints, or we need to support old platforms.

The offical installer is the most trusted installaion source, but it's not 
provided with security releases. Lacking of installers makes installaion 
extreme difficult (impossible for end users), and there's no (free) way for a 
individual to create a code signed copy of python. Non-code-signed binarys will 
lead a lot of problem on recent operating systems.

The choice of providing no offical installer leads a lot of user stay with 
lastest bug-fix release and not upgrading to latest security releases. 
Individuals who want to stay with a old version must either use lastest bug-fix 
release or risk running a non-code-signed python binary. The former lacks 
recent python security fix, and the latter is vulnerable to binary 
modifications such as virus infection.

To sum up, if offical installer is provided, it will make life a lot easier for 
users who want to stay with old python version. It would be appreciated if you 
could accept my feature request.

Thank you!

--
components: Installation
messages: 387774
nosy: zby1234
priority: normal
severity: normal
status: open
title: [feature request] Please provide offical installers for security releases
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Daniel Moisset


Daniel Moisset  added the comment:

Thanks @xtreak, I'll make some changes in these sections too. 

The docs are coming along well, there's still some refinement to do in the 
compound statements section (it's there, but looks to big), I'll submit a draft 
PR during the weekend so interested people can review

--

___
Python tracker 

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



[issue43326] About Zipfile

2021-02-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue21109] tarfile: Traversal attack vulnerability

2021-02-27 Thread STINNER Victor


STINNER Victor  added the comment:

What is the status of this issue?

--
nosy: +vstinner

___
Python tracker 

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