[issue37709] CSVReader ignores dialect.lineterminator

2020-07-21 Thread Daniel Smejkal


Change by Daniel Smejkal :


--
assignee:  -> docs@python
components: +2to3 (2.x to 3.x conversion tool), Documentation, email
nosy: +barry, docs@python, r.david.murray

___
Python tracker 

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



[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This fix touched the unpickling code, and the test crashed during pickling, so 
it is not directly related. But it may be some compiler glitch, when changing 
one part of code affects compilation of other parts of code. The next run on 
the buildbot was passed, and there were failures in the past (but logs were not 
saved), so it may be just unstable test.

--

___
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-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Now Argument Clinic generates more efficient (but more cumbersome) code, so 
there may be new reasons of using it. Please test the performance of the deque 
constructor (deque(), deque(()), deque((), 10), deque((), maxlen=10)), methods 
index() and rotate(), builtins iter() and reversed(). It is hard to test 
insert() because it mutates the deque and I do not expect anything beside noise 
for other methods.

--

___
Python tracker 

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



[issue41366] sign-conversion warning in 3.9 beta

2020-07-21 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +20731
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21592

___
Python tracker 

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



[issue41366] sign-conversion warning in 3.9 beta

2020-07-21 Thread Henry Schreiner


New submission from Henry Schreiner :

The macro Py_UNICODE_COPY was replaced by a function in CPython 3.9, and that 
function cannot compile with full warnings enabled + warnings as errors under 
Clang. The problematic line:

Py_DEPRECATED(3.3) static inline void
Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t 
length) {
memcpy(target, source, length * sizeof(Py_UNICODE));
}

has an implicit conversion of Py_ssize_t into size_t, which creates:

/Users/runner/hostedtoolcache/Python/3.9.0-beta.5/x64/include/python3.9/cpython/unicodeobject.h:55::
 implicit conversion changes signedness: 'Py_ssize_t' (aka 'long') to 'unsigned 
long' [-Werror,-Wsign-conversion]

error: implicit conversion changes signedness: 'Py_ssize_t' (aka 'long') to 
'unsigned long' [-Werror,-Wsign-conversion]
memcpy(target, source, length * sizeof(Py_UNICODE));memcpy(target, 
source, length * sizeof(Py_UNICODE));

An explicit cast to size_t (is there a Py_size_t?) should be made.

--
components: C API
messages: 374084
nosy: Henry Schreiner
priority: normal
severity: normal
status: open
title: sign-conversion warning in 3.9 beta
type: compile error
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



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

2020-07-21 Thread Chuck


New submission from Chuck :

on Windows 10 64 after install of Python 3.8.5 and after install of 
decrypt_bitcoinj_seed.pyw <--- and after double click, I get "Python Launcher 
is sorry to say... No pyvenv.cfg file".  I have tried multiple reinstalls of 
Python to no avail. When a search is performed on the entire C:\ drive, no 
pyvenv.cfg file is present so c:\>python -m venv myenv c:\path\to\myenv does 
not create the pyvenv.cfg file.  The Python Script requires PIP (Google 
Protobuf and pylibscrypt) and I understand it's included in 3.8.5. Please 
provide step by step instructions for how to either create or download the 
pyvenv.cfg file and the exact Python path to folder name it needs to go so I 
can overcome this error. Or if someone has a different solution, that's fine 
too... I just need the decrypt_bitcoinj_seed.pyw to work.

--
components: Windows
messages: 374083
nosy: Packhash, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python Launcher is sorry to say... No pyvenv.cfg file
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue41361] Converting collections.deque methods to Argument Clinic

2020-07-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

> collections.deque was intentionally not converted to Argument Clinic,

Oh, I see ..

--

___
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-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20730
pull_request: https://github.com/python/cpython/pull/21591

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


miss-islington  added the comment:


New changeset 00466db22168579509fe6aa6cb47cdd89dfb9141 by Miss Islington (bot) 
in branch '3.9':
bpo-41364: Reduce import overhead of uuid module (GH-21586)
https://github.com/python/cpython/commit/00466db22168579509fe6aa6cb47cdd89dfb9141


