[issue39100] email.policy.SMTP throws AttributeError on invalid header

2021-07-07 Thread Anton Khirnov


Anton Khirnov  added the comment:

Quoting R. David Murray (2021-07-06 18:59:56)
> How are you encountering this error?  The following program runs without 
> exception for me on master:
> 
> from email import message_from_binary_file
> from email.policy import SMTP
> 
> msg = message_from_binary_file(open('mail.eml', 'rb'), policy=SMTP)
> print(msg)

The exception is thrown on accessing the 'to' header, so make that
print(msg['to'])

--

___
Python tracker 

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



[issue39100] email.policy.SMTP throws AttributeError on invalid header

2021-07-07 Thread Anton Khirnov


Anton Khirnov  added the comment:

Quoting Andrei Kulakov (2021-07-03 16:03:34)
> Anton: thanks for the report! In the message you say you are not sure
> of the solution, and because of that not sending a patch, but then you
> created the PR; - please clarify.

I didn't send a patch when originally submitting the bugreport in 2019.
I did write a patch about a year later, since there was no response to
the bugreport.

--

___
Python tracker 

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Andre Roberge


New submission from Andre Roberge :

Consider the following program

# example.py
one = 1
two = "two"
a = [one
.
two]

Running this program with Python versions before 3.10, yields the following 
traceback:

Traceback (most recent call last):
  File "C:\Users\andre\example.py", line 3, in 
a = [one
AttributeError: 'int' object has no attribute 'two'

The line shown correctly includes the 'int' object. I have verified that this 
is the case for Python 3.6 to 3.9 inclusively.

However, with Python version 3.10.0b3, the following traceback is generated:

Traceback (most recent call last):
  File "C:\Users\andre\example.py", line 5, in 
two]
AttributeError: 'int' object has no attribute 'two'

--
messages: 397067
nosy: aroberge
priority: normal
severity: normal
status: open
title: AttributeError: incorrect line identified in Python 3.10
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



[issue44561] Some expired hyperlinks in Python documentation

2021-07-07 Thread Steven Hsu


Steven Hsu  added the comment:

