[issue44452] Allow paths to be joined without worrying about a leading slash

2021-06-26 Thread Vedran Čačić

Vedran Čačić  added the comment:

It doesn't make sense to "concatenate" one absolute path to another. / has a 
simple explanation: if you start at /foo, and then do cd bar, you'll end up in 
/foo/bar. But if you start at /foo, and then do cd /bar, you'll end up in /bar.

You mean, some of your users write '/some/path' when they mean 'some/path'? 
Then the users should be educated about the difference. These are not the same, 
just like '../some/path' is not the same as them, and '~some/path' is again 
something very different.

--
nosy: +veky

___
Python tracker 

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



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 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



[issue36991] zipfile: AttributeError on extract

2021-06-26 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
stage: patch review -> 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



[issue44511] Improve the bytecode for mapping patterns

2021-06-26 Thread Brandt Bucher


Change by Brandt Bucher :


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

___
Python tracker 

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



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 Thread miss-islington


miss-islington  added the comment:


New changeset 3df23b5199a4bb237a595cadca6c49d34ab2a56c by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44468: Never skip base classes in `typing.get_type_hints()`, even 
with invalid `.__module__`. (GH-26862) (GH-26920)
https://github.com/python/cpython/commit/3df23b5199a4bb237a595cadca6c49d34ab2a56c


--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> patch review

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When the backport is done or Serhiy changes his mind.

Can you change labels on your own PRs?

--
nosy:  -miss-islington
stage: patch review -> 

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +25494
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26921

___
Python tracker 

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



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 7569c0fe91dfcf562dee8c29798ecda74d738aa8 by will-ca in branch 
'main':
bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with 
invalid `.__module__`. (GH-26862)
https://github.com/python/cpython/commit/7569c0fe91dfcf562dee8c29798ecda74d738aa8


--

___
Python tracker 

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



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-26 Thread Thomas Grainger


Thomas Grainger  added the comment:

nosying the author of the selector_events fix

--

___
Python tracker 

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



[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-26 Thread Thomas Grainger


Change by Thomas Grainger :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue33408] Enable AF_UNIX support in Windows

2021-06-26 Thread Thomas Grainger


Change by Thomas Grainger :


--
nosy: +graingert

___
Python tracker 

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



[issue40620] [doc] Range tutorial shorthand could be made clearer

2021-06-26 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 5.0 -> 6.0
pull_requests: +25492
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26919

___
Python tracker 

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



[issue40620] [doc] Range tutorial shorthand could be made clearer

2021-06-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Another alternative is to make the example *be* interactive.
This would also teach the easy, standard, and often better way to see the 
output of an iterable.

>>> list(range(5, 10))
[5, 6, 7, 8, 9]
>>> list(range(0, 10, 3))
[0, 3, 6, 9]
>>> list(range(-10, -100, -30))
[-10, -40, -70]

--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-26 Thread E. Paine


E. Paine  added the comment:

Can this issue be closed?

--

___
Python tracker 

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



[issue43964] ctypes CDLL search path issue on MacOS

2021-06-26 Thread Carlo Cabrera


Carlo Cabrera  added the comment:

