[issue41045] f-string's "debug" feature is undocumented

2020-07-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

I've reviewed your first PR (#21509).

Regarding your second one, I think there's a misunderstanding. With "pydoc" I 
didn't mean "the Python docs". IMO the documentation of f-strings in the 
language reference is sufficient, there's no need for another section about it 
in the library reference.

What I meant was that the pydoc *module* doesn't have any text about f-strings. 
The help() builtin calls pydoc.help(), and there are some *special* topics that 
you can invoke whose source text is generated
by running `make pydoc-topics` in the Doc directory and copying the output into 
Lib/pydoc_data/. There is a list of topics included in 
Doc/tools/extensions/pyspecific.py (pydoc_topic_labels) and something has to be 
added there. But beware! This code is tricky. You also need to add an entry to 
pydoc.py itself, to the dict named 'topics' around line 1891. I think you can 
just add an entry FSTRINGS to the latter and make it point to the section 
labeled f-strings in the language reference (which you are updating in PR 
21509).

Let me know if you need more help (I had a fun hour figuring out how all this 
works :-).

--

___
Python tracker 

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



[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-22 Thread Terry J. Reedy


New submission from Terry J. Reedy :

#41300 fixed one bug in the patch for #41158.  A user reported another on on 
idle-dev list.  Create a file in Windows Explorer.  Leave as .txt or rename to 
.py.  Right click and Edit with IDLE 3.8 (.4/.5 or 3.9.0b4 or 5).  Edit works, 
Save (or Run) does not.  Open the same file from Command Prompt, change it, and 
trying to save produces

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Programs\Python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
  File "C:\Programs\Python38\lib\idlelib\multicall.py", line 176, in handler
r = l[i](event)
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 200, in save
if self.writefile(self.filename):
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 232, in writefile
text = self.fixnewlines()
  File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 252, in fixnewlines
text = text.replace("\n", self.eol_convention)
TypeError: replace() argument 2 must be str, not None

The replacement line is guarded with
if self.eol_convention != "\n":
Either the condition should be include 'and self.eol_convention is not None' or 
the setting of the attribute should be changed.  I will look into how it was 
set before the #41158 patch.

--
messages: 374119
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: edit/save files created by Windows Explorer
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41182] DefaultSelector fails to detect selector on VMware ESXi

2020-07-22 Thread miss-islington


miss-islington  added the comment:


New changeset bcd47837a9bf4806e559b40df73869493efcce27 by Abhijeet Kasurde in 
branch 'master':
bpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)
https://github.com/python/cpython/commit/bcd47837a9bf4806e559b40df73869493efcce27


--
nosy: +miss-islington

___
Python tracker 

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



[issue41371] test_zoneinfo fails

2020-07-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue41357] pathlib.Path.resolve incorrect os.path equivalent

2020-07-22 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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

___
Python tracker 

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



[issue12423] signal handler doesn't handle SIGABRT from os.abort

2020-07-22 Thread Howard A. Landman


Howard A. Landman  added the comment:

I don't think changing the documentation makes this not be a bug. My situation: 
I have a Python 3.7.3 program that reliably dies (after about 13 hours, having 
called its measure() method between 118.6M and 118.7M times) with free(): 
invalid pointer, which calls abort(). I believe that this is a bug in Python; 
and it's NOT a memory leak, since the size of the program doesn't change at all 
over time and is under 14 MB (real). I would like to debug it. This basically 
says "you're screwed". I can't catch the abort, and I can't use python3-dbg 
because it won't bind with the RPi.GPIO or spidev libraries. So all I can get 
from a core dump is that free() is being called by list_ass_item() at 
../Objects/listobject.c line 739. Assuming that I'm right and that this is a 
bug in Python, how do you expect anyone to ever debug it? At a bare minimum, 
there needs to be an easy way to get a full stack trace through both Python and 
C.

--
nosy: +Howard_Landman

___
Python tracker 

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



[issue41265] lzma/bz2 module: inefficient buffer growth algorithm

2020-07-22 Thread Ma Lin


Ma Lin  added the comment:

