[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Dong-hee Na


Dong-hee Na  added the comment:

I can see some users use such flags with manual mapping
Looks good to support it :)

https://github.com/TaskEvolution/Task-Coach-Evolution/blob/master/taskcoach/taskcoachlib/filesystem/fs_darwin.py#L27

--

___
Python tracker 

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



[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue43082] descriptor howto: typo in "Definition and introduction"

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thank you.

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



[issue43082] descriptor howto: typo in "Definition and introduction"

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset f02ef7afcf67db52f169f809a1b0babb80ec8370 by Miss Islington (bot) 
in branch '3.9':
bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394) (GH-24427)
https://github.com/python/cpython/commit/f02ef7afcf67db52f169f809a1b0babb80ec8370


--

___
Python tracker 

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



[issue43082] descriptor howto: typo in "Definition and introduction"

2021-02-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +23237
pull_request: https://github.com/python/cpython/pull/24427

___
Python tracker 

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



[issue43082] descriptor howto: typo in "Definition and introduction"

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset a98fe02d735e7bfe369fc5ce6efb6c9d82adf3b7 by diegoe in branch 
'master':
bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394)
https://github.com/python/cpython/commit/a98fe02d735e7bfe369fc5ce6efb6c9d82adf3b7


--

___
Python tracker 

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



[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2021-02-02 Thread Bradley Miller


Bradley Miller  added the comment:

Thanks Jakub,

Your patch fixed an increasingly frequent problem with my site.  

How can I help to get this merged so I don't have to have a custom version of 
cgi.py??

--
nosy: +bnmnetp

___
Python tracker 

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



[issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar

2021-02-02 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar

2021-02-02 Thread Andrew C. Morrow


New submission from Andrew C. Morrow :

When building with `--with-lto`, an explicit check for `llvm-ar` is performed 
as part of the configure step. However, Apple does not ship `llvm-ar` as part 
of Xcode, so when building with Apple Clang this check fails and prevents using 
`--with-lto`.

However, using the builtin `ar` seems to work just fine, and it can be selected 
by passing `LLVM_AR=/path/to/ar` to `configure`. It would be nice to see the 
`configure` script updated to know that system `ar` is sufficient when using 
Apple Clang on macOS.

Please see https://github.com/Homebrew/homebrew-core/pull/70177 for additional 
background.

--
components: Build
messages: 386174
nosy: acmorrow
priority: normal
severity: normal
status: open
title: When using Apple Clang, --with-lto builds should not check for llvm-ar
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



[issue43108] test_curses is leaking references

2021-02-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue29086] Document C API that is not part of the limited API

2021-02-02 Thread Petr Viktorin


Petr Viktorin  added the comment:

The bigger problem is that currently, it's not clear what is limited API and 
what is not.

I am working to propose a PEP to fix this. It will also cover documentation: 
https://discuss.python.org/t/pre-pep-maintaining-the-stable-abi/6986

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue43104] csv package in class

2021-02-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

This isn't a forum for helping users with questions about Python, it's for 
reporting bugs in Python.

I suggest you ask this question on the python-list mailing list: 
https://mail.python.org/mailman/listinfo/python-list

And when you do ask your question there, you should include the code that shows 
what you have tried and what error you're getting.

Good luck! And your English is perfectly fine!

--
nosy: +eric.smith
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



[issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist

2021-02-02 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 2edaf6a4fb7e20324dde1423232f07211347f092 by Ken Jin in branch 
'master':
bpo-8264: Document hasattr and getattr behavior for private attributes 
(GH-23513)
https://github.com/python/cpython/commit/2edaf6a4fb7e20324dde1423232f07211347f092


--
nosy: +ethan.furman

___
Python tracker 

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



[issue40956] Use Argument Clinic in sqlite3

2021-02-02 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +23236
pull_request: https://github.com/python/cpython/pull/24421

___
Python tracker 

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



[issue43108] test_curses is leaking references

2021-02-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bb739ec922c6992a2be38f9fd3c544c2cc322dde by Pablo Galindo in 
branch 'master':
bpo-43108: Fix a reference leak in the curses module (GH-24420)
https://github.com/python/cpython/commit/bb739ec922c6992a2be38f9fd3c544c2cc322dde


--

___
Python tracker 

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



[issue41149] Threads can fail to start

2021-02-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue41149] Threads can fail to start

