[issue41652] An Advice on Turning Ellipsis into Keyword

2020-08-27 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

You can do the same thing to replace int, float, dict, len, and all the other 
built-in classes and functions. Why is Ellipsis so special that it needs 
protection, especially when, as you note, ... is an available unoverrideable 
way to refer to it? Making new keywords is a high bar (because it can break 
existing code). What justifies this one beyond "don't want folks to mess with a 
barely used name"?

--
nosy: +josh.r

___
Python tracker 

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



[issue41653] About the use of cpython console mode problem

2020-08-27 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

When I use the Py_Initialize function in cpython, the console is forced to 
become gbk encoding, hoping to be compatible with UTF-8

--
components: C API
files: Screenshot_2020_0828_104656.png
messages: 376019
nosy: twoone3
priority: normal
severity: normal
status: open
title: About the use of cpython console mode problem
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49430/Screenshot_2020_0828_104656.png

___
Python tracker 

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



[issue41652] An Advice on Turning Ellipsis into Keyword

2020-08-27 Thread Alex


New submission from Alex <2423067...@qq.com>:

In early versions of python,  programmers can simply swap True and False by
>>> True, False = False, True
Then True and False and None become keywords so programmers can't change their 
value.
... is also a keyword, but Ellipsis is not. So the code below is right:

>>> Ellipsis = 1
>>> print(Ellipsis)
1

If Ellipsis become a keyword, this will be better.

--
components: Interpreter Core
messages: 376018
nosy: Alex-Python-Programmer
priority: normal
severity: normal
status: open
title: An Advice on Turning Ellipsis into Keyword
type: enhancement
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



[issue41651] Pip: Wrong Showing of Progressbar when Downloading Modules

2020-08-27 Thread Alex

New submission from Alex <2423067...@qq.com>:

1. Abstract
Command line in Windows the progress bar doesn't work like usual after about 
half of the downloading process.
Another remarkble bug is the length of the progressbar seems to be lengthened.

2. Reason(my opinion)
I noticed that this bug only happens when the rightmost character reaches the 
end of the cmd screen. I infer the reason of this bug from the phenomenon: when 
the progres bar is going to be lengthened, pip will delete the last line. Pip 
consider the line as an enter that the program output. However, the cmd 
consider the line as an enter whether it is output by the program or added by 
cmd itself because of the rightmost character reaches the end of the cmd 
screen. When pip make cmd delete the last line, pip want cmd to delete the 
whole progressbar, but cmd only deletes a part of the progressbar which are in 
the line 2.

3. Instance
An instance of the bug, showing what happenred when upgrading pip via py -m pip 
install --upgrade pip. You can see the progress bar wasn't deleted completly. 