I have make a new PR (#27032), and the CLA was signed.
Thanks for review.

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



[issue44561] Some expired hyperlinks in Python documentation

2021-07-07 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-07-07 Thread Zachary Marshall


Change by Zachary Marshall :


--
nosy: +zlmarshall

___
Python tracker 

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



[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-07-07 Thread wiso


Change by wiso :


--
nosy: +wiso

___
Python tracker 

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



[issue44577] Probably defect in Python 3.7.11

2021-07-07 Thread Vladislav Kozlenko


New submission from Vladislav Kozlenko :

After upgrade to 3.7.11 from 3.7.10 WebSockets start failing.
Django==2.1.2
djangorestframework==3.8.2
daphne==2.3.0
channels==2.3.1

>From the 3.7.11 changelog:
Following the controlling specification for URLs defined by WHATWG 
urllib.parse() now removes ASCII newlines and tabs from URLs, preventing such 
attacks.

Probably something is not good here now.


2021-07-07T10:11:23.439030174Z2021-07-07 10:11:23,438 ERROR [Failure instance: 
Traceback: : 'NoneType' object has no attribute 
'replace'
Error
2021-07-07T10:11:23.439074685Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/autobahn/websocket/protocol.py:2841:processHandshake
Error
2021-07-07T10:11:23.439091149Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/txaio/tx.py:366:as_future
Error
2021-07-07T10:11:23.439097914Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/twisted/internet/defer.py:167:maybeDeferred
Error
2021-07-07T10:11:23.439118640Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/daphne/ws_protocol.py:82:onConnect
Error
2021-07-07T10:11:23.439122445Z---  ---
Error
2021-07-07T10:11:23.439125845Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/twisted/internet/defer.py:167:maybeDeferred
Error
2021-07-07T10:11:23.439129088Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/daphne/server.py:200:create_application
Error
2021-07-07T10:11:23.439132308Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/channels/routing.py:58:__call__
Error
2021-07-07T10:11:23.439135496Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/channels/security/websocket.py:35:__call__
Error
2021-07-07T10:11:23.439138809Z/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.7/site-packages/channels/security/websocket.py:53:valid_origin

--
components: Library (Lib)
messages: 397069
nosy: vladislavko
priority: normal
severity: normal
status: open
title: Probably defect in Python 3.7.11
type: crash
versions: Python 3.7

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread neonene


neonene  added the comment:

To debug pure python, use embeddable pythons in different folders and copy Lib 
folder from source archive instead of using python3.9.zip.

When using msvc (python3*.lib), I think it's enouth to install python as 
follows or build from source.

1.Copy Installed Python to any folder.
2.Uninstall Python.
3.Install Python with different minor version.

--
nosy: +neonene

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Mark Shannon


Mark Shannon  added the comment:

I suspect that the 0.1% increase is noise.
The size of importlib.h etc show a small decrease, suggesting that the 
information content of the code object has *decreased*.

After all, the qualname has to stored somewhere and moving it from caller to 
callee should make no difference.

Organizing the code object so it wastes less memory is a separate issue.

--

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f by Gabriele N. Tornetta 
in branch 'main':
bpo-44530: Add co_qualname field to PyCodeObject (GH-26941)
https://github.com/python/cpython/commit/2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f


--

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25608
pull_request: https://github.com/python/cpython/pull/27052

___
Python tracker 

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



[issue44578] dict with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


New submission from Michael :

dict with three type parameters is legal (e.g., dict[str, str, str]), where I 
expected a TypeError. When using typing.Dict, it does raise a TypeError.

Example in python 3.9:

>>> from typing import Dict
>>> Dict[str, str, str]  # Raises a TypeError, as expected
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
275, in inner
return func(*args, **kwds)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
828, in __getitem__
_check_generic(self, params, self._nparams)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
212, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for 
{cls};"
TypeError: Too many parameters for typing.Dict; actual 3, expected 2
>>> dict[str, str, str]  # No TypeError here?
dict[str, str, str]

This also works in 3.7 and 3.8:

Python 3.8.11 (default, Jul  6 2021, 12:13:09) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> dict[str, str, str]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'type' object is not subscriptable
>>> def foo(bar: dict[str, str, str]): pass
... 
>>> foo.__annotations__
{'bar': 'dict[str, str, str]'}

--
messages: 397073
nosy: mthe
priority: normal
severity: normal
status: open
title: dict with more than two type parameters doesn't raise a TypeError
type: behavior
versions: 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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall


Alex Hall  added the comment:

I believe this is the outcome of https://bugs.python.org/issue39316 which I 
filed, so I'm pulling in . Naturally I think the new behaviour is not a bug but 
a feature.

I think it's more important for the traceback to show the attribute access 
(`two`) than the value (`one`). That's what the frame was doing at the time 
which led to the error.

The difference becomes even more important when calling a method with no 
arguments. Given this script:

class A:
def b(self):
1 / 0


x = (
A()
.b()
)


The 3.9 traceback points to the line with `A()` in the `` frame, while 
3.10 correctly points to `.b()`, which makes the following line 'in b' make 
more sense.

Where the old behaviour has really gotten to me is when I run the pycharm 
debugger and put a breakpoint on the .b() line and it never gets hit. Not being 
sure what lines 'count', I sometimes defensively put breakpoints on a cluster 
of lines, then spend more time removing them later. Having that fixed in 3.10 
is great.

--
components: +Interpreter Core
nosy: +Mark.Shannon, alexmojaki
type:  -> behavior

___
Python tracker 

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall


Alex Hall  added the comment:

(meant to say "so I'm pulling in @Mark.Shannon)

--

___
Python tracker 

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



[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread sfmc


New submission from sfmc :

In Windows shutil.copy() uses _copyfileobj_readinto which copies file in user 
mode.
In Windows there is an fast API to copy file in kernel mode: CopyFile (see 
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile).

--
components: Library (Lib)
messages: 397076
nosy: sfmc
priority: normal
severity: normal
status: open
title: shutil.copy() inefficient implementation in Windows
type: performance
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



[issue44579] shutil.copy() inefficient implementation in Windows

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



[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Eryk Sun


Eryk Sun  added the comment:

> In Windows there is an fast API to copy file in kernel mode: CopyFile

The possibility of calling CopyFileEx() for shutil.copy2() is discussed in 
issue 30044. Note that CopyFileEx() is a high-level Windows API function, not a 
"kernel mode" copy. It opens the source and destination files and makes 
multiple system calls in order to copy file data and metadata (e.g. system 
calls such as NtOpenFile, NtCreateFile, NtReadFile, NtWriteFile, 
NtQueryInformationFile, NtSetInformationFile, NtQueryEaFile, NtSetEaFile, 
NtQuerySecurityObject, etc). This includes copying the primary data stream, 
alternate data streams, file attributes, extended file attributes, and security 
resource attributes.

--
components:  -Windows
nosy: +eryksun

___
Python tracker 

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



[issue44577] Probably defect in Python 3.7.11

2021-07-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

Can you provide a short code example that reproduces this, preferably without 
using any third party libraries?

--
nosy: +eric.smith

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 8363c53369a582ff9ae4e797a80cdce12624a278 by Pablo Galindo in 
branch 'main':
bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)
https://github.com/python/cpython/commit/8363c53369a582ff9ae4e797a80cdce12624a278


--

___
Python tracker 

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



[issue44578] dict with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


Michael  added the comment:

Same for list btw

Python 3.9.6 (default, Jul  7 2021, 11:41:04) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> list[str, str, str]
list[str, str, str]
>>> from typing import List
>>> List[str, str, str]
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
275, in inner
return func(*args, **kwds)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
828, in __getitem__
_check_generic(self, params, self._nparams)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
212, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for 
{cls};"
TypeError: Too many parameters for typing.List; actual 3, expected 1
>>>

--

___
Python tracker 

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



[issue44578] dict/list with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


Change by Michael :


--
title: dict with more than two type parameters doesn't raise a TypeError -> 
dict/list with more than two type parameters doesn't raise a TypeError

___
Python tracker 

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



[issue44558] operator.countOf `is` / `==` inconsistency

2021-07-07 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 6bd3ecfc272b122b55a6adec50dd7a7c868f262f by Rupert Tombs in 
branch 'main':
bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)
https://github.com/python/cpython/commit/6bd3ecfc272b122b55a6adec50dd7a7c868f262f


--

___
Python tracker 

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



[issue44580] pprint does not work for typing.Mapping

2021-07-07 Thread Hayden Clark


Change by Hayden Clark :


--
components: Library (Lib)
nosy: hclark
priority: normal
severity: normal
status: open
title: pprint does not work for typing.Mapping
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



[issue44558] operator.countOf `is` / `==` inconsistency

2021-07-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25609
pull_request: https://github.com/python/cpython/pull/27053

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

Why does it have to be so complicated? What is the rationale behind prohibiting 
different patches in separate folders?

--

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread Dong-hee Na


Change by Dong-hee Na :


--
assignee: docs@python -> corona10
components:  -Documentation
title: operator.countOf `is` / `==` inconsistency -> Make the implementation 
consistency of operator.countOf/indexOf

___
Python tracker 

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



[issue44572] Calls to platform._syscmd_ver() dependent functions consume STDIN

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

Well, I opened pull request, but it was closed. You guys have a very good team 
work going on out there :) Good luck!

--

___
Python tracker 

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



[issue44580] pprint does not work for typing.Mapping

2021-07-07 Thread Hayden Clark


New submission from Hayden Clark :

If you make a user-defined type that inherits from typing.Mapping (which is an 
alias for collections.abc.Mapping), pprint does not dump the contents, it just 
treats it as an unknown class.
Examining the code, it is explicitly checking for "dict" type, even though it 
is only reading the data.

Here is a reproduction:
from typing import Mapping
from pprint import pprint


class MyMap(Mapping):
def __init__(self, **kwargs) -> None:
self.data = {
k:v for k, v in kwargs.items()
}

def __getitem__(self, k):
return self.data.get(k)

def __len__(self):
return self.data.__len__()

def __iter__(self):
return self.data.__iter__()


info = MyMap(
foo="bar",
baz=MyMap(bar="foo")
)

pprint(info)

--

___
Python tracker 

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



[issue44572] Calls to platform._syscmd_ver() dependent functions consume STDIN

2021-07-07 Thread Zachary Ware


Zachary Ware  added the comment:

The pull request you opened was invalid, because it was just trying to merge 
the `main` branch of the python/cpython repository into the `3.9` branch.  What 
we need instead is a pull request between a branch from `main` in your own fork 
of python/cpython with the change you want to see in a new commit.  You can 
find a more detailed walkthrough in the devguide, or if you prefer to leave it 
for someone else to do that is also a valid option :)

--
keywords: +3.9regression -patch
stage: patch review -> needs patch

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread miss-islington


miss-islington  added the comment:


New changeset 9f431dd0a59c9ac2de46772a4dbd7db2199ef26a by Miss Islington (bot) 
in branch '3.10':
bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)
https://github.com/python/cpython/commit/9f431dd0a59c9ac2de46772a4dbd7db2199ef26a


--

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread Rupert Tombs


Change by Rupert Tombs :


--
pull_requests: +25610
pull_request: https://github.com/python/cpython/pull/27054

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25611
pull_request: https://github.com/python/cpython/pull/27055

___
Python tracker 

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



[issue42878] urllib.request.HTTPPasswordMgr.is_suburi does not care about order

2021-07-07 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, please take a look as beta4 is this week

--

___
Python tracker 

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



[issue44578] dict/list with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Ken Jin


Ken Jin  added the comment:

Sorry, I don't think this will be fixed as it is intentional. 
types.GenericAlias (the type of list[int] or dict[str, str]) does almost 0 
checking for two reasons IIUC:

- Types with wrong number of parameters will usually be caught by your IDE/type 
checker.
- Checking would add complexity and slow down runtime performance. The current 
implementation of GenericAlias in C is intentionally simple.

We can add a note in the docs noting that too many type parameters won't raise 
a TypeError. It would probably be here 
https://docs.python.org/3/library/stdtypes.html#generic-alias-type

BTW, I adjusted the issue's affected versions because this was introduced only 
in 3.9.

--
nosy: +gvanrossum, kj
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, take a look as soon as possible as beta4 is this week

--
nosy: +pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue44581] Interpreter can execute quickened opcodes in tracing mode

