[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-11 Thread suresh


suresh  added the comment:

Please find the below Code and attached the files, expecting true as output and 
getting as false: 
 

"import filecmp

filecmp.clear_cache()

boolfile=filecmp.cmp(r'C:\destination.css',r'C:\source.css',shallow=False)

print(boolfile)"

--
hgrepos: +398
Added file: https://bugs.python.org/file49802/files.zip

___
Python tracker 

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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 68d6bc798b34eccabdfbf94e563273759c4cef1f by Miss Islington (bot) 
in branch '3.9':
bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498)
https://github.com/python/cpython/commit/68d6bc798b34eccabdfbf94e563273759c4cef1f


--

___
Python tracker 

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



[issue39658] Include user scripts folder to PATH on Windows

2021-02-11 Thread fireattack


Change by fireattack :


--
nosy: +fireattack

___
Python tracker 

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



[issue43042] Augment tutorial sentence.

2021-02-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue43042] Augment tutorial sentence.

2021-02-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

https://docs.python.org/3/tutorial/controlflow.html#defining-functions
I decided to augment the sentence as suggested by Jesse, and see what any 
reviewers think.

--
assignee: docs@python -> terry.reedy
nosy:  -rhettinger
title: Delete or merge redundant tutorial sentence. -> Augment tutorial 
sentence.
versions: +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



