[issue42500] crash with unbounded recursion in except statement

2020-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

As mentioned earlier I can reproduce this without calling os.fstat (python 
3.9.1rc, macOS 10.15):

# ---
def status():
   try:
  1/0

   except status():
  pass

status()
# 

The crash happens both with the default recursion limit as well with a 
recursion limit of 10. Setting the recursion limit doesn't seem to have an 
effect on what's happening (in both cases I get a long traceback).

--

___
Python tracker 

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



[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

See also #42500

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue42500] crash with unbounded recursion in except statement

2020-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

See also #42509

--

___
Python tracker 

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



[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2020-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Good catch.

--

___
Python tracker 

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



[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-30 Thread Xinmeng Xia


Xinmeng Xia  added the comment:

But program like following program 3 will not cause any core dump, 
RecursionError is also being caught in this  Recursion.
program 3
def rec():
try:
rec()
except:
pass
rec()

Beside,I use sys.setrecursionlimit(80), and the program 1 still cause core 
dump.I print sys.getrecursionlimit(),the value is 1000. 80 is << 50 +1000, it 
shouldn't cause core dump.

--

___
Python tracker 

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



[issue42510] Tuple Slice Bug

2020-11-30 Thread Sathvik Rao Poladi


New submission from Sathvik Rao Poladi :

>>>a=1,2,3,4
>>>a[1:2]
(2,)

Expected output -> (2)
bug -> ,

--
components: Build
messages: 382118
nosy: p.saisathvikrao
priority: normal
severity: normal
status: open
title: Tuple Slice Bug
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-30 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6cc2c419f6cf5ed336609ba01055e77d7c553e6d by Serhiy Storchaka in 
branch 'master':
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
https://github.com/python/cpython/commit/6cc2c419f6cf5ed336609ba01055e77d7c553e6d


--

___
Python tracker 

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



[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22447
pull_request: https://github.com/python/cpython/pull/23566

___
Python tracker 

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



[issue42455] Add decorator_factory function to functools module

2020-11-30 Thread Yurii Karabas


Yurii Karabas <1998uri...@gmail.com> added the comment:

Let's wait for Nick.

I have found great examples to show how decorator_factory can simplify things.

dataclasses.dataclass
```
def dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False,
  unsafe_hash=False, frozen=False):
def wrap(cls):
return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)

# See if we're being called as @dataclass or @dataclass().
if cls is None:
# We're called with parens.
return wrap

# We're called as @dataclass without parens.
return wrap(cls)
```
```
@functools.decorator_factory
def dataclass(cls, /, *, init=True, repr=True, eq=True, order=False,
  unsafe_hash=False, frozen=False):
return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
```

functools.lru_cache
```
def lru_cache(maxsize=128, typed=False):
if isinstance(maxsize, int):
# Negative maxsize is treated as 0
if maxsize < 0:
maxsize = 0
elif callable(maxsize) and isinstance(typed, bool):
# The user_function was passed in directly via the maxsize argument
user_function, maxsize = maxsize, 128
wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo)
wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed}
return update_wrapper(wrapper, user_function)
elif maxsize is not None:
raise TypeError(
'Expected first argument to be an integer, a callable, or None')

def decorating_function(user_function):
wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo)
wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed}
return update_wrapper(wrapper, user_function)

return decorating_function
```
```
@decorator_factory
def lru_cache(user_function, /, maxsize=128, typed=False):
if isinstance(maxsize, int):
# Negative maxsize is treated as 0
if maxsize < 0:
maxsize = 0
elif maxsize is not None:
raise TypeError(
'Expected first argument to be an integer, a callable, or None')

wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo)
wrapper.cache_parameters = lambda : {'maxsize': maxsize, 'typed': typed}
return update_wrapper(wrapper, user_function)
```

--

___
Python tracker 

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



[issue42507] test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10

2020-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Try to test with 6cc2c419f6cf5ed336609ba01055e77d7c553e6d (PR-23474). All of 
failing tests were modified to make them passing on Windows, so I expect that 
this can help on macOS too (in most cases). If it does not help I will propose 
other changes for testing.

--

___
Python tracker 

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



[issue42506] Unexpected output when running test_format

2020-11-30 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 96545924780da34afc457bc22a869096af985ebf by Zackery Spytz in 
branch 'master':
bpo-42506: Fix unexpected output in test_format (GH-23564)
https://github.com/python/cpython/commit/96545924780da34afc457bc22a869096af985ebf


--
nosy: +corona10

___
Python tracker 

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



[issue42506] Unexpected output when running test_format

2020-11-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thank you ZackerySpytz!

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



[issue42455] Add decorator_factory function to functools module

2020-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Would be nice to include these examples (and more if they exist) in the PR. It 
will help to see the benefit from the new feature and to test that it does not 
break anything.

I have no opinion yet, but multiple examples can convince me. Or not.

--

___
Python tracker 

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



[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-30 Thread miss-islington


miss-islington  added the comment:


New changeset a5b0c17e0d04931e639c4aa7a908a69cd0b529b3 by Miss Islington (bot) 
in branch '3.8':
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
https://github.com/python/cpython/commit/a5b0c17e0d04931e639c4aa7a908a69cd0b529b3


--

___
Python tracker 

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



[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-30 Thread miss-islington


miss-islington  added the comment:


New changeset 03ae7e4518dae6547576c616173106d2eb283ae2 by Miss Islington (bot) 
in branch '3.9':
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
https://github.com/python/cpython/commit/03ae7e4518dae6547576c616173106d2eb283ae2


--

___
Python tracker 

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



[issue42510] Tuple Slice Bug

2020-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

(2) is not a tuple. It is just a number 2. To make a tuple containing a single 
item you need to use special syntax: add a comma to that item. Parenthesis are 
optional.

>>> (2)
2
>>> (2,)
(2,)
>>> 2,
(2,)

--
nosy: +serhiy.storchaka
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



[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-30 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

sys.getrecursionlimit() returns whatever was passed to the most recent call of 
sys.setrecursionlimit(...), with some system default (here 1000).

Catching a RecursionError might be fine sometimes, but the issue is that 
Program 1 catches a RecursionError *and then keeps recursing more* rather than 
stopping.

I think it might have to be the responsibility of the Python user to make sure 
that if a RecursionError is to be caught, that the program can recover without 
making things much worse. It's my understanding that the extra buffer of +50 is 
to make sure that the programmer has room to stop the overflow and do any 
necessary cleanup [1].

If no attempt is made to clean up, then it seems reasonable to me that Python 
should crash, unless there's some idea of what could happen that I'm missing. 
The interpreter could allow arbitrary recursion during the cleanup until the C 
stack overflows, but that sort of defeats the point of the recursion checker. 
It could raise some new ExtraSuperRecurionError, but that doesn't fix anything: 
what if *that* error is caught ;) ?

[1] to get back to a recursion depth lower than some lower threshold: 
https://github.com/python/cpython/blob/master/Include/internal/pycore_ceval.h#L98

--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-30 Thread Igor Skochinsky


Igor Skochinsky  added the comment:

Hi All,

 It seems this patch removes some functions provided by the Stable ABI (PEP 
384), most notably Py_CompileString. Was this the intention? If not, is there 
still a chance to reintroduce it before the release?

--
nosy: +Igor.Skochinsky

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

> It seems this patch removes some functions provided by the Stable ABI (PEP 
> 384), most notably Py_CompileString. Was this the intention? If not, is there 
> still a chance to reintroduce it before the release?

The functions removal is intentional and was approved by the PEP 617.

But Py_CompileString() function was not removed, it's still in the master 
branch (future Python 3.10). Why do you think that it has been removed?

--

___
Python tracker 

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



[issue42502] Conflict between get_traced_memory and setrlimit

2020-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

> I am trying to limit the memory consumption of a function

This issue is not a bug in Python, but a question. I suggest to close it and 
ask your question on a forum to get help.

--

___
Python tracker 

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



[issue42451] Indicate in the docs that PyTuple_GetItem does not support negative indices

2020-11-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9f004634a2bf50c782e223e2eb386ffa769b901c by Yasser A in branch 
'master':
bpo-42451: Indicate that PyTuple_GetItem does not support negative indices 
(GH-23529)
https://github.com/python/cpython/commit/9f004634a2bf50c782e223e2eb386ffa769b901c


--
nosy: +vstinner

___
Python tracker 

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



[issue42451] Indicate in the docs that PyTuple_GetItem does not support negative indices

2020-11-30 Thread STINNER Victor


Change by STINNER Victor :


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



[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for your help!

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



[issue40939] Remove the old parser

2020-11-30 Thread Igor Skochinsky


Igor Skochinsky  added the comment:

> But Py_CompileString() function was not removed, it's still in the master 
> branch (future Python 3.10). Why do you think that it has been removed?

Thank you. It looked that way because of the removed block of lines in the 
commit 1ed83adb0e95305af858bd41af531e487f54fee7 (pythonrun.c). We were also 
getting a missing symbol error. We'll check again to be sure.

--

___
Python tracker 

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



[issue14556] telnetlib Telnet.expect fails with timeout=0

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

This has been fixed by now:

Running Release|x64 interpreter...
Python 3.10.0a2+ (heads/bpo-42482:920f808f50, Nov 29 2020, 23:02:47) [MSC 
v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from telnetlib import Telnet
>>> import time
>>> tn = Telnet("scn.org", 23)
>>> time.sleep(5) # short wait for data to be available
>>> tn.expect(['.{16}'], 0)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\User\src\cpython\lib\telnetlib.py", line 622, in expect
m = list[i].search(self.cookedq)
TypeError: cannot use a string pattern on a bytes-like object
>>> tn.expect([b'.{16}'], 0)
(0, , b'\r\nSeattle 
Communit')
>>>

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



[issue42502] Conflict between get_traced_memory and setrlimit

2020-11-30 Thread Vipul Cariappa


Change by Vipul Cariappa :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue42502] Conflict between get_traced_memory and setrlimit

2020-11-30 Thread Vipul Cariappa


Change by Vipul Cariappa :


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



[issue27387] Thread hangs on str.encode() when locale is not set

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2 issue.

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



[issue35953] crosscompilation fails with clang on android

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2 issue, fixed in Python 3.7.

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



[issue42500] crash with unbounded recursion in except statement

2020-11-30 Thread Mark Shannon


Mark Shannon  added the comment:

Ronald's test case also causes a Fatal Error on master.

2.7.18 produces the expected "RuntimeError: maximum recursion depth exceeded"

--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue25635] urllib2 cannot fully read FTP file

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Works for me on master (3.10) too.

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



[issue21664] multiprocessing leaks temporary directories pymp-xxx

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


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



[issue13341] Incorrect documentation for "u" PyArg_Parse format unit

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


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



[issue14869] imaplib erronously quotes atoms such as flags

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


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



[issue42511] string in string not working

2020-11-30 Thread Mohammad Sadra Sharifzadeh

New submission from Mohammad Sadra Sharifzadeh :

I want to know whether some string is in same string or not (yeah the SAME) 
in the file attached I have two expressions:
1- print('اندیمشک' in 'اندیمشک')
2- print('اندیمشک' in 'اندیمشک')
as you can see both of them are same thing but if you run the program you see 
it returns True for first one and False for second one. the difference between 
two expressions is that in the first one I typed both of the strings but in the 
second one I copied second string from a file and type first string

Thanks

--
files: string bug.py
messages: 382140
nosy: m.s.sharifzade
priority: normal
severity: normal
status: open
title: string in string not working
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file49638/string bug.py

___
Python tracker 

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



[issue16027] pkgutil doesn't support frozen modules

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2 issue.

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



[issue42451] Indicate in the docs that PyTuple_GetItem does not support negative indices

2020-11-30 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue42511] string in string not working

2020-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

The two strings a different, that's why Python returns False.

a = U+0627 U+0646 U+062f U+064a U+0645 U+0634 U+06a9
b = U+0627 U+0646 U+062f U+06cc U+0645 U+0634 U+06a9

U+064a != U+06cc

>>> unicodedata.name('\u064a')
'ARABIC LETTER YEH'
>>> unicodedata.name('\u06cc')
'ARABIC LETTER FARSI YEH'

Python doesn't know arabic, it only compares code pointers: the number 0x064a 
is not equal to the number 0x06cc.

It's not a bug, but a deliberate choice.

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



[issue42512] Confusing that BinaryIO and IO[bytes] cannot be used interchangeably

2020-11-30 Thread conchylicultor


New submission from conchylicultor :

Currently, because `BinaryIO` is subclass of `IO[bytes]`, the 2 cannot be used 
interchangeably.

Example with pytype:

```
def iter_zip(arch_f) -> List[typing.BinaryIO]]:
  with open(arch_f, 'rb') as fobj:
z = zipfile.ZipFile(fobj)
return [z.open(member) for member in z.infolist()]
```

Raise:

```
   Expected: Tuple[str, BinaryIO]
  Actually returned: Tuple[Any, IO[bytes]]
```

Technically pytype is right as `ZipFile.open() -> IO[bytes]`:

https://github.com/python/typeshed/blob/ca45cb21a8a0422cbb266cb25e08051fe481887c/stdlib/2and3/zipfile.pyi#L109

But this makes BinaryIO usage quite confusing.

>From the implementation, it seems that the BinaryIO is slightly different 
>(https://github.com/python/cpython/blob/9f004634a2bf50c782e223e2eb386ffa769b901c/Lib/typing.py#L2094):

But the documentation is unclear about the difference between the 2 
https://docs.python.org/3/library/typing.html#typing.BinaryIO


Additionally, `typing.IO` is implemented as Generic but shouldn't this be a 
Protocol instead ?

--
messages: 382143
nosy: conchylicultor
priority: normal
severity: normal
status: open
title: Confusing that BinaryIO and IO[bytes] cannot be used interchangeably

___
Python tracker 

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



[issue42512] Confusing that BinaryIO and IO[bytes] cannot be used interchangeably

2020-11-30 Thread conchylicultor


Change by conchylicultor :


--
components: +Library (Lib)
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



[issue42512] typing: Confusing that BinaryIO and IO[bytes] cannot be used interchangeably

2020-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
title: Confusing that BinaryIO and IO[bytes] cannot be used interchangeably -> 
typing: Confusing that BinaryIO and IO[bytes] cannot be used interchangeably

___
Python tracker 

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



[issue34216] python platform no child error

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I was unable to reproduce this on Python 3. Is this issue only relevant to 
version 2.7?

Can you please post a complete script that shows the issue, and specify on 
which system you see it?

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



[issue42513] Socket.recv hangs

2020-11-30 Thread Barney Stratford


New submission from Barney Stratford :

import socket
self.__socket = socket.create_connection ([host, port], 1)
value = self.__socket.recv (4096)

This code sometimes hangs despite having a non-None timeout specified. GDB says:

(gdb) bt
#0  0x76d33c94 in __GI___poll (fds=0x7ea55148, nfds=1, timeout=1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x001e8014 in poll (__timeout=, __nfds=, 
__fds=, __fds=, __nfds=, 
__timeout=)
at /usr/include/arm-linux-gnueabihf/bits/poll2.h:46
#2  internal_select (writing=writing@entry=0, interval=, 
connect=0, connect@entry=4156908, s=)
at ../Modules/socketmodule.c:745
#3  0x001ec588 in sock_call_ex (s=s@entry=0x76979d68, writing=writing@entry=0, 
sock_func=sock_func@entry=0x1e736c , data=0x7ea551b0, 
data@entry=0x7ea551a8, connect=connect@entry=0, err=err@entry=0x0, 
timeout=100) at ../Modules/socketmodule.c:840
#4  0x001ed394 in sock_call (data=0x7ea551a8, func=0x1e736c , 
writing=0, s=0x76979d68) at ../Modules/socketmodule.c:3287
#5  sock_recv_guts (s=s@entry=0x76979d68, cbuf=, 
len=, flags=)
at ../Modules/socketmodule.c:3287
#6  0x001ed51c in sock_recv (s=0x76979d68, args=)
at ../Modules/socketmodule.c:3318

Googling for this problem turned up this:

https://stackoverflow.com/questions/56038224/poll-waits-indefinitely-although-timeout-is-specified

If we look at socket module.c line 756 (Python 3.7.9 version), we see that 
we're indeed not checking for the pollfd.revents, and are therefore missing 
socket errors.

PR coming up in a few days.

--
components: Library (Lib)
messages: 382145
nosy: Barney Stratford
priority: normal
severity: normal
status: open
title: Socket.recv hangs
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



[issue24063] Support Mageia and Arch Linux in the platform module

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2.7 is no longer being updated.

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



[issue31481] telnetlib fails to read continous large output from Windows Telnet Server

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Nisar,

Is this problem reproducible in Python 3? Can you provide a script that shows 
exactly what you mean? What is "large" (are you running out of memory?)

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



[issue10837] Issue catching KeyboardInterrupt while reading stdin

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2-only issue.

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



[issue42513] Socket.recv hangs

2020-11-30 Thread Barney Stratford


Change by Barney Stratford :


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

___
Python tracker 

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



[issue41837] Upgrade installers to OpenSSL 1.1.1h

2020-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

Sorry, I missed the initial ping.

The changes look unproblematic to me. Our test suite is passing with 1.1.1h, 
too. Python doesn't set VERIFY_X509_STRICT by default and does not support DTLS.

Please go ahead.

--

___
Python tracker 

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



[issue5773] Crash on shutdown after os.fdopen(2) in debug builds

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2.7 is no longer being maintained.

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



[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-30 Thread Mark Shannon


Mark Shannon  added the comment:

Duplicate of 42500

--
nosy: +Mark.Shannon
resolution:  -> duplicate
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



[issue34216] python platform no child error

2020-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

The platform module no longer uses popen(). Victor replaced the broken code 
with subprocess in bpo-35346.

--
nosy: +christian.heimes
resolution:  -> fixed
stage:  -> resolved
status: pending -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue42484] get_obs_local_part fails to handle empty local part

2020-11-30 Thread R. David Murray


R. David Murray  added the comment:

Yep, you've found another in a category of bugs that have shown up in the 
parser: places where there is a missing check for there being any value at all 
before checking character [0].

In this case, the fix should be to add

if not obs_local_part:
return obs_local_part, value

just before the if that is blowing up.

--
title: parse_message_id, get_msg_id, get_obs_local_part is poorly written -> 
get_obs_local_part fails to handle empty local part

___
Python tracker 

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



[issue42495] socket.gethostbyaddr raises error if invalid unicode in hosts

2020-11-30 Thread Peter Hunt


Peter Hunt  added the comment:

Ah, I just realised it may have been a different dash to the one that can be 
typed with the keyboard.

>From the wiki article (https://en.wikipedia.org/wiki/Dash), using either the 
>"en" or "em" dash will cause the issue for me on Windows.

--

___
Python tracker 

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



[issue42500] crash with unbounded recursion in except statement

2020-11-30 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue35120] SSH tunnel support to ftp lib

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Mohit, Python 2.7 is no longer maintained. If you are seeing this issue in 
Python 3 then please create a new issue, and also include more information 
about what the problem is and how one can reproduce it.

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



[issue34079] Multiprocessing module fails to build on Solaris 11.3

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

_XOPEN_SOURCE is no longer defined in multiprocessing.h. Is there anything left 
to do here or can we close it as out of date?

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



[issue28881] int no attribute 'lower' iterating email.Message

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2-only issue.

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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

One thing to add, the proposed implementation also optimizes extended slices 
(mostly used in scientific stacks) such as [:, 1].

--

___
Python tracker 

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



[issue42487] collections.ChainMap.__iter__ calls __getitem__ on underlying maps

2020-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 0be9ce305ff2b9e13ddcf15af8cfe28786afb36a by Andreas Poehlmann in 
branch 'master':
bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ 
(GH-23534)
https://github.com/python/cpython/commit/0be9ce305ff2b9e13ddcf15af8cfe28786afb36a


--

___
Python tracker 

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



[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-30 Thread Renato Cunha


Renato Cunha  added the comment:

No worries, Gregory. Glad I could help. :-)

--

___
Python tracker 

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



[issue42487] collections.ChainMap.__iter__ calls __getitem__ on underlying maps

2020-11-30 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue21567] cannot create multipart alternative message with us-ascii charset

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I'm not seeing the problem in 3.7(linux) and 3.10(windows). Is this a python 
2-only 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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue28288] Expose environment variable PYTHON_OPT as alternative to command line options

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