2021-07-07 Thread Mark Shannon


New submission from Mark Shannon :

This breaks a key invariant of PEP 659.

Inserting `assert(cframe.use_tracing == 0);` at the top of all quickened 
instructions results in several failures when running the test suite.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 397090
nosy: Mark.Shannon, kj
priority: normal
severity: normal
stage: needs patch
status: open
title: Interpreter can execute quickened opcodes in tracing mode
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

> Note that CopyFileEx() is a high-level Windows API function, not a "kernel 
> mode" copy.

This is true today, but could change whenever Windows feels like changing it. 
If we switch to the native API then we'll get any advantage there automatically.

The only challenge is in managing changes to semantics (that is, anything extra 
we do to "match" Unix that isn't normally how copies work on Windows - 
personally, I'd rather be more native on Windows anyway).

--

___
Python tracker 

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



[issue44578] dict/list with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yes this is intentional. Use a static checker to find this type of bug.

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

> Why does it have to be so complicated? What is the rationale behind 
> prohibiting different patches in separate folders?

Most users don't want different patches in separate folders - they want to 
update to the latest and greatest and use it everywhere.

Those users who *do* want different versions tend to be well-informed enough to 
figure out alternatives.

You can also grab the packages from https://www.nuget.org/packages/python/ 
which can be extracted anywhere you like and are not stripped down like the 
embeddable package.

--

___
Python tracker 

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



[issue44577] Probably defect in Python 3.7.11

2021-07-07 Thread Vladislav Kozlenko


Vladislav Kozlenko  added the comment:

It will be not easy as I'll need to create some sandbox for you. The current 
code version is not available for sharing.


But ok. For example here is a routing.py file:

from django.conf.urls import url
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.security.websocket import AllowedHostsOriginValidator
from channels.auth import AuthMiddlewareStack
from some_dir import MyConsumer

application = ProtocolTypeRouter({
'websocket': AllowedHostsOriginValidator(
AuthMiddlewareStack(
URLRouter([
url('api/socket/end-point-1', MyConsumer),
])
)
)
})

Let me know if you need more information

--

___
Python tracker 

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



[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Eryk Sun


Change by Eryk Sun :


--
components: +Windows -Library (Lib)

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 9761abf30617946a374886184b0e36ec050dd8d7 by Dong-hee Na in branch 
'3.9':
[3.9] bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007). (GH-27055)
https://github.com/python/cpython/commit/9761abf30617946a374886184b0e36ec050dd8d7


--

___
Python tracker 

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



[issue44558] Make the implementation consistency of operator.countOf/indexOf

2021-07-07 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thank you Rupert for reporting and contributing!!

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Mark Shannon


Mark Shannon  added the comment:

This is a tricky one.
Which is the "correct" line appears to be subjective.

I'm inclined to leave it as is, as the tracing sequence seems better in the 
case of method chaining.
See https://github.com/python/cpython/blob/main/Lib/test/test_compile.py#L890

--

___
Python tracker 

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Andre Roberge


Andre Roberge  added the comment:

While I filed the original report, I am in agreement that accurate information 
for debugging tools is definitely more important than the quick summary shown 
in the traceback, and that the change likely represents an improvement in 
situations more realistic than the contrived example I gave.

--

___
Python tracker 

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



[issue43191] Shared Memory for array of object

2021-07-07 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
type: crash -> behavior

___
Python tracker 

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



[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I'm inclined to leave it as is

I am fine with that, if you think this is not a bug, close the issue and remove 
the release blocker :)

--

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

Unfortunately I am not so enlightened to figure out how to do it on my own, and 
python.org obviously wants to keep it secret. I am also not on a friendly basis 
with kami-sama and don't know what other users want, but the common sense tells 
me that having an option to do do something should not hurt anyone.

--

___
Python tracker 

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



[issue44572] Calls to platform._syscmd_ver() dependent functions consume STDIN

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

I do not understand why a one line change in the code requires full blown git 
clone. Shouldn't you guys have a system that allows to change code over the web 
interface and your bots will do the rest: checks, tests, regressions, etc.?

--

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Ken Jin


Ken Jin  added the comment:

@Steve, after this change, the Azure Pipelines commit CI's appx tests started 
failing on main and 3.10.

https://dev.azure.com/Python/cpython/_build/results?buildId=83619&view=results

==
FAIL: test_printer_buttons (idlelib.idle_test.test_help_about.LiveDialogTest) 
(name='license')
Test buttons whose commands use printer function.
--
Traceback (most recent call last):
  File "D:\a\1\b\layout-appx-win32\lib\idlelib\idle_test\test_help_about.py", 
line 65, in test_printer_buttons
self.fail(name + ' full text was not found')

AssertionError: license full text was not found

It seems that idlelib's license isn't included in that specific build.

FWIW, I can't repro this on my own machine. Though I recall you explaining that 
appx has some differences in another issue.

Please take a look if you have the time. Thanks in advance!

--
nosy: +kj

___
Python tracker 

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



[issue44572] Calls to platform._syscmd_ver() dependent functions consume STDIN

2021-07-07 Thread Zachary Ware


Zachary Ware  added the comment:

You can make a PR entirely through the Github web interface, though we do 
generally encourage running the tests locally, especially since it would be 
good to add a new test for this case.

--

___
Python tracker 

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



[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

2021-07-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

Didn't even realise we had a test for it. Maybe it only runs in install-like 
layouts?

I'll simplify the regeneration by just doing it every time. Nothing else 
depends on the license file, so it won't matter if we touch it unnecessarily.

--

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25612
pull_request: https://github.com/python/cpython/pull/27056

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 3d3027c5fcc683c14ee55ad231d79971ba12b24d by Steve Dower in branch 
'main':
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
https://github.com/python/cpython/commit/3d3027c5fcc683c14ee55ad231d79971ba12b24d


--

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25613
pull_request: https://github.com/python/cpython/pull/27058

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

You found your way to the issue tracker where we can help, which is more 
enlightened than most of our other ~20 million users :)

Nuget allows you to download the packages directly. Go to the page I linked and 
choose your version, then find the download link. They have a bit more 
structure in the ZIP file than just a Python runtime, to enable them to 
interoperate properly with a Nuget-based build system (relatively common on 
Windows these days), but you can move the contents around however you like.

And unfortunately, any "options" are not free. Someone has to develop, 
document, test, maintain and support it, and everyone who's been willing to do 
it has chosen to do it independently from the core team (which is great! 
CPython is free open-source software for exactly that reason). Perhaps Anaconda 
would suit your needs better?

--

___
Python tracker 

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



[issue44479] Windows build doesn't regenerate some files

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset f2491c647937fc0871a473c19e3d5cb5392cfca0 by Steve Dower in branch 
'3.10':
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
https://github.com/python/cpython/commit/f2491c647937fc0871a473c19e3d5cb5392cfca0


--

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

Hi Steve,

Thank you for taking time to reply. I do appreciate it.

I did try nuget installs but they a little bit weird for my taste.
Anaconda is too bloated.
I also tried python-webinstall.exe /layout and install from .msi, these
work OK for the command line use, but do not work with Vim plugins for some
reason, so I cannot rely on them as I can on a normal Windows install.

As a side note, I think making the install restrictive is more work than
just let it install where user wants to install. The restrictions need to
be coded - don't they? :)

Konstantin

чт, 8 июл. 2021 г. в 03:28, Steve Dower :

>
> Steve Dower  added the comment:
>
> You found your way to the issue tracker where we can help, which is more
> enlightened than most of our other ~20 million users :)
>
> Nuget allows you to download the packages directly. Go to the page I
> linked and choose your version, then find the download link. They have a
> bit more structure in the ZIP file than just a Python runtime, to enable
> them to interoperate properly with a Nuget-based build system (relatively
> common on Windows these days), but you can move the contents around however
> you like.
>
> And unfortunately, any "options" are not free. Someone has to develop,
> document, test, maintain and support it, and everyone who's been willing to
> do it has chosen to do it independently from the core team (which is great!
> CPython is free open-source software for exactly that reason). Perhaps
> Anaconda would suit your needs better?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 4823d9a51281ebbc8e8d82a0dd3edc7d13ea8ac7 by Ammar Askar in branch 
'main':
bpo-43950: Add option to opt-out of PEP-657 (GH-27023)
https://github.com/python/cpython/commit/4823d9a51281ebbc8e8d82a0dd3edc7d13ea8ac7