--

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


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +20729
pull_request: https://github.com/python/cpython/pull/21589

___
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-21 Thread Steve Dower


Steve Dower  added the comment:


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


--

___
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-21 Thread Lawrence D'Anna


Change by Lawrence D'Anna :


--
pull_requests: +20728
pull_request: https://github.com/python/cpython/pull/21588

___
Python tracker 

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



[issue35328] Set a environment variable for venv prompt

2020-07-21 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 6.0 -> 7.0
pull_requests: +20727
pull_request: https://github.com/python/cpython/pull/21587

___
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-21 Thread Steve Dower


Change by Steve Dower :


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

___
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-21 Thread Steve Dower


New submission from Steve Dower :

The uuid module calls platform.system() multiple times, even when the result is 
known from sys.platform. We can avoid some of these.

--
assignee: steve.dower
components: Library (Lib)
messages: 374079
nosy: steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Optimise uuid platform detection
type: performance
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



[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: closed -> open

___
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-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue20180. collections.deque was intentionally not converted to 
Argument Clinic, but some of methods were made using more efficient code for 
parsing arguments by inlining the code generated by Argument Clinic at that 
time.

--
nosy: +rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue41363] python 3.8.5 folder not visible in https://www.python.org/ftp/python/ listing

2020-07-21 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. The python.org website sits behind a content delivery 
network service and sometimes it takes a little while for pages to be updated 
in the cache.  It should be there now.

--
nosy: +ned.deily
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41363] python 3.8.5 folder not visible in https://www.python.org/ftp/python/ listing

2020-07-21 Thread Андрей Перевёрткин

New submission from Андрей Перевёрткин :

Open https://www.python.org/ftp/python/ and observe that there is no 3.8.5 
folder.
Open https://www.python.org/ftp/python/3.8.5/ and observe that all the expected 
files are present.

Conclusion: https://www.python.org/ftp/python/ index needs an update.

--
messages: 374076
nosy: Андрей Перевёрткин
priority: normal
severity: normal
status: open
title: python 3.8.5 folder not visible in https://www.python.org/ftp/python/ 
listing
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



[issue41363] python 3.8.5 folder not visible in https://www.python.org/ftp/python/ listing

2020-07-21 Thread SilentGhost


Change by SilentGhost :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-21 Thread Eryk Sun


Eryk Sun  added the comment:

> This is exactly what it does. The fact that it is SUBSYSTEM:WINDOWS

Sorry, I neglected to check:
 
C:\>python3 script.py 2>&1 | more
Python was not found but can be installed from the Microsoft Store: 
https://go.microsoft.com/fwlink?linkID=2082640

--

___
Python tracker 

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



[issue41362] Regenerating parser table fails (windows)

2020-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue41362] Regenerating parser table fails (windows)

2020-07-21 Thread Constant Marks


New submission from Constant Marks :