I'm working on a patch.
lzma decompressing speed increases:

baseline: 0.275722 sec
patched:  0.140405 sec
(Uncompressed data size 52.57 MB)


The new algorithm looks like this:

#define INITIAL_BUFFER_SIZE (16*1024)

static inline Py_ssize_t
get_newsize(Py_ssize_t size)
{
const Py_ssize_t MB = 1024*1024;
const Py_ssize_t GB = 1024*1024*1024;

if (size <= 1*MB) {
return size << 2;   // x4
} else if (size <= 128*MB) {
return size << 1;   // x2
} else if (size <= 1*GB) {
return size + (size >> 1);  // x1.5
} else if (size <= 2*GB) {
return size + (size >> 2);  // x1.25
} else {
return size + (size >> 3);  // x1.125
}
}

--

___
Python tracker 

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



[issue41372] Log exception never retrieved in concurrent.futures

2020-07-22 Thread Bar Harel


Change by Bar Harel :


--
nosy: +bquinlan, pitrou

___
Python tracker 

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



[issue41357] pathlib.Path.resolve incorrect os.path equivalent

2020-07-22 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I uploaded a script illustrating the differences between how Path.resolve(), 
os.path.abspath(), and os.path.realpath() handle symlinks.  As noted by 
Jendrik, Path.resolve() and os.path.realpath() both resolve symlinks, while 
os.path.abspath() does not.  The documentation needs to be updated.  I will 
generate a pull request.

Example run on the master branch:

python version:
3.9.0a0 (heads/master-dirty:f69d5c6198, Jul 16 2019, 12:38:41) 
[Clang 10.0.1 (clang-1001.0.46.4)]

tdir1: /var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1
creating tdir1
tdir2: /var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo2
creating tdir2 as symlink to tdir1
Path(tdir1).resolve(): 
/private/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1
Path(tdir2).resolve(): 
/private/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1
os.path.abspath(tdir1): 
/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1
os.path.abspath(tdir2): 
/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo2
os.path.realpath(tdir1): 
/private/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1
os.path.realpath(tdir2): 
/private/var/folders/w7/mxt827716xs7_3wbk3mqwd3hgn/T/tmpyj7juuca/foo1

--
Added file: https://bugs.python.org/file49333/bpo-41537-test.py

___
Python tracker 

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



[issue41372] Log exception never retrieved in concurrent.futures

2020-07-22 Thread Bar Harel


New submission from Bar Harel :

Asyncio has an amazing mechanism showing "Task exception was never retrieved" 
or "Future exception was never retrieved" if the task threw an exception, and 
no one checked its `.result()` or `.exception()`.

It does so by setting a private variable named `__log_traceback` to False upon 
retrieval, and logging at `__del__` if the exception wasn't retrieved.

I believe it's a very important mechanism missing from concurrent.futures. It's 
very easy to implement.

I wanted to see if there's any disagreement before I implement it though. It's 
small enough to not need python-ideas yet important enough for inclusion I 
believe.

Regarding potential issues - I can only see issues with unlikely deadlocks at 
`__del__` (think of a handler taking a lock and this occurs during the handling 
of another log record). Asyncio however already took that bet, and although 
it's less planned for multi-threading, it's still a bet that was totally worth 
it.

--
components: Library (Lib)
messages: 374114
nosy: bar.harel
priority: normal
severity: normal
status: open
title: Log exception never retrieved in concurrent.futures
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-22 Thread Alex Grönholm

Change by Alex Grönholm :


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

___
Python tracker 

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



[issue41371] test_zoneinfo fails

2020-07-22 Thread doodspav


doodspav  added the comment:

Note:
=
I marked the type as `crash` because during the test run, the first attempt at 
`test_zoneinfo` failed with a segfault

--

___
Python tracker 

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



[issue4630] IDLE: add cursor noblink option

2020-07-22 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +20733
pull_request: https://github.com/python/cpython/pull/21594

___
Python tracker 

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