--

___
Python tracker 

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



[issue44582] Accelerate mimetypes.init on Windows

2021-07-07 Thread Steve Dower


New submission from Steve Dower :

mimetypes.init is slow on Windows because of the big registry search, which 
involves touching thousands of entries in order to add a few hundred into the 
initial table.

Things get even worse when audit hooks are enabled, because the winreg methods 
need to be hooked. However, we know that this particular operation is coming 
from core, and so we could skip these hooks.

Both issues can be trivially solved (helped) with a native accelerator function.

--
assignee: steve.dower
messages: 397110
nosy: steve.dower
priority: normal
severity: normal
status: open
title: Accelerate mimetypes.init on Windows
type: performance
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2021-07-07 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Looks like this issue can be closed.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44582] Accelerate mimetypes.init on Windows

2021-07-07 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue44582] Accelerate mimetypes.init on Windows

2021-07-07 Thread Steve Dower


Change by Steve Dower :


--
components: +Windows
nosy: +paul.moore, 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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

> As a side note, I think making the install restrictive is more work than
just let it install where user wants to install. The restrictions need to
be coded - don't they? :)

Well at this point, the restrictions already exist! So change it now is the 
expensive part.

And having two ways to do something will always be more complicated than one 
way. We can't abandon the existing installation methods.

