[issue42440] MACBOOK Python launcher

2020-11-25 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A few functions in `tasks.py` a left and documentation should be updated.

--

___
Python tracker 

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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset f533cb80cbbb7acdf9ce1978cfba095ce5eeedaa by Yurii Karabas in 
branch 'master':
bpo-42392: Remove loop parameter from asyncio.streams (GH-23517)
https://github.com/python/cpython/commit/f533cb80cbbb7acdf9ce1978cfba095ce5eeedaa


--

___
Python tracker 

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



[issue39529] Deprecate get_event_loop()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I think the deprecation of `set_event_loop()` is a good idea.
The function is not required by `asyncio.run()` implementation.

--

___
Python tracker 

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



[issue41200] Add pickle.loads fuzz test

2020-11-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Given that pickle is documented as:

"""
Warning The pickle module is not secure. Only unpickle data you trust.

It is possible to construct malicious pickle data which will execute arbitrary 
code during unpickling.
"""

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

What is fuzzing pickle.loads() expected to accomplish?

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue42469] Space in re's {min, max} should raise an error, rather than fail silently

2020-11-25 Thread Reuven Lerner


New submission from Reuven Lerner :

I just discovered that having whitespace inside of {min,max} causes the regexp 
to report no matches, rather than an error:

>>> import re
>>> s = 'abbccce'
>>> re.findall('d{1, 4}', s)
[]
>>> re.findall('d{1,4}', s)
['']

Ruby and JavaScript have the same behavior, so maybe this is standard in some 
way. But I find it hard to believe that it's desirable. (My post on Twitter 
about this confirmed that a whole lot of people were bitten by this bug in the 
past.)

BSD grep, GNU grep, and GNU Emacs all raise an error upon encountering this 
whitespace, which strikes me as less surprising and more useful behavior.

--
components: Regular Expressions
messages: 381879
nosy: ezio.melotti, mrabarnett, reuven
priority: normal
severity: normal
status: open
title: Space in re's {min,max} should raise an error, rather than fail silently
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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks for the suggestion though ThatXliner.  It is good for us to keep these 
things in mind for future API designs.  That __bool__ exists and could be 
meaningful in some contexts is often overlooked.

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

My concern with this as an API change is if anyone is returning or passing a 
CompletedProcess instance around it may well be used in a context where None is 
a potential value.  Existing code in that situation would ordinarily be doing a 
bare `if cp:` test on it to check for None.

I don't ordinarily see code that passes a CompletedProcess instance around... 
but it seems like an annoying potentially breaking change to make for a very 
small added value.

`if cp.returncode:` is very explicit about its intent when read or written.  

`if cp:` is not, and could even be misread by someone unaware of the API to 
assume that cp is a number most likely the returncode itself and misunderstand 
that as "the returncode was non-zero" when it really means the opposite.

If we had done this on day one of the run() -> CompletedProcess API this 
would've been a fine choice.  But changing it now doesn't seem like a good idea 
to me.

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



[issue42461] os.statvfs_result doesn't show f_fsid

2020-11-25 Thread haoyixing


haoyixing <359062...@qq.com> added the comment:

Under my mac and fedora test environment, calling statfs in C language as a 
non-privileged user both returned meaningful fsid. And in python 
os.statvfs(some_path).f_fsid can also show the f_fsid of path. So I didn't see 
any inconveniences so far if object print shows it.

--

___
Python tracker 

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks Eric, I will update those quotation marks in the next edit to the 
recipes.

Peter, sorry I closed this so abruptly.  All suggestions are welcome.  In this 
case, readability trumps other rules.  Also, PEP 257 wasn't intended to be 
strict.  Lots of code in the standard library follows local conventions which 
vary module to module.

--

___
Python tracker 

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



[issue42376] Add helpers to populate modules in C

2020-11-25 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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here's a before and after example from my code.

==

class GraphvizResult(NamedTuple):
svg: str
err: str