Re option 3: relying on `DYLD_LIBRARY_PATH` or `DYLD_FRAMEWORK_PATH` isn't a 
great solution either because of SIP. It's can get impractical to use in many 
standard Makefile-based build systems, for example. (cf. 
https://github.com/qmk/qmk_cli/issues/60, 
https://github.com/Homebrew/discussions/discussions/1737) I imagine it can get 
quite vexing to set these variables but find them to not have the effect you 
expected them to.

One workaround for the example above would be to compile your own `make` 
program (or use one from a package manager) so that SIP doesn't sanitise your 
environment, but I imagine that's not an ideal solution either.

--
nosy: +ccabrera

___
Python tracker 

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



[issue40528] Improve / Clear ASDL generator

2021-06-26 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +25491
pull_request: https://github.com/python/cpython/pull/26918

___
Python tracker 

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



[issue44516] Update bundled pip to 21.1.3

2021-06-26 Thread Stéphane Bidoul

Change by Stéphane Bidoul :


--
pull_requests: +25490
pull_request: https://github.com/python/cpython/pull/26917

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +25489
pull_request: https://github.com/python/cpython/pull/26916

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-26 Thread Guido van Rossum

Guido van Rossum  added the comment:

That explanation is still valid, I just hadn’t thought of it that way.

--

___
Python tracker 

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



[issue44516] Update bundled pip to 21.1.3

2021-06-26 Thread Stéphane Bidoul

Change by Stéphane Bidoul :


--
pull_requests: +25488
pull_request: https://github.com/python/cpython/pull/26915

___
Python tracker 

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



[issue44503] Hide __enter__ calls in mock_open

2021-06-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +michael.foord

___
Python tracker 

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



[issue44185] mock_open file handle __exit__ does not call close

2021-06-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +michael.foord
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Nick Coughlin explained on issue 13814 msg151763 why he thought that making 
generators be context managers could/should not be done.

"Generators deliberately don't support the context management protocol. This is 
so that they raise an explicit TypeError or AttributeError (pointing out that 
__exit__ is missing) if you leave out the @contextmanager decorator when you're 
using a generator to write an actual context manager.

Generators supporting the context management protocol natively would turn that 
into a far more subtle (and confusing) error: your code would silently fail to 
invoke the generator body.

Ensuring this common error remains easy to detect is far more important than 
making it easier to invoke close() on a generator object (particularly when 
contextlib.closing() already makes that very easy)."

The new entry in the Design FAQ is this:

"Why don’t generators support the with statement?

For technical reasons, a generator used directly as a context manager would not 
work correctly. When, as is most common, a generator is used as an iterator run 
to completion, no closing is needed. When it is, wrap it as 
“contextlib.closing(generator)” in the ‘with’ statment."

If Nick's explanation is not currently correct, the above should be removed.  
If it is, perhaps further doc is needed.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue13814] Document why generators don't support the context management protocol

2021-06-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Note: Rietveld patch reviews are no longer accessible so I could not look at R. 
David's comments.

--

___
Python tracker 

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



[issue44481] Tkinter config() minor documentation bug for shorthand options

2021-06-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The specific subsection link is
https://docs.python.org/3/library/tkinter.html#setting-options

The outputs
>>> import tkinter as tk
>>> r = tk.Tk()
>>> r.config('bg')
('background', 'background', 'Background', , 
'SystemButtonFace')
>>> r.config()['bg']
('bg', '-background')

I think
"Example:

>>> print(fred.config())
{'relief': ('relief', 'relief', 'Relief', 'raised', 'groove')}

Of course, the dictionary printed will include all the options available and 
their values. This is meant only as an example."

would be clearer with ellipses instead of the sentence after a misleading 
output.

"Example key-value pair in the dictionary returned by config():

>>> fred.config()
{..., 'relief': ('relief', 'relief', 'Relief', 'raised', 'groove'), ...}"

The previous code should set the relieve to 'groove' in order for this to make 
more sense.  Or, instead use example with 2- and 5-tuples.

{..., 'fg': ('fg', '-foreground'), ..., 'foreground': ('foreground', 
'foreground', 'Foreground', 'SystemButtonText', 'SystemButtonText'), ...}
---

Side note: the third members of these tuples are reversed.  Bug in tk?
b.config('activebackground')
('activebackground', 'activeBackground', 'Foreground', 'SystemButtonFace', 
'SystemButtonFace')
b.config('activeforeground')
('activeforeground', 'activeForeground', 'Background', 'SystemButtonText', 
'SystemButtonText')

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, serhiy.storchaka, terry.reedy
stage:  -> needs patch
versions: +Python 3.11 -Python 3.6, Python 3.9

___
Python tracker 

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



[issue44109] missing dataclass decorator in match-statement example

2021-06-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Ahmet: once there's agreement on how to fix this, would you like to work on a 
patch?

--

___
Python tracker 

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



[issue44465] html.escape can be used in a few places in the standard lib instead of similar existing code

2021-06-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2021-06-26 Thread Martin


Martin  added the comment:

Thanks for the pointer, @pitrou!

--

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2021-06-26 Thread John Belmonte


John Belmonte  added the comment:

> bpo-40816 took the much simpler approach of introducing a separate 
> contextlib.AsyncContextDecorator class

How do I apply AsyncContextDecorator to the use case of wrapping either a sync 
or async function with a synchronous context manager?