It's too late for the PYTHON3WARNINGS variable in 2.7, but Serhiy's suggestion 
for PYTHON_OPTS can still be implemented. Updating title and version 
accordingly.

--
nosy: +iritkatriel
title: Expose environment variable for Py_Py3kWarningFlag -> Expose environment 
variable PYTHON_OPT as alternative to command line options
versions: +Python 3.10 -Python 2.7

___
Python tracker 

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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Mark Shannon


Mark Shannon  added the comment:

I agree with Mark about slice hashing.
This looks like a deliberate design decision.
x[:] = [] should empty a sequence, not set the key-value pair (slice(None, 
None, None), []) in a mapping.

However, code-objects can still be hashable even if slices are not.

By leaving slices unhashable, and accounting for their presence in 
code.__hash__, we get both the performance improvement and full backwards 
compatibility.

--

___
Python tracker 

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



[issue42487] collections.ChainMap.__iter__ calls __getitem__ on underlying maps

2020-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset cf22aa3bc698847459a6bf20c166aa80825b810a by Miss Islington (bot) 
in branch '3.9':
bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ 
(GH-23534) (GH-23569)
https://github.com/python/cpython/commit/cf22aa3bc698847459a6bf20c166aa80825b810a


--

___
Python tracker 

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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +22452
pull_request: https://github.com/python/cpython/pull/23571

