[issue41794] Memory leak in asyncio server

2020-09-15 Thread Bale


Bale  added the comment:

Also, if this is intended behavior and there is something that I am missing, 
you should really make it more clear in the documentation. In every project I 
found on github that uses asyncio.start_server, the bug exists

--

___
Python tracker 

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



[issue41517] Able to subclass enum with members by using multiple inheritance

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +21327
pull_request: https://github.com/python/cpython/pull/22272

___
Python tracker 

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



[issue41517] Able to subclass enum with members by using multiple inheritance

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue31870] add timeout parameter for get_server_certificate in ssl.py

2020-09-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 5.0 -> 6.0
pull_requests: +21325
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22270

___
Python tracker 

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



[issue41794] Memory leak in asyncio server

2020-09-15 Thread Bale


New submission from Bale :

In the file I attached below is a pretty simple asyncio server, it is identical 
to the echo server on the documentation except it does not disconnect after 
echoing. 

When a connection is received, it creates an object called "test object" and 
the only reference to that object is on the local scope. If all is working 
properly, when the handler function returns the test object should also be 
deleted, but I noticed the __del__ method is not being called, indicating 
python is not deleting it. It seems like a reference to the frame of the 
handler is being kept in a list (not sure where) and it is not being removed 
from it.

Here is example code of how to trigger the bug:
s = socket.socket();s.connect(("127.0.0.1", ));s.send(b"test\0")
s.close()

By sending data and closing afterwards WITHOUT using s.recv() causes the issue, 
what's interesting is that if we call s.close() immediately after sending, the 
object is deleted by the server and everything works as intended. Calling 
s.close() a few seconds after, causes the bug to happen. It should also be 
noted that if I call s.recv() before s.close(), the bug does not happen.

What's more interesting is that when I run the above code in my python3.5 
interpreter the bug does not get triggered, no matter what I do. The bug does 
also not happen when I run it in a python3.8 interpreter on my windows 
computer. When I run on the code on ubuntu on a python3.8 interpreter, the bug 
is triggered.

--
Added file: https://bugs.python.org/file49460/test_server.py

___
Python tracker 

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



[issue41794] Memory leak in asyncio server

2020-09-15 Thread Bale


Change by Bale :


--
components: asyncio
nosy: EmperorBale, asvetlov, valid22, yselivanov
priority: normal
severity: normal
status: open
title: Memory leak in asyncio server
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



[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 0705ec8a149e27023b0420ae0366d16255f6c9f7 by Patrick Reader in 
branch 'master':
bpo-41792: Add is_typeddict function to typing.py (GH-22254)
https://github.com/python/cpython/commit/0705ec8a149e27023b0420ae0366d16255f6c9f7


--
nosy: +gvanrossum

___
Python tracker 

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



[issue40288] [subinterpreters] atexit module should not be loaded more than once per interpreter

2020-09-15 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



[issue41787] adding PEP references to documentation

2020-09-15 Thread Cameron Simpson


Change by Cameron Simpson :


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

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Inada Naoki


Inada Naoki  added the comment:

PyUnicode_AsUTF8 is useful "API". But it can be implemented as C macro, C 
inline function, or functions/macros in any other languages using 
PyUnicode_AsUTF8AndSize.

PyUnicode_AsUTF8AndSize is more important for "ABI".

--

___
Python tracker 

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



[issue28694] tkinter interface to fontchooser

2020-09-15 Thread Mark Roseman


Mark Roseman  added the comment:

Elaine, I was just having a look at this the other day too! I agree, this is 
definitely worth some effort to get done.

To be honest, I'm not a fan of the vwait solution to force the dialog to be 
modal. It doesn't actually make it modal (i.e. you can still do stuff in other 
windows). Moreover, the Mac version (which is native, so couldn't easily be 
made modal via Tkinter) has a very different design than on other platforms. It 
doesn't have "ok", "apply", "cancel" buttons or similar. It's designed to just 
hang around. 