[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 Thread Eric Martin


Eric Martin  added the comment:

Many thanks Raymond for these insights and thorough explanations, I appreciate 
it very much. Your conclusions are of course most reasonable. For me, I cannot 
say that it is a real issue in practice. I have teaching notes in which I 
illustrate with plots the differences in complexity when working with sets 
versus lists. One such plot showed that the cost of removing an element from a 
set does not depend on what the element is (which is why I reused the same 
element again and again) and is orders of magnitude less than for removing an 
element from the middle of a list. I just found out that something had changed 
with Python3.9 when I last run the cell of the jupyter notebook in which that 
plot was produced...

--

___
Python tracker 

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



[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Addenda [reposted to fix a premature submission].

Top use cases for sets (roughly in order of commonality):

1. Eliminate duplicates from an iterable input and loop over the result.
2. Store elements in a set just once but do many membership tests.
3. Perform data analysis on multiple sets using union, intersection, 
difference, and isdisjoint.
4. Remove elements from a set, one at a time, until it is empty.
5. Algorithms and that alternately add and remove different elements over time 
(toposort, NFA, DFA, etc).  

The first three are all penalized by an extra inner loop test and the loss of 
the register to track the freeslot.  Those use cases get no offsetting benefit.

Case 4 doesn't exercise the dummy reuse at all.  So, it is unaffected.

The last is approximately a net wash.  It pays the inner loop price, suffers 
the loss of a register, and incurs an extra test outside the loop, but it 
occasionally gets lucky and reuses a freeslot. The benefit for reuse is that it 
is delays the inevitable resize which would have reclaimed the dummy entries 
earlier. (The comparable use case for dicts is LRU/LFU caches where new entries 
are added at the same rate as old entries are removed.  That use case also 
showed a net wash when freeslot tracking was removed from dicts).

Not on the list at all is the case of a large set, where exactly the same 
element is added and removed in a tight loop.  The payoff for this case is that 
the O(n) resize step never occurs; however, this case is so rare that there is 
no reason to preference it over the common cases.

If the addition and removal of the same element happens only a few times, with 
no other set updates, the performance is about the same as case 5.

However, if there are many such updates and the set is large (as in the OP's 
code sample), the add() operation becomes quadratic because the chain of dummy 
or used entries grows larger and larger with each reinsertion.  (FWIW, dicts 
also face the same issue and some additional ones related to maintaining 
insertion order).  The question is whether this unhappy case is worth burdening 
all of the normal use cases.  If this turns out to be a real issue in practice, 
we can reopen this; otherwise, let's stick with what we have.

--

___
Python tracker 

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



[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
Removed message: https://bugs.python.org/msg386847

___
Python tracker 

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



[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Addenda.  Top use cases for sets (roughly in order of commonality):

1. Eliminate duplicates from an iterable input and loop over the result.
2. Store elements in a set just once but do many membership tests.
3. Perform data analysis on multiple sets using union, intersection, 
difference, and isdisjoint.
4. Remove elements from a set, one at a time, until it is empty.
5. Algorithms and that alternately add and remove different elements over time 
(toposort, NFA, DFA, etc).  

The first three are all penalized by an extra inner loop test and the loss of 
the register to track the freeslot.  Those use cases get no offsetting benefit.

Case 4 doesn't exercise the dummy reuse at all.  So, it is unaffected.

The last is approximately a net wash.  It pays the inner loop price, suffers 
the loss of a register, and incurs an extra test outside the loop, but it 
occasionally gets lucky and reuses a freeslot. The benefit for reuse is that it 
is delays the inevitable resize which would have reclaimed the dummy entries 
earlier. (The comparable use case for dicts is LRU/LFU caches where new entries 
are added at the same rate as old entries are removed.  That use case also 
showed a net wash when freeslot tracking was removed from dicts).

Not on the list at all is the case of a large set, where exactly the same 
element is added and removed in a tight loop.  The payoff for this case is that 
the O(n) resize step never occurs; however, this case is so rare that there is 
no reason to preference it over the common cases.  It now has the same 
performance as case 5.

--

___
Python tracker 

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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +23298
pull_request: https://github.com/python/cpython/pull/24512

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
nosy: +pablogsal
nosy_count: 8.0 -> 9.0
pull_requests: +23297
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24510

___
Python tracker 

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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread Steve Dower


Steve Dower  added the comment:

I think so, yeah. We shouldn't have any string literals that are non-ASCII, but 
if we do then it's almost certainly an improvement for them to be UTF-8.

--

___
Python tracker 

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



[issue43203] Default value incorrectly read with unittests on Windows & macOS but not Linux

2021-02-11 Thread Samuel Marks

New submission from Samuel Marks :

Had a couple of commits to try and fix it on GitHub Actions (as I was unable to 
replicate locally), ended up with this very easy fix for Windows:
https://github.com/SamuelMarks/doctrans/commit/98203e9fee3e0a888ab1f4128011dde5fad98f63

To completely remove the default value. The only thing I can assume happened is 
that a different test in the same class—which set the default value to 
something else—changed the default value of the function.

This was all very confusing, and I can only think it to be a bug on python, or 
in GitHub Actions deployment thereof.

PS: The macOS builds are still failing with the previous issue :\

--
components: Windows, macOS
messages: 386845
nosy: ned.deily, paul.moore, ronaldoussoren, samuelmarks, steve.dower, 
tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Default value incorrectly read with unittests on Windows & macOS but not 
Linux
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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 2068b261e95e9fe9c4041f0102c9e931692dd5aa by Terry Jan Reedy in 
branch 'master':
bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)
https://github.com/python/cpython/commit/2068b261e95e9fe9c4041f0102c9e931692dd5aa


--

___
Python tracker 

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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread Inada Naoki


Inada Naoki  added the comment:

May I backport this for Python 3.9?

--

___
Python tracker 

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



[issue43174] Windows: Use /utf-8 compiler flag

2021-02-11 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset fedd86df2448370cdf62a229fd6f31dc92daf379 by Inada Naoki in branch 
'master':
bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498)
https://github.com/python/cpython/commit/fedd86df2448370cdf62a229fd6f31dc92daf379


--

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Irit Katriel


Change by Irit Katriel :


--
Removed message: https://bugs.python.org/msg386839

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Irit Katriel


Change by Irit Katriel :


--
Removed message: https://bugs.python.org/msg386840

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Irit Katriel


Irit Katriel  added the comment:

Still happening in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> TAG = object()
>>>
>>> def monitor():
... lst = [x for x in gc.get_referrers(TAG)
...if isinstance(x, tuple)]
... t = lst[0]   # this *is* the result tuple
... print(t) # full of nulls !
... return t # Keep it alive for some time
...
>>> def my_iter():
... yield TAG# 'tag' gets stored in the result tuple
... t = monitor()
... for x in range(10):
... yield x  # SystemError when the tuple needs to be resized
...
>>> tuple(my_iter())
(, , , , , , 
, , , )
Traceback (most recent call last):
  File "", line 1, in 
SystemError: C:\Users\User\src\cpython-dev\Objects\tupleobject.c:963: bad 
argument to internal function
>>>

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Irit Katriel


Irit Katriel  added the comment:

oops, wrong ticket. Sorry about the noise.

--
status: pending -> open

___
Python tracker 

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



[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2021-02-11 Thread Irit Katriel


Irit Katriel  added the comment:

Is there anything left to do here? Looks like a 3rd party issue.

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

___
Python tracker 

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



[issue27835] SystemExit in setUpClass etc. terminates test run

2021-02-11 Thread Irit Katriel


Irit Katriel  added the comment:

I can't reproduce the issue. I think it was fixed in issue24412.

--
nosy: +iritkatriel
resolution:  -> fixed
status: open -> pending

___
Python tracker 

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



[issue43163] codeop prematurely raises on 2nd line when closer is needed

2021-02-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>Pablo, Is there any sane possibility that the compiler could, at least 
>sometimes, raise an IncompleteSyntax subclass of SyntaxError when code is 
>merely incomplete, as opposed to wrong?

I'm assuming you mean the parser (when the compiler runs the code must have 
been correct or otherwise the parser would have raised before).

In case of the parser, I'm not sure but the answer is generally no. The parser 
doesn't have a concept of "partial Syntax" so that should be defined. There is 
also the problem that some of these syntax error come from the tokenizer which 
has its own rules. We could probably do more in the tokenizer than in the 
parser but this would add considerable complexity in the general case.

--

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Following-up on discussion in #43163 and PR-24483, this issue is limited to 
changes that are expected to not affect the return value.  Therefore, do not 
backport unless and until needed as part of a bugfix.

First is moving the code return to immediately after it is successfully 
created.  Everything done after is ignored and useless.  This move makes the 
function return sooner and renders initialization of 'code' unnecessary.

--
assignee: terry.reedy
components: Library (Lib)
messages: 386836
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Cleanup codeop._maybe_compile
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



[issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

2021-02-11 Thread Tyler Reed


Tyler Reed  added the comment:

It was an environment issue. There were pre-existing files (pyd and pyc) in the 
application folder (from builds done with Kivy) and apparently python was 
loading those instead of the libraries in the python39 folder.

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



[issue43163] codeop prematurely raises on 2nd line when closer is needed

2021-02-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issue is for 3.10 only since the never-closed message was only added for 
3.10.0a5 and not backported.

Pablo, Is there any sane possibility that the compiler could, at least 
sometimes, raise an IncompleteSyntax subclass of SyntaxError when code is 
merely incomplete, as opposed to wrong?

Do you happen to know where the REPL code is?  (If not, I will ask elsewhere.)

--

___
Python tracker 

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



[issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

2021-02-11 Thread Zachary Ware


Zachary Ware  added the comment:

That looks more like `_sqlite3.pyd` is missing.  You're sure no changes have 
been to the installation directory?  Does repairing the installation help at 
all?

I imagine we would have been flooded with issue reports if the installer was 
missing this module, so without that it does seem that something fishy is going 
on in your particular case.

--
components: +Installation, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
type: crash -> behavior

___
Python tracker 

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



[issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

2021-02-11 Thread Tyler Reed


New submission from Tyler Reed :

Running on a new, updated Windows 10 machine with no virtual environment. After 
removing all previous Python installations, rebooting and performing a fresh 
install if Python 3.9.1. I run the python console and type:
import sqlite3

I receive the following error:
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python39\lib\sqlite3\__init__.py", line 23, in 
from sqlite3.dbapi2 import *
  File "C:\Program Files\Python39\lib\sqlite3\dbapi2.py", line 27, in 
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module 
could not be found.


I verified that the sqlite3.dll file does exist in C:\Program 
Files\Python39\DLLs

--
messages: 386832
nosy: ZenSkunkworx
priority: normal
severity: normal
status: open
title: sqlite3 import * ImportError: DLL load failed while importing _sqlite3: 
The specified module could not be found.
type: crash
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



[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 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



[issue43001] python3.9.1 test_embed test_tabnanny failed

2021-02-11 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I close the issue.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43001] python3.9.1 test_embed test_tabnanny failed

2021-02-11 Thread Tony Martin Berbel

Tony Martin Berbel  added the comment:

My system crashed completely. I reinstalled Ubuntu. Sorry I couldn't help
more ... :(
___

MARTIN BERBEL, Tony
GSM: +32 (0) 477 / 33.12.48

--

Le mer. 10 févr. 2021 à 04:06, Tony Martin Berbel 
a écrit :

>
> Tony Martin Berbel  added the comment:
>
> I had the same error
> I ran the make test command with >
> But I don't know where to look for the log file
>
> --
> nosy: +wingarmac
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts

2021-02-11 Thread Christoph Reiter


Christoph Reiter  added the comment:

Ah, wonderful. We'll do something similar then.

Thanks for the info and the pointer to the resolved issue. Much appreciated!

--

___
Python tracker 

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



[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2021-02-11 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip, xtreak

___
Python tracker 

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



[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2021-02-11 Thread Jason Madden


Change by Jason Madden :


--
nosy: +jmadden

___
Python tracker 

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



[issue43200] link to copy module in shutil document, not to shutil.copy

2021-02-11 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
keywords: +patch
nosy: +erlendaasland
nosy_count: 2.0 -> 3.0
pull_requests: +23294
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24504

___
Python tracker 

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



[issue43200] link to copy module in shutil document, not to shutil.copy

2021-02-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +23295
pull_request: https://github.com/python/cpython/pull/24505

___
Python tracker 

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



[issue43200] link to copy module in shutil document, not to shutil.copy

2021-02-11 Thread nikkie


New submission from nikkie :

"copy()" is not a link to shutil.copy, but a link to the copy module.

https://docs.python.org/3/library/shutil.html#platform-dependent-efficient-copy-operations
>Starting from Python 3.8 all functions involving a file copy (copyfile(), 
>copy(), copy2(), copytree(), and move()) may use ...

# As is

https://docs.python.org/3/library/copy.html#module-copy

# To be

https://docs.python.org/3/library/shutil.html#shutil.copy


The reference of :func:`copy` does not seem to be resolved properly.
https://github.com/python/cpython/blob/ea46579067fd2d4e164d6605719ffec690c4d621/Doc/library/shutil.rst#platform-dependent-efficient-copy-operations

--
assignee: docs@python
components: Documentation
messages: 386828
nosy: docs@python, nikkie
priority: normal
severity: normal
status: open
title: link to copy module in shutil document, not to shutil.copy
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



[issue43181] Python macros don’t shield arguments

2021-02-11 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Are you interested to convert the PyObject_TypeCheck() macro to a static 
> inline function?

I'd like to give it a shot if it's ok for you all.

--

___
Python tracker 

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



[issue43154] code.InteractiveConsole can crash if sys.excepthook is broken

2021-02-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-02-11 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> If we are going to change public sqlite3 APIs in to be positional-only, I'd 
> prefer writing a PEP and fix all modules once and for all.

Right. I assume you mean that such a PEP would contain a set of guidelines for 
how to handle these dilemmas? It would be almost impossible to create a set of 
strict rules that can handle all cases, AFAICS.

--

___
Python tracker 

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



[issue43199] FAQ about goto lacks answer

2021-02-11 Thread Mikael Lövqvist

New submission from Mikael Lövqvist :

In the FAQ there is a question "Why is there no goto?" but the answer addresses 
how to use exceptions to do something akin to goto. I think the documentation 
could benefit from the reasons why there is no goto or that the question is 
changed, perhaps "How to approximate goto?".

Reference: https://docs.python.org/3/faq/design.html#why-is-there-no-goto

--
assignee: docs@python
components: Documentation
messages: 386825
nosy: docs@python, mlovqvist
priority: normal
severity: normal
status: open
title: FAQ about goto lacks answer
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue43181] Python macros don’t shield arguments

2021-02-11 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



[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-11 Thread Miro Hrončok

Miro Hrončok  added the comment:

At the very least, it's worth documenting in all places that can give you the 
exception, such as subprocess etc.

Whether it's worth to try to fix the exception message I don't really know. 
Confused users on one side, fragile complex heuristic on the other.

Honestly, I think it is worth it to at least try to brainstorm how to improve 
the message without making it needlessly complicated. I've attempted that with: 
Either demo or interpreter of demo. It's not perfect and maybe another file is 
missing. So let's go further:

FileNotFoundError: [Errno 2] No such file or directory while attempting to 
execute './demo'. This means './demo' or other files needed to run it don't 
exist.

--

___
Python tracker 

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



[issue27640] Add --disable-test-modules configure option to not build nor install tests

2021-02-11 Thread STINNER Victor


STINNER Victor  added the comment:

> It would be more convenient if we had a Makefile option to install the tests 
> separately.

While this use case is tighly coupled to this feature, would you mind to open a 
separate issue for your use case? IMO it makes sense and it sounds easy to 
implement it (especially after --disable-test-modules feature has been 
implemented).

--

___
Python tracker 

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



[issue43181] Python macros don’t shield arguments

2021-02-11 Thread STINNER Victor


STINNER Victor  added the comment:

I'm replacing macros with static inline functions to avoid issues like this one 
(ex: bpo-35059). Are you interested to convert the PyObject_TypeCheck() macro 
to a static inline function?

"""
There is a lot of macros like:
#define PyObject_TypeCheck(ob, tp) \
(Py_IS_TYPE(ob, tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
These work fine until an argument happen to contain a comma.
"""

This macro also has a common bug of macros: if one argument has a side effect, 
it is executed twice! For example, if an argument is a function call, the 
function is called twice.

See:

* https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html
* https://vstinner.github.io/split-include-directory-python38.html "Convert 
macros to static inline functions"

--

___
Python tracker 

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