___
Python tracker 

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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22453
pull_request: https://github.com/python/cpython/pull/23572

___
Python tracker 

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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset e41bfd15dd148627b4f39c2a5837bddd8894d345 by Terry Jan Reedy in 
branch 'master':
bpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570)
https://github.com/python/cpython/commit/e41bfd15dd148627b4f39c2a5837bddd8894d345


--

___
Python tracker 

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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issue exposed and is affected by an existing system and version 
independent bug.  With that fixed as in PR 23570, running a file with 
"print('output')" with the new 3.9.1rc1 universal binary results in the 
following.

output
= RESTART: /Users/.../tem1.py =
<'... finished.' dialog box>


== RESTART: Shell =
>>>
output
>>>

The normal output is

= RESTART: /Users/.../tem1.py =
output
>>>

I am investigating how 'RESTART' is being printed after 'output', even though 
the restart function is called before the compiled tem1 is sent to be executed.

--
stage: patch review -> 

___
Python tracker 

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



[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-30 Thread miss-islington


miss-islington  added the comment:


New changeset f4389bfbb5b9f67db1505dd0003987896eae560b by Miss Islington (bot) 
in branch '3.8':
bpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570)
https://github.com/python/cpython/commit/f4389bfbb5b9f67db1505dd0003987896eae560b