When the font dialog was originally proposed for Tk (see http://tip.tcl.tk/324) 
they'd tried a modal API first and found it unworkable.

In light of that, my preference for the official wrapper would be to mirror the 
underlying API, as per what Lance's version first tried, using a callback 
mechanism to return results. Most importantly, it would eliminate the 
assumption that there's always a way to make it modal. Documentation would be 
key. Mind you, there's no official docs for the other dialogs. I can guarantee 
it would be well-documented with an example on TkDocs anyway!

If there aren't any strong objections, I'm able to have a go at modifying 
Lance's version over the next week or so. I've got Mac, Windows, and Linux 
environments to test everything out. 

Question... I assume the official wrapper needs checks to ensure fontchooser is 
available (i.e. 8.6 or greater). If not, should the wrapper just error out? 
Would providing an alternative implementation for Tk < 8.6 be something that 
would be done in an external module, or might that be something that 
could/should be included in the official library?

--

___
Python tracker 

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



[issue41762] Documentation job fails on CIs: duplicate token description of format_spec

2020-09-15 Thread Cameron Simpson


Change by Cameron Simpson :


--
nosy: +cameron

___
Python tracker 

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



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Another oddity of this crash is that Python usually checks stack usage and 
raise RecursionError when the limit is reached.  Event handling apparently can 
bypass this.

I opened python-list thread "Need tests of turtledemo.colordemo on Windows 
installations".  Colormixer works fine for Frank Milman and MRAB. Dennis Lee 
Bieber asked whether there was a mix of 32- and 64-bit stuff.

Until someone else has the same problem, I am tempted to close this as 
local-system-specific.  ('Works for me')  I certainly have no more to say on 
this.

--

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 929112ef81ccef20d3aef25c8a1142059ee941da by Miss Islington (bot) 
in branch '3.8':
bpo-41789: honor object overrides in Enum classes (GH-22250)
https://github.com/python/cpython/commit/929112ef81ccef20d3aef25c8a1142059ee941da


--

___
Python tracker 

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



[issue36223] Execution sequence for print function

2020-09-15 Thread Ketan Sharma


Change by Ketan Sharma :


--
nosy:  -iitkgp.ke...@gmail.com

___
Python tracker 

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



[issue41749] Allow omission of imghdr.what file arg if bytes are given

2020-09-15 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

> The opening message confused me by using 'need' as 'currently required to 
> call' rather than 'required to compute (test) and necessarily needed to 
> call'; but after reading the code, I believe I understand and modified title 
> to match.

Sorry for my bad English, yes my idea was more likely your point of view. In 
the future I'll try to be more clear. 

> However, what is very problemmatic is requiring 1 of 2 different arguments.  
> For range, the first parameter is really 'start_or_stop', an int either way, 
> with the interpretation depending on the presence of a second.  This is a 
> nuisance for understanding, but a convenience in usage.  But I think 
> requiring an argument (usually) passed positionally or an argument that now 
> has to be passed by keyword, with an arbitrary letter name, is worse and less 
> justified.  So my current view is that this change should be rejected.

My intention is try to avoid a call like `what(None, b'...')`. IMO call a 
function that start with None seems a little weird (from my point of view). 
Sincerely, I don't know if for the people it's ok use `what(None, b'...')` or 
not, probably not because haven't changed since 1997.

Reading your opinion it's more clear for me that this patch should be rejected. 
So, I'll close this issue and the PR.

Thanks for the feedback, very appreciate.

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



[issue41787] adding PEP references to documentation

2020-09-15 Thread Cameron Simpson


Cameron Simpson  added the comment:

Argh. I bet that additional %s above won't work :-(

--

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


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



[issue41787] adding PEP references to documentation

2020-09-15 Thread Cameron Simpson


Cameron Simpson  added the comment:

Re the possible change to "New in version V." text, my proposal there is the 
make this become:

New in :ref:`version V `.

by modifying the definitions in sphinxdomains/changset.py from:

versionlabels = {
'versionadded':   _('New in version %s'),
'versionchanged': _('Changed in version %s'),
'deprecated': _('Deprecated since version %s'),
}

to:

versionlabels = {
'versionadded':   _('New in :ref:`version %s `'),
'versionchanged': _('Changed in :ref:`version %s `'),
}

and adding a:

:: _whatsnew-3.7:

to Doc/whatsnew/3.7.rst and likewise for the other whatsnew files.

That requires a change to both the docs and sphinx, and is independent of the 
PEP reference additions. I'll make a distinct PR for this, unrelated to the 
other PRs.

In an ideal world we could be more precise by using one of the 
_whatsnew37-feature anchors where they are present, but I don't see how to 
integrate that into the versionadded directives (absent something quite 
intrusive). The above change makes a docs-wide sweep immediately without 
additional work.

--

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 95b81e2f8c955823dbf5632a817902b8a4916eaa by Miss Islington (bot) 
in branch '3.9':
bpo-39587: Enum - use correct mixed-in data type (GH-22263) (GH-22266)
https://github.com/python/cpython/commit/95b81e2f8c955823dbf5632a817902b8a4916eaa


--

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21323
pull_request: https://github.com/python/cpython/pull/22267

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 49917d576a578c8c29b8dbcbd5257c366a53d498 by Miss Islington (bot) 
in branch '3.9':
bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)
https://github.com/python/cpython/commit/49917d576a578c8c29b8dbcbd5257c366a53d498