2021-02-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 01c4fddc4b2ac707f226e0bd92679588d2252cc4 by BarneyStratford in 
branch 'master':
bpo-41149: Fix a bug in threading that causes fals-y threads callables to fail 
to start. (GH-21201)
https://github.com/python/cpython/commit/01c4fddc4b2ac707f226e0bd92679588d2252cc4


--
nosy: +pablogsal

___
Python tracker 

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



[issue43108] test_curses is leaking references

2021-02-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue43108] test_curses is leaking references

2021-02-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b is the first bad commit
commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b
Author: Serhiy Storchaka 
Date:   Sun Jan 31 17:22:27 2021 +0200

bpo-43016: Rewrite tests for curses (GH-24312)

 Lib/test/test_curses.py | 1002 +--
 1 file changed, 787 insertions(+), 215 deletions(-)

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41552] uuid.uuid1() on certain Macs does not generate unique IDs

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I got feedback on FB889: Apple says they have fixed the issue (they don't 
mention in what version, but I expect 11.2). I haven't checked this yet.

--

___
Python tracker 

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



[issue43108] test_curses is leaking references

2021-02-02 Thread Pablo Galindo Salgado

New submission from Pablo Galindo Salgado :

❯ ./python -m test test_curses -uall -R :
0:00:00 load avg: 3.77 Run tests sequentially
0:00:00 load avg: 3.77 [1/1] test_curses
beginning 9 repetitions
123456789
.
test_curses leaked [4, 4, 4, 4] references, sum=16
test_curses failed

== Tests result: FAILURE ==

1 test failed:
test_curses

Total duration: 2.5 sec
Tests result: FAILURE


https://buildbot.python.org/all/#/builders/75/builds/168/steps/5/logs/stdio

--
components: Tests
messages: 386166
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_curses is leaking references
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



[issue43107] RotatingFileHandler with multi processes creates too small backup files

2021-02-02 Thread Yotam Medini


New submission from Yotam Medini :

Using RotatingFileHandler by multi-processes
when they reach a point for rotation (roll-over)
they continue on separate files.

Two problems:
1. Eventually some backup files are left with sizes
   much less than the maxBytes configuration.
2. Intertwining events are not logged together,
   but separated by processes.

--
components: Library (Lib)
messages: 386165
nosy: yotam
priority: normal
severity: normal
status: open
title: RotatingFileHandler with multi processes creates too small backup files
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



[issue42997] Improve error message for missing : before suites

2021-02-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue42997] Improve error message for missing : before suites

2021-02-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 58fb156edda1a0e924a38bfed494bd06cb09c9a3 by Pablo Galindo in 
branch 'master':
bpo-42997: Improve error message for missing : before suites (GH-24292)
https://github.com/python/cpython/commit/58fb156edda1a0e924a38bfed494bd06cb09c9a3


--

___
Python tracker 

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