--

___
Python tracker 

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



[issue42501] Improve error messages for argparse choices using enum

2020-11-30 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue42501] Improve error messages for argparse choices using enum

2020-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 7f82f22eba1312617e1aa19cb916da1aae1609a4 by Raymond Hettinger in 
branch 'master':
bpo-42501:  Revise the usage note for Enums with the choices (GH-23563)
https://github.com/python/cpython/commit/7f82f22eba1312617e1aa19cb916da1aae1609a4


--

___
Python tracker 

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



[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-11-30 Thread pyTama


Change by pyTama :


--
resolution:  -> third party
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



[issue42433] mailbox.mbox fails on non ASCII characters

2020-11-30 Thread R. David Murray


R. David Murray  added the comment:

After thinking about it some more, I think given that when there is no 
non-ascii mbox will happily treat *anything* as valid on the "From " line, that 
we should consider blowing up on non-ascii to be a bug.

--

___
Python tracker 

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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> By leaving slices unhashable, and accounting for their presence in 
> code.__hash__, we get both the performance improvement and full backwards 
> compatibility.


I thought about using code.__hash__ in the first place, but the compiler's 
underlying store system (both compiler_unit->u_consts and 
compiler->c_const_cache) uses dictionary's where the keys are constant objects 
themselves (or tuples where one of the items is the constant). We might need to 
change that first (either using something else for the keys, or switch to 
lists? or something else).

--

___
Python tracker 

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



[issue42514] Relocatable framework for macOS

2020-11-30 Thread Greg Neagle


New submission from Greg Neagle :

The current Python.framework installed by the macOS packages is hard-coded to 
/Library/Frameworks/Python.framework and breaks if renamed or moved.

A relocatable framework would allow users/admins/developers to install a 
specific framework to an alternate location, or include it inside an 
application bundle, or access it from a mounted disk image.

Currently it is possible to use `otool` and `install_name_tool` to convert the 
current framework into one that can be relocated, but doing so breaks any code 
signing. With Apple Silicon, all executable code and libraries must be code 
signed, so the effort of relocating the Python framework becomes that more 
difficult.

Ideally the official macOS framework would be built as relocatable, eliminating 
the need to modify it and re-sign it to use it anywhere other than  
/Library/Frameworks/Python.framework.

--
components: macOS
messages: 382171
nosy: gregneagle, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Relocatable framework for macOS
type: enhancement
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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Yep, Mark Shannon's solution of contextual hashing is what I was trying 
(without success) when my last computer died (without backing up work offsite, 
oops) and I gave up on this for a while. And Batuhan Taskaya's note about 
compiler dictionaries for the constants being a problem is where I got stuck.

Switching to lists might work (I never pursued this far enough to profile it to 
see what the performance impact was; presumably for small functions it would be 
near zero, while larger functions might compile more slowly).

The other approach I considered (and was partway through implementing when the 
computer died) was to use a dict subclass specifically for the constants 
dictionaries; inherit almost everything from regular dicts, but with built-in 
knowledge of slices so it could perform hashing on their behalf (I believe you 
could use the KnownHash APIs to keep custom code minimal; you just check for 
slices, fake their hash if you got one and call the KnownHash API, otherwise, 
defer to dict normally). Just an extension of the code.__hash__ trick, adding a 
couple more small hacks into small parts of Python so they treat slices as 
hashable only in that context without allowing non-intuitive behaviors in 
normal dict usage.

--

___
Python tracker 

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



[issue42514] Relocatable framework for macOS

2020-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

There's also macholib (which is used by py2app for rewriting mach-o headers). 

Note that resigning for arm64 is possible using the following command:

$ codesign -s - --preserve-metadata=identifier,entitlements,flags,runtime -f 
.

This was mentioned in the Xcode 12 release notes.

BTW. My hobby horse w.r.t. a relocatable Python installation is to turn the 
current framework inside out: have a "Python.app" or "Python 3.10.app" that 
contains the framework and presents a GUI when double clicked (probably IDLE 
with some additional menu items). This would simplify the installation 
experience (no installer, just drop Python.app somewhere convenient).   

I have no idea if I'll ever get around to implementing this.

--

___
Python tracker 

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



[issue42497] New pathlib.Path attribute

2020-11-30 Thread Eryk Sun


Change by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add to pathlib function to check permission similar to os.access

___
Python tracker 

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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I thought about using code.__hash__ in the first place, but the compiler's 
> underlying store system (both compiler_unit->u_consts and 
> compiler->c_const_cache) uses dictionary's where the keys are constant 
> objects themselves (or tuples where one of the items is the constant). We 
> might need to change that first (either using something else for the keys, or 
> switch to lists? or something else).

I have to say that I feel that this will complicate things too much. Part of 
the appeal of this change is how straightforward and maintainable is. Fiddling 
with code objects lowers the watermark.

--

___
Python tracker 

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



[issue42507] test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10

2020-11-30 Thread Ned Deily


Ned Deily  added the comment:

I tested on 3.9 with the backport of GH-23474 merged. The six failures are 
still there plus there is now an additional failure:

==
FAIL: test_horizontal_range 
(tkinter.test.test_ttk.test_extensions.LabeledScaleTest)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_extensions.py",
 line 121, in test_horizontal_range
self.assertEqual(prev_xcoord, int(linfo_1['x']))
AssertionError: 12 != 0

--

___
Python tracker 

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



[issue42485] Full grammar specification should link to PEP 617

2020-11-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bcc9579227578de5dd7f8825d24ba51b618ad3c2 by James Gerity in 
branch 'master':
bpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532)
https://github.com/python/cpython/commit/bcc9579227578de5dd7f8825d24ba51b618ad3c2


