[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Patrick Reader


Change by Patrick Reader :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane

2021-11-19 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

By the way note that path.glob('**/my_symlink') also does return the dangling 
symlink match. And glob.glob('my_symlink') also returns a dangling symlink.

--

___
Python tracker 

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



[issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -27895

___
Python tracker 

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



[issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane

2021-11-19 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Rasmus: thanks for the report, it does seem like a bug to me.

--

___
Python tracker 

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



[issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane

2021-11-19 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

The issue is that _PreciseSelector follows the symlink when it checks if a path 
exists before yielding it as a result.

I've put up a PR with a fix; I've also added a *follow_symlinks* arg to 
`exists()` method because it seems more logical to be able to test if a path 
exists via the same method rather than having to also remember and to check for 
it being a symlink.

I will add docs and news a bit later today or tomorrow.

--
assignee:  -> andrei.avk
nosy: +kj

___
Python tracker 

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



[issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane

2021-11-19 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
keywords: +patch
nosy: +andrei.avk
nosy_count: 1.0 -> 2.0
pull_requests: +27897
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29655

___
Python tracker 

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



[issue45811] Improve error message when source code contains invisible control characters

2021-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue45852] statistics.mode test doesn't test what it claims to

2021-11-19 Thread Stefan Pochmann


New submission from Stefan Pochmann :

This test:

def test_counter_data(self):
# Test that a Counter is treated like any other iterable.
data = collections.Counter([1, 1, 1, 2])
# Since the keys of the counter are treated as data points, not the
# counts, this should return the first mode encountered, 1
self.assertEqual(self.func(data), 1)

If the mode() code *were* wrong this way (used Counter(data) instead of 
Counter(iter(data))), then the test wouldn't detect it, as mode() would still 
return 1. The test data should be [1, 2, 2, 2] instead, in which case such 
wrong mode() would return 2.

It used to be correct but wasn't adjusted correctly when mode() switched from 
raising an error for multiple modes to returning the first. The old code was:

def test_counter_data(self):
# Test that a Counter is treated like any other iterable.
data = collections.Counter([1, 1, 1, 2])
# Since the keys of the counter are treated as data points, not the
# counts, this should raise.
self.assertRaises(statistics.StatisticsError, self.func, data)

--
components: Tests
messages: 406642
nosy: Stefan Pochmann
priority: normal
severity: normal
status: open
title: statistics.mode test doesn't test what it claims to
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



[issue45841] IDLE fails to save files in macOS 12.0.1 Monterey

2021-11-19 Thread Don Chamberlin


Don Chamberlin  added the comment:

Thanks, Terry!

--

___
Python tracker 

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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +27894, 27895
pull_request: https://github.com/python/cpython/pull/29653

___
Python tracker 

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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +27894
pull_request: https://github.com/python/cpython/pull/29653

___
Python tracker 

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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

>From Guido's page: 'But when my last name is used alone to refer to me, it is 
>capitalized, for example: "As usual, Van Rossum ..."' and similar usage on 
>wiki page.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2021-11-19 Thread Julien Palard


Change by Julien Palard :


--
pull_requests: +27893
pull_request: https://github.com/python/cpython/pull/29652

___
Python tracker 

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



[issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too)

2021-11-19 Thread Stefan Pochmann


Stefan Pochmann  added the comment:

(somehow the benchmark script didn't get attached, trying again)

--
Added file: https://bugs.python.org/file50453/multimode_mode.py

___
Python tracker 

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



[issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too)

2021-11-19 Thread Stefan Pochmann


New submission from Stefan Pochmann :

The current implementation is:

def multimode(data):
counts = Counter(iter(data)).most_common()
maxcount, mode_items = next(groupby(counts, key=itemgetter(1)), (0, []))
return list(map(itemgetter(0), mode_items))

The most_common() does a complete sort of Counter item tuples, taking O(n log 
n) time and quite big O(n) extra space (mostly for all those tuples).

When Raymond Hettinger suggested it in 
https://bugs.python.org/issue35892#msg336338 he said it should have "running 
speed that is optimal for the desired result". But then he detailed that with 
"Slow O(n log n), loads all data in memory, full sort".

Which seems like a mistake, as that's not optimal. It's easy to do in O(n) time 
and O(1) extra memory (in addition to the Counter and result, I mean):

def multimode(data):
counts = Counter(iter(data))
if not counts:
return []
maxcount = max(counts.values())
return [value for value, count in counts.items() if count == maxcount]

If there are only very few *different* values then the time/space after 
creating the Counter is insignificant compared to the Counter creation. But if 
there are many different values, it can be significant.

statistics.mode takes O(n) time and O(1) space, which is optimal, but I found 
an apparently faster way anyway (code at end).

For example for data = random.choices(range(n), k=n):

   | multimode |   mode
 n | current  proposal | current  proposal
---+---+--
 1 |131%70%|125%   58%
10 |144%73%|119%   53%
   100 |126%71%|108%   29%
 1,000 |123%65%| 62%   22%
10,000 |172%55%| 53%   18%
   100,000 |164%44%| 55%   20%
 1,000,000 | 85%20%| 22%4%
10,000,000 | 56%12%| 11%4%

All four start with Counter(iter(data)), so I took that as baseline and the 
above results show relative additional times. For example 55% means if Counter 
construction alone took 10 seconds, the function took 15.5 seconds.

An extreme case, data = list(range(n)):

   | multimode|   mode
 n | current proposal | current proposal
---+--+-
 1 |   128%   67% |   124%   56%
10 |   187%   93% |   141%   52%
   100 |   316%  149% |   181%   45%
 1,000 |   380%  174% |   213%   46%
10,000 |   349%  111% |   146%   30%
   100,000 |   397%  128% |   159%   34%
 1,000,000 |   336%   95% |   112%   24%
10,000,000 |   349%   97% |   109%   23%

I also tried a bunch of other cases, didn't find one where my versions weren't 
quite a bit faster.

My mode() version:

from operator import indexOf
from itertools import islice

def mode(data):
counts = Counter(iter(data))
if not counts:
raise StatisticsError('no mode for empty data') from None
maxcount = max(counts.values())
index = indexOf(counts.values(), maxcount)
return next(islice(counts, index, None))

--
components: Library (Lib)
messages: 406638
nosy: Stefan Pochmann
priority: normal
severity: normal
status: open
title: statistics.multimode is inefficient (time and space) (mode somewhat, too)
type: performance
versions: Python 3.10

___
Python tracker 

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



[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -27890

___
Python tracker 

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



[issue44844] The command line of launching Edge on Linux hangs

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +27892
pull_request: https://github.com/python/cpython/pull/29651

___
Python tracker 

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



[issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
nosy: +terry.reedy
nosy_count: 2.0 -> 3.0
pull_requests: +27891
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29651

___
Python tracker 

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



[issue44844] The command line of launching Edge on Linux hangs

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -27889

___
Python tracker 

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



[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy
nosy_count: 2.0 -> 3.0
pull_requests: +27890
pull_request: https://github.com/python/cpython/pull/29651

___
Python tracker 

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



[issue44844] The command line of launching Edge on Linux hangs

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
nosy: +terry.reedy
nosy_count: 2.0 -> 3.0
pull_requests: +27889
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29651

___
Python tracker 

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



[issue45832] Misleading membersip expression documentation

2021-11-19 Thread Harald Husum


Change by Harald Husum :


--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue45823] python stopped working

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: phyton stopped working -> python stopped working

___
Python tracker 

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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On 3.11, both of the last two lines are required for the crash and restart.

--

___
Python tracker 

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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

No crash on Windows running in CommandPrompt (using -i to ensure that python 
survives running the test code):

C:\Users\Terry>py -3.10 -i f:/dev/tem/tem.py
f:\dev\tem\tem.py:5: RuntimeWarning: coroutine 'f' was never awaited
  del f
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
>>> quit()

C:\Users\Terry>py -3.11 -i f:/dev/tem/tem.py
f:\dev\tem\tem.py:5: RuntimeWarning: coroutine 'f' was never awaited
  del f
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
>>> quit()

Running in IDLE, I only see the first warning.  (IDLE bug?  python behavior 
difference?  Don't know yet.)  On 3.11, the remote process crashes and IDLE's 
Shell does an unrequested restart.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-11-19 Thread Brett Cannon


Change by Brett Cannon :


--
pull_requests: +27888
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29650

___
Python tracker 

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



[issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools

2021-11-19 Thread Steve Dower


Steve Dower  added the comment:

Looks like the fix for those errors is to specify the arguments to the linker 
in PCbuild/pyproject.props

 /OPT:REF,NOICF 
/CGTHREADS:1 /PDBTHREADS:1 %(AdditionalOptions)

I don't particularly know what a good number of threads is for this. One seems 
safe, but maybe we can get faster builds with more?

--

___
Python tracker 

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



[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-11-19 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset be36e0634060c7d5dee8e8876fb888bbb53d992a by Brett Cannon in 
branch 'main':
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently 
required by CPython (GH-29170)
https://github.com/python/cpython/commit/be36e0634060c7d5dee8e8876fb888bbb53d992a


--

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +27884, 27885
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +27884, 27885, 27886
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +27884
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +27887
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests:  -27882

___
Python tracker 

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



[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


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

___
Python tracker 

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



[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests:  -27883

___
Python tracker 

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



[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-11-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

(Note, that PR doesn't actually fix this, its description just references this.)

--

___
Python tracker 

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



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-11-19 Thread Steve Dower


Steve Dower  added the comment:


New changeset 4c616911b69ce07fb35da1721506bfaba0998c30 by Steve Dower in branch 
'main':
bpo-45506: Fix test_embed expecting to not find stdlib in source tree build 
when stdlib has been installed. (GH-29649)
https://github.com/python/cpython/commit/4c616911b69ce07fb35da1721506bfaba0998c30


--

___
Python tracker 

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



[issue44556] ctypes unittest crashes with libffi 3.4.2

2021-11-19 Thread Isuru Fernando


Isuru Fernando  added the comment:

Duplicate of https://bugs.python.org/issue45350

--
nosy: +isuruf

___
Python tracker 

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



[issue45272] 'os.path' should not be a frozen module

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +27882
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45273] OS-specific frozen modules are built, even on other OSes.

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
keywords: +patch
nosy: +gvanrossum
nosy_count: 2.0 -> 3.0
pull_requests: +27883
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29648

___
Python tracker 

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



[issue45850] Port deep-freeze to Windows

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


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

___
Python tracker 

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



[issue45850] Port deep-freeze to Windows

2021-11-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Port deep-freeze to Windows
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



[issue45811] Improve error message when source code contains invisible control characters

2021-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue45811] Improve error message when source code contains invisible control characters

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +pablogsal

___
Python tracker 

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



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-11-19 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +27880
pull_request: https://github.com/python/cpython/pull/29649

___
Python tracker 

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



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-11-19 Thread Steve Dower


Steve Dower  added the comment:

Hijacking this issue number for a related test failure I found: if you "make 
install" Python and then run the test_embed tests from the build directory, 
some will successfully find the stdlib under PREFIX and fail because they 
expect to never find it.

PR incoming.

--
nosy: +steve.dower

___
Python tracker 

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



[issue45849] Embedded python doesn't recognize exit()

2021-11-19 Thread Steve Dower


Steve Dower  added the comment:

This is expected. The top-level exit() command only exists when the site module 
is imported, which is not the default for embedded Python (you should specify 
all the import paths explicitly, since they're going to be in your app rather 
than found by searching the disk).

You probably want to use sys.exit() in your script.

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



[issue44556] ctypes unittest crashes with libffi 3.4.2

2021-11-19 Thread Eli Rykoff


Eli Rykoff  added the comment:

To add a bit more color, I don't think you can explicitly set 
LIBFFI_INCLUDE_DIR, it's set by the configure script explicitly.  The problem 
is that some time between python 3.9 and 3.10 the configure script has (at 
least in our system) failed to figure out the $PKG_CONFIG variable correctly.  
It should be set to the executable with the full path name, as is done with 
3.9, but now it is set to just the executable name.  When that happens the 
library location check fails.

--
nosy: +erykoff

___
Python tracker 

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



[issue44556] ctypes unittest crashes with libffi 3.4.2

2021-11-19 Thread jakirkham


jakirkham  added the comment:

We ran into the same issue in conda-forge ( 
https://github.com/conda-forge/python-feedstock/issues/522 ).

The problem is Apple also supplies their own `libffi`. However if the build 
scripts in CPython fail to find the user provided `libffi`, they end up pulling 
the headers from Apple's `libffi`, but the linker will link to the user 
provided `libffi`. IOW mashing these two incompatible `libffi`'s together. As 
result one gets crashes like the one illustrated in this bug.

In conda-forge, we are resolving this by forcing our `pkg-config` to be used to 
ensure we pick up the headers from our `libffi` as well as the libraries. Other 
users may be able to workaround this issue by explicitly setting 
`LIBFFI_INCLUDE_DIR`.

That said, it would be preferable to have a clear way to specify the `libffi` 
used and ensure that Apple's one doesn't get accidentally pulled in. If this 
exists and we are just missing these details, some pointers to this effect 
would be very helpful.

--
nosy: +jakirkham

___
Python tracker 

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



[issue45727] Parse error when missing commas is inconsistent

2021-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27879
pull_request: https://github.com/python/cpython/pull/29647

___
Python tracker 

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



[issue45727] Parse error when missing commas is inconsistent

2021-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 546cefcda75d7150b55c8bc1724bea35a1e12890 by Pablo Galindo Salgado 
in branch 'main':
bpo-45727: Make the syntax error for missing comma more consistent (GH-29427)
https://github.com/python/cpython/commit/546cefcda75d7150b55c8bc1724bea35a1e12890


--

___
Python tracker 

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



[issue45848] Pegen's nice error reporting crashes with non-UTF-8 files

2021-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27878
pull_request: https://github.com/python/cpython/pull/29646

___
Python tracker 

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



[issue45849] Embedded python doesn't recognize exit()

2021-11-19 Thread thewh1teagle


New submission from thewh1teagle :

C:\Users\user\Downloads\python-3.10.0-embed-win32>python
Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 18:46:30) [MSC v.1929 32 bit 
(Intel)] on win32
>>> exit
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'exit' is not defined
>>> exit()
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'exit' is not defined
>>> import os;os._exit(0)

C:\Users\user\Downloads\python-3.10.0-embed-win32>


same error when running exit from file.

--
components: Windows
messages: 406624
nosy: paul.moore, steve.dower, thewh1teagle, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Embedded python doesn't recognize exit()
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



[issue45844] Dead link 'consolelib' in faq/library

2021-11-19 Thread JMcB


JMcB  added the comment:

The command line libraries I'm aware of that support windows are Blessed 
(curses-based), Rich, Asciimatics, and python-prompt-toolkit.
>From here: https://www.pythondiscord.com/events/code-jams/8/frameworks/

--

___
Python tracker 

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



[issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect

2021-11-19 Thread Saul Shanabrook

Saul Shanabrook  added the comment:

Thanks Éric!

Do you think it would make sense to add the future flags as well to the inspect 
flags documentation 
(https://docs.python.org/3/library/inspect.html#code-objects-bit-flags) and to 
the dis.pretty_flags?

--

___
Python tracker 

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



[issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect

2021-11-19 Thread Éric Araujo

Éric Araujo  added the comment:

No worry about posting multiple messages.

I think the flag is documented through the __future__ module.
Future imports are both special-cased by the compiler to enable custom 
behaviour, but also real, regular imports!

>>> from __future__ import annotations
>>> annotations
_Feature((3, 7, 0, 'beta', 1), (3, 10, 0, 'alpha', 0), 16777216)
>>> hex(annotations.compiler_flag)
'0x100'

--
nosy: +eric.araujo

___
Python tracker 

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



[issue45823] phyton stopped working

2021-11-19 Thread Éric Araujo

Éric Araujo  added the comment:

Please give a more detailed answer: what is your OS version, what’s the version 
of python and how did you install it, what is your IDE or how do you run your 
python script, copy full error messages from event viewer.  It would also be 
useful if you attached your script!

--
nosy: +eric.araujo

___
Python tracker 

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



[issue45844] Dead link 'consolelib' in faq/library

2021-11-19 Thread Éric Araujo

Éric Araujo  added the comment:

Archived version: 
https://web.archive.org/web/20191202041245/http://effbot.org/zone/console-index.htm

The whole FAQ entry should be reviewed for relevance.
Is it true that curses is not built by default?
Should third-party curses modules be recommended?
How do people develop text user interfaces on windows these days?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27877
pull_request: https://github.com/python/cpython/pull/29644

___
Python tracker 

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



[issue28445] Wrong documentation for GzipFile.peek

2021-11-19 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy, newcomer friendly
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-19 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset c8c21bdd199f9feb75fc6cdb398a686dc133b99f by Christian Heimes in 
branch 'main':
bpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642)
https://github.com/python/cpython/commit/c8c21bdd199f9feb75fc6cdb398a686dc133b99f


--

___
Python tracker 

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



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset bbe3c57c865439f2194eb760a4362b5506d221a7 by Miss Islington (bot) 
in branch '3.10':
bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) 
(GH-29643)
https://github.com/python/cpython/commit/bbe3c57c865439f2194eb760a4362b5506d221a7


--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-19 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue45848] Pegen's nice error reporting crashes with non-UTF-8 files

2021-11-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
type:  -> crash

___
Python tracker 

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



[issue45848] Pegen's nice error reporting crashes with non-UTF-8 files

2021-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue45837] Fix turtle deprecations

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Hugo! ✨ 🍰 ✨

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



[issue45837] Fix turtle deprecations

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 9501e8d3a339c5a9217b7d90275d2a8c8cba5d13 by Hugo van Kemenade in 
branch '3.10':
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29629)
https://github.com/python/cpython/commit/9501e8d3a339c5a9217b7d90275d2a8c8cba5d13


--

___
Python tracker 

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



[issue45837] Fix turtle deprecations

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e8d41eea7a73a91cf1da2a4e60245902226bc599 by Hugo van Kemenade in 
branch '3.9':
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630)
https://github.com/python/cpython/commit/e8d41eea7a73a91cf1da2a4e60245902226bc599


--

___
Python tracker 

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



[issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

2021-11-19 Thread neonene


neonene  added the comment:

In the eval-loop of PR29565, inlining seems to be enabled within about 70 
op-brahches, trained with 44 tests.

log & source: ceval_PR29565_split_func.c  (not for performance)

--
Added file: https://bugs.python.org/file50452/ceval_PR29565_split_func.c

___
Python tracker 

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



[issue45838] Incorrect line numbers in GDB Python backtraces [3.9]

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Sam! ✨ 🍰 ✨

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



[issue45838] Incorrect line numbers in GDB Python backtraces [3.9]

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2a32dbf110cf80ec9a00290ea6bc84f409948cb0 by Sam Gross in branch 
'3.9':
[3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628)
https://github.com/python/cpython/commit/2a32dbf110cf80ec9a00290ea6bc84f409948cb0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks! ✨ 🍰 ✨

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



[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 4296396db017d782d3aa16100b366748c9ea4a04 by Mark Shannon in 
branch '3.9':
[3.9] bpo-45806: Fix recovery from stack overflow for 3.9. Again. (GH-29640)
https://github.com/python/cpython/commit/4296396db017d782d3aa16100b366748c9ea4a04


--

___
Python tracker 

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



[issue45507] Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for noticing, Ruben! ✨ 🍰 ✨

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



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27875
pull_request: https://github.com/python/cpython/pull/29643

___
Python tracker 

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



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e34809e1c2a09478f4e0651d551c9c12d3c556ab by Raymond Hettinger in 
branch 'main':
bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634)
https://github.com/python/cpython/commit/e34809e1c2a09478f4e0651d551c9c12d3c556ab


--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-11-19 Thread Alex Waygood


Alex Waygood  added the comment:

It makes me sad that the stdlib will no longer provide a way to compose 
classmethods with other descriptors. However, I agree that deprecating 
classmethod  chaining is probably the correct course of action, given the 
complications this feature has caused, and the backwards-compatibility issues 
it raises.

This is probably a conversation for another BPO issue or the python-ideas 
mailing list, but I hope some consideration can be given in the future as to 
whether a new classmethod-like feature could possibly be added to functools 
that would enable this kind of decorator chaining without the same 
code-breakage concerns that this feature has had.

--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-11-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I propose deprecating classmethod chaining.  It has become clear that it 
doesn't really do what people wanted and can't easily be made to work.

By even suggesting that some stateful decorators are composable, we've ventured 
onto thin ice.  Wrapping property in a classmethod doesn't produce something 
that behaves like a real property.  Mixing staticmethod and property doesn't 
work at all.  Putting abstractmethod in the mix doesn't work well either.  The 
ecosystem of code inspection tools, like help() in this issue, is wholly 
unprepared for recognizing and working around these combinations.  The latest 
"fix" for classmethod chaining looks weird and worriesome as well:  
self.f.__get__(cls, cls).

Classmethod chaining is relatively new, so we will affect very little code by 
deprecating it.  Any of the possible use cases can be served in other ways like 
the wrapt package or by explicit code in __getattribute__.

--
nosy: +lukasz.langa, pablogsal

___
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

2021-11-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
superseder:  -> Cannot Recover From StackOverflow in 3.9 Tests

___
Python tracker 

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



[issue43185] AssertRaises() causes core dump in handling recursion

2021-11-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> Cannot Recover From StackOverflow in 3.9 Tests

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d32316a2aacc3b3c4f6f56f96edb09a4437c8bdb by Julien Palard in 
branch 'main':
bpo-42238: [doc]: Hide false positive in make suspicious. (GH-29636)
https://github.com/python/cpython/commit/d32316a2aacc3b3c4f6f56f96edb09a4437c8bdb


--

___
Python tracker 

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



[issue45507] Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility

2021-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0ff3d95b9875805ac03aeffc37ae4458ce3b8ac0 by Ruben Vorderman in 
branch 'main':
bpo-45507: EOFErrors should be thrown for truncated gzip members (GH-29029)
https://github.com/python/cpython/commit/0ff3d95b9875805ac03aeffc37ae4458ce3b8ac0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45848] Pegen's nice error reporting crashes with non-UTF-8 files

2021-11-19 Thread Petr Viktorin


Change by Petr Viktorin :


--
title: Pegen's nice error reporting crashes non-UTF-8 files -> Pegen's nice 
error reporting crashes with non-UTF-8 files

___
Python tracker 

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



[issue45848] Pegen's nice error reporting crashes non-UTF-8 files

2021-11-19 Thread Petr Viktorin


New submission from Petr Viktorin :

Parsing a script with non-UTF-8 encoding and a missing close parenthesis, like 
a file with the following 2 lines:

# encoding: ascii
(

... crashes with:

python: Parser/pegen.c:408: get_error_line: Assertion `p->tok->fp == NULL || 
p->tok->fp == stdin' failed.
Aborted (core dumped)

--
components: Parser
files: missing_paren_ascii.py
messages: 406602
nosy: lys.nikolaou, pablogsal, petr.viktorin
priority: normal
severity: normal
status: open
title: Pegen's nice error reporting crashes non-UTF-8 files
Added file: https://bugs.python.org/file50451/missing_paren_ascii.py

___
Python tracker 

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



[issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10

2021-11-19 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained. Please create a new issue if you have problems 
with a current version (3.9+).

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



[issue29010] Incorrect description about scope related with inheritance

2021-11-19 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy, newcomer friendly
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-11-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also see:  https://bugs.python.org/issue42073

The classmethod pass through broke some existing code and the "fix" for it 
looks dubious:

if hasattr(type(self.f), '__get__'):
return self.f.__get__(cls, cls)

--

___
Python tracker 

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



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2021-11-19 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2021-11-19 Thread Christian Heimes


Christian Heimes  added the comment:

Nope, we don't have to support this edge case.

--
nosy: +christian.heimes
resolution:  -> rejected
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



[issue10202] ftplib doesn't check close status after sending file

2021-11-19 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found

2021-11-19 Thread Irit Katriel


Irit Katriel  added the comment:

>  when you run the test suite in a chroot (to do "pure" builds) or in a 
> network sandbox (for other functions)


Do we support that?

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-19 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-19 Thread Christian Heimes


New submission from Christian Heimes :

bpo-45573 added the PY_STDLIB_MOD() autoconf macro, Modules/Setup.stdlib.in 
template, and setup.py helper method addext().

The macro sets up

* MODULE_{NAME}_TRUE/FALSE conditional
* MODULE_{NAME} variable with values yes, disabled, missing, or n/a
* MODULE_{NAME}_CFLAGS
* MODULE_{NAME}_LDFLAGS

Additionally there is a MODULE_{NAME}_DEPS variable with dependency information.

The Modules/Setup.stdlib.in template and addext() method consume the variables 
and set up extension compilation and linking. There is no need to look for 
headers or libraries in setup.py any more.

Let's port all modules to the new approach.

--
components: Build
messages: 406597
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Port module setup to PY_STDLIB_MOD() macro and addext()
type: enhancement
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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread JMcB


Change by JMcB :


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

___
Python tracker 

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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-19 Thread JMcB

New submission from JMcB :

At 
https://docs.python.org/3/faq/programming.html#how-can-i-have-modules-that-mutually-import-each-other
 it says:
van Rossum doesn’t like this approach much because the imports appear in a 
strange place, but it does work.
The V should be capitalised.
References:
https://gvanrossum.github.io/
https://en.wikipedia.org/wiki/Guido_van_Rossum#Life_and_education

--
assignee: docs@python
components: Documentation
messages: 406596
nosy: JMcB17, docs@python
priority: normal
severity: normal
status: open
title: Incorrect name capitalisation in faq/programming
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library

2021-11-19 Thread JMcB


New submission from JMcB :

At https://docs.python.org/3/faq/library.html#how-do-i-program-using-threads it 
says:
Aahz has a set of slides from his threading tutorial that are helpful; see 
http://www.pythoncraft.com/OSCON2001/.
This link is dead.

--
assignee: docs@python
components: Documentation
messages: 406595
nosy: JMcB17, docs@python
priority: normal
severity: normal
status: open
title: Dead link 'pythoncraft.com/OSCON2001'  in faq/library
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue45844] Dead link 'consolelib' in faq/library

2021-11-19 Thread JMcB


New submission from JMcB :

At 
https://docs.python.org/3/faq/library.html#is-there-a-curses-termcap-package-for-python
 it says:
For Windows: use the consolelib module.
And links to:
http://effbot.org/zone/console-index.htm
This link is dead. Also, a quick google search for consolelib doesn't yield any 
good results, and I've never heard of it myself.

--
assignee: docs@python
components: Documentation
messages: 406594
nosy: JMcB17, docs@python
priority: normal
severity: normal
status: open
title: Dead link 'consolelib' in faq/library
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2021-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 24, in 
read32
return struct.unpack("
Date:   Tue Jan 22 17:01:59 2013 +0200

Issue #1159051: GzipFile now raises EOFError when reading a corrupted file
with truncated header or footer.
Added tests for reading truncated gzip and bzip2 files.

---


  File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line 
2307, in next
self.fileobj.seek(self.offset)
  File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 382, in 
seek
self.read(1024)

Moreover, gzip.GzipFile().seek() no longer calls self.read(1024):

commit 2dbc6e6bce0a29757acddd8000d55f7c844295a2
Author: Antoine Pitrou 
Date:   Sat Apr 11 00:31:01 2015 +0200

Issue #23529: Limit the size of decompressed data when reading from
GzipFile, BZ2File or LZMAFile.  This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).

Patch by Martin Panter and Nikolaus Rath.

IMO it's no longer possible to reproduce the gzip.error on 
gzip.GzipFile.seek(), so I close the issue as out of date.

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



  1   2   >