[issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled

2020-11-03 Thread serge-sans-paille


Change by serge-sans-paille :


--
pull_requests: +22054
pull_request: https://github.com/python/cpython/pull/23141

___
Python tracker 

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



[issue42257] platform.libc_ver() doesn't consider in case of executable is empty string

2020-11-03 Thread Kurochan


Change by Kurochan :


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

___
Python tracker 

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



[issue42257] platform.libc_ver() doesn't consider in case of executable is empty string

2020-11-03 Thread Kurochan


New submission from Kurochan :

Currently, `platform.libc_ver()` doesn't consider in case of `executable` 
variable is an empty string.
However, with Python 3.8, the following code could pass an empty string 
`executable` to the `platform.libc_ver()` function.

https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L1205
https://docs.python.org/3/library/sys.html#sys.executable

Because the `sys.executable` could return an empty string, so I would like to 
add the empty string handler.

https://github.com/python/cpython/blob/efc782d29e229924076ffb6645a72f26242fb3ef/Lib/platform.py#L174

Or please also merge the following PR to Python 3.8.
https://github.com/python/cpython/pull/14418

--
components: Library (Lib)
messages: 380311
nosy: kurochan
priority: normal
severity: normal
status: open
title: platform.libc_ver() doesn't consider in case of executable is empty 
string
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



[issue42049] Add image/webp to list of media types in mimetypes.py

2020-11-03 Thread Inada Naoki


Change by Inada Naoki :


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



[issue42205] Add image/webp to list of non-standard mimetypes

2020-11-03 Thread Inada Naoki


Change by Inada Naoki :


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



[issue38902] image/webp support in mimetypes

2020-11-03 Thread Inada Naoki


Inada Naoki  added the comment:

I'm +1 to add it in common types, because webp is really de-facto standard.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

If no objection, I will merge this in next week.

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



[issue4999] multiprocessing.Queue does not order objects

2020-11-03 Thread Irit Katriel


Irit Katriel  added the comment:

I see the documentation mentions it now (in the second gray box here:
https://docs.python.org/3.8/library/multiprocessing.html#pipes-and-queues )

and it also suggests to use a shared queue if this is an issue. 


Any objections to closing this issue?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue38902] image/webp support in mimetypes

2020-11-03 Thread waicalibre


Change by waicalibre :


--
pull_requests: +22052
pull_request: https://github.com/python/cpython/pull/23034

___
Python tracker 

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



[issue42205] Add image/webp to list of non-standard mimetypes

2020-11-03 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> duplicate
superseder:  -> image/webp support in mimetypes

___
Python tracker 

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



[issue42049] Add image/webp to list of media types in mimetypes.py

2020-11-03 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> duplicate
superseder:  -> image/webp support in mimetypes

___
Python tracker 

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



[issue38902] image/webp support in mimetypes

2020-11-03 Thread waicalibre


Change by waicalibre :


--
keywords: +patch
nosy: +waicalibre
nosy_count: 3.0 -> 4.0
pull_requests: +22051
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22718

___
Python tracker 

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



[issue15128] inspect raises exception when frames are misleading about source line numbers

2020-11-03 Thread Irit Katriel


Change by Irit Katriel :


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



[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2020-11-03 Thread Irit Katriel


Change by Irit Katriel :


--
keywords:  -patch
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6

___
Python tracker 

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



[issue17344] checking size of size_t... configure: error:

2020-11-03 Thread Irit Katriel


Change by Irit Katriel :


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



[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2020-11-03 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
resolution:  -> out of date
stage: test needed -> resolved
status: pending -> closed

___
Python tracker 

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



[issue1643712] Emphasize buffering issues when sys.stdin is used

2020-11-03 Thread Irit Katriel


Irit Katriel  added the comment:

Closed along with 1633941.

--
nosy: +iritkatriel
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue42252] Embeddable Python indicates that it uses PYTHONPATH

2020-11-03 Thread Tom Kent


Tom Kent  added the comment:

A couple things...

>> One possible use-case is to package it along with another program to use the 
>> interpreter.

> This is the primary use case. If you're doing something else with it, you're 
> probably misusing it :)

Interesting, I'd been expecting this was commonly used as the way to give 
access to python3X.dll. We actually do (or are trying to do) both from our 
installation.



I've been mostly focusing on `PYTHONPATH` because that's where I encountered 
the issue. Which if any of the other env variables are respected? 



Would there be an argument to add additional command line options that could be 
used as a more secure alternative to the env variables? A command line argument 
`-e` that is the opposite of `-E` and enables the usage of PYTHON* env? Maybe 
this doesn't make sense since you said it is the ._pth that causes this...just 
thinking aloud.

The two options you mention (modify ._pth and append to sys.path) aren't great 
because we 1) would prefer to use the un-modified python distro 2) don't own 
the scripts that we are embedding, they are from a 3rd party so modifications 
are complicated.