--

___
Python tracker 

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



[issue42485] Full grammar specification should link to PEP 617

2020-11-30 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



[issue42454] Move slice creation to the compiler for constants

2020-11-30 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> I have to say that I feel that this will complicate things too much. Part of 
> the appeal of this change is how straightforward and maintainable is. 
> Fiddling with code objects lowers the watermark.

Agreed. And I'd go for either making slices hashable as is, or rejecting this 
patch without implementing more hacks to the Python / messing with the compiler.

--

___
Python tracker 

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



[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-30 Thread Eryk Sun


Eryk Sun  added the comment:

> takes extended file attributes like immutable bit

Just to clarify, immutable isn't an extended attribute. It's one of the flag 
values in a Linux inode, which is supported by some filesystems such as ext4. 
It's in the API as STATX_ATTR_IMMUTABLE from the statx() stx_attributes field.

> according to the man page, AT_EACCESS (effective_ids=True) and
> AT_SYMLINK_NOFOLLOW (follow_symlinks=False) are implemented in 
> the glibc wrapper by calling fstatat() instead. I presume 
> that's limited to the discretionary st_mode permissions

Apparently this is the case. For example, given 'spam.txt' is an immutable file:

>>> os.access('spam.txt', os.W_OK)
False
>>> os.access('spam.txt', os.W_OK, follow_symlinks=False)
True

The AT_EACCESS flag has the same limitations in Linux, when it's not ignored. 
This issue with AT_SYMLINK_NOFOLLOW and AT_EACCESS will be resolved with the 
next release of glibc [1] on Linux systems running kernel 5.8+, which has a new 
faccessat2 system call that supports the flags parameter. Maybe initially a 
pathlib.Path method that implements an access check doesn't need to support the 
follow_symlinks and effective_ids parameters.

---

[1] 
https://sourceware.org/git/?p=glibc.git;a=commit;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2

--

___
Python tracker 

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



[issue28926] subprocess.Popen + Sqlalchemy doesn't wait for process

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2.7 is no longer maintained.

Are you seeing this issue in Python3 as well? Can you attached a script that 
reproduces the problem? (A script is always better than a verbal description). 
Information about the system on which you observed the issue can also be 
helpful.

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



[issue42514] Relocatable framework for macOS

2020-11-30 Thread Greg Neagle


Greg Neagle  added the comment:

A Python.app you could drop somewhere convenient would by definition need a 
relocatable Python.framework within. :-)