--

___
Python tracker 

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



[issue44516] Update bundled pip to 21.1.3

2021-06-26 Thread Stéphane Bidoul

Change by Stéphane Bidoul :


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

___
Python tracker 

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



[issue44517] test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at test_still_running

2021-06-26 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Fatal Python error: Py_EndInterpreter: thread still has a frame
Python runtime state: initialized

Thread 0x7ff625ee4740 (most recent call first):
  File "", line 4 in 
make: *** [Makefile:1256: buildbottest] Aborted (core dumped)
program finished with exit code 2
elapsedTime=382.700268
test_still_running (test.test__xxsubinterpreters.DestroyTests) ...

--

___
Python tracker 

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



[issue44517] test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at test_still_running

2021-06-26 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

Builder: https://buildbot.python.org/all/#/builders/543

The buildbot has failed since 0982ded179f280176868c1c4eccf77bf70687816:
bpo-44032: Move pointer to code object from frame-object to frame specials 
array. (GH-26771)

Test stdio log attached.

--
components: Subinterpreters, Tests
files: test-stdio.txt
messages: 396546
nosy: Mark.Shannon, erlendaasland, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at 
test_still_running
type: crash
versions: Python 3.11
Added file: https://bugs.python.org/file50127/test-stdio.txt

___
Python tracker 

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



[issue44516] Update bundled pip to 21.1.3

2021-06-26 Thread Stéphane Bidoul

Change by Stéphane Bidoul :


--
nosy: sbidoul
priority: normal
severity: normal
status: open
title: Update bundled pip to 21.1.3
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan


Change by Nick Coghlan :


--
keywords: +patch
pull_requests: +25486
stage: commit review -> patch review
pull_request: https://github.com/python/cpython/pull/26910

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan


Change by Nick Coghlan :


--
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan


New submission from Nick Coghlan :

Backporting the latest contextlib module and test suite to contextlib2, I ran 
into a couple of CI failures on PyPy3.

Investigation showed that a couple of the new test cases were assuming the use 
of a refcounted GC. One could be fixed by switching to using a synchronous 
context manager instead of a ``__del__`` method, but the other needed a few 
explicit gc.collect() calls.

--
assignee: ncoghlan
keywords: 3.10regression
messages: 396545
nosy: ncoghlan, yselivanov
priority: normal
severity: normal
stage: commit review
status: open
title: contextlib test incompatibility with non-refcounted GC
type: behavior

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2021-06-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

This is just issue6721 again.

The workaround is easy: just add 
`multiprocessing.set_start_method("forkserver")` at the start of your program.

Also, this is more or less documented, though quite tersely:
"""Note that safely forking a multithreaded process is problematic.""
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Locks in the standard library should be sanitized on fork
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2021-06-26 Thread Nick Coghlan


Nick Coghlan  added the comment:

bpo-40816 took the much simpler approach of introducing a separate 
contextlib.AsyncContextDecorator class.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add missed AsyncContextDecorator to contextlib
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



[issue41539] print blocks with multiprocessing and buffered output

2021-06-26 Thread Martin


Martin  added the comment:

Yes, I think it should at least be documented.

But then it practically says: "Do not use print in your library because it 
might be used in a threading context" This sounds unacceptable to me. 

It would be great to "just make it work".

> I debugged it a bit and I think the race may be between your print statement 
> and the util._flush_std_streams()

Why would print deadlock with a flush?

--

___
Python tracker 

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



[issue44514] configparser.rst & bz2.rst leave temp files after 'make doctest'

2021-06-26 Thread Kevin Follstad


Change by Kevin Follstad :


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

___
Python tracker 

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



[issue44514] configparser.rst & bz2.rst leave temp files after 'make doctest'

2021-06-26 Thread Kevin Follstad


New submission from Kevin Follstad :

Both Docs/library/configparser.rst and Docs/library/bz2.rst create untracked 
temp files on the filesystem when 'make doctest' is run because testcleanup 
directives are absent in these files.

--
assignee: docs@python
components: Documentation
messages: 396541
nosy: docs@python, kfollstad
priority: normal
severity: normal
status: open
title: configparser.rst & bz2.rst leave temp files after 'make doctest'
type: behavior
versions: Python 3.10, Python 3.11, 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