--

___
Python tracker 

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



[issue42252] Embeddable Python indicates that it uses PYTHONPATH

2020-11-03 Thread Steve Dower


Steve Dower  added the comment:

Updating the documentation link on the download page is being discussed as we 
speak.

> One possible use-case is to package it along with another program to use the 
> interpreter.

This is the primary use case. If you're doing something else with it, you're 
probably misusing it :)

> In this case, the user may assume that adding something to the `PYTHONPATH` 
> env variable, as most of the launching methods allow, would take hold.

Agreed. The documentation explains this, though likely doesn't make clear 
enough that it's the presence of the ._pth file that triggers the behaviour.

> ... then promptly look at python --help when that fails. 

I'm pretty sure the help text is generated before we've tried to detect any 
local configuration, so it's far from trivial to make it dynamic based on 
context. 

> Maybe a better question is why should the embeddable distribution's 
> python.exe ignore env variables? Wouldn't it make more sense to depend on the 
> user to add a `-E` if that is what they desire?

It's to make it non-exploitable by default. The theory being that it will 
likely be installed into Program Files by an admin, which means file-based 
configuration is locked down from regular users and an attacker can't rely on a 
fully functioning Python runtime being present. 
 Most people wildly underestimate how exploitable CPython is via environment 
variables.

In an embedded scenario, you also have other ways to update paths, either 
statically (in the ._pth file) or in Python code (via sys.path modification). 
And you can of course delete the ._pth file if you don't feel you need the 
isolation, but there are legitimate reasons we don't recommend that one.

Not enough of this is documented that well, unfortunately. It sounds like we 
should:
* add a note to the environment variables section of --help that some other 
options may disable these
* add a link to https://docs.python.org/3/using/windows.html#windows-embeddable 
back to the download page (it was removed in the 3.9 releases for some reason)
* expand that doc section to link forward to 
https://docs.python.org/3/using/windows.html#finding-modules and maybe 
rearrange for making it more obvious how to use this package

--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue42225] Tkinter hangs or crashes when displaying astral chars

2020-11-03 Thread Kevin Walzer


Kevin Walzer  added the comment:

Some work has been done this year on expanding support for these types of 
glyphs in Tk, but I'm not sure of its current state--it's not my area of 
expertise. Can you open a ticket at https://core.tcl-lang.org/tk/ so one of the 
folks working on this can take a look?

--

___
Python tracker 

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



[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2020-11-03 Thread Irit Katriel


Irit Katriel  added the comment:

Since this is a python 2 only issue, should this issue be closed as out of date?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue42100] Add _PyType_GetModuleByDef

2020-11-03 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-11-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

> Can we write those info to docs? In case some developer want to exposing slot 
> in future.

Do you mean something like "only expose a slot if you have a reason for 
exposing it"? That sounds like a tautology.
Where in the docs would this go?

> nb_inserved in PyNumberMethods should be removed?

You mean nb_reserved, right?
It can't be removed; old-style initialization is positional.
But it could be replaced according to PEP387:
- in 3.x, raise a warning if it is not set to NULL (in static types)
- in 3.x+2, throw an error if it is not set to NULL (in static types)
- in 3.x+3 or later, it can be replaced by another slot, if there's something 
we need to add to PyNumberMethods

--

___
Python tracker 

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



[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

The PyType_Slot documentation says that the pointer may not be NULL: 
https://docs.python.org/3/c-api/type.html?highlight=pytype_fromspec#c.PyType_Slot.PyType_Slot.pfunc

If you change this, why do it only for tp_doc, but for all the slots? NULL 
should *always* mean that the slot is set to NULL instead of inherited. (Except 
maybe in cases where this is dangerous; then it should result in an error?)
See: https://bugs.python.org/issue26979

If you want to only change this for tp_doc, please also update the PyType_Slot 
documentation to cover the exception.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue42249] Plistlib cannot create binary Plist file larger than 4GiB

2020-11-03 Thread miss-islington


miss-islington  added the comment:


New changeset 9bc07874e34930d4e816a9a3330aab009404991e by Miss Skeleton (bot) 
in branch '3.9':
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
https://github.com/python/cpython/commit/9bc07874e34930d4e816a9a3330aab009404991e