--

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-30 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

This issue was brought to the Python Steering Council, and we deliberated it at 
today's SC meeting.  With a vote of 4 approvals and one abstention, we have 
approved the addition of this API.

--
nosy: +barry

___
Python tracker 

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



[issue31990] Pickling deadlocks in thread with python -m

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I don't see the hang on Linux (3.7) or windows (3.10). I think this might be a 
python 2-only issue.

There were problems in Python 2 with importer race conditions, and since you 
start threads at import time, that could be what was causing what you saw.

Python 2.7 is no longer maintained, so unless the problems is relevant to 
Python 3 this issue can be closed.

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



[issue23276] hackcheck is broken in association with __setattr__

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue42515] Devguide recommend against using PRs to update fork

2020-11-30 Thread E. Paine


New submission from E. Paine :

Simple enough: we should make it very clear in the Devguide that creating a PR 
from python:master to :master is not a good way to update your fork.

For context, I recently saw that a commit on a fork was showing as a mention on 
a lot of the more recent commits to the master. I left a comment on the PR for 
the fork responsible to save them the embarrassment of this happening again 
(https://github.com/ThatXliner/cpython/pull/1#issuecomment-735969158 - my 
apologies to those who got pinged by that comment, I'm the one who feels 
embarrassed now!).

When I first started to contribute to CPython, I made exactly the same mistake 
(using a PR to update my fork - for the record I had never before used git 
except to clone). Yes, most of that was my ignorance but even after finding 
"Syncing with Upstream" (32.14 - which may make more sense renamed to "Updating 
your CPython fork" for accessibility but that's a separate issue), I did not 
think to combine it with the clone instructions of "Get the source code" (1.2 - 
I delete local copies when not in use to save space so only ran `git clone` 
before trying those on the guide).

That is also a separate issue and there is nothing we can do if people don't 
read the docs but IMO we should make it very clear that opening a PR on your 
fork is not a good solution to the problem (I don't want others making the same 
mistake, and it also unnecessarily pings quite a few of the core devs - though 
please correct me if I'm wrong and it doesn't ping them).

--
assignee: docs@python
components: Documentation
messages: 382183
nosy: Mariatta, docs@python, epaine, eric.araujo, ezio.melotti, willingc
priority: normal
severity: normal
status: open
title: Devguide recommend against using PRs to update fork

___
Python tracker 

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



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue28468] Add platform.freedesktop_os_release()