--

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 22415ad62555d79bd583b4a7d6a96006624a8277 by Ethan Furman in 
branch 'master':
bpo-41789: honor object overrides in Enum classes (GH-22250)
https://github.com/python/cpython/commit/22415ad62555d79bd583b4a7d6a96006624a8277


--
nosy: +miss-islington

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 8f8ebcca95d3b6ed0a522a9736ab53d6d4f0208c by Miss Islington (bot) 
in branch '3.8':
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
https://github.com/python/cpython/commit/8f8ebcca95d3b6ed0a522a9736ab53d6d4f0208c


--

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +21321
pull_request: https://github.com/python/cpython/pull/22265

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21322
pull_request: https://github.com/python/cpython/pull/22266

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1 by Ethan Furman in 
branch 'master':
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
https://github.com/python/cpython/commit/bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1


--

___
Python tracker 

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



[issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)

2020-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

s390x Debian 3.x:
https://buildbot.python.org/all/#/builders/49/builds/75

Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 
2)
Warning -- Dangling thread: <_MainThread(MainThread, started 4396138073968)>
Warning -- Dangling thread: 

--

___
Python tracker 

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



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I have a draft PR but haven't checked it in yet.  Will do so shortly :-)

--

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Ethan Furman  added the comment:

Yes, the change only considered types with their own copy of `__new__` to be 
actual data types, so in 3.6 `HexInt` was the recognized data type, but in 3.7+ 
it was `int` -- which also meant that HexEnum was considered a simple mix-in 
and its `__repr__` was used instead of `Enum.__repr__`.

--

___
Python tracker 

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



[issue13340] list.index does not accept None as start or stop

2020-09-15 Thread Irit Katriel


Irit Katriel  added the comment:

The error message was fixed under issue29935, so I think this issue can now be 
closed.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21320
pull_request: https://github.com/python/cpython/pull/22264

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 2e87774df1a0eaf2a1fe8cc4d958df60f7125b6e by Batuhan Taskaya in 
branch 'master':
bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)
https://github.com/python/cpython/commit/2e87774df1a0eaf2a1fe8cc4d958df60f7125b6e


--
nosy: +miss-islington

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


--
versions: +Python 3.10, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

I also tested bpo-41261 reproducer and 
https://bugs.python.org/issue41194#msg372863 reproducer on 3.9 and master 
branches: Python doesn't crash.

--

___
Python tracker 

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



[issue39587] Mixin repr overrides Enum repr in some cases

2020-09-15 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. I tested manually: the fix works as expected.