--

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-03 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22050
pull_request: https://github.com/python/cpython/pull/23136

___
Python tracker 

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



[issue42254] inspect.getmembers iterator version

2020-11-03 Thread signing_agreement


signing_agreement  added the comment:

That is a fair point. I selected a few popular python libraries to test, and 
they all return a small list.

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-11-03 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

FYI, rebased https://github.com/erlend-aasland/cpython/tree/bpo-42064/all onto 
master, added Petr Viktorin's _PyType_GetModuleByDef() for use in item 7 
(module state). I still run into problems in item 8, but I haven't devoted much 
time for this yet:
Modules/gcmodule.c:116: gc_decref: Assertion "gc_get_refs(g) > 0" failed: 
refcount is too small
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7f861140c6b0
object refcount : 2
object type : 0x10978
object type name: type
object repr : 

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: finalizing (tstate=0x7f8631409000)

--

___
Python tracker 

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



[issue42254] inspect.getmembers iterator version

2020-11-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I personally don't think it is worthwhile to add another API for this without a 
good use case.  The memory overhead of eagerly creating a list should be fairly 
small.

--

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2020-11-03 Thread Volker Weißmann

Change by Volker Weißmann :


--
nosy: +Volker Weißmann
nosy_count: 12.0 -> 13.0
pull_requests: +22049
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/23135

___
Python tracker 

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



[issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies

2020-11-03 Thread Paulie Pena


Paulie Pena  added the comment:

whoops, the first string should also be a raw string, i.e. `r'...'`

--

___
Python tracker 

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



[issue42205] Add image/webp to list of non-standard mimetypes

2020-11-03 Thread Éric Araujo

Éric Araujo  added the comment:

Hello!  Why open a second ticket?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue42254] inspect.getmembers iterator version

2020-11-03 Thread signing_agreement


signing_agreement  added the comment:

The object it deals with is already loaded, but in cases I see online, users 
tend to examine one member at a time.

--

___
Python tracker 

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



[issue42100] Add _PyType_GetModuleByDef

2020-11-03 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies

2020-11-03 Thread Paulie Pena


New submission from Paulie Pena :

Since `requests` creates a comma-separated list for any duplicated headers, 
this causes a problem when `expires=...` is between two `Set-Cookie` header 
values. `BaseCookie.__parse_string()` in 
https://github.com/python/cpython/blob/master/Lib/http/cookies.py, in that 
case, will just give up, since it thinks it was given an invalid cookie. The 
fix is to replace the comma at the end of each trailing `expires=...` with a 
semicolon. Inside `BaseCookie.__parse_string()`, before the `while` loop, all 
that should be needed is to add this:
```
str = re.sub('(=\w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT),', r'\1;', str)
```

--
components: Library (Lib)
messages: 380294
nosy: paulie4
priority: normal
severity: normal
status: open
title: BaseCookie.__parse_string() doesn't work with expires= between cookies
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