[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-22 Thread Alex Grönholm

Alex Grönholm  added the comment:

Looks like they do – fantastic!

--

___
Python tracker 

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



[issue41357] pathlib.Path.resolve incorrect os.path equivalent

2020-07-22 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-22 Thread Alex Grönholm

Alex Grönholm  added the comment:

Sure, it should be a rather straightforward fix. I have to check if the tests 
for the related methods test for proper cancellation semantics. It should be 
even faster if they do.

--

___
Python tracker 

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



[issue41317] sock_accept() does not remove server socket reader on cancellation

2020-07-22 Thread Yury Selivanov


Yury Selivanov  added the comment:

Alex, do you want to submit a PR?

--

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2020-07-22 Thread Joseph Perez


Joseph Perez  added the comment:

However, PEP 563 will not solve the recursive type alias issue like `A = 
list["A"]` but this is a minor concern.

--

___
Python tracker 

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



[issue33129] Add kwarg-only option to dataclass

2020-07-22 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue33129] Add kwarg-only option to dataclass

2020-07-22 Thread Prakhar Goel


Prakhar Goel  added the comment:

Hi,

As another piece of evidence: I run into this problem _all the time_. Whenever 
I need a field in the parent with a default, I either need to add bogus default 
values for every field in every subclass or just skip the default in the parent.

I'd like to suggest a middle ground:
1. A field level keyword_only option which forces just that field to be a 
kw-only field (for every subclass as well).
2. A class level keyword_only option that does:
2a. False (default) means current behavior where classes are not keyword only 
(but may be forced to be by the field specific arg).
2b. True means all the fields in this class (but not the subclasses!) Would be 
marked as keyword only. This does affect the order of arguments in the init 
method but that seems acceptable given that keyword only parameters are 
conceptually order independent.
2c. None implies that precisely the fields with a default (or default_factory) 
should be keyword only fields.

Thoughts?

--
nosy: +Prakhar Goel

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2020-07-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

I think mentioning this in the docs is the best we can do in 3.9, and for 3.10 
the point will be moot. The next release is release candidate 1, so we're well 
past the point where we can implement new functionality.

--

___
Python tracker 

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



[issue41371] test_zoneinfo fails

2020-07-22 Thread doodspav


New submission from doodspav :

Issue:
==
`_lzma` is not built because the required libraries are not available on my 
machine. `test_zoneinfo` assumes it is always available, leading it to crash on 
my machine.

How I build and ran the tests:
==
git clone https://github.com/python/cpython.git  (bpo-41364)
cd cpython
mkdir build && cd build
../configure
make -j8
make test > test_output.txt

Test traceback:
===
  File 
"/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/test/libregrtest/runtest.py",
 line 272, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
  File 
"/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/test/libregrtest/runtest.py",
 line 223, in _runtest_inner2
the_module = importlib.import_module(abstest)
  File 
"/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/importlib/__init__.py", 
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1030, in _gcd_import
  File "", line 1007, in _find_and_load
  File "", line 986, in _find_and_load_unlocked
  File "", line 680, in _load_unlocked
  File "", line 790, in exec_module
  File "", line 228, in _call_with_frames_removed
  File 
"/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/test/test_zoneinfo/__init__.py",
 line 1, in 
from .test_zoneinfo import *
  File 
"/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/test/test_zoneinfo/test_zoneinfo.py",
 line 9, in 
import lzma
  File "/home/doodspav/Jetbrains/CLionProjects/cpython/Lib/lzma.py", line 27, 
in 
from _lzma import *
ModuleNotFoundError: No module named '_lzma'

--
components: Tests
files: test_output.txt
messages: 374106
nosy: doodspav
priority: normal
severity: normal
status: open
title: test_zoneinfo fails
type: crash
versions: Python 3.10
Added file: https://bugs.python.org/file49332/test_output.txt

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2020-07-22 Thread Joseph Perez


New submission from Joseph Perez :