I reproduced https://bugzilla.redhat.com/show_bug.cgi?id=1871992#c1 bug (I had 
to comment the workaround of the mercurial package in Fedora) on 3.9:

make[1]: Entering directory '/home/vstinner/mercurial/mercurial-5.4/doc'
/home/vstinner/python/3.9/python gendoc.py "hgrc.5" > hgrc.5.txt.tmp
python: Python/Python-ast.c:231: get_ast_state: Assertion `state != NULL' 
failed.

I confirm that the fix in 3.9 works as expected:

> New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in 
> branch '3.9'

=> No crash with this fix.


I also reproduced the bug in the master branch (without the fix), and I also 
confirm that the fix in master does fix the crash.

--
priority: release blocker -> 
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



[issue23832] pdb's `longlist` shows only decorator if that one contains a lambda

2020-09-15 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +pablogsal

___
Python tracker 

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



[issue37296] pdb next vs __next__

2020-09-15 Thread Irit Katriel


Irit Katriel  added the comment:

I think this ticket can be closed.

Rick can always reopen it or create a new one if there is still an open problem.

--

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue33802] Regression in logging configuration

2020-09-15 Thread Andrés Delfino

Change by Andrés Delfino :


--
nosy: +adelfino
nosy_count: 8.0 -> 9.0
pull_requests: +21317
pull_request: https://github.com/python/cpython/pull/22205

___
Python tracker 

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



[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2020-09-15 Thread Andrés Delfino

Change by Andrés Delfino :


--
nosy: +adelfino
nosy_count: 8.0 -> 9.0
pull_requests: +21316
pull_request: https://github.com/python/cpython/pull/22205

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2020-09-15 Thread Andrés Delfino

Change by Andrés Delfino :


--
nosy: +adelfino
nosy_count: 28.0 -> 29.0
pull_requests: +21315
pull_request: https://github.com/python/cpython/pull/22205

___
Python tracker 

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



[issue28694] tkinter interface to fontchooser

2020-09-15 Thread E. Paine


E. Paine  added the comment:

+1 I also think that the fontchooser should be wrapped. I briefly tested your 
wrapper, Lance, and found it worked fine on Windows but did not on my Linux 
setup (because it is non-modal).

I went about implementing my own wrapper based loosely around your's (see 
attached) and the way I overcame this problem was to use vwait (this still 
works on Windows where the call is modal). vwait is good because it returns 
once the condition is fulfilled without the need for polling or similar.

While I use the commondialog module in the wrapper, this is simply for its 
handling (in __init__) of the master (I don't think it would make sense to 
enhance the Dialog class for this wrapper).

> the awful kludge in the show method (creating a Frame widget just so that 
> some low-level operations can be performed) is repugnant to me

You're going to moan at me then for using something similar in the attached! 
The reason I use it is to avoid the logic found on line 77 of your wrapper and 
*hopefully* make the code more readable (whether I achieve this is somewhat 
debatable).

> I have access only to Windows OS

Is this still the case or can you now test on a different system which is 
non-modal?


Do you wish to go ahead with authoring a patch for this or would you prefer me 
to do it? (I would appreciate you reviewing it either way and you would still 
get credit in the news as I took sections from your wrapper) If everything goes 
well, we can hopefully get this into Python 3.10 (as this is a new feature, it 
won't be back-ported to 3.9 and before).

--
nosy: +epaine
versions: +Python 3.10 -Python 3.7
Added file: https://bugs.python.org/file49459/fontchooser.py

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PyUnicode_AsUTF8() is used 3 times more than PyUnicode_AsUTF8AndSize().

$ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8AndSize\(' '{}' + | wc 
-l
35
$ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8\(' '{}' + | wc -l
101

--

___
Python tracker 

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



[issue41052] Opt out serialization/deserialization for heap type

2020-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are other heap types implemented in C in the stdlib and third-party 
libraries for which pickling with protocols 0 and 1 works incorrectly. It would 
be better to fix copyreg._reduce_ex() instead of disabling pickling for these 
types one by one.

>From PEP 307:


> Let D be the class on the object to be pickled. First, find the nearest base 
> class that is implemented in C (either as a built-in type or as a type 
> defined by an extension class). Call this base class B, and the class of the 
> object to be pickled D. Unless B is the class 'object', instances of class B 
> must be picklable, either by having built-in support (as defined in the above 
> three bullet points), or by having a non-default __reduce__ implementation. B 
> must not be the same class as D (if it were, it would mean that D is not 
> implemented in Python).

The problem is with determining which class is implemented in C. The current 
code implies that heap types are implemented in Python, and static types are 
implemented in C. It is not always true, because some heap types can be 
implemented in C.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38113] Remove statics from ast.c

2020-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in 
branch '3.9':
[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
https://github.com/python/cpython/commit/55e0836849c14fb474e1ba7f37851e07660eea3c


--

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in 
branch '3.9':
[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
https://github.com/python/cpython/commit/55e0836849c14fb474e1ba7f37851e07660eea3c


--

___
Python tracker 

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



[issue38113] Remove statics from ast.c

2020-09-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 5.0 -> 6.0
pull_requests: +21314
pull_request: https://github.com/python/cpython/pull/22258

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21313
pull_request: https://github.com/python/cpython/pull/22258

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Guido van Rossum


Change by Guido van Rossum :


--
assignee: docs@python -> 
stage:  -> needs patch

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

The forwarding of `__class__`, and the resulting difference between 
`type(list[int])` and `list[int].__class__` are intentional.

I think overriding `__dir__` along the lines suggested by Allan (but in C of 
course) would be the best solution.

--

___
Python tracker 

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



[issue41790] C-API documentation ignores heap types and says type objects must never be deallocated

2020-09-15 Thread Ammar Askar


Change by Ammar Askar :


--
title: C-API documentation -> C-API documentation ignores heap types and says 
type objects must never be deallocated

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Alex Gaynor


Alex Gaynor  added the comment:

I think less is more, one API is plenty :-)

It looks to me like the API is already supported on PyPy, so I think it's fine 
from that perspective: 
https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.7/pypy/module/cpyext/unicodeobject.py#L493

--

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e5fbe0cbd4be99ced5f000ad382208ad2a561c90 by Victor Stinner in 
branch 'master':
bpo-41631: _ast module uses again a global state (#21961)
https://github.com/python/cpython/commit/e5fbe0cbd4be99ced5f000ad382208ad2a561c90


--

___
Python tracker 

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



[issue38113] Remove statics from ast.c

2020-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e5fbe0cbd4be99ced5f000ad382208ad2a561c90 by Victor Stinner in 
branch 'master':
bpo-41631: _ast module uses again a global state (#21961)
https://github.com/python/cpython/commit/e5fbe0cbd4be99ced5f000ad382208ad2a561c90


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue41793] Inaccuracy about reflected operands in datamodel docs.

2020-09-15 Thread wim glenn


Change by wim glenn :


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

___
Python tracker 

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



[issue41793] Inaccuracy about reflected operands in datamodel docs.

2020-09-15 Thread wim glenn


New submission from wim glenn :

Qualifying that the right operand's type must be a *strict* subclass for the 
reflected method to take precedence avoids an edge case / counter-example when 
the types are actually equal.

>>> class A:
... def __add__(self, other):
... print(1)
... def __radd__(self, other):
... print(2)
...
>>> A() + A()
1
>>> issubclass(A, A)
True

--
assignee: docs@python
components: Documentation
messages: 376944
nosy: docs@python, wim.glenn
priority: normal
severity: normal
status: open
title: Inaccuracy about reflected operands in datamodel docs.

___
Python tracker 

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



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-09-15 Thread wim glenn


wim glenn  added the comment:

Hi Raymond, any update on this?

--
nosy: +wim.glenn

___
Python tracker 

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



[issue21644] Optimize bytearray(int) constructor to use calloc()

2020-09-15 Thread Bruce Merry


Bruce Merry  added the comment:

Was this abandoned just because nobody had the time, or was there a problem 
with the approach? I independently wanted this optimisation, and have ended up 
implementing something very similar to what was reverted in 
https://hg.python.org/lookup/dff6b4b61cac.

In a benchmark that creates a large bytearray, then fills it with 
socket.readinto, I'm seeing a 2x performance improvement on Linux, and from 
some quick benchmarking it seems to be just as fast as the old code for small 
arrays that are allocated from the pool.

--
nosy: +bmerry

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What about PyUnicode_AsUTF8? Should it be made public too or left for internal 
use only?

What about third-party implementations of Python? How hard to implement this 
API on an implementation without reference counts? It is interesting to hear 
the expert opinion of the core developers of PyPy.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Okay, so IIRC if we stop forwarding __class__ (add it as an exception to 
attr_exceptions) it would return us the original dir(), and also solve the 
inconsistency of the example you gave;

> >>> list.__class__
> 
> >>> list[int].__class__
> 
>
> >>> type(list)
> 
> >>> type(list[int])
> 

but the problem is that, it is not 'exactly' complying with the specs at PEP 
585. I am aware that we already added some extras to this list 
(https://www.python.org/dev/peps/pep-0585/#parameters-to-generics-are-available-at-runtime)
 like __mro_entries__ etc, but __class__ looks like a tricky problem. 
@gvanrossum any comments?

--

___
Python tracker 

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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset a0da90720d5330c53b8083272374ede1c7a1e33a by Miss Islington (bot) 
in branch '3.8':
bpo-41776: Revise example of "continue" in the tutorial documentation 
(GH-22234) (GH-22256)
https://github.com/python/cpython/commit/a0da90720d5330c53b8083272374ede1c7a1e33a


--

___
Python tracker 

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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 0cc037f8a72c283bf64d1968e34cbdc22b0e3010 by Miss Islington (bot) 
in branch '3.9':
bpo-41776: Revise example of "continue" in the tutorial documentation 
(GH-22234) (GH-22255)
https://github.com/python/cpython/commit/0cc037f8a72c283bf64d1968e34cbdc22b0e3010


--

___
Python tracker 

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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21311
pull_request: https://github.com/python/cpython/pull/22256

___
Python tracker 

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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 7bcc6456ad4704da9b287c8045768fa53961adc5 by Neeraj Samtani in 
branch 'master':
bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234)
https://github.com/python/cpython/commit/7bcc6456ad4704da9b287c8045768fa53961adc5


--

___
Python tracker 

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



[issue41776] Revise example of "continue" in the tutorial documentation

2020-09-15 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Allan Daemon


Allan Daemon  added the comment:

> I actually have no idea where dir() gets its information.

I will share what I find out already, so it may hopefully be helpful.

The dir function used is the general object.__dir__ function, defined in 
Objects/typeobject.c:type___dir___impl(), that just takes everything from 
__dict__ of the class and its bases.

But the GenericAlias is trying hard pretending to be the origin class, so when 
you ask for the __dict__, it gives the original class, not the GenericAlias:

>>> list[int].__dict__ == list.__dict__
True

There are also some other things that seems a bit strange, but it may just be 
right:

>>> list.__class__

>>> list[int].__class__


>>> type(list)

>>> type(list[int])


This happens because of the tp_getattro function 
genericaliasobject.c:ga_getattro(), that takes the attributes from the origin 
except for the following names, that are taken from the GenericAlias itself:
"__origin__",
"__args__",
"__parameters__",
"__mro_entries__",
"__reduce_ex__",
"__reduce__",

So, when the dir() is getting the __dict__, it gets list.__dict__ and base 
(object) instead of GenericAlias. Looking the ga_getattro() calls when dir() is 
fired, it also gets the __class__ attribute after getting the __dict__. Adding 
one or another makes the dir() showing up the GenericAlias attributes, but 
others went missing.

An idea to solve this spefic issue could be overriding the __dir__ method, 
something like this python code (written in c, of course):

def __dir__(self):
r = super().__dir__()
return r + attribute_names_list + method_names_list


But I wonder what else should not be forwarded to origin.

--
components: +Interpreter Core -Documentation, Library (Lib)

___
Python tracker 

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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Matt, you can add this to your own unit tests by just subclassing 
unittest.TestCase and adding a new assertDuration method. Copy the existing 
method's implementations (its open source and you should have the source code 
already, but if not you can find it here:

https://github.com/python/cpython/blob/3.8/Lib/unittest/__init__.py

If you are looking for some timing code to use (in case you don't already have 
your own) you can try this:

https://github.com/ActiveState/code/tree/master/recipes/Python/577896_Benchmark_code

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-09-15 Thread Ruben Vorderman


Ruben Vorderman  added the comment:

Hi, thanks all for the comments and the help.

I have created the bindings using Cython. The project is still a work in 
progress as of this moment. I leave the link here for future reference.

Special thanks for the Cython developers for enabling these bindings.

https://github.com/rhpvorderman/python-isal

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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the proposal Matthew, unfortunately, this addition is not reliable 
enough for the standard library and OTOH can be easily implemented in-situ for 
the users that know what the limitations are.

--

___
Python tracker 

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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Pablo. It is too unreliable.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Patrick Reader


Change by Patrick Reader :


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

___
Python tracker 

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



[issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict

2020-09-15 Thread Patrick Reader


New submission from Patrick Reader :

See https://github.com/python/typing/issues/751

--
components: Library (Lib)
messages: 376931
nosy: pxeger
priority: normal
severity: normal
status: open
title: No (public) way to dynamically introspect if an annotation is a TypedDict

___
Python tracker 

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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think this can be very error prone because a particular operation could be 
interrupted by GIL switching in the middle of the context manager and be 
reported as taking much more than the execution of the code itself is taking. 
This will be very confused to users that expect it to "just work"

--
nosy: +pablogsal

___
Python tracker 

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



[issue41783] Standard Color class

2020-09-15 Thread Mertcan

Mertcan  added the comment:

For example, consider the libraries of stdlib and PyPI that are available now 
and may be in the future. In libraries like Tkinter or Turtle, a universal 
color class can make the code clearer. Color operations can also be performed 
by representing the Color class. For example, deriving a CLI color code from 
the RGB values ​​it represents. Doesn't such a thing provide more advanced 
possibilities for the existing cli library (cmd) and reduce the need for PyPI 
API?

I think this can provide a common use for WEB and GUI libraries. It can also be 
beneficial in terms of performance as it can reduce the number of parameters 
for most functions.

Python is a programming language widely used as CLI. With a built-in color 
library, wouldn't we increase the appeal and language coverage? I see that 
there are many libraries on PyPI regarding colors, and most of them are built 
on CLI. Some of these are really used too much.

We often encounter issues like "How can I print in color in Console?" in places 
like Stackoverflow.

I think that many color-related or color libraries do not have a color class on 
stlib, so it might be too crowded for them to make a color class for 
themselves, especially when using multiple color-oriented libraries. Even if 
they don't make a special class for them, the number of parameters will 
naturally be higher. However, I think a standard color class can prevent all of 
these and increase readability.

--

___
Python tracker 

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



[issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set?

2020-09-15 Thread Pavel Raiskup


Pavel Raiskup  added the comment:

Check out this default behavior of /bin/cp though:

$ mkdir a b
$ echo content > a/file
$ ln -s non-existing b/file
$ cp a/file b
cp: not writing through dangling symlink 'b/file'

Shouldn't shutil.copy*() refuse to write trough a dangling symlink to 
non-existent
file?  (ATM it seems it just silently creates the file, or fails if it can not 
be
created).

--
nosy: +Pavel Raiskup

___
Python tracker 

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