[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2020-11-03 Thread Ronald Oussoren


New submission from Ronald Oussoren :

class webbrower.MacOSX is untested and undocumented. It is also not used by 
webbrowser itself (webbrowser.MacOSXOSAScript is used to launch browsers).

It's probably safe to just remove the class, otherwise deprecate in 3.10 for 
removal in 3.11.

--
components: Library (Lib), macOS
messages: 380293
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: webbrowser.MacOSX is unused, untested and undocumented
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



[issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property?

2020-11-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've created a PR for adding the attribute.

--

___
Python tracker 

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



[issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property?

2020-11-03 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types

2020-11-03 Thread Éric Araujo

Éric Araujo  added the comment:

Editing /etc/mime.types is one way of customizing the types returned; another 
one is to make a pull request to add them to the list inside the mimetypes 
module.

--
nosy: +eric.araujo
stage:  -> needs patch
versions:  -Python 3.6, 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



[issue7175] Define a standard location and API for configuration files

2020-11-03 Thread Éric Araujo

Éric Araujo  added the comment:

This ticket did not reach a consensus.  It seems there would be little value in 
changing the existing scheme for IDLE and such; external tools can (and often 
do) already use appdirs; I suggest closing this.

--

___
Python tracker 

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



[issue42254] inspect.getmembers iterator version

2020-11-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

why?

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue42225] Tkinter hangs or crashes when displaying astral chars

2020-11-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@Kevin Walzer: Is the problem were seeing a known issue with Tk?

--
nosy: +wordtech

___
Python tracker 

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



[issue42254] inspect.getmembers iterator version

2020-11-03 Thread signing_agreement


New submission from signing_agreement :

inspect.getmembers should have a generator version.

--
components: Library (Lib)
messages: 380287
nosy: signing_agreement
priority: normal
severity: normal
status: open
title: inspect.getmembers iterator version
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



[issue41796] _ast module state should be made per interpreter

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

The leak is fixed, I close again the issue. Thanks for the report Pablo.

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



[issue42252] Embeddable Python indicates that it uses PYTHONPATH

2020-11-03 Thread Tom Kent


Tom Kent  added the comment:

I'm not sure I agree with that. One possible use-case is to package it along 
with another program to use the interpreter. In this case they could use the 
other program's native language features (e.g. .Net's Process.Start(), Win32 
API's CreateProcess(), Even Python's subprocess but why?, etc) to run 
`python.exe myscript.py`. 

In this case, the user may assume that adding something to the `PYTHONPATH` env 
variable, as most of the launching methods allow, would take hold. When this 
fails, the first attempt at debugging would be to try it interactively with the 
same command, then promptly look at python --help when that fails. 

Maybe a better question is why should the embeddable distribution's python.exe 
ignore env variables? Wouldn't it make more sense to depend on the user to add 
a `-E` if that is what they desire?

--

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fd957c124c1d9c5eaf61f7af8cf266bafcb1 by Victor Stinner in 
branch 'master':
bpo-41796: Call _PyAST_Fini() earlier to fix a leak (GH-23131)
https://github.com/python/cpython/commit/fd957c124c1d9c5eaf61f7af8cf266bafcb1


--

___
Python tracker 

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



[issue42225] Tkinter hangs or crashes when displaying astral chars

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

> This version catches exceptions and reports them separately and runs directly 
> with tkinter, in about a second.

The X Error is displayed and then the process exit. Python cannot catch this 
fatal X Error.

--

___
Python tracker 

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



[issue42225] Tkinter hangs or crashes when displaying astral chars

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

The following program fails with:
---
X Error of failed request:  BadLength (poly request too large or internal Xlib 
length error)
  Major opcode of failed request:  138 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  4248
  Current serial number in output stream:  4956
---

Python program:
---
from tkinter import Tk
from tkinter.scrolledtext import ScrolledText
root = Tk()
text = ScrolledText(root, width=80, height=40)
text.pack()

for i in range(0x1, 0x4, 32):
chars = ''.join(chr(i+j) for j in range(32))
text.insert('insert', f"{hex(i)} {chars}\n")

input("Press enter to exit")
---

It seems like the first character which triggers this RenderAddGlyphs BadLength 
issue is: U+1f6c2. See attached emoji.png screenshot. As you can see, some 
emojis are rendered in color in Gnome Terminal. I guess that it uses the Gtk 3 
pango library to render these characters.

--
Added file: https://bugs.python.org/file49567/emojis.png

___
Python tracker 

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



[issue42252] Embeddable Python indicates that it uses PYTHONPATH

2020-11-03 Thread Eryk Sun


Eryk Sun  added the comment:

The embeddable distribution isn't intended for end users to run Python scripts 
from the command line, so I don't think the CLI help needs to be special cased. 
The documentation you quoted should be clarified as something like "isolated 
from user and system Python settings, including environment variables such as 
PYTHONPATH, registry settings, and installed packages". It would be helpful as 
well if the Windows download links on python.org explained or linked to the 
intended use case for the embeddable distribution. Sometimes people mistakenly 
download it when they really need a normal Python installation.

--
nosy: +eryksun

___
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-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

In PR 23131, I added a comment to _PyInterpreter_Clear() to remind me that 
trying to destroy a Python type after the last GC collection doesn't work as 
expected:

// All Python types must be destroyed before the last GC collection. Python
// types create a reference cycle to themselves in their in their
// PyTypeObject.tp_mro member (the tuple contains the type).

--

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-11-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22047
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23131

___
Python tracker 

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



[issue42246] Implement PEP 626

2020-11-03 Thread Mark Shannon


Change by Mark Shannon :


--
nosy: +nedbat

___
Python tracker 

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



[issue35455] Solaris: thread_time doesn't work with current implementation

2020-11-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +22046
pull_request: https://github.com/python/cpython/pull/23130

___
Python tracker 

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



[issue42249] Plistlib cannot create binary Plist file larger than 4GiB

2020-11-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22045
pull_request: https://github.com/python/cpython/pull/23129

___
Python tracker 

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



[issue42249] Plistlib cannot create binary Plist file larger than 4GiB

2020-11-03 Thread miss-islington


miss-islington  added the comment:


New changeset ac70175fc038e0f06034c4d61c577ef4b923464a by Miss Skeleton (bot) 
in branch '3.8':
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
https://github.com/python/cpython/commit/ac70175fc038e0f06034c4d61c577ef4b923464a


--

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-11-03 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-11-03 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue42249] Plistlib cannot create binary Plist file larger than 4GiB