--
nosy: +eric.smith

___
Python tracker 

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



[issue44582] Accelerate mimetypes.init on Windows

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

It's only a rough benchmark, but my timings for `python -c "import mimetypes; 
mimetypes.init()` were ~200ms without the accelerator and ~100ms with the 
accelerator.

Since that includes all of startup, it's actually a better than 50% reduction 
for mimetypes.init(). I'm happy to take that without questioning precisely how 
much better it is ;)

--

___
Python tracker 

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



[issue44582] Accelerate mimetypes.init on Windows

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

mimetypes doesn't _really_ support clearing, but `python.exe -m timeit "import 
mimetypes as M; M.types_map.clear(); M.init()"` is pretty close.

Without the accelerator: 133ms
With the accelerator: 27.8ms

--

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-07-07 Thread Skip Montanaro


Skip Montanaro  added the comment:

I routinely build with -O0 and have been getting test_gdb failures building the 
3.10 branch. I tried adding -g3 to my configure flags:

nice ./configure OPT="-O0 -g3 -Wall" --with-pydebug --with-trace-refs

but test_gdb still fails. Output attached. Note that I have been getting CRC 
mismatches between a couple files. They are copious in the test output, so I 
won't elaborate here.

--
nosy: +skip.montanaro
Added file: https://bugs.python.org/file50140/test_gdb.out

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Steve Dower