When calling `build.bat -d --regen' the graminit.c and graminit.h files are not 
generated with the following warnings:

Time Elapsed 00:02:49.06
  Killing any running python_d.exe instances...
  Getting build info from "C:\Program Files\Git\cmd\git.exe"
  Building heads/3.9-dirty:9e84a2c424 3.9
  pythoncore.vcxproj -> 
C:\Users\crm0376\source\repos\cpython\PCbuild\win32\python39_d.dll
  C:\Users\crm0376\source\repos\cpython\Parser\pgen\__main__.py:43: 
ResourceWarning: unclosed file <_io.TextIOWrapper 
name='C:\\Users\\crm0376\\source\\repos\\cpython\\PCbuild\\obj\\39win32_Debug\\regen\\graminit.h'
 mode='w' encoding='cp
  1252'>
main()
  ResourceWarning: Enable tracemalloc to get the object allocation traceback
  C:\Users\crm0376\source\repos\cpython\Parser\pgen\__main__.py:43: 
ResourceWarning: unclosed file <_io.TextIOWrapper 
name='C:\\Users\\crm0376\\source\\repos\\cpython\\PCbuild\\obj\\39win32_Debug\\regen\\graminit.c'
 mode='w' encoding='cp
  1252'>
main()
  ResourceWarning: Enable tracemalloc to get the object allocation traceback

--
messages: 374074
nosy: constantmarks
priority: normal
severity: normal
status: open
title: Regenerating parser table fails (windows)
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



[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread paul j3


paul j3  added the comment:

This is the result of how default values are handled with '?' (and '*') nargs.

At the start of nested `take_action` function (which handles all actions) is 
this code:

argument_values = self._get_values(action, argument_strings)

# error if this argument is not allowed with other previously
# seen arguments, assuming that actions that use the default
# value don't really count as "present"
if argument_values is not action.default:
seen_non_default_actions.add(action)
for conflict_action in action_conflicts.get(action, []):
if conflict_action in seen_non_default_actions:
msg = _('not allowed with argument %s')
action_name = _get_action_name(conflict_action)
raise ArgumentError(action, msg % action_name)

'get_values' gets the values for this action.  A bare '-b' will be given its 
'default'. 

An optional positional is always 'seen', since an empty list satisfies its 
'nargs'.  'get_values' assigns the default instead.  This code in take_action 
allows us to include such positionals in a mutually exclusive group.

This handing of the '?' optional is a byproduct of that code.  Normally we 
provide both a 'default' and a 'const' with such an argument, giving us a 3-way 
switch (default, const or user-value).  If either 'default' or 'const' is 
provided, your '-b' will behave as expected.

I have a feeling that trying to document this edge case will just make things 
more confusing.

--

___
Python tracker 

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



[issue41337] strangnedd with the parser

2020-07-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm going to close this as not a python bug. If someone gets some evidence to 
the contrary, we can re-open it.

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

___
Python tracker 

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



[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2020-07-21 Thread SD


SD  added the comment:

So there is no advised way around this then. I am currently using time.sleep() 
to hit my 60hz.

--

___
Python tracker 

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



[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-21 Thread Steve Dower


Steve Dower  added the comment:

> Windows 10 has a "Feedback Hub" to report problems and search for existing 
> feedback that's similar.

This is the correct channel, but ultimately the "real" issue tracker is 
private, so all you'll ever get is "not finished yet" that suddenly becomes 
"finished" (and generally that's updated on release, not on commit, because 
we've found that users get confused when something is claimed to be fixed but 
they're still seeing the issue).

> IMO, the installer-redirector in this case should be a console application 
> that prints a message to stdout to inform the user that it's opening the 
> store to install Python.

This is exactly what it does. The fact that it is SUBSYSTEM:WINDOWS instead of 
CONSOLE is what I'm trying to get fixed. It's not complicated, it's just not 
something that anyone can force through besides the team that owns the code, 
and they own a lot of other things that need fixing as well (and the release 
schedule doesn't allow for "just one little fix"). Shipping an OS is *hard* ;)

--

___
Python tracker 

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



[issue41337] strangnedd with the parser

2020-07-21 Thread Steve Stagg


Steve Stagg  added the comment:

This appears to be a bug with the google colab site.

For whatever reason, if you try to evaluate a statement that is a line with  a 
leading comma (afaik, never valid python), then colab does something wierd by 
wrapping the arguments in quotes, and evaluating them ...

Here, `>>>` denotes running python in a colab cell:

>>> type(1)
int
>>> ,type(1)
str
>>> ,type(1,2,3)
str
>>> ,type(1, 2, 3)
---

TypeError Traceback (most recent call last)

 in ()
> 1 type("(1,", "2,", "3)")

TypeError: type.__new__() argument 2 must be tuple, not str

---

This is not reproducible in normal python, so seems extremely likely to be some 
(planned or unplanned) feature of google colab that's causing confusion here.

--
nosy: +stestagg
status: pending -> open

___
Python tracker 

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



[issue41360] method _tunnel does not allow for a standard proxy authentication solution

2020-07-21 Thread Ilia Androshchuk


Change by Ilia Androshchuk :


--
nosy: +an7e

___
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-21 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
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-21 Thread Dong-hee Na


New submission from Dong-hee Na :

There was no performance regressin with this change.

--
components: Argument Clinic
messages: 374068
nosy: corona10, larry
priority: normal
severity: normal
status: open
title: Converting collections.deque methods to Argument Clinic
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



[issue41360] method _tunnel does not allow for a standard proxy authentication solution

2020-07-21 Thread Alexey


New submission from Alexey :

The _tunnel method of the HTTPConnection class in the http.client module, if 
the CONNECT request is unsuccessful, closes the connection and raises an 
OSError without returning the response data. This behavior does not allow to 
implement the authentication procedure on the proxy server using methods 
similar to those used for authentication on servers (using hooks). And at the 
moment proxy authentication (Kerberos, Digest, NTLM - all other than Basic) is 
not supported by the urllib3 and accordingly requests, pip and many others. As 
a result, a large number of people cannot use Python to create scripts that 
involve working on the Internet (if they don't know workarounds). This problem 
has been mentioned many times here (Issue 7291, 24333, 24964). There are many 
Issues related to this task in requests, urllib3, pip and other. This problem 
is many years old (at least 5), but there is still no complete solution (as far 
as I can tell). There are several workarounds, but there is still no so
 lution that could be used in urllib3, requests, pip and other (in many 
discussions of Issues _tunnel method is indicated as a reason preventing a 
proxy authentication solution from being implemented). Hopefully someone can 
finally solve this problem or explain why it can't be solved

--
components: Library (Lib)
messages: 374067
nosy: Namyotkin
priority: normal
severity: normal
status: open
title: method _tunnel does not allow for a standard proxy authentication 
solution
type: enhancement
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



[issue41345] Remote end closed connection without response

2020-07-21 Thread Ilia Androshchuk


Ilia Androshchuk  added the comment:

Hi Michal,
I found some information in the package documentation
Please check this page
https://requests.readthedocs.io/en/master/user/advanced/#keep-alive

--

___
Python tracker 

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



[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue41359] argparse mutually exclusive group does not exclude in some cases

2020-07-21 Thread Krzysiek


New submission from Krzysiek :

The documentation for `ArgumentParser.add_mutually_exclusive_group` states: 
"argparse will make sure that only one of the arguments in the mutually 
exclusive group was present on the command line".

This is not the case in certain circumstances:

```python
import argparse

parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument('-a')
group.add_argument('-b', nargs='?')

parser.parse_args('-a a -b'.split())
```

The above code does not produce any error, even though both exclusive arguments 
are present.

My guess is that the check for mutual exclusion is not done during processing 
of each command line argument, but rather afterwards. It seems the check only 
ensures at most one argument from group is not `None`.

The issue exists at least on Python 2.7.13, 3.6, 3.7.5, 3.8, and 3.10.

--
components: Library (Lib)
messages: 374065
nosy: kkarbowiak
priority: normal
severity: normal
status: open
title: argparse mutually exclusive group  does not exclude in some cases
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41100] Build failure on macOS 11 (beta)

2020-07-21 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +20724
pull_request: https://github.com/python/cpython/pull/21583

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-21 Thread Tim Z


Tim Z  added the comment:

It works even after restart. I thought I had to run it after each restart I did 
it in idle only once.
So no need to do it again in python

--

___
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-21 Thread hap


New submission from hap :

Trying to create a command line keeping the following in mind, and my script is 
python-3.8.4.exe" /quiet InstallLauncherAllUsers=0 Include_pip=1 
Include_tcltk=1 Include_test=1 PrependPath=1
1. Python installs in user profile
2. Install pip as a part of installation
All good here. 
So, my script installs python and also installs Python Launcher.

So far so good!

The problem is, when uninstall python i use command "python-3.8.4.exe" /quiet 
/uninstall, it does uninstall python, but this does not uninstall Python 
Launcher. Therefore, i call msiexec.exe /x 
{339192BE-2520-4C34-89DF-81CF98EB7E6C} /qn+ and it does remove all components 
from %localappdata%\Package Cache folder, except that it still keeps 
launcher.msi (588kb) and also entry in appwiz.cpl (around 7.15 MB).

What i am trying to achieve is,
1. If user wants to uninstall Python, it should uninstall python and python 
launcher because i don't want to leave away any installer files which an 
contribute to my system space.

I have gone through many links with failed help. Any suggestion to save my 7.2 
MB space is greatly appreciated.

--
components: Installation
messages: 374063
nosy: ahmedparvez...@gmail.com
priority: normal
severity: normal
status: open
title: Unable to uninstall Python launcher using command line
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue29056] logging.Formatter doesn't respect more than one formatException()

2020-07-21 Thread Matthew Davis


Matthew Davis  added the comment:

The documentation says "you will have to clear the cached value"

What does that mean? How do I clear the cached value? Is there a flush function 
somewhere? Do I `del` the attribute? Set the attribute to None?

The documentation as it stands today does not provide enough detail about this 
workaround.

--
nosy: +matt-davis

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I meant to run 'import tkinter; tkinter.Tk()' directly in python, without IDLE 
involved, in your portrait window.  Do that by running terminal in the portrait 
window.  Then try to maximize.

Yes we need more volunteers, but #38946 is an issue between macOS Catalina and 
tk.

--

___
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-21 Thread Jendrik Weise


New submission from Jendrik Weise :

According to the table at the bottom of the pathlib documentation 
Path.resolve() is equivalent to os.path.abspath(path). In contrast to the 
latter Path.resolve() does follow symlinks though, making it more similar to 
os.path.realpath(path).

--
assignee: docs@python
components: Documentation
messages: 374060
nosy: Jendrik Weise, docs@python
priority: normal
severity: normal
status: open
title: pathlib.Path.resolve incorrect os.path equivalent
type: behavior
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-21 Thread Tim Z


Tim Z  added the comment:

I have 2nd screen that rotate to portrait. Is there a way to launch "import 
tkinter; tkinter.Tk()" at idle start? Or I better wait the next update?
It's not related but...
  ...why idle3.8 don't have cut/copy/paste on right click? (I mean the paste is 
broken when you paste-replace selected text). What's up with this one 
https://bugs.python.org/issue38946 ?
Is there a shortage of volunteers ? Or it's all macOS fault?

--

___
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-21 Thread Dennis Sweeney


Change by Dennis Sweeney :


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

___
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-21 Thread Dennis Sweeney


New submission from Dennis Sweeney :

Benchmarked on my machine (Windows 10):

.\python.bat -m pyperf timeit -s "from collections import deque; x = [[], [1]] 
* 1_000_000" "deque(map(bool, x), maxlen=0)"

--- Win32 build configuration ---
Master: 105 ms +- 2 ms
With this change:  88.2 ms +- 2.1 ms

--- x64 build configuration ---
Master:80.2 ms +- 1.3 ms
With this change:  74.2 ms +- 0.5 ms

--
components: Argument Clinic
messages: 374058
nosy: Dennis Sweeney, larry
priority: normal
severity: normal
status: open
title: Convert bool.__new__ to argument clinic
type: performance
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



[issue41355] os.link(..., follow_symlinks=False) without linkat(3)

2020-07-21 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The code for os.link() seems to ignore follow_symlinks when the linkat(2) 
function is not available on the platform, which results in unexpected 
behaviour when "follow_symlinks" is false.

--
components: Extension Modules
messages: 374057
nosy: ronaldoussoren
priority: normal
severity: normal
stage: test needed
status: open
title: os.link(..., follow_symlinks=False) without linkat(3)
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41354] filecmp.cmp documentation does not match actual code

2020-07-21 Thread Christof Hanke


Change by Christof Hanke :


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

___
Python tracker 

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



[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-21 Thread Eryk Sun


Eryk Sun  added the comment:

> there would still be value in having a known reporting channel

Windows 10 has a "Feedback Hub" to report problems and search for existing 
feedback that's similar. You could report a problem with the "AppInstaller" 
app. In this case, the app execution alias targets 
"AppInstallerPythonRedirector.exe". This is a GUI program, so CMD won't wait on 
it and set %errorlevel% if run from an interactive prompt -- not unless one 
uses `start /w` to force it to wait. (Sidebar: CMD determines that it's a GUI 
program by querying the PEB address and reading the process PEB via 
ReadProcessMemory... hack-o-rama.) 

IMO, the installer-redirector in this case should be a console application that 
prints a message to stdout to inform the user that it's opening the store to 
install Python. If it fails, it should print an error message to stderr and 
return a non-zero exit status.

--
nosy: +eryksun

___
Python tracker 

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



[issue4928] tempfile.NamedTemporaryFile: automatic cleanup by OS

2020-07-21 Thread Hugo


Hugo  added the comment:

It would seem that the main issue here lies in the documentation not being  
obvious enough for some of us. If you're familiar with lower level OS APIs, it 
might be clear, but as an app developer, some things slip by.

The key difference is that TemporaryFile will be erased properly (at least on 
Linux) even if the process gets a SIGKILL, while NamedTemporaryFile will linger 
(which fills up my disk every few weeks/months).

As an application developer, this difference is super important to me (I hope 
I'm not the only one). Would a PR that mentions this explicitly in the docs be 
an acceptable solution here?

--
nosy: +WhyNotHugo

___
Python tracker 

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



[issue41354] filecmp.cmp documentation does not match actual code

2020-07-21 Thread Christof Hanke


New submission from Christof Hanke :

help(filecmp.cmp) says:

"""
cmp(f1, f2, shallow=True)
Compare two files.

Arguments:

f1 -- First file name

f2 -- Second file name

shallow -- Just check stat signature (do not read the files).
   defaults to True.

Return value:

True if the files are the same, False otherwise.

This function uses a cache for past comparisons and the results,
with cache entries invalidated if their stat information
changes.  The cache may be cleared by calling clear_cache().
"""

However, looking at the code, the shallow-argument is taken only into account 
if the signatures are the same:
"""
s1 = _sig(os.stat(f1))
s2 = _sig(os.stat(f2))
if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG:
return False
if shallow and s1 == s2:
return True
if s1[1] != s2[1]:
return False

outcome = _cache.get((f1, f2, s1, s2))
if outcome is None:
outcome = _do_cmp(f1, f2)
if len(_cache) > 100:  # limit the maximum size of the cache
clear_cache()
_cache[f1, f2, s1, s2] = outcome
return outcome
"""

Therefore, if I call cmp with shallow=True and the stat-signatures differ, 
cmp actually does a "deep" compare.
This "deep" compare however does not check the stat-signatures.

Thus I propose follwing patch:
cmp always checks the "full" signature.
return True if shallow and above test passed.
It does not make sense to me that when doing a "deep" compare, that only the 
size 
is compared, but not the mtime. 


--- filecmp.py.orig 2020-07-16 12:00:57.0 +0200
+++ filecmp.py  2020-07-16 12:00:30.0 +0200
@@ -52,10 +52,10 @@
 s2 = _sig(os.stat(f2))
 if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG:
 return False
-if shallow and s1 == s2:
-return True
-if s1[1] != s2[1]:
+if s1 != s2:
 return False
+if shallow:
+return True
 
 outcome = _cache.get((f1, f2, s1, s2))
 if outcome is None:

--
components: Library (Lib)
messages: 374054
nosy: chanke
priority: normal
severity: normal
status: open
title: filecmp.cmp documentation does not match actual code
type: behavior

___
Python tracker 

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



[issue41327] Windows Store "stub" Python executables give confusing behaviour

2020-07-21 Thread Paul Moore


Paul Moore  added the comment:

Understood that these would be duplicates, and I certainly don't want to put 
more pressure on you, but I think there would still be value in having a known 
reporting channel for people to say "I am also affected by this":

* MS Developers get a more objective feel for the scale of the issue.
* Users who report the issue can track progress (they will presumably get told 
*what* their report is a duplicate of, and can follow the underlying issue).
* Python package developers have something definite that they can offer to 
users.

My suspicion here is that MS simply doesn't have a user-visible support channel 
for the Store Python stubs, which is why we've ended up discussing this here.

--

___
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-21 Thread Lawrence D'Anna


Change by Lawrence D'Anna :


--
pull_requests: +20721
pull_request: https://github.com/python/cpython/pull/21577

___
Python tracker 

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