PEP 585 current implementation (3.10.0a0) differs from current Generic 
implementation about ForwardRef, as illustrated bellow:
```python
from dataclasses import dataclass, field
from typing import get_type_hints, List, ForwardRef

@dataclass
class Node:
children: list["Node"] = field(default_factory=list)
children2: List["Node"] = field(default_factory=list)

assert get_type_hints(Node) == {"children": list["Node"], "children2": 
List[Node]}
assert List["Node"].__args__ == (ForwardRef("Node"),)
assert list["Node"].__args__ == ("Node",) # No ForwardRef here, so no 
evaluation by get_type_hints
```
There is indeed no kind of ForwardRef for `list` arguments. As shown in the 
example, this affects the result of get_type_hints for recursive types handling.

He could be "fixed" in 2 lines in `typing._eval_type` with something like this :
```python
def _eval_type(t, globalns, localns, recursive_guard=frozenset()):
if isinstance(t, str):
t = ForwardRef(t)
if isinstance(t, ForwardRef):
   ...
```
but it's kind of hacky/dirty.

It's true that this issue will not concern legacy code, 3.9 still being not 
released. So developers of libraries using get_type_hints could add in their 
documentation that `from __future__ import annotations` is mandatory for 
recursive types with PEP 585 (I think I will do it).

By the way, Guido has quickly given his opinion about it in PR 21553: "We 
probably will not ever support this: importing ForwardRef from the built-in 
generic alias code would be problematic, and once from __future__ import 
annotations is always on there's no need to quote the argument anyway." (So 
feel free to close this issue)

--
messages: 374105
nosy: BTaskaya, eric.smith, gvanrossum, joperez, levkivskyi, lukasz.langa, 
vstinner
priority: normal
severity: normal
status: open
title: PEP 585 and ForwardRef
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



[issue41341] Recursive evaluation of ForwardRef (and PEP 563)

2020-07-22 Thread Guido van Rossum

Guido van Rossum  added the comment:

Łukasz, can I please have a decision on whether to backport this bugfix to 3.9?

See my comment about that:
https://github.com/python/cpython/pull/21553#pullrequestreview-452895735

--

___
Python tracker 

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



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 9b9f1582753979f38d2fd927cddf0621a65e9ed6 by Stefan Krah in branch 
'master':
bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)
https://github.com/python/cpython/commit/9b9f1582753979f38d2fd927cddf0621a65e9ed6


--

___
Python tracker 

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



[issue41341] Recursive evaluation of ForwardRef (and PEP 563)

2020-07-22 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 653f420b53a3aa87316cef59de8d3f5d9e11deb4 by wyfo in branch 
'master':
bpo-41341: Recursive evaluation of ForwardRef in get_type_hints (#21553)
https://github.com/python/cpython/commit/653f420b53a3aa87316cef59de8d3f5d9e11deb4


--

___
Python tracker 

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



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


Change by Stefan Krah :


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

___
Python tracker 

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



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


New submission from Stefan Krah :

This issue tracks the update of the included libmpdec to version 2.5.1.

The version includes features required for #41324.

--
assignee: skrah
components: Extension Modules
messages: 374101
nosy: skrah
priority: normal
severity: normal
status: open
title: Update to libmpdec-2.5.1
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue41368] Allow compiling Python with llvm-clang on Windows.

2020-07-22 Thread William Pickard


William Pickard  added the comment:

Note: Apparently Google-OpenID login button created a seperate account... 
instead of finding this one.

--
nosy: +WildCard65 -William Pickard

___
Python tracker 

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



[issue41368] Allow compiling Python with llvm-clang on Windows.

2020-07-22 Thread William Pickard


New submission from William Pickard :

Since Visual Studio 2017, Microsoft has an optional C++ Desktop Development 
option for compiling C/C++ code with LLVM's Clang compiler.

It's called: Clang with Microsoft CodeGen.
While the code is parsed with LLVM's Clang parser, the code is generated with a 
MSVC compatible code generator (hence the "with Microsoft CodeGen" name suffix)

Currently, Python 3.10 is uncompilable with Clang, but I would appreciate it if 
it can be supported.

I have attached a build log from MSBuild, below is the commandline I used to 
run the build.