def create_svg(dot: str) -> GraphvizResult:
'Convert a string in the "dot" format to an "svg" string using Graphviz'
cp = run(['dot', '-Tsvg'], input=dot, capture_output=True, text=True)
result = cp.stdout
if not cp.returncode:
i = result.index(' GraphvizResult:
'Convert a string in the "dot" format to an "svg" string using Graphviz'
cp = run(['dot', '-Tsvg'], input=dot, capture_output=True, text=True)
result = cp.stdout
if cp:
i = result.index('

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



[issue31904] Python should support VxWorks RTOS

2020-11-25 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +22403
pull_request: https://github.com/python/cpython/pull/23518

___
Python tracker 

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue41103] Removing old buffer support

2020-11-25 Thread Inada Naoki


Inada Naoki  added the comment:

Thank you for reporting. I removed these APIs to get such feedback as early as 
possible.

We are free to revive these APIs if it breaks too much and some projects can 
not be fixed before Python 3.10 release.

Some project maintainers ignore deprecations and wait compile errors to fix 
soemthing. (e.g. 
https://github.com/rogerbinns/apsw/issues/288#issuecomment-62322)
That's why we need to break some projects during alpha phase.


> What is the benefit of removing this? Is copy pasting the compatibility layer 
> to (possibly many) different projects worth the "cleanup"?

Oh, no need to copy-paste compatibility layer for all projects. They can 
migrate to new APIs.

--

___
Python tracker 

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Greg, do you have an opinion here?

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread ThatXliner


New submission from ThatXliner :

I propose making subprocess.CompletedProcess a truthy value if the returncode 
is 0. False, otherwise.

--
components: Library (Lib)
messages: 381871
nosy: ThatXliner
priority: normal
severity: normal
status: open
title: subprocess.CompletedProcess: Add boolean value
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



[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread ThatXliner


Change by ThatXliner :


--
type:  -> enhancement

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Zachary Ware


Zachary Ware  added the comment:

Moving my notes from PR23514 to here, the issue that that PR addressed is not 
Gentoo-specific; here's a simple reproducer on Ubuntu:

./python -c "import pty;pty.spawn('./python -m test -v test_pty'.split())"

--

___
Python tracker 

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



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

The feature request reminds me of 
https://github.com/python-trio/trio/issues/611. Nathaniel and Yury have been 
discussing the idea of a MultiError handler for a while.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue40857] tempfile.TemporaryDirectory() context manager can fail to propagate exceptions generated within its context

2020-11-25 Thread Irit Katriel


Irit Katriel  added the comment:

Too late for 3.7 now, closing.

--
nosy: +iritkatriel
resolution:  -> fixed
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



[issue37317] asyncio gather doesn't handle custom exceptions that inherit from BaseException

2020-11-25 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks for reporting. This has been fixed in 3.8 and it's too late for 3.7.

--
nosy: +iritkatriel
resolution:  -> fixed
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



[issue27839] "Python [...] calls sys.displayhook() on unhandled exceptions"

2020-11-25 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks for reporting. That line has been edited out of the doc in the meantime.

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



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel

___
Python tracker 

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



[issue41103] Removing old buffer support

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

PyObject_AsCharBuffer() is dangerous: it returns a dangling pointer by design. 
PyObject_GetBuffer() design is safer: the API ensures that the buffer remains 
valid until PyBuffer_Release() is called.

PyQt5 was updated to use the safe PyObject_GetBuffer()/PyBuffer_Release(). 
PyQt4 is no longer updated, that's why I proposed a downstream fix which 
copy/paste the old code. Changing PyQt4 to use the safe API was not worth it, 
since it's complex to redesign the impacted function qpycore_encode().

--

___
Python tracker 

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



[issue42467] slice().indices() returns incorrect values

2020-11-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

This is essentially a duplicate of #11842. In short, slice.indices is working 
as intended here. It's best to think of slice.indices as start, stop and step 
arguments that could be provided to the range built-in function to get the set 
of relevant indices.

--
nosy: +mark.dickinson
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> slice.indices with negative step and default stop

___
Python tracker 

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



[issue21564] Declaration of EVP_MD_CTX causes crash when switching between OpenSSL 0.9 and 1.0

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

The code has changed a lot since this bug was opened. It's no longer an issue. 
Thanks for checking!

--
resolution: out of date -> fixed
stage:  -> 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



[issue42467] slice().indices() returns incorrect values

2020-11-25 Thread misianne


New submission from misianne :

I have a problem with slice().indices():

x=[0,1,2,3,4,5,6,7,8,9]*10
x[-91:-101:-3] # == [9, 6, 3, 0] OK!
x[slice(*slice(-91,-101,-3).indices(len(x)))] # == [] WRONG!

This is correct:

x[-91:-100:-3] # == [9, 6, 3] OK!
x[slice(*slice(-91,-100,-3).indices(len(x)))] # == [9, 6, 3] OK!

This is not:

x[-91:-101:-3] # == [9, 6, 3, 0] OK!
x[slice(*slice(-91,-101,-3).indices(len(x)))] # == [] WRONG!

The problem is that 
slice(-91,-101,-3).indices(len(x))
returns:
(9,-1,-3)
which result in an empty list, while:
(9,None,-3)
gives the correct result.

--
components: Interpreter Core
messages: 381862
nosy: misianne
priority: normal
severity: normal
status: open
title: slice().indices() returns incorrect values
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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Yurii Karabas


Change by Yurii Karabas <1998uri...@gmail.com>:


--
pull_requests: +22402
pull_request: https://github.com/python/cpython/pull/23517

___
Python tracker 

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



[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue42440] MACBOOK Python launcher

2020-11-25 Thread Rawad Bader


Rawad Bader  added the comment:

Thank you so much for all your help. I just ran this command pip install 
opencv-python opencv-python-headless and it solves the problem.

--

___
Python tracker 

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



[issue39529] Deprecate get_event_loop()

2020-11-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am writing a code (it is not trivial to emit correct warning) and I have a 
question. What to do if the loop was set by set_event_loop()? Currently 
get_event_loop() can return a loop without creating a new loop while 
get_running_loop() raises an error. Should get_event_loop() still support this 
in future or set_event_loop() will be deprecated?

--

___
Python tracker 

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



[issue42440] MACBOOK Python launcher

2020-11-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Thanks for the update. I cannot test this myself at the moment, my laptop does 
not yet run Big Sur and I'm only running it in VM's on a mac mini without a 
webcam. 

This might be a problem with opencv, 

 mentions a similar issue (with a workaround, but no clear solution)

--

___
Python tracker 

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



[issue21564] Declaration of EVP_MD_CTX causes crash when switching between OpenSSL 0.9 and 1.0

2020-11-25 Thread Irit Katriel


Irit Katriel  added the comment:

This patch is out of date with the code, but comparing it with the code I think 
the fixes were made. Christian, can you confirm?

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
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



[issue37865] tempfile.NamedTemporaryFile() raises exception on close() when file is absent

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> NamedTemporaryFile with delete=True should not fail if file 
already deleted

___
Python tracker 

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



[issue37718] 2to3 exception handling

2020-11-25 Thread Irit Katriel


Irit Katriel  added the comment:

Right, the message field on exceptions was removed in python 3 (it was 
deprecated since Python 2.6).

2to3 can't automatically fix this, because as a static translator it doesn't 
know that the object on which you are accessing .message is an exception.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

We have reached an impasse. Therefore I have contacted the steering council and 
requested mediation. Victor will abstain from the decision process.

--

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Don't get me wrong.
I don't want to put my vote in this hot discussion but mention my use case. 
test.support can solve my need.
On another hand, very many Python batteries exist to solve third-party needs 
and are not required by CPython itself.

So I'm +0 for adding this function -- but can live without it.

--

___
Python tracker 

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



[issue41103] Removing old buffer support

2020-11-25 Thread Miro Hrončok

Miro Hrončok  added the comment:

I've just seen a fix of PyQt4 that basically copy pastes (some of) the removed 
code to PyQt4:

https://src.fedoraproject.org/rpms/PyQt4/pull-request/2#request_diff

What is the benefit of removing this? Is copy pasting the compatibility layer 
to (possibly many) different projects worth the "cleanup"?

In Fedora, at least 7 packages are broken so far:

PyQt4: https://bugzilla.redhat.com/show_bug.cgi?id=1895298
libsolv: https://bugzilla.redhat.com/show_bug.cgi?id=1896411
m2crypto: https://bugzilla.redhat.com/show_bug.cgi?id=1897148
apsw: https://bugzilla.redhat.com/show_bug.cgi?id=1897500
djvulibre: https://bugzilla.redhat.com/show_bug.cgi?id=1897558
wsaccel: https://bugzilla.redhat.com/show_bug.cgi?id=1899550
webassets: https://bugzilla.redhat.com/show_bug.cgi?id=1899555

--
nosy: +hroncok, vstinner

___
Python tracker 

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



[issue38787] PEP 573: Module State Access from C Extension Methods

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

FYI Cython doesn't support this PEP yet: 
https://github.com/cython/cython/issues/3917

--

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 87f7ab5359bc12eeb858272b7bd58e132cb9c176 by Andrew Svetlov in 
branch 'master':
bpo-41818: test_openpty succeed on Gentoo, don't expect to fail on this 
platform (GH-23514)
https://github.com/python/cpython/commit/87f7ab5359bc12eeb858272b7bd58e132cb9c176


--

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Matthias Klose


Matthias Klose  added the comment:

> I just needed such functionality for PTY tests

another use case for a test. so please add it to the test framework, also 
suggested by Marc.

--

___
Python tracker 

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



[issue42466] asyncio loop.getaddrinfo raises RuntimeError

2020-11-25 Thread Giacomo Caironi


New submission from Giacomo Caironi :

import asyncio
import traceback
from threading import Thread


class Test(Thread):
def __init__(self):
super().__init__()
self.loop = asyncio.new_event_loop()

async def getaddrinfo(self, loop):
try:
print(await loop.getaddrinfo("www.google.com", 8333))
except Exception:
print(traceback.format_exc())

def run(self):
loop = self.loop
asyncio.set_event_loop(loop)
asyncio.run_coroutine_threadsafe(self.getaddrinfo(loop), loop)
loop.run_forever()


test = Test()
test.start()

Executing the previous code throws RuntimeError("can't register atexit after 
shutdown") only in python3.9. Strangely it doesn't happen when I execute the 
code in interactive mode. 

I think this is related to https://bugs.python.org/issue41962

--
components: asyncio
messages: 381850
nosy: asvetlov, kappa, yselivanov
priority: normal
severity: normal
status: open
title: asyncio loop.getaddrinfo raises RuntimeError
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I just needed such functionality for PTY tests: 
https://github.com/python/cpython/pull/23514

--
nosy: +asvetlov

___
Python tracker 

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



[issue42465] Reference to subclass method resolve() in PurePath docs

2020-11-25 Thread John Engelke

New submission from John Engelke :

The text: 

'If you want to walk an arbitrary filesystem path upwards, it is recommended to 
first call Path.resolve() so as to resolve symlinks and eliminate “..” 
components.' 

should be moved or changed to 

'If you want to walk a concrete path upwards, it is recommended to first call 
Path.resolve() so as to resolve symlinks and eliminate “..” components.'

Rationale: Wording is confusing as the resolve() method doesn't exist for 
PurePath, PurePosixPath nor PureWindowsPath. It's unclear that the method 
applies only to concrete implementations of the Path subclass.

This should be resolved by either altering the above text or (preferably) 
moving it to the concrete Path section.

NOTE: PurePath (PurePosixPath, PureWindowsPath) operations are described in 
docs as "purely computational" components that "don’t actually access a 
filesystem." https://docs.python.org/3.7/library/pathlib.html#pure-paths

--
assignee: docs@python
components: Documentation
messages: 381848
nosy: docs@python, john.engelke
priority: normal
severity: normal
status: open
title: Reference to subclass method resolve() in PurePath docs
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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

> In addition to the above, if a major revision is made to pty, I'd suggest 
> also addressing the issue of "master/slave" terminology

In bpo-34605, I chose to leave the pty module unchange since it *seems* like 
"master_fd" and "slave_fd" is part of the API. See my rejected PR 9100.

More recently, I discussed with a glibc maintainer who is open to change the 
openpty() manual page to avoid "master" and "slave" terms.

In fact, these terms are not part of the API. They are just variable names in a 
manual page.

"parent" and "child" terms would work here. I'm not sure of the exact 
relationship between the two file descriptors.

--

___
Python tracker 

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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-11-25 Thread Bhushan Shelke


Bhushan Shelke  added the comment:

I had uploaded one file(simple_flask.py) to be used as server to the ticket 
when I created the ticket. Since ticket allows only one file upload, I'd pasted 
relevant code in ticket itself. I've now uploaded the client python 
file(flask_client.py) to ticket which should help you reproduce this. This is 
not using any third party library.

Also regarding content-length - It was part triaging I was doing, I continue to 
get the issue even if I remove that header completely. You can notice in sample 
client program that I have attached.

--
Added file: https://bugs.python.org/file49623/flask_client.py

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

> https://github.com/python/cpython/pull/23514 has the fix, waiting for all 
> buildbots finish before pressing "Merge" button.

Thanks for working on a fix :-)

--

___
Python tracker 

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



[issue42464] Pathlib resolve() resolves non-existent ".." components with strict=False

2020-11-25 Thread John Engelke


New submission from John Engelke :

The below snippet results in the symlink "/home" resolving as expected. 
However, documentation at 
https://docs.python.org/3.7/library/pathlib.html#pathlib.Path.resolve suggests, 
"If strict is False, the path is resolved as far as possible and any remainder 
is appended without checking whether it exists."

>>> from pathlib import Path
>>> host_path_str = "/home/somewhere/there/../nowhere"
>>> host_path = Path(host_path_str)
>>> host_path
PosixPath('/home/somewhere/there/../nowhere')
>>> host_path.resolve()
PosixPath('/System/Volumes/Data/home/somewhere/nowhere')

Expected results (based on the wording above): 

>>> host_path.resolve()
PosixPath('/System/Volumes/Data/home/somewhere/there/../nowhere')

Right now the ".." pieces are universally removed. I'm not exactly sure exactly 
how symlinks resolve, but this might create unexpected results. 

No part of the path component "somewhere/there/../nowhere" exists. When 
strict=True this would yield an error. So when strict=False, and it doesn't 
resolve, documentation implies that would be re-added to the resolved section.

--
components: Library (Lib)
messages: 381844
nosy: john.engelke
priority: normal
severity: normal
status: open
title: Pathlib resolve() resolves non-existent ".." components with strict=False
type: behavior
versions: Python 3.10, 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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

https://github.com/python/cpython/pull/23514 has the fix, waiting for all 
buildbots finish before pressing "Merge" button.
Gentoo bots are green.

--

___
Python tracker 

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



[issue42458] Pathlib resolve() on Mac prepends path

2020-11-25 Thread John Engelke


Change by John Engelke :


--
title: Pathlib resolve() on Mac Catalina prepends secret path -> Pathlib 
resolve() on Mac prepends path

___
Python tracker 

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



[issue42458] Pathlib resolve() on Mac Catalina prepends secret path

2020-11-25 Thread John Engelke


Change by John Engelke :


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



[issue42458] Pathlib resolve() on Mac Catalina prepends secret path

2020-11-25 Thread John Engelke


John Engelke  added the comment:

Thanks @ronaldoussoren. This bug report is flawed for a couple reasons, 
notwithstanding some assumptions I made incorrectly. (SIP actually makes 
"/home" a symlink so that resolved correctly.) So I am retracting it as-is 
because I can't edit the original report. 

The documentation for the behavior of resolve() is talking about using 
resolve() in the PurePath section. And, resolve() is removing "/../" when the 
path doesn't really exist locally. I'll open clearer tickets about those when I 
have a chance.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue42463] test_pty.test_openpty() failed on x86 Gentoo Installed with X 3.x: unexpected success

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

Regression related to bpo-41818:
https://github.com/python/cpython/commit/c13d89955d9a2942c6355d6839d7096323244136

--

___
Python tracker 

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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

I also noticed that you are passing an explicit content length. 
{'Content-Length' : '0'} is wrong for a POST payload of "{}" with standard 
transfer encoding. It should be len("{}") == 2.

A zero content length only valid for chunked transfer encoding, which either 
requires header {"transfer-encoding": "chunked"} or encode_chunked=True.

--

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

This change broke x86 Gentoo buildbots: bpo-42463.

--
nosy: +vstinner

___
Python tracker 

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



[issue42463] test_pty.test_openpty() failed on x86 Gentoo Installed with X 3.x: unexpected success

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

Same issue on x86 Gentoo Non-Debug with X 3.x:
https://buildbot.python.org/all/#builders/58/builds/442

--

___
Python tracker 

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



[issue42463] test_pty.test_openpty() failed on x86 Gentoo Installed with X 3.x: unexpected success

2020-11-25 Thread STINNER Victor


New submission from STINNER Victor :

x86 Gentoo Installed with X 3.x:
https://buildbot.python.org/all/#/builders/464/builds/445

0:05:51 load avg: 4.73 [104/425/1] test_pty failed -- running: test_unparse (1 
min 3 sec)

test_fork (test.test_pty.PtyTest) ... calling pty.fork()
Waiting for child (3734) to finish.
Child (3734) exited with code 4 (status 1024).
ok

test_master_read (test.test_pty.PtyTest) ... Calling pty.openpty()
Got master_fd '3', slave_fd '4'
Closing slave_fd
Reading from master_fd
ok

test_openpty (test.test_pty.PtyTest) ... Setting pty.STDIN_FILENO window size
Calling pty.openpty()
Got master_fd '3', slave_fd '4'
Writing to slave_fd
Writing chunked output
unexpected success

test__copy_eof_on_all (test.test_pty.SmallPtyTests)
Test the empty read EOF case on both master_fd and stdin. ... ok

test__copy_to_each (test.test_pty.SmallPtyTests)
Test the normal data case on both master_fd and stdin. ... ok

--

Ran 5 tests in 0.054s

FAILED (unexpected successes=1)
test test_pty failed

--
components: Tests
messages: 381837
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_pty.test_openpty() failed on x86 Gentoo Installed with X 3.x: 
unexpected success
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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

So far we don't even know for sure if there is a bug in Python's http module. 
It would be helpful if you could provide a reproducer that does not use any 3rd 
party code like requests.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +22401
pull_request: https://github.com/python/cpython/pull/23514

___
Python tracker 

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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-11-25 Thread Bhushan Shelke


Bhushan Shelke  added the comment:

Any tentative Date for fix to be generally available?

--

___
Python tracker 

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



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

2020-11-25 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 4.0 -> 5.0
pull_requests: +22400
pull_request: https://github.com/python/cpython/pull/23513

___
Python tracker 

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



[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2020-11-25 Thread Petr Viktorin


Petr Viktorin  added the comment:

Note that the pathfix comment says:

# Directories are searched recursively for files whose name looks
# like a python module.

Files with a dash are *not* Python modules, since they can't be imported. 
Should the comment (which is the only documentation for pathfix, AFAIK) be 
updated to say it looks for the .py suffix?

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue42299] Remove formatter module

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

Thread on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/ZEDIBBYCWI34GVOXDEUYXQY3LYXOFHA2/

Copy of Fred Drake's email:

"Oh, the memories!  Looking at docs, I can vaguely recall using the
API, but... it definitely doesn't belong in the stdlib. -Fred"

--

___
Python tracker 

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



[issue31861] add aiter() and anext() functions to operator module

2020-11-25 Thread Joshua Bronson


Joshua Bronson  added the comment:

Nice to see there is still interest in this from someone else! Thanks, John. 
Are any core developers still interested in this?

If I can get a new PR together that adds C implementations of `aiter` and 
`anext` to builtins, would a committer still be interested in reviewing the 
patch?

A week from Friday, I'll have a rare and precious opportunity to spend the day 
contributing to open source. I have a bunch of different things I could work 
on, but would work on this if there is still interest. Thanks and hope this 
finds you all well.

--

___
Python tracker 

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



[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

Although I do have to say it wouldn't offend me if the partition and 
nth_combination examples were changed to double quotes to be consistent! But 
it's not important.

--

___
Python tracker 

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



[issue42462] Unacceptable Output

2020-11-25 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset c13d89955d9a2942c6355d6839d7096323244136 by Soumendra Ganguly in 
branch 'master':
bpo-41818: Updated tests for the standard pty library (GH-22962)
https://github.com/python/cpython/commit/c13d89955d9a2942c6355d6839d7096323244136


--
nosy: +asvetlov

___
Python tracker 

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



[issue42299] Remove formatter module

2020-11-25 Thread Dong-hee Na


Dong-hee Na  added the comment:

@terry.reedy @vstinner

Thank you, Terry and Victor, and goodbye formatter module!

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



[issue42299] Remove formatter module

2020-11-25 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset be319c0c108e308fb7ed6ec9522e969fdffd1253 by Dong-hee Na in branch 
'master':
bpo-42299: Remove formatter module (GH-23476)
https://github.com/python/cpython/commit/be319c0c108e308fb7ed6ec9522e969fdffd1253


--

___
Python tracker 

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



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

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
title: hasattr doesn't show private (double underscore) attributes exist -> 
[doc] hasattr doesn't show private (double underscore) attributes exist
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3, Python 
3.4

___
Python tracker 

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



[issue42462] Unacceptable Output

2020-11-25 Thread Nishant Gautam


Change by Nishant Gautam :


Added file: https://bugs.python.org/file49622/Screenshot 2020-11-25 181647.png

___
Python tracker 

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



[issue42454] Move slice creation to the compiler for constants

2020-11-25 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> What are the potential benefits or drawbacks for the user?

The only potential drawback that I can see is that it prevents you from 
distinguishing a sequence from mapping by 'accidentally' passing a slice. 

The major benefit for users is that they will have a decent speed up on their 
slice access. Other than that, I can think of some scenarios where the slice 
objects can be usable. One thing that I just came up with is this example 
(https://gist.github.com/isidentical/a799c4ae5c318bb7ac1a9f101cb709c7). I don't 
claim that we are implementing this to support these kinds of obscure cases, 
but it doesn't hurt anyone (beside maybe become a little bit confusing for a 
second) and doesn't look odd when used with a decent purpose.

--

___
Python tracker 

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



[issue42462] Unacceptable Output

2020-11-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Please don't attach images since text will have better accessibility for 
readers. The expression is as below and is a result of operator precedence : 
https://docs.python.org/3/reference/expressions.html#operator-precedence

>>> 7+3==10 | 7+1==8 and not(10!=10)
False


>>> (7+3) == (10 | (7 +1)) == 8
False
>>> (7+3) == (10 | (7 +1)) == 10
True

It would be good to use parens to indicate explicit bracing that helps in 
readability and understanding it in future for complex operations in 1 line.

Please refrain from creating multiple issues as explained in the other issues 
using stack overflow, python tutor, etc will be better forums to ask for help

https://bugs.python.org/issue42460
https://bugs.python.org/issue42456
https://bugs.python.org/issue42459

--
nosy: +xtreak

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

Pablo, I would like to get mediation from the release manager.

I want to add an interface to the os-release file. It's a decade-old standard 
from freedesktop.org. The file is available in the minimal base installation of 
virtually every Linux distributions except for Android. It's in Alpine, Arch 
Linux, Debian family (Mint, Raspberry Pi OS, Ubuntu, ...), Fedora family 
(CentOS, RHEL, ...), Gentoo, SUSE, and many more. The os-release file contains 
human readable and machine readable operating system information. The file 
format is simple but not trivial.

Matthias and Marc-Andre oppose my patch. Victor and I are in favor of the new 
feature.

--
nosy: +pablogsal

___
Python tracker 

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



[issue42454] Move slice creation to the compiler for constants

2020-11-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

> At least for optimization, IMHO it worth taking the shot.

For me, this feels a bit backwards: IMO you should decide what behaviour you 
want first, implement the desired behaviour, and then optimize (if possible) 
while keeping that same desired behaviour. It's rare that we want an 
optimization to drive behaviour changes.

So for me, the key question that needs answering is: independent of any 
performance changes, do we want the behaviour change? Specifically, do we want 
something like "d = {}; d[1:2] = True" to "work" in Python 3.10, given that in 
previous releases it raises TypeError? What are the potential benefits or 
drawbacks for the user?

If you can get consensus that the behaviour change is fine, then by all means 
go ahead with the optimization. But I think the behaviour question needs to be 
answered first.

--

___
Python tracker 

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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

> Should I create a separate issue for every PR or they all can be done in the 
> scope of this PR (we can update issue title to match what was done)?

Up to you, I don't think it really matters.

--

___
Python tracker 

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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-25 Thread Kyle Stanley


Kyle Stanley  added the comment:


New changeset b9127dd6eedd693cfd716a648864e2e00186 by Yurii Karabas in 
branch 'master':
bpo-42392: Improve removal of *loop* parameter in asyncio primitives (GH-23499)
https://github.com/python/cpython/commit/b9127dd6eedd693cfd716a648864e2e00186


--

___
Python tracker 

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



[issue42462] Unacceptable Output

2020-11-25 Thread Nishant Gautam


New submission from Nishant Gautam :

Wrong Output

--
components: Windows
files: Screenshot 2020-11-25 161636.png
messages: 381821
nosy: Kshitish, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Unacceptable Output
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49621/Screenshot 2020-11-25 161636.png

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 25.11.2020 11:45, Christian Heimes wrote:
> 
> Christian Heimes  added the comment:
> 
> PS: MAL, would it be possible to suppress your email footer? BPO is not an 
> advertisement channel.

That's an ancient bug on bpo, which apparently still haven't been
resolved - it doesn't handle longer sigs correctly. Sorry for that.

--

___
Python tracker 

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



[issue17545] [doc] os.listdir and os.path.join inconsistent on empty path

2020-11-25 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> docs@python
components: +Documentation
keywords:  -patch
nosy: +docs@python
title: os.listdir and os.path.join inconsistent on empty path -> [doc] 
os.listdir and os.path.join inconsistent on empty path
type: enhancement -> behavior
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

PS: MAL, would it be possible to suppress your email footer? BPO is not an 
advertisement channel.

--

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-11-25 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-11-25 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 7301979b23406220510dd2c7934a21b41b647119 by Yurii Karabas in 
branch 'master':
bpo-42202: Store func annotations as a tuple (GH-23316)
https://github.com/python/cpython/commit/7301979b23406220510dd2c7934a21b41b647119


--

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

> It's not pointless. The rate of change in the field is why this
> particular API did not work out in practice. It was working fine
> at the time I added it, but then quickly became unmaintainable.

Yes, it's pointless. You are arguing that os-release is bad because lsb-release 
was bad. It's like arguing against TOML file format because YAML and JSON have 
issues.

os-release was purposely designed to address concerns with lsb-release. 
os-release has been around for more than a decade and wildly adopted (except on 
Android platforms). The format hasn't changed since its first appearance in 
November 2010. Some optional fields were standardized and the meaning of "no 
shell features are supported" was elaborated on.

--

___
Python tracker 

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



Re: [issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread M.-A. Lemburg
On 25.11.2020 11:13, STINNER Victor wrote:
> Platform was always a thin wrapper to OS functions. For example, there is no 
> unified API to retrieve OS name and version on Windows, macOS or Linux. You 
> need to pick the proper function. For me, freedesktop_os_release() just 
> follows this trend.

Not really. We have functions per OS, but not functions which only work
on a subset of distros of an OS.

The patch also has other issues:

A text file parse could be a private function in the module,
but it doesn't fit the platform module API spirit.

platform module APIs should return meaningful information and
provide defaults where these cannot be determined. Accordingly,
an API would have to return a tuple (distname, version, id), just
like linux_distribution() did.

Regardless, I don't see the point of opening up this can of
worms again. We settled on moving Linux distribution version detection
out of the stdlib and that was a good decision.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Nov 25 2020)
>>> Python Projects, Coaching and Support ...https://www.egenix.com/
>>> Python Product Development ...https://consulting.egenix.com/


::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   https://www.egenix.com/company/contact/
 https://www.malemburg.com/

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread STINNER Victor


Change by STINNER Victor :


--
title: Add platform.freedesktop_osrelease() -> Add 
platform.freedesktop_os_release()

___
Python tracker 

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



[issue42461] os.statvfs_result doesn't show f_fsid

2020-11-25 Thread Christian Heimes


Christian Heimes  added the comment:

Changeset 96a5e50a5de3683b2afd6d680c7ecc4b525986f6 added a new struct member 
but did not increase PyStructSequence_Desc.n_in_sequence of
statvfs_result_desc. I'm not sure if the size of the sequence was not increased 
on purpose.

For reference the feature was added in bpo-32143.

--
nosy: +christian.heimes
stage: patch review -> 

___
Python tracker 

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



[issue28468] Add platform.freedesktop_osrelease()

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

Marc-Andre Lemburg:
> It's not pointless. The rate of change in the field is why this
> particular API did not work out in practice. It was working fine
> at the time I added it, but then quickly became unmaintainable.

Please look at the history of the os-release file. The os-release file format 
exists for 8 years and has not changed in 8 years.

It seems like you are referring to /etc/*release files. I agree that these 
files are causing a lot of maintenance troubles, and... that's exactly why 
os-release file has been standardized and created.

So I don't get your point.

--

___
Python tracker 

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



[issue42461] os.statvfs_result doesn't show f_fsid

2020-11-25 Thread hao


Change by hao <359062...@qq.com>:


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

___
Python tracker 

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



[issue28468] Add platform.freedesktop_osrelease()

2020-11-25 Thread STINNER Victor


STINNER Victor  added the comment:

Marc-Andre Lemburg:
> The main reason why it failed was the Linux distros keep inventing new ways 
> to identify themselves, sometimes misuse existing mechanisms to maintain 
> compatibility (e.g. as a Ubuntu or RedHat based OS) or ship with two 
> different release files.
> (...)
> Then the LSB standardized this and wanted everyone to use lsb_release. Guess 
> what... The tool is not even installed anymore by default on recent OpenSUSE 
> releases. Experience shows that these things change too often to make the 
> stdlib a good place to maintain support for this.

Please read the discussion. os-release is a standardize file: fixed filename, 
only 2 possible locations, standardize format. It's a freedesktop 
specification. In my experience, freedesktop standards are well adopted, 
whereas LSB standards look like a failed attempt.

This is no need to bet on the future. os-release file is already available on 
all major Linux distribution, as, again, explained in depth in previous 
comments. There is no need to install a lsb_release program or anything. It's 
part of the *base* image on these systems.

As you wrote, lsb_release isn't installed on many operating systems. For 
example, I just checked on my Fedora 33, it's not installed... Moreover, I'm 
not comfortable with running an external program which causes its own set of 
issue. Reading a plain text file is safer and faster.


> To get a sense of the complexity involved in all this, have a look
at how Ansible does this:
> https://github.com/ansible/ansible/blob/ea119d30894478b84b5fbe271f580cb2b0401b86/lib/ansible/module_utils/facts/system/distribution.py

Ansible has a high-level API similar to what the Python distro module does: it 
calls uname, parse /etc/*release files, try to normalize values, has special 
cases, etc.

Not everybody needs like kind of advanced API. For my own use cases (see 
previous comments), I'm perfectly fine with basic and incomplete information.


> It's not just about the file name, the content also needs a lot
> of massaging to make it useful for a general purpose API. (...)

I strongly suggest to keep platform.freedesktop_os_release() as simple as 
possible: just parse the file, no special case at all.

For example, I'm against treating ID_LIKE variable differently in PR 23492. 
Users would expect if another space separated variable is added tomorrow, the 
function would also specialize it, and so we would come back to the 
linux_distribution() maintenance issue.

IHMO a dummy text parser remains very useful. The file format is not as trivial 
as it looks, there are single quote and double quotes, and escaped characters.

If someone wants a more complete API, I suggest to develop it on PyPI on top of 
the new function.

It's fine to provide any API where some variables can miss if the there are not 
provided by the operating system. For me, it's like the os and select modules 
which are thin wrappers to operating system functions (syscalls). And then 
there are more high-level module like shutil and selectors. But we don't need 
to ship a high-level API for os-release.

Platform was always a thin wrapper to OS functions. For example, there is no 
unified API to retrieve OS name and version on Windows, macOS or Linux. You 
need to pick the proper function. For me, freedesktop_os_release() just follows 
this trend.

--

___
Python tracker 

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



[issue28468] Add platform.freedesktop_osrelease()

2020-11-25 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 25.11.2020 10:39, Christian Heimes wrote:
> 
>> It would be an interface to a file /etc/os-release
>> that's common nowadays, just like /etc/lsb-release was some years
>> ago. These things change too often to make the stdlib a good fit.
>> I'm pretty sure distros will invent something new in 5 years which
>> would then render the API mostly useless again.
> 
> That's pointless speculation -- unless you found a fool-proof way to see into 
> the future.
>
> Where do you draw the line? Should the stdlib ignore any standard and API 
> that is less than 10 years old? 20 years?

It's not pointless. The rate of change in the field is why this
particular API did not work out in practice. It was working fine
at the time I added it, but then quickly became unmaintainable.

Note that I'm not saying it's a useless API. The main point is
that such code is better placed into a PyPI package, where it
can be updated more frequently and also in a safe way across
Python versions.

Additionally, such a package could provide normalization features,
to make matching distros easier, even when the distros decide
to change the way they are named, e.g. for marketing purposes.

The distro package is doing a pretty good job at this.

If you need this for tests in the stdlib, I'd suggest to add a helper
to the test package to find the needed information for the platforms
where you want to run platform dependent tests.

For tests outside the stdlib, the distro package will do the
job just fine.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Nov 25 2020)
>>> Python Projects, Coaching and Support ...https://www.egenix.com/
>>> Python Product Development ...https://consulting.egenix.com/


::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   https://www.egenix.com/company/contact/
 https://www.malemburg.com/

--

___
Python tracker 

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



[issue42461] os.statvfs_result doesn't show f_fsid

2020-11-25 Thread hao


New submission from hao <359062...@qq.com>:

>From doc I see about os.statvfs "New in version 3.7: Added f_fsid.", but it 
>doesn't show up when print an object os.statvfs returned. So I think maybe we 
>can add the field when printing object.

--
components: Library (Lib)
messages: 381811
nosy: Rethan
priority: normal
severity: normal
status: open
title: os.statvfs_result doesn't show f_fsid
type: behavior
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



[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2020-11-25 Thread miss-islington


miss-islington  added the comment:


New changeset bda2e68c8849e23899b3dad9e436c06303254943 by Miss Islington (bot) 
in branch '3.8':
bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)
https://github.com/python/cpython/commit/bda2e68c8849e23899b3dad9e436c06303254943


--

___
Python tracker 

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



[issue42460] Wrong Output

2020-11-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Correct output.

https://docs.python.org/3/reference/expressions.html#operator-precedence

a = 10
b = 10
(a >= 10) and not (b == 10) | 7+2 == 9

returns False because of operator precedence. It evaluates like this:

(a >= 10) and not (b == 10) | 7+2 == 9
--> True and not True | 7+2 == 9
--> True and not True | 9 == 9
--> True and not 9 == 9
--> True and not True
--> True and False
--> False

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28468] Add platform.freedesktop_osrelease()

2020-11-25 Thread Matthias Klose


Matthias Klose  added the comment:

> Where do you draw the line?

there's a module available outside cpython. Your use case is to add some work 
around for some tests (like issue42142).  If you need it for the tests, add it 
to the test framework.

--

___
Python tracker 

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



[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2020-11-25 Thread miss-islington


miss-islington  added the comment:


New changeset 9d2c2a8e3b8fe18ee1568bfa4a419847b3e78575 by Miss Islington (bot) 
in branch '3.9':
bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)
https://github.com/python/cpython/commit/9d2c2a8e3b8fe18ee1568bfa4a419847b3e78575


--

___
Python tracker 

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



  1   2   >