2020-11-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 212d32f45c91849c17a82750df1ac498d63976be by Serhiy Storchaka in 
branch 'master':
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
https://github.com/python/cpython/commit/212d32f45c91849c17a82750df1ac498d63976be


--

___
Python tracker 

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



[issue42249] Plistlib cannot create binary Plist file larger than 4GiB

2020-11-03 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2020-11-03 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +22043
pull_request: https://github.com/python/cpython/pull/23127

___
Python tracker 

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



[issue42253] xml.dom.minidom.rst missed informations

2020-11-03 Thread Jens Diemer


New submission from Jens Diemer :

The standalone arguments was added in Python 3.9. This information is missed in 
the docu.

--
messages: 380277
nosy: jedie2
priority: normal
pull_requests: 22042
severity: normal
status: open
title: xml.dom.minidom.rst missed informations
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



[issue42246] Implement PEP 626

2020-11-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Dead code elimination will remove the `secret_debugging_code()`, but leave 
> the test. The peephole optimiser can then reduce it to a NOP, but won't 
> eliminate it as it is the only instruction for line 1.

Gotcha. I am pretty sure that this will have a similar problem as the coverage 
people were claiming when we were not properly removing all dead code (slightly 
less coverage percentage). This is not a problem of course, but we should ping 
the coverage folks so they are aware of this.

--

___
Python tracker 

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



[issue40511] IDLE: properly handle '(' and ')' within calls

2020-11-03 Thread wyz23x2


wyz23x2  added the comment:

Thanks! :D

--

___
Python tracker 

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



[issue42251] Add threading.gettrace and threading.getprofile

2020-11-03 Thread Mario Corchero


Change by Mario Corchero :


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

___
Python tracker 

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



[issue42252] Embeddable Python indicates that it uses PYTHONPATH

2020-11-03 Thread Tom Kent

New submission from Tom Kent :

According to the documentation 
https://docs.python.org/3/using/windows.html#windows-embeddable

> When extracted, the embedded distribution is (almost) fully isolated 
> from the user’s system, including environment variables, system registry 
> settings, and installed packages

The embedded distribution should ignore the environment variables. 

This is echoed in this prior issue that thought `PYTHONPATH` not being 
respected was a bug:
https://bugs.python.org/issue28245

Regardless of the decision to respect environment variables, the message that 
is displayed when running the distribution's `python --help` needs to indicate 
how it will act. 

Currently, for the embedded distribution, which doesn't respect the env 
variables, there is a section in the output from running `python -help` that 
indicates:

```
Other environment variables:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH   : ';'-separated list of directories prefixed to the
   default module search path.  The result is sys.path.
PYTHONHOME   : alternate  directory (or ;).
   The default module search path uses 
\python{major}{minor}.
PYTHONPLATLIBDIR : override sys.platlibdir.
PYTHONCASEOK : ignore case in 'import' statements (Windows).
PYTHONUTF8: if set to 1, enable the UTF-8 mode.
PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.
PYTHONHASHSEED: if this variable is set to 'random', a random value is used
   to seed the hashes of str and bytes objects.  It can also be set to an
   integer in the range [0,4294967295] to get hash values with a
   predictable seed.
PYTHONMALLOC: set the Python memory allocators and/or install debug hooks
   on Python memory allocators. Use PYTHONMALLOC=debug to install debug
   hooks.
PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale
   coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of
   locale coercion and locale compatibility warnings on stderr.
PYTHONBREAKPOINT: if this variable is set to 0, it disables the default
   debugger. It can be set to the callable of your debugger of choice.
PYTHONDEVMODE: enable the development mode.
PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.
```

This may lead users (it did lead this one) to assume that they are doing 
something wrong when for example the output of `sys.path` doesn't included 
items in `os.environ["PYTHONPATH"]`. 

Realizing that it may be difficult to achieve, the help output should match the 
state of what the interpreter will actually do if run.