2020-11-30 Thread Matthias Klose


Matthias Klose  added the comment:

I don't agree with this decision, but ok.

In this case, please also provide a way to provide the value of the VERSION_ID 
field. It doesn't make sense to blacklist whole distributions in tests.

--

___
Python tracker 

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



[issue39096] "Format Specification Mini-Language" doc mistake for Decimal

2020-11-30 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +22455
pull_request: https://github.com/python/cpython/pull/23575

___
Python tracker 

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



[issue42495] socket.gethostbyaddr raises error if invalid unicode in hosts

2020-11-30 Thread Steve Dower


Steve Dower  added the comment:

This is covered by issue26227

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

___
Python tracker 

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



[issue39096] "Format Specification Mini-Language" doc mistake for Decimal

2020-11-30 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Should this issue be closed, or are you thinking of more changes?

I've made one more round of changes in GH-23575. Once that's gone in, I think 
we can close this issue.

I don't think we're ever going to be able to make this table perfectly 
accurate; at best, we can achieve a series of successive approximations to the 
truth. (Which is pretty much what I aim for when teaching.)

--

___
Python tracker 

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



[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2-only issue.

--
nosy: +iritkatriel
resolution:  -> out of date
stage: test needed -> 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



[issue42455] Add decorator_factory function to functools module

2020-11-30 Thread Yurii Karabas


Yurii Karabas <1998uri...@gmail.com> added the comment:

I have posted this idea to python-ideas

Link to thread 
https://mail.python.org/archives/list/python-id...@python.org/thread/OIRAB3QA4AAD3JGH2S5HMGCPDLGG7T52/

--

___
Python tracker 

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



  1   2   >