C:\Users\**>py -m pip install --upgrade pip
Collecting pip
  Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB)
 |█▌  | 634 kB 21 kB/s eta 0:00:41
 |██  | 645 kB 21 kB/s eta 0:00:41
 |██  | 655 kB 21 kB/s eta 0:00:40
 |██  | 665 kB 21 kB/s eta 0:00:40
 |██▌ | 675 kB 23 kB/s eta 0:00:3
 |██▌ | 686 kB 23 kB/s eta 0:00:3
 |███ | 696 kB 23 kB/s eta 0:00:3
 |███ | 706 kB 33 kB/s eta 0:00:2
 |███ | 716 kB 33 kB/s eta 0:00:2
 |███▌| 727 kB 28 kB/s eta 0:00:
 || 737 kB 28 kB/s eta 0:00:
 || 747 kB 28 kB/s eta 0:00:
 || 757 kB 23 kB/s eta 0:00:
 |▌   | 768 kB 23 kB/s eta 0:00
 |▌   | 778 kB 23 kB/s eta 0:00
 |█   | 788 kB 20 kB/s eta 0:00
 |█   | 798 kB 20 kB/s eta 0:00
 |█   | 808 kB 20 kB/s eta 0:00
 |█▌  | 819 kB 20 kB/s eta 0:0
 |█▌  | 829 kB 20 kB/s eta 0:0
 |██  | 839 kB 25 kB/s eta 0:0
 |██  | 849 kB 25 kB/s eta 0:0
 |██  | 860 kB 19 kB/s eta 0:0
 |██▌ | 870 kB 19 kB/s eta 0:
 |███ | 880 kB 17 kB/s eta 0:
 |███ | 890 kB 17 kB/s eta 0:
 |███ | 901 kB 17 kB/s eta 0:
 |███▌| 911 kB 17 kB/s eta 0
 |███▌| 921 kB 17 kB/s eta 0
 || 931 kB 12 kB/s eta 0
 || 942 kB 12 kB/s eta 0
 || 952 kB 12 kB/s eta 0
 |▌   | 962 kB 13 kB/s eta
 |█   | 972 kB 13 kB/s eta
 |█   | 983 kB 8.9 kB/s eta
 |█   | 993 kB 6.7 kB/s eta
 |█▌  | 1.0 MB 6.7 kB/s et
 |█▌  | 1.0 MB 6.7 kB/s et
 |██  | 1.0 MB 6.7 kB/s et
 |██  | 1.0 MB 6.7 kB/s et
 |██  | 1.0 MB 8.4 kB/s et
 |██▌ | 1.1 MB 8.4 kB/s e
 |██▌ | 1.1 MB 8.4 kB/s e
 |███ | 1.1 MB 8.8 kB/s e
 |███ | 1.1 MB 8.8 kB/s e
 |███ | 1.1 MB 24 kB/s et
 |███▌| 1.1 MB 24 kB/s e
 || 1.1 MB 16 kB/s e
 || 1.1 MB 16 kB/s e
 || 1.1 MB 14 kB/s e
 |▌   | 1.1 MB 14 kB/s
 |▌   | 1.2 MB 14 kB/s
 |█   | 1.2 MB 14 kB/s
 |█   | 1.2 MB 12 kB/s
 |█   | 1.2 MB 12 kB/s
 |█▌  | 1.2 MB 12 kB/s
 |██  | 1.2 MB 12 kB/s
 |██  | 1.2 MB 12 kB/s
 |██  | 1.2 MB 19 kB/s
 |██▌ | 1.2 MB 19 kB/
 |██▌ | 1.2 MB 20 kB/
 |███ | 1.3 MB 15 kB/
 |███ | 1.3 MB 

[issue41647] MutableMapping ".setdefault()" to return default value via __getitem__

2020-08-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm with Raymond. Closing.

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



[issue41647] MutableMapping ".setdefault()" to return default value via __getitem__

2020-08-27 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The current code makes sense to me and also mirrors the actual implementation 
of setdefault() for regular dictionaries. 

While I can see what you're trying do, it is a feature that __getitem__() is 
not called.  And for regular dicts, that is the only way to make it an atomic 
operation.

In any case, the proposal would be a behavior change that breaks code — users 
are likely and justifiably relying on the actual default value being returned 
rather than a possibly new value computed by the __getitem__() method.

There is also an efficiency concern.  Changing the behavior implies that 
missing keys would trigger one initial search, then a store for the default, 
and then another subsequent lookup.  Speaking only for myself, I know that I 
would never want that by default.  If required, I would prefer to override 
setdefault() and explicitly spell-out the new behavior.

--
nosy: +gvanrossum

___
Python tracker 

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



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

2020-08-27 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21095
pull_request: https://github.com/python/cpython/pull/21986

___
Python tracker 

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



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

2020-08-27 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21094
pull_request: https://github.com/python/cpython/pull/21985

___
Python tracker 

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



[issue32313] Wrong inspect.getsource for datetime

2020-08-27 Thread Paul Ganssle

Paul Ganssle  added the comment:

I think that we should re-examine this issue after GH-20472 is merged. I'm not 
really sure how that will affect this and indeed *how* it should affect this. I 
am not sure whether people are relying on the current behavior, or what use 
cases would be improved if we had a different behavior.

With regards to this:

> The documentation for getfile says "This will fail with a TypeError if the 
> object is a built-in module, class, or function."

> https://docs.python.org/3/library/inspect.html#inspect.getfile

This is a bit unclear to me, and I'm not entirely sure if `datetime` qualifies. 
I think of built-in classes as things like `int` and `float`, and built-in 
functions as things like `abs` and `sum`, and `datetime` is an extension module 
— albeit one with a C implementation, and one that is in the standard library.

We should probably clarify the wording of `inspect.getsource` and determine 
what the intended semantics are for PEP-399-style modules, with both a C and 
pure Python implementation and the C implementation is what's being used. 
Error? Point to the Python implementation?

--

___
Python tracker 

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



[issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available

2020-08-27 Thread Mark Roseman


Mark Roseman  added the comment:

I've posted a copy at https://tkdocs.com/shipman/

I've lightly modified it to add a site header and explanation of where the 
material comes from and caveats about age to each page, and have removed or 
crossed out dead links, requests for feedback, etc.

I agree with Terry's assessment of the copyright issues. While I don't expect 
anyone with a valid claim to contact me about the mirrored copy, I'd be happy 
to address any concerns if they do arise.

If this all seems okay, I would very greatly appreciate if someone could update 
the links in the Python documentation for all the relevant branches and 
shepherd that through the approval process.

--

___
Python tracker 

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



[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-08-27 Thread Alexander Boeckmann


Alexander Boeckmann  added the comment:

So over the past week the issue resolved its self. I unfortunately did not get 
a video or a screenshot but thought you might want to know this
So maybe Apple did something or you guys fixed it. Anyways, have a good day!

--

___
Python tracker 

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



[issue41642] RHEL and fedora buildbots fail due to disk space error

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

The buildbot server migrated to a new machine and is now behind a load 
balancer. tcp/80 (buildbot web page, HTTP) and tcp/9020 (used by buildbot 
workers) are both behind the load balancer.

Maybe the load balancer closes TCP connections which are idle for 60 seconds?

Buildbot workers have a TCP keepalive option of 1 hour (3600 seconds) by 
default:
https://docs.buildbot.net/latest/manual/configuration/workers.html#master-worker-tcp-keepalive

Pablo told me that his worker uses a keepalive of 2 minutes (120 seconds).

--

___
Python tracker 

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



[issue41642] RHEL and fedora buildbots fail due to disk space error

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

On the worker (client) side, I see many "lost remote step" every 1 to 3 
minutes. Example with the PPC64LE Fedora Stable 
(cstratak-fedora-stable-ppc64le) worker:

2020-08-27 01:30:09-0400 [Broker,client] lost remote step
2020-08-27 01:31:57-0400 [Broker,client] lost remote step
2020-08-27 01:34:34-0400 [Broker,client] lost remote step
2020-08-27 01:36:29-0400 [Broker,client] lost remote step
2020-08-27 01:38:37-0400 [Broker,client] lost remote step
(...)

--

___
Python tracker 

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



[issue41642] RHEL and fedora buildbots fail due to disk space error

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I have found a large number of un-removed files in /tmp.

Right. I found many /tmp/cc.XXX and /tmp/tmpX files. Around 20 GB of 
these files! Maybe using passing "-pipe" to gcc/clang would avoid the 
/tmp/cc.XXX files when a build is interrupted. For example, I saw assembly 
files (.s) of around 20 MB.

I don't know what are the /tmp/tmpX files.

I'm disappointed that in 2020, buildbot has no safe way to ensure that all 
created files are removed at the end of a build. chroot, containers, etc. are 
effecient way to ensure that everything is removed at the end of a build.

--

___
Python tracker 

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



[issue41642] Buildbot: workers detached every minute and "no space left on device" issue

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

27 buildbot workers are detached. They are are detached every minute! Affected 
workers:

aixtools-aix-power6
billenstein-macos
bolen-ubuntu
bolen-windows10
bolen-windows7
cstratak-RHEL7-aarch64
cstratak-RHEL7-ppc64le
cstratak-RHEL7-x86_64
cstratak-RHEL8-fips-x86_64
cstratak-RHEL8-ppc64le
cstratak-fedora-stable-ppc64le
edelsohn-aix-ppc64
edelsohn-debian-z
edelsohn-fedora-ppc64
edelsohn-fedora-rawhide-z
edelsohn-fedora-z
edelsohn-rhel-z
edelsohn-rhel8-z
edelsohn-sles-z
gps-clang-ubsan
gps-debian-profile-opt
gps-raspbian
isidentical-centos-power8
kloth-win64
koobs-freebsd-564d
ware-alpine
ware-win81-release

Output of: grep Worker.detach twistd.log|sed -e 's!.*(!!g;s!)!!g'|sort -u|uniq

Example of server logs:

2020-08-27 15:33:49+ [Broker,33580,10.132.169.156] 
Worker.detached(billenstein-macos)
2020-08-27 15:34:43+ [Broker,33608,10.132.169.156] 
Worker.detached(billenstein-macos)
2020-08-27 15:35:40+ [Broker,33635,10.132.169.157] 
Worker.detached(billenstein-macos)
(...)

--
title: RHEL and fedora buildbots fail due to disk space error -> Buildbot: 
workers detached every minute and "no space left on device" issue

___
Python tracker 

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



[issue41642] RHEL and fedora buildbots fail due to disk space error

2020-08-27 Thread David Edelsohn


David Edelsohn  added the comment:

I have found a large number of un-removed files in /tmp.  Things seem to 
function better with Buildbots running older 0.x "buildslave" as opposed to 
newer "builtbot-worker" instances.

--
nosy: +David.Edelsohn
title: Buildbot: workers detached every minute and "no space left on device" 
issue -> RHEL and fedora buildbots fail due to disk space error

___
Python tracker 

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



[issue41642] Buildbot: workers detached every minute and "no space left on device" issue

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

I closed bpo-41648 "edelsohn-* buildbot worker failing with: No space left on 
device" as a duplicate of this issue.

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, there are many affected workers. I will reuse bpo-41642 instead.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> RHEL and fedora buildbots fail due to disk space error

___
Python tracker 

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



[issue41650] .pyc file not running in cross python versions

2020-08-27 Thread Ammar Askar


Ammar Askar  added the comment:

.pyc files aren't meant to be portable, they contain raw bytecode and data 
specific to the version of Python they were compiled on. For example, search 
for "Changed in version 3.6" here and you'll see all the little changes to the 
bytecode format: https://docs.python.org/3/library/dis.html

You'll have to compile your python source code on 3.6 if you intend to run it 
on a 3.6 interpreter.

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



[issue41650] .pyc file not running in cross python versions

2020-08-27 Thread Princy katlana


New submission from Princy katlana :

When I tried to compile the python source code from python version 3.5 and run 
the .pyc file on python version 3.6 then it shows the following exception: 
RuntimeError: Bad magic number in .pyc file

--
components: Build
messages: 376003
nosy: princykatlana
priority: normal
severity: normal
status: open
title: .pyc file not running in cross python versions
type: crash
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I would appreciate a discussion of the underlying issue and not "edelsohn-* 
> buildbot workers failing".

FYI Charalampos, Pablo and me are investigating the root issues.

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread David Edelsohn


David Edelsohn  added the comment:

If they want to discuss here, fine, but the failing bot is a symptom not the 
problem.  The Buidlbot infrastructure is unstable, causing disconnects and 
leaving un-removed files.  If one looks at the workers, one can see many of the 
architectures in Exception states.

I would appreciate a discussion of the underlying issue and not "edelsohn-* 
buildbot workers failing".

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

> It really would be better to discuss this in the builtbot mailing list and 
> not Python issue tracker.

Pablo, me and a few otheres are using the Python bug tracker to track buildbot 
issues. But I'm fine with also discussing these issues on python-buildbot list. 
I suggested to Charalampos to write there:
https://mail.python.org/archives/list/python-buildb...@python.org/thread/R4CPNQFTOHBKU5VHCOPM2OBXWY5JC5SC/

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread David Edelsohn


David Edelsohn  added the comment:

It really would be better to discuss this in the builtbot mailing list and not 
Python issue tracker.

I have been seeing problems with many buildbots for the past few weeks, not 
just the s390x bots.  I receive messages that all of the bots disconnected, but 
the bots themselves are fine.  I also find many temporary files left in the 
bots, filling the /tmp filesystem.

I believe that something else has degraded.

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Note: I found that all my Fedora and RHEL8 buildbots have issues with 
connecting to the master buildbot server.

Not sure if a related package got updated and prompts the disconnects (as the 
RHEL7 ones are fine), or if it's relevant to the master buildbot server 
migration.

--
nosy: +cstratak

___
Python tracker 

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



[issue35228] Index search in CHM help crashes viewer

2020-08-27 Thread Václav Dvořák

Václav Dvořák  added the comment:

I have just apparently discovered a workaround! (Thanks to @chrullrich whose 
comment gave me the hint.) Maybe it's been obvious to everybody this whole time 
but I have only now found out that when I delete the file 
%APPDATA%\Microsoft\HTML Help\hh.dat (in my case 
c:\Users\dvorak\AppData\Roaming\Microsoft\HTML Help\hh.dat), the problem seems 
to go away. I'm so happy I just had to share. :)

I also have another, possibly naive idea. While Microsoft has ignored this 
issue for years, they have recently "helped the community release their 
distribution of Python to the Microsoft Store" 
(https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/),
 and by "they", apparently I mean the very same Steve Dower who comments here, 
as I just realized. :-D (So... thanks, Steve.) So I'm thinking, as we actually 
have a Microsoft insider here, wouldn't it be possible to make Microsoft fix 
the viewer so that it, I don't know, possibly DOESN'T CRASH? I assume that 
Microsoft has plenty of those crash reports in some database?

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

"xtreak set nosy: + David.Edelsohn"

Strange. I'm quite sure that I added him to the nosy list when I wrote my 
previous comment.

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://bugs.python.org/issue31961

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue35228] Index search in CHM help crashes viewer

2020-08-27 Thread Ma Lin


Ma Lin  added the comment:

> More realistically, including the docs as unbundled HTML files
> and relying on the default browser is probably an all-around better idea.

CHM's index function is very convenient, I almost always use this feature when 
I use CHM.

How about use tkinter to write a doc indexing tool, it reads the indexes in 
this page:
https://docs.python.org/3/genindex-all.html

Its behavior is the same as CHM's index, except that the link is opened in 
browser.

This indexing tool can be packaged with Python installer, just like IDLE, then 
MacOS/Linux users can also use the index.

--

___
Python tracker 

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



[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-27 Thread Jani Mikkonen


New submission from Jani Mikkonen :

Following code:

```
from pathlib import Path
import os
import subprocess

dir_name = os.environ.get("WORKSPACE", None) or "."
output_directory = Path(dir_name) / "results"
res = subprocess.run(["mytest", "--output", output_directory])
```

Works on macos and linux but on windows, this causes "TypeError: argument of 
type 'WindowsPath' is not iterable" at 
https://github.com/python/cpython/blob/master/Lib/subprocess.py#L568

(line is different, depending on the actual python release but i guess that 
gives the idea where it is)..

Quick test to check if i can do  `" " in Path("/tmp")` on posix platforms shows 
the same exception but with PosixPath type but apparently this sort of check 
does not happen on those platforms as the example code works fine there.

It would be nice to be able to pass path objects to subprocess api calls also 
in windows without explicitly casting the object into string before passing it 
as argument.

--
components: Windows
messages: 375993
nosy: paul.moore, rasjani, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Can't pass  Path like objects to subprocess api's on Windows.
type: behavior
versions: Python 3.10, Python 3.5, 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



[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-08-27 Thread Daniel Martin


Daniel Martin  added the comment:

See also https://bugs.python.org/issue40961 - that bug is not about thread 
safety, but another quirk around env. variable setting that needs to be 
documented in the documentation for os.putenv and os.getenv, and so anyone 
addressing this bug should probably address that one at the same time.

--
nosy: +Daniel Martin

___
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-08-27 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset d9a966ae08258da2ce2a432c943d8194760f09c4 by Petr Viktorin in 
branch 'master':
bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake 
(GH-20215)
https://github.com/python/cpython/commit/d9a966ae08258da2ce2a432c943d8194760f09c4


--

___
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-08-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21093
pull_request: https://github.com/python/cpython/pull/21984

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

Example of affected workers.

edelsohn-fedora-rawhide-z: s390x Fedora Rawhide Refleaks 3.8
https://buildbot.python.org/all/#/builders/56/builds/8

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


STINNER Victor  added the comment:

David: Would you mind to have a look?

--

___
Python tracker 

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



[issue41648] edelsohn-* buildbot worker failing with: No space left on device

2020-08-27 Thread STINNER Victor


New submission from STINNER Victor :

Issue similar to bpo-41642 "RHEL and fedora buildbots fail due to disk space 
error", multiple edelsohn-* buildbot worker are failing with: No space left on 
device.

--
components: Tests
messages: 375988
nosy: vstinner
priority: normal
severity: normal
status: open
title: edelsohn-* buildbot worker failing with: No space left on device
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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-08-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

copy uses copyfile and copymode. Both were updated to support path-like objects 
in https://github.com/python/cpython/pull/15141 . It makes sense to update 
copy's documentation too.

--
nosy: +steve.dower, xtreak
title: Outdated shutil.copy documentation -> shutil.copy documentation should 
clarify support for path-like objects
type:  -> behavior
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



[issue41647] MutableMapping ".setdefault()" to return default value via __getitem__

2020-08-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue41624] typing.Coroutine documentation

2020-08-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +21092
pull_request: https://github.com/python/cpython/pull/21983

___
Python tracker 

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



[issue41624] typing.Coroutine documentation

2020-08-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +21091
pull_request: https://github.com/python/cpython/pull/21982

___
Python tracker 

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



[issue41634] Typo in curses documentation

2020-08-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:


New changeset 398575c210f79627830c5c470184f54ace950ac6 by Zackery Spytz in 
branch 'master':
bpo-41634: Fix a typo in the curses documentation (GH-21958)
https://github.com/python/cpython/commit/398575c210f79627830c5c470184f54ace950ac6


--
nosy: +xtreak

___
Python tracker 

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



[issue41634] Typo in curses documentation

2020-08-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21090
pull_request: https://github.com/python/cpython/pull/21981

___
Python tracker 

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



[issue41634] Typo in curses documentation

2020-08-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41594] Intermittent failures of loop.subprocess_exec() to capture output

2020-08-27 Thread Kyle Meyer


Kyle Meyer  added the comment:

I should have thought to provide the output of when debug=True is
passed to asyncio.run().  Here it is, with the python on my Debian
system:

$ python3 -V
Python 3.7.3

$ python3 reproducer.py
Iteration:   1 of 100
Failed on iteration 1
logfile: /tmp/asyncio-debug-rqfsxyth.log

$ cat /tmp/asyncio-debug-rqfsxyth.log 
DEBUG: Starting iteration 1
DEBUG: Using selector: EpollSelector
DEBUG: execute program 'printf' stdout=
DEBUG: process 'printf' created: pid 20488
DEBUG: process 20488 exited with returncode 0
INFO: <_UnixSubprocessTransport pid=20488 running> exited with return code 0
DEBUG: Read pipe 8 connected: (<_UnixReadPipeTransport fd=8 polling>, 
>)
DEBUG: process_exited() called
INFO: execute program 'printf': <_UnixSubprocessTransport pid=20488 
returncode=0 stdout=<_UnixReadPipeTransport fd=8 polling>>
DEBUG: pipe_data_received(): fd=1, data=b'ok'
DEBUG: Close <_UnixSelectorEventLoop running=False closed=False debug=True>
DEBUG: Failed on iteration 1

And with a python built from a recent commit (8e19c8be8701):

$ python -V
Python 3.10.0a0

$ python reproducer.py
Iteration:   1 of 100
Failed on iteration 1
logfile: /tmp/asyncio-debug-9eyhuas4.log

$ cat /tmp/asyncio-debug-9eyhuas4.log 
DEBUG: Starting iteration 1
DEBUG: Using selector: EpollSelector
DEBUG: execute program 'printf' stdout=
DEBUG: process 'printf' created: pid 20524
DEBUG: process 20524 exited with returncode 0
INFO: <_UnixSubprocessTransport pid=20524 running> exited with return code 0
DEBUG: Read pipe 8 connected: (<_UnixReadPipeTransport fd=8 polling>, 
>)
DEBUG: process_exited() called
INFO: execute program 'printf': <_UnixSubprocessTransport pid=20524 
returncode=0 stdout=<_UnixReadPipeTransport fd=8 polling>>
DEBUG: pipe_data_received(): fd=1, data=b'ok'
DEBUG: Close <_UnixSelectorEventLoop running=False closed=False debug=True>
DEBUG: Failed on iteration 1

---

It looks like I can work around the issue (i.e. I don't observe any
lost output) by adding this line to the attached script:

diff --git a/reproducer.py b/reproducer.py
index 5e04c36..a462898 100644
--- a/reproducer.py
+++ b/reproducer.py
@@ -25,6 +25,7 @@ async def get_stdout():
 transport, protocol = await loop.subprocess_exec(
 lambda: Protocol(exit_future),
 "printf", "ok", stdin=None, stderr=None)
+await asyncio.ensure_future(transport._wait())
 await exit_future
 transport.close()
 return bytes(protocol.output)

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



[issue41647] MutableMapping ".setdefault()" to return default value via __getitem__

2020-08-27 Thread Matias G


New submission from Matias G :

Hi,

This is more a question/proposal than a real issue. I apologize in
advance if this has already been debated or if it is not relevant.

I noticed `setdefault` method of mutable mapping objects is returning
the default value as passed in the call, when applicable, without
passing through `__getitem__`.

I think it would be more "symmetric" if it would return the default
value set by `__setitem__` via `__getitem__`. This would handle the
case of a custom MutableMapping defining a custom behaviour of
`__setitem__` and `__getitem__`.

Of course, in my case finally I overloaded `setdefault` to do this,
but it might be worth in general, at least for the MutableMapping
class.

Thanks,
Matias.

--
messages: 375984
nosy: guijarro
priority: normal
severity: normal
status: open
title: MutableMapping ".setdefault()" to return default value via __getitem__
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue41646] Outdated shutil.copy documentation

2020-08-27 Thread Jonatan Skogsfors


New submission from Jonatan Skogsfors :

In the 3.8.5 documentation for shutil.copy it says that "src and dst should be 
strings". However, the implementation doesn't seem to have any problem with 
path objects.

--
assignee: docs@python
components: Documentation
messages: 375983
nosy: Jonatan Skogsfors, docs@python
priority: normal
severity: normal
status: open
title: Outdated shutil.copy documentation
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