--
components: Windows
messages: 380274
nosy: paul.moore, steve.dower, teeks99, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Embeddable Python indicates that it uses PYTHONPATH
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



[issue42251] Add threading.gettrace and threading.getprofile

2020-11-03 Thread Mario Corchero


New submission from Mario Corchero :

When working in a C extension from a non-python created thread which calls 
PyGILState_Ensure as it later calls a Python callback on user code, I wished 
there was a way to set the trace function similar to what a native Python 
thread would do.

We could just call sys.gettrace within the thread, but the application might 
have chosen to set threading.settrace differently.

Same applies for threading.setprofile.

--
components: Library (Lib)
messages: 380273
nosy: mariocj89
priority: normal
severity: normal
status: open
title: Add threading.gettrace and threading.getprofile
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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-03 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22040
pull_request: https://github.com/python/cpython/pull/23124

___
Python tracker 

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



[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-03 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

There is a leak (I just marked bpo-42250 as duplicate of this issue):

https://buildbot.python.org/all/#/builders/205/builds/83

OK
..
test_ast leaked [23640, 23636, 23640] references, sum=70916
test_ast leaked [7932, 7930, 7932] memory blocks, sum=23794
1 test failed again:
test_ast

test_subinterpreter() test leaks.

There are two problems:

* _PyAST_Fini() is only called in the main interpreter, I forgot to remove the 
"if _Py_IsMainInterpreter()"
* _PyAST_Fini() is called after the last GC collection, whereas AST_type 
contains a reference to itself (as any Python type) in its tp_mro member. A GC 
collection is required to destroy the type. _PyAST_Fini() must be called before 
the last GC collection.

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

___
Python tracker 

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



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:

I prefer to track the regression in bpo-41796.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> _ast module state should be made per interpreter

___
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-11-03 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I've converted _sre to multi-phase init in this branch: 
https://github.com/erlend-aasland/cpython/tree/bpo-1635741/sre

I'm waiting for GH-23101 to be merged (or rejected) before I submit the PR. 
It's a fairly large PR (1 file changed, 259 insertions(+), 173 deletions(-), 
ex. clinic code). Let me know if you want me to split it up.

Here's an overview over the commits in the branch (clinic included):
97fc9aad3f (HEAD -> bpo-1635741/sre, origin/bpo-1635741/sre) Convert _sre to 
multi-phase initialisation
 1 file changed, 55 insertions(+), 15 deletions(-)
f2cc4bdf45 Convert global state to module state
 2 files changed, 212 insertions(+), 345 deletions(-)
0d9b3cb47e Establish global module state and add types to it
 1 file changed, 28 insertions(+), 14 deletions(-)
823767cf9a Convert _sre scanner type to heap type
 1 file changed, 19 insertions(+), 37 deletions(-)
a018a9ce15 Convert _sre match type to heap type
 1 file changed, 31 insertions(+), 43 deletions(-)
7e6e997b59 Convert _sre pattern type to heap type
 1 file changed, 35 insertions(+), 44 deletions(-)
06d23e377c Add convenience macro
 1 file changed, 12 insertions(+)

--

___
Python tracker 

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



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
assignee:  -> vstinner

___
Python tracker 

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



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
components: +Tests
nosy: +BTaskaya, vstinner -pablogsal
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



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

2020-11-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22038
pull_request: https://github.com/python/cpython/pull/23122

___
Python tracker 

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



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/205/builds/83

OK
..
test_ast leaked [23640, 23636, 23640] references, sum=70916
test_ast leaked [7932, 7930, 7932] memory blocks, sum=23794
1 test failed again:
test_ast

--
messages: 380269
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_ast leaked [23640, 23636, 23640] references

___
Python tracker 

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



[issue42246] Implement PEP 626

2020-11-03 Thread Mark Shannon


Mark Shannon  added the comment:

The following code is completely eliminated by the macros.

1. if 0:
2. secret_debugging_code()

PEP 626 says that all executed lines of code must generate trace events,
so we need to emit an instruction for line 1.

Dead code elimination will remove the `secret_debugging_code()`, but leave the 
test. The peephole optimiser can then reduce it to a NOP, but won't eliminate 
it as it is the only instruction for line 1.

--
stage: patch review -> 

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 74b4eda98b650245216292ace8d7e30d3997baa7 by Erlend Egeberg 
Aasland in branch 'master':
bpo-40077: Convert mmap.mmap static type to a heap type (GH-23108)
https://github.com/python/cpython/commit/74b4eda98b650245216292ace8d7e30d3997baa7


--

___
Python tracker 

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