Steve Dower  added the comment:

Some quotes from my reply to an off-list email that may be useful for other 
people who encounter this issue:

---

Apps that use Python-based plugins we can't make Just Work - it's up to the 
host application to work with Python installs (or to bundle its own, which is 
easier on Windows). We're happy to help the people who can fix it on their side 
if you know who to work with.

Rather than developing our own installer, it's actually less effort to use the 
standard Windows Installer service to manage installs, and that's the system 
with the restrictions. Coding something from scratch that supports the 
equivalent upgrade/repair/uninstall mechanisms would be considerably more work, 
and we'd end up basically reimplementing it or end up regularly recommending 
people try and delete everything by hand.

We also support the newer Windows MSIX format via the Store, because that's 
even less work and is a better experience for most users. Unfortunately, it's 
even further away from what you want. If your preferences are so strong, you 
may need to do your own builds and manually put them where you need. The Nuget 
packages will let you skip the compile step, and the regular ones will let you 
also skip the "put them where you need" step.

--

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Steve Dower

Steve Dower  added the comment:

Huh, interesting that the email reply is identical to the one above from 
Константин, but the email I received had no reference to bpo in it...

Okay, consider my reply above identical to the one I sent off list :)

--

___
Python tracker 

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



[issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror()

2021-07-07 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

This is a duplicate of https://bugs.python.org/issue43219 .

--
nosy: +andrei.avk
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-07 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Note that someone else ran into this confusion here: 
https://bugs.python.org/issue43153 .

--

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Skip: I am still unable to reproduce in my machine unfortunately. Could you 
maybe bisect the failures if you can reliably reproduce the problem so we can 
at least narrow it down to one commit?

--

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-07-07 Thread Skip Montanaro


Skip Montanaro  added the comment:

Unfortunately, I'm currently not able to build Python 3.8, 3.9 or 3.10 and get 
a non-failing test_gdb. I'll mess around a bit more, but I'm skeptical I'll 
find something simple. (I wonder if something changed in GDB which is causing 
the failure.)

--

___
Python tracker 

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



[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset fed2fc4443235fa9669b73817827fd6da88e3417 by Ian Henriksen in 
branch 'main':
bpo-43895: Remove an unnecessary cache of shared object handles (GH-25487)
https://github.com/python/cpython/commit/fed2fc4443235fa9669b73817827fd6da88e3417


--

___
Python tracker 

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



[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks Ian!

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



[issue43126] IOBase.readlines(0) behaviour is inconsistent with documentation

2021-07-07 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
keywords: +patch
nosy: +andrei.avk
nosy_count: 2.0 -> 3.0
pull_requests: +25615
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27061

___
Python tracker 

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



[issue43126] IOBase.readlines(0) behaviour is inconsistent with documentation

2021-07-07 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Thanks for the report!

I agree docs could be improved. Note this method lives in `IOBase` so this 
behavior also applies to the file pointer returned from `open()` builtin.

I've put up the PR here: https://github.com/python/cpython/pull/27061/files

--

___
Python tracker 

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



[issue11343] Make errors due to full parser stack identifiable

2021-07-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I retract my original comment as I now agree with SyntaxError + distinct 
message.

Given Irit's report, I think the remaining question is whether 

A. The implication that 'too many nested parentheses' is compiler specific is 
strong enough, and any thing further should be left to 3rd parties to explain, 
and this issue should be closed as 'out of date'.

B. We should be explicit and add something like 'for this compiler'.

Since Pablo has been working on improving error messages, I would give his 
opinion high weight.

To find the actual limit, I did the following with Win 10, 3.10.0b3, IDLE:

>>> def f(n):
... print(eval('('*n + ')'*n"))
... 
And after some trials, found
>>> f(200)
()
>>> f(201)
Traceback (most recent call last):
  File "", line 1, in 
f(201)
  File "", line 2, in f
print(eval('('*n + ')'*n))
  File "", line 1

()





^
SyntaxError: too many nested parentheses

The error is detected in 'string' line 1, 1-based offset 201, at the final '('. 
 There are 200 spaces before the caret but they are not obvious in this box, 
which does not wrap spaces properly. The end_lineno and end_offset are None, 
None rather than the 1,202 I expected.

--
nosy: +aroberge, pablogsal
stage: patch review -> needs patch
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Константин Глухов

Константин Глухов  added the comment:

After reviewing all the suggested options of the "versioned" Windows install I 
came to the conclusion that the "NuGet" path is the easiest.
Assuming x - version, y - patch number, the following steps work

1. Unzip 'Tools' folder of the NuGet archive into Python\3xy
2. Re-install pip to add pip.exe to Python\3xy\Scripts

3xy\python.exe -m pip install -U pip --force-reinstall

It works like a regular install after that.

Switching between versions can be done via a symbolic link:

cmd /c mklink /d 3x 3xy

Optional: Add Python\3x\Scripts;Python\3x to the PATH env variable.

--
resolution:  -> works for me

___
Python tracker 

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



[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2021-07-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> rejected
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