[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Out of curiosity, how did you find this?  Did it arise in the course of trying 
to solve a real problem or were you just reading the code and and thought you 
might do it differently?

Unless there's a real problem, I prefer None because it is immutable (safer), 
because it doesn't incur the time and memory cost of creating a new object, and 
because it does a good job of indicating that builtins are shut-off and not 
intended to be accessed.  The primary reason the line is there at all is to 
make eval() as safe as possible.  There is no public named tuple functionality 
that depends on it, so no user should ever encounter it unless they are just 
investigating implementation details.  In particular, they should never see the 
error message in your post.

--

___
Python tracker 

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



[issue43074] Unable to use system proxy with HTTPS connection on Windows

2021-02-02 Thread 双草酸酯

双草酸酯  added the comment:

Oh sorry I forgot requests is a third party library.

--
resolution:  -> third party
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



[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Likewise for O_POPUP and O_ALERT, although I don't understand what these are 
supposed to do.

--

___
Python tracker 

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



[issue18617] AIA chasing for missing intermediate certificates on TLS connections

2021-02-02 Thread Ofek Lev


Ofek Lev  added the comment:

Any update on this?

--
nosy: +Ofekmeister

___
Python tracker 

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



[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The following O_* flags are present in the macOS 11 SDK, but aren't provided by 
posixmodule.c:

O_FSYNC (alias for O_SYNC)
O_EVTONLY
O_SYMLINK
O_NOFOLLOW_ANY

--
components: Extension Modules, macOS
keywords: easy (C)
messages: 386159
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Some macOS open flags are missing from posixmodule.c
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



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
keywords: +patch
pull_requests: +23234
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24419

___
Python tracker 

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



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I was too quick, EQFULL appears to be missing:

#define EQFULL  106 /* Interface output queue is full */


If the script I'm using to check for this is correct this is the only missing 
errno with the macOS 11 SDK.

--
resolution: not a bug -> 
stage: resolved -> needs patch
status: pending -> open

___
Python tracker 

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



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've checked all three and all of them are present in errnomodule.c, and all of 
them are defined in the errno module (macOS 11, Python 3.9.1 "universal2" 
build).

On first glance all errno values in the macOS 11 SDK are present in 
errnomodule.c.

--

___
Python tracker 

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



[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't care about the flipflop at all. I only care about the third possible 
outcome, an exception.

I thought the compromise semantics you proposed earlier sounded nice.

As Serhiy already explained, 'b or True' vs. 'True or b' is unrelated.

--

___
Python tracker 

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



[issue43103] Add configure option to disable build libpython.a and don't install python.o

2021-02-02 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows

2021-02-02 Thread Simon Munday


Change by Simon Munday :


--
title: Can't import extension modules resolved via relative paths in sys.path 
on Windows don't don't -> Can't import extension modules resolved via relative 
paths in sys.path on Windows

___
Python tracker 

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



[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows don't don't

2021-02-02 Thread Simon Munday


New submission from Simon Munday :

If I attempt to import an extension module via something like this:

from pkg import extmodule

and it happens that "pkg" is found in a folder that is given in sys.path as a 
relative path, then the import fails, with 

ImportError: DLL load failed while importing extmodule: The parameter is 
incorrect.

This only happens with 3.8 and later.  

AFAICS the reason is that if the module resolution is done via a relative path, 
it results in dynload_win.c:_PyImport_FindSharedFuncptrWindows attempting to 
feed LoadLibraryExW a relative path for the .pyd file.   But LoadLibraryExW 
treats relative paths completely differently from absolute ones, in that it 
searches for the given path relative to the library search path entries rather 
than simply loading the DLL at that path.  But as of 3.8 the current directory 
is removed from the search path, so the .pyd is never found.  Since Python 
knows the specific file it wants LoadLibraryExW to load, having just resolved 
it via the import mechanism, I guess it ought to ensure it only ever calls 
LoadLibraryExW with an absolute path.  

(I'm assuming use of relative paths in sys.path is officially supported, since 
nothing I've found in the docs says otherwise.)

--
components: Extension Modules
messages: 386155
nosy: smunday
priority: normal
severity: normal
status: open
title: Can't import extension modules resolved via relative paths in sys.path 
on Windows don't don't
type: behavior
versions: Python 3.10, 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



[issue43048] Printing RecursionError results in RecursionError

2021-02-02 Thread Vladimir Feinberg


Vladimir Feinberg  added the comment:

Yep, you're right. I'd be happy to (but I've never done it before, so
please give me some time).

On Tue, Feb 2, 2021 at 12:35 AM Irit Katriel  wrote:

>
> Irit Katriel  added the comment:
>
> It should truncate at the call that raised the recursion error, not the
> first one. Do you want to create a patch?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue43103] Add configure option to disable build libpython.a and don't install python.o

2021-02-02 Thread STINNER Victor


STINNER Victor  added the comment:

"./configure --enable-shared --prefix /opt/py310 && make && make install" 
installs multiple files which are only useful to create a static Python binary:

$ ls /opt/py310/lib/python3.10/config-3.10-x86_64-linux-gnu/ -1
config.c
config.c.in
install-sh*
libpython3.10.a
Makefile
makesetup*
__pycache__/
python-config.py*
python.o
Setup
Setup.local

$ ls /opt/py310/lib/ -1
libpython3.10.so@
libpython3.10.so.1.0*
libpython3.so*
pkgconfig/
python3.10/

libpython3.10.a is a big file: 15 MB.

Without --enable-shared, /opt/py310/lib/ contains a second copy of 
libpython3.10.a!


Example with the Ubuntu libpython3.6-dev package:

$ dpkg -L libpython3.6-dev|grep config-
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Makefile
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup.config
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup.local
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/config.c
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/config.c.in
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/install-sh
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m-pic.a
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/makesetup
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py
/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/python.o

---

By the way, it seems like many files of 
/opt/py310/lib/python3.10/config-3.10-x86_64-linux-gnu/ are useless.

The most useful one is python-config.py script.

Makefile is no longer used by sysconfig which creates 
_sysconfigdata__linux_x86_64-linux-gnu.py (in /opt/py310/lib/python3.10/) 
instead.

--

___
Python tracker 

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



[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-02 Thread Steve Dower


Steve Dower  added the comment:

I closed the PR. Jason's fix deals with it, so this is now resolved.

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



[issue43104] csv package in class

2021-02-02 Thread Tobias Müllner

New submission from Tobias Müllner :

Hello

I want to use the csv package in a class.

If I use the writer instance as local variable in the class it works perfectly 
but if I use it as class-variable (self.writer) it does not work anymore. 

Does anyone have the same behaviour?

Yours Toby

By the way, sorry for my bad English :(

--
messages: 386151
nosy: tobias.muellner250502
priority: normal
severity: normal
status: open
title: csv package in class
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2021-02-02 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-43103 "Add configure option to disable build libpython.a and 
don't install python.o".

--

___
Python tracker 

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



[issue43103] Add configure option to disable build libpython.a and don't install python.o

2021-02-02 Thread STINNER Victor


New submission from STINNER Victor :

Currently, "make install" copies Programs/python.o to 
$prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/: see bpo-42307. This file 
is only useful to build a static Python executable with libpython3.10.a.

libpython3.10.a is also copied to 
$prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/.

Most users don't build a static Python executable, so I propose to no longer 
build "static Python" by default and add --with-static-python option to the 
configure script.


---


Fedora has a downstream patch to not build libpythonX.Y.a for 11 years:
https://src.fedoraproject.org/rpms/python3.10/blob/master/f/00111-no-static-lib.patch

It is needed to respect the Fedora packaging guideline. The patch was 
introduced in Fedora to fix "python : does not adhere to Static Library 
Packaging Guideline" issue:
https://bugzilla.redhat.com/show_bug.cgi?id=556092

"""


The package is in need of an update because it does not adhere to
the guidelines for packaging static libraries:

  http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries

The -devel package contains both the shared and the static build of
a library. That makes it possible to link statically with the -devel
package as a build requirement instead of having to build-require a
special-purpose -static subpackage.

Correct would be to either disable/delete the static libraries at
build-time, or to %exclude them in the %files section, or to split off
a -static subpackage (if there is a compelling reason as why the static
libs should be made available).

Please consult the guidelines for the details.

[...]

python-devel
/usr/lib/python2.6/config/libpython2.6.so  <=>  
/usr/lib/python2.6/config/libpython2.6.a
"""

--
components: Build
messages: 386149
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add configure option to disable build libpython.a and don't install 
python.o
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



[issue43042] Delete or merge redundant tutorial sentence.

2021-02-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ramond, any opinion on this?  We could just close this, but I consider either 
alternative enough of an improvement to write a PR and merge it.

--
nosy: +rhettinger

___
Python tracker 

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



[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for the report.  I'll look at it in detail this evening.  Off-hand the 
suggest sounds reasonable.

--
assignee:  -> rhettinger
nosy: +rhettinger
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-02 Thread Paul Moore


Paul Moore  added the comment:

That's specifically the ensurepip PR, which is now outdated since pip 21.0.1 is 
in master. But for this bug report, Steve said "I still consider the changes a 
release blocking regression, but if it's not blocking ensurepip then I guess 
the updated packages can go in now" so I don't know if he considers there to be 
something else that this issue should still track.

--

___
Python tracker 

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



[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-02 Thread Douglas Raillard

New submission from Douglas Raillard :

When creating a namedtuple such as this one:

from collections import namedtuple

class C(namedtuple('C', ('hello', 'world'))):
pass

print(C.__new__.__globals__)

The globals' dict of __new__ contains a "__builtins__" key which is set to None 
in collections/__init__.py:

namespace = {
'_tuple_new': tuple_new,
'__builtins__': None,
'__name__': f'namedtuple_{typename}',
}

When such globals are used with eval(), it will raise a TypeError such as:

>>> eval('X', {'__builtins__': None})
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
TypeError: 'NoneType' object is not subscriptable

If an empty dict was used instead, we get the expected exception:

>>> eval('X', {'__builtins__': {}})
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
NameError: name 'X' is not defined

Given that both ways allow preventing references to any builtin, please 
consider switching to an empty dict. Also, even though this is documented as 
implementation detail, this would agree more with the current documentation 
stating:

The value of __builtins__ is normally either this module or the value of 
this module’s __dict__ attribute

https://docs.python.org/3/library/builtins.html

--
components: Library (Lib)
messages: 386145
nosy: douglas-raillard-arm
priority: normal
severity: normal
status: open
title: namedtuple's __new__.__globals__['__builtins__'] is None
type: behavior
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



[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-02 Thread Paul Moore


Paul Moore  added the comment:

It can be closed.

--

___
Python tracker 

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



[issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1

2021-02-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Do we need to wait for PR 22779 or can it be closed?

--

___
Python tracker 

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



[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Mark Shannon


Mark Shannon  added the comment:

It isn't a specific optimization at all, but the combination of several.
I will change the behavior to match what appears to be the consensus.

BUT, we need to define what the semantics should be. Otherwise implementing the 
compiler is just guesswork.


As for a definition of what is legal, the best I can come up with is:

"Repeated bool() checks of a value in short-circuiting expressions ('and' and 
'or') may be eliminated if the result can be deduced using boolean algebra."

--

___
Python tracker 

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



[issue43053] Speed up math.isqrt, again

2021-02-02 Thread Mark Dickinson


Change by Mark Dickinson :


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



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-02 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43097] IndexError msg of random.choice() not helpful

2021-02-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

-1 on changing this because we would have to gum-up and slow down the code with 
an extra try-except to catch and reraise the exception with a different error 
message:

def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
try:
return seq[self._randbelow(len(seq))]
except IndexError:
raise IndexError('Cannot choose from an empty sequence') from None

We rarely do that elsewhere in the code.  The norm in pure python code is that 
indexing into an empty list shows "IndexError: list index out of range" without 
further elaboration on what it means for the list to be empty.

FWIW, this behavior is very old and doesn't seem to have been a problem in 
practice.  Here is what the code looked like in Python 2.1:

def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
return seq[int(self.random() * len(seq))]

--

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2021-02-02 Thread Petr Viktorin


Petr Viktorin  added the comment:

Sorry, I lost this bug in my TODO list :(

> > I don't think it's necessary here.
> 
> Did you read my rationale (first message)? Do you mean that per-interpreter 
> GIL is not worth it?

Right, I mean that it it is not worth breaking the C-API for all existing 
modules.
Instead, I think that it can be done as an addition: only modules that don't 
use things like these static types would be allowed in subinterpreters that 
have their own GIL.

--

___
Python tracker 

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



[issue43097] IndexError msg of random.choice() not helpful

2021-02-02 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue43101] Add deprecation of float limits for resource to documentation

2021-02-02 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43101] Add deprecation of float limits for resource to documentation

2021-02-02 Thread Gereon Kremer


New submission from Gereon Kremer :

While the documentation always (as in: at least since 3.5) required to pass "a 
tuple (soft, hard) of two integers" to resource.setrlimit(), passing floats 
worked just fine until 3.9.
This behavior was deprecated in 3.8 and removed in 3.10.

I see that the implementation was merely fixed to do what the documentation 
says. Nevertheless, I think this change of behavior should be mentioned in the 
documentation.

In my use-case for resource (within preexec_fn of subprocess.Popen), this 
deprecation warning only showed up in 3.9 for some reason (as you can see here: 
https://github.com/nafur/python-playground/runs/1814573503) and is now hidden 
by a generic "subprocess.SubprocessError: Exception occurred in preexec_fn." 
message.
A hint in the documentation would have helped significantly...

--
messages: 386139
nosy: nafur
priority: normal
severity: normal
status: open
title: Add deprecation of float limits for resource to documentation
versions: Python 3.10, 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



[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

`True or b` is always True and differs from `b or True`. `x = True and y` is 
always equivalent to `x = y`.

What is the use case of your optimization? Can you provide examples of real 
code which would benefit from removing all boolean tests (not only the repeated 
one) of non-constants?

If there are not such examples or they are not common, there is no need of this 
optimization. Just revert that changes.

--

___
Python tracker 

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



[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Mark Shannon


Mark Shannon  added the comment:

Option 3 with what semantics exactly?

https://docs.python.org/3/reference/datamodel.html#object.__bool__ says that 
__bool__ should return True or False.


If we don't allow the optimizer the freedom to assume that __bool__ is 
self-consistent and has no side effects, then we need to define what happens 
for stuff like:

class FlipFlop:
def __init__(self):
self.val = random.choice((True, False))
def __bool__(self):
self.val = not self.val
return self.val

Saying that only the second test can be removed is hard to define in a way that 
we can reliably implement.
For example, it makes the simplification of `x = True and y` to `x = y` 
problematic.
We routinely remove any tests of `if True:` or `while True:`, but the removal 
of `if True:` and the simplification of `x = True and y` to `x = y` is 
basically the same thing in the CFG.

--

___
Python tracker 

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



[issue43100] Python fails to execute shiv pyz files greater than 2 GB

2021-02-02 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +barry

___
Python tracker 

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



[issue43100] Python fails to execute shiv pyz files greater than 2 GB

2021-02-02 Thread Mark Dickinson


Mark Dickinson  added the comment:

This sounds as though it should be reported to the Shiv maintainers. (This 
tracker is for core Python, and Shiv isn't part of core Python.)

If the Shiv problem turns out to be due to an underlying core Python bug, this 
issue can be re-opened with more details.

--
nosy: +mark.dickinson
resolution:  -> third party
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



[issue43100] Python fails to execute shiv pyz files greater than 2 GB

2021-02-02 Thread Divyanshu


New submission from Divyanshu :

Issue with shiv packages greater than 2GBs.
Any shiv package(.pyz) greater than 2 GB fails to execute on python.
Getting the below error with a simple shiv package that contains a main file 
that prints Hello World, and some random data files crossing the 2GB mark (can 
be a data file, a zip file or whatever unrelated)
Error - cannot find 'main' module in abc.pyz

On removing some of the redundant data files so that the size becomes less than 
2 GB, the package becomes functional again.

--
messages: 386135
nosy: divyanshurastogi4
priority: normal
severity: normal
status: open
title: Python fails to execute shiv pyz files greater than 2 GB
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36302] distutils creates unreproducible .so files

2021-02-02 Thread STINNER Victor


STINNER Victor  added the comment:

> Why do we need to sort those extensions by name?

Because calling sorted() is easy. Any other arbitrary choice would make sense. 
But giving the ability to build sources in a specific order, add dependencies, 
or something else, would a new features.

Also, distutils is now deprecated in the stdlib: the steering council approved 
https://www.python.org/dev/peps/pep-0632/

You should now report distutils issues to setuptools.

--

___
Python tracker 

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



[issue36302] distutils creates unreproducible .so files

2021-02-02 Thread Matej Cepl

Matej Cepl  added the comment:

> In particular, I sort the source list by age when working on larger 
> extensions, this makes sure that the source files I edited last get compiled 
> first, which speeds up edit/build cycles.

On the one hand, this sounds creepily like https://xkcd.com/1172, but on the 
other: why do we need to sort those extensions by name? Wouldn’t sorting by 
some attribute of those extensions (including their size) be better?

--
nosy: +mcepl

___
Python tracker 

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



[issue43048] Printing RecursionError results in RecursionError

2021-02-02 Thread Irit Katriel


Irit Katriel  added the comment:

It should truncate at the call that raised the recursion error, not the first 
one. Do you want to create a patch?

--

___
Python tracker 

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



[issue43099] Deleted positions lists

2021-02-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

That's the correct behavior. The elements given by the start and end range are 
replaced by what's on the right hand side of the assignment. They don't need to 
be the same length.

>>> list_test=[0,1,2,3,4,5,6]
>>> list_test[2:5] = ['two', 'three']
>>> list_test
[0, 1, 'two', 'three', 5, 6]

--
nosy: +eric.smith
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



[issue43099] Deleted positions lists

2021-02-02 Thread iqanansoft


New submission from iqanansoft :

Hello, in a list, when using the slice notation, if a higher rank is placed 
than the new data, the positions of the list are removed 

list_test=[0,1,2,3,4,5,6]
list_test[2:4]=["two","three"]

result-->[0,1,'two','three',4,5,6]

this is correct, but this


list_test=[0,1,2,3,4,5,6]
list_test[2:21]=["two","three"]

result-->[0,1,'two','three']

deleted last positions

--
messages: 386130
nosy: iqanansoft
priority: normal
severity: normal
status: open
title: Deleted positions lists
type: behavior
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