Start-Process -FilePath $(Join-Path $PCBUILD -ChildPath 'build.bat' -Resolve) 
-WorkingDirectory $PCBuild -NoNewWindow -RedirectStandardOut $BUILD_LOG 
-RedirectStandardError $BUILDERROR_LOG -ArgumentList '-m', '-v', '-c', 'Debug', 
'-p', 'x64', '-t', 'Build', '"/p:PlatformToolset=ClangCL"'
PS L:\GIT\cpython> Start-Process -FilePath $(Join-Path $PCBUILD -ChildPath 
'build.bat' -Resolve) -WorkingDirectory $PCBuild -NoNewWindow 
-RedirectStandardOut $BUILD_LOG -RedirectStandardError $BUILDERROR_LOG 
-ArgumentList '-m', '-v', '-c', 'Debug', '-p', 'x64', '-t', 'Build', 
'"/p:PlatformToolset=ClangCL"'

--
components: Cross-Build, Windows
files: build.log
messages: 374099
nosy: Alex.Willmer, William Pickard, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Allow compiling Python with llvm-clang on Windows.
type: compile error
versions: Python 3.10
Added file: https://bugs.python.org/file49331/build.log

___
Python tracker 

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



[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-22 Thread Eryk Sun


Eryk Sun  added the comment:

> "Python Launcher is sorry to say... No pyvenv.cfg file" 

As already mentioned, that it fails with this error means you're running a 
virtual-environment launcher instead of a base Python executable. That it 
displays a message box means you ran a GUI pythonw.exe virtual-environment 
launcher. pyvenv.cfg is a configuration file that the virtual-environment 
launcher looks for beside the executable, or one directory up. It tells the 
launcher where to find the base python[w].exe executable.

As already suggested, you should associate .py[w] scripts with the "Python" app 
that depicts a rocket/shuttle being launched on its icon. This will associate 
.py[w] scripts with the py[w].exe launcher, and it also associates them with a 
shell drop handler that allows files to be dragged and dropped on a script icon 
in Explorer.

--
nosy: +eryksun

___
Python tracker 

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



[issue41100] Build failure on macOS 11 (beta)

2020-07-22 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-22 Thread Chuck


Chuck  added the comment:

Does anyone know why when Python Launcher is executed by double clicking on the 
Python script called ecrypt_bitcoinj_seed.pyw a small window pops of stating... 
"Python Launcher is sorry to say... No pyvenv.cfg file" as in the image? Why 
wouldn't the pyvenv.cfg file NOT get created like it's supposed to.  After 
doing a search for it on C: drive it is not found.  If anyone has a copy of the 
file, would you please provide it and also tell me the folder to place it in? 
Thank you

--
Added file: https://bugs.python.org/file49330/screenshot.png

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2020-07-22 Thread Wicher Minnaard


Change by Wicher Minnaard :


--
nosy: +wicher

___
Python tracker 

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



[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

> It should also include 0x20 (space) since that can also be used to manipulate 
> the request.

Can you indicate how to use a space in the HTTP verb as part of an attack?

--

___
Python tracker 

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



[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-22 Thread Howard A. Landman


Howard A. Landman  added the comment:

This is not a memory leak problem. "Top" reports VIRT 21768 RES 13516 for the 
whole run, and Python internal resource reporting says 13564 kb for the whole 
run. So that's less than 1 kb leaked in 118.6M measurement cycles; most likely 
zero.

--

___
Python tracker 

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



[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-22 Thread Chuck


Chuck  added the comment:

Mr. Dower, I apologize for not being more specific... since this is Windows 
based and not console driven, the file used for execution should be pythonw.exe 
according to the instructions at 
https://github.com/gurnec/decrypt_bitcoinj_seed so I right clicked on 
decrypt_bitcoinj_seed.pyw and went to properties and changed it's association 
to pythonw.exe so it would run in a non-console manner.  After doing this 
however, it still didn't work with the error "No pyvenv.cfg file".  Would I 
still follow your instructions, choosing Python instead of pythonw.exe?  Do you 
happen to know why the pyvenv.cfg never got created in the first place?  After 
all, when I do a search it's no where to be found on my C: drive.

--

___
Python tracker 

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



[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-22 Thread Max


Max  added the comment:

I've just noticed an issue with the current version of the patch. It should 
also include 0x20 (space) since that can also be used to manipulate the request.

--

___
Python tracker 

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



[issue41365] Python Launcher is sorry to say... No pyvenv.cfg file

2020-07-22 Thread Steve Dower


Steve Dower  added the comment:

It seems like you're trying to launch the python.exe that is created for a 
virtual environment rather than the actual one. This probably means that at 
some point you created a virtual environment and updated your file association 
to launch it.

The best thing to do is to right-click your .pyw file, choose "Open With", 
"Choose another app", enable "Always open ..." and choose "Python" from its 
list (the icon should have a space shuttle being launched). That will switch 
you back to the original file association.

--

___
Python tracker 

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



[issue41364] Optimise uuid platform detection

2020-07-22 Thread Steve Dower


Steve Dower  added the comment:


New changeset a18f22ab11a7bfb5ff3e74c737ca9e1bebe4abf9 by Steve Dower in branch 
'3.8':
bpo-41364: Reduce import overhead of uuid module (GH-21586)
https://github.com/python/cpython/commit/a18f22ab11a7bfb5ff3e74c737ca9e1bebe4abf9


--

___
Python tracker 

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



[issue41364] Optimise uuid platform detection

2020-07-22 Thread Steve Dower


Change by Steve Dower :


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



[issue40979] typing module docs: keep text, add subsections

2020-07-22 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

FWIW I like Guido's suggestion in the PR, I would rather use "importance order" 
than alphabetical order.

--

___
Python tracker 

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



[issue41367] Popen Timeout raised on 3.6 but not on 3.8

2020-07-22 Thread Joan Prat Rigol


New submission from Joan Prat Rigol :

If I run this code in Python 3.8 I get the result as expected:

Python 3.8.2 (default, Apr 27 2020, 15:53:34) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> process = subprocess.Popen("sudo -Si ls -l /home", shell=True, stdin=-1, 
>>> stdout=-1, stderr=-1)
>>> out, err = process.communicate(input="Pr4tR1g01J04n\n".encode(), timeout=2)
>>> print(out)
b'total 4\ndrwxr-xr-x 43 joan joan 4096 Jul 22 09:46 joan\n'
>>> 
But If I run the code in Python 3.6 I am getting a timeout:

Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> process = subprocess.Popen("sudo -Si ls -l /home", shell=True, stdin=-1, 
>>> stdout=-1, stderr=-1)
>>> out, err = process.communicate(input="Pr4tR1g01J04n\n".encode(), timeout=2)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/subprocess.py", line 863, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.6/subprocess.py", line 1535, in _communicate
self._check_timeout(endtime, orig_timeout)
  File "/usr/lib/python3.6/subprocess.py", line 891, in _check_timeout
raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command 'sudo -Si ls -l /home' timed out after 2 
seconds
>>> 
Is this a bug?

--
messages: 374089
nosy: Joan Prat Rigol
priority: normal
severity: normal
status: open
title: Popen Timeout raised on 3.6 but not on 3.8
versions: Python 3.6, Python 3.8

___
Python tracker 

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



[issue41358] Unable to uninstall Python launcher using command line

2020-07-22 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue41356] Convert bool.__new__ to argument clinic

2020-07-22 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

More microbenchmarks:

pyperf timeit "bool()"
Before: 63.1 ns +- 0.7 ns
After:  51.7 ns +- 1.2 ns

pyperf timeit "bool(0)"
Before: 77.4 ns +- 1.9 ns
After:  67.2 ns +- 1.3 ns

pyperf timeit "bool(17)"
Before: 77.3 ns +- 2.3 ns
After:  67.1 ns +- 1.0 ns

--

___
Python tracker 

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



[issue41361] Converting collections.deque methods to Argument Clinic

2020-07-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think we should skip applying the clinic to the code. It jumbles the code 
quite a bit but doesn't give any real benefit.

--
resolution:  -> not a bug
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



[issue41361] Converting collections.deque methods to Argument Clinic

2020-07-22 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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