[issue32536] ast and tokenize disagree about line number

2021-06-18 Thread Arjun


Arjun  added the comment:

Well actually, it depends on the platform?

--

___
Python tracker 

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



[issue43329] Multiprocessing Manager Client Not Reconnecting

2021-06-18 Thread Ethan Furman


Ethan Furman  added the comment:

Here is the test, reduced and in a single script:

--- 8< 
import multiprocessing.managers, os, sys, time

if __name__ == '__main__':
address = ("127.0.0.1", 54321)

class TestManager(multiprocessing.managers.BaseManager):
pass

if sys.argv[1] == 'server':

class TestClass(object):
def test_method(self):
print("In test_method")
return "TEST"

TestManager.register("Test", TestClass)
manager = TestManager(address = address, authkey = 
"1234".encode("utf-8"))
print('waiting...')
manager.get_server().serve_forever()

else:

TestManager.register("Test")

manager = TestManager(address = address, authkey = 
"1234".encode("utf-8"))
manager.connect()
test_class = manager.Test()

print(test_class.test_method())

print("Kill and restart the server and press return")
sys.stdin.readline()

try:
print(test_class.test_method())
except EOFError:
print('EOF received\n')

# reestablish connection
manager.connect()
test_class = manager.Test()

# trigger error
print(test_class.test_method())
--- 8< 

Running it in two terminals gives (only showing client side):

---
$ ./python ~/test_mp client
TEST
Kill and restart the server and press return
# hit 
EOF received

Traceback (most recent call last):
  File "/home/ethan/test_mp", line 45, in 
print(test_class.test_method())
  File "", line 2, in test_method
  File "/source/virtualenv/lib/python3.9/multiprocessing/managers.py", line 
808, in _callmethod
conn.send((self._id, methodname, args, kwds))
  File "/source/virtualenv/lib/python3.9/multiprocessing/connection.py", line 
211, in send
self._send_bytes(_ForkingPickler.dumps(obj))
  File "/source/virtualenv/lib/python3.9/multiprocessing/connection.py", line 
416, in _send_bytes
self._send(header + buf)
  File "/source/virtualenv/lib/python3.9/multiprocessing/connection.py", line 
373, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
---

The problem appears to be that the call to `manager.connect()` after the EOF is 
not getting a new connection, but is reusing the old one (?).  This is as far 
as I can take this; hopefully somebody with more multiprocessing/socket skills 
can take it from here.

--
nosy: +davin, pitrou, serhiy.storchaka
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-18 Thread Russell Keith-Magee


New submission from Russell Keith-Magee :

BPO-41486 added _BlocksOutputBuffer for the bz2, lzma and zlib module.

Part of this patch included a new header file, pycore_blocks_output_buffer.h, 
which defines a BUFFER_BLOCK_SIZE constant.

If two or more of the bz2, lzma or zlib modules are compiled as statically 
linked modules (i.e., added to Lib/Setup.local), this results in a duplicate 
symbol error when the Python executable is linked:

```
duplicate symbol '_BUFFER_BLOCK_SIZE' in:
libpython3.10.a(_bz2module.o)
libpython3.10.a(_lzmamodule.o)
duplicate symbol '_BUFFER_BLOCK_SIZE' in:
libpython3.10.a(_bz2module.o)
libpython3.10.a(zlibmodule.o)
```

--
components: Extension Modules
messages: 396114
nosy: freakboy3742
priority: normal
severity: normal
status: open
title: Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple 
modules
type: compile error
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue32536] ast and tokenize disagree about line number

2021-06-18 Thread Arjun


Arjun  added the comment:

the line numbers are different for me too (MacOS).

it seems that tokenize module is off by +1 line

--
nosy: +CCLDArjun

___
Python tracker 

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



[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2021-06-18 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



[issue16959] rlcompleter doesn't work if __main__ can't be imported

2021-06-18 Thread Aaron Meurer


Aaron Meurer  added the comment:

A quick glance at the source shows that it still imports __main__ at the 
top-level. I have no idea how legitimate it is that the App Engine (used to?) 
makes it so that __main__ can't be imported.

--
nosy: +asmeurer

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-06-18 Thread Anthony Sottile


Anthony Sottile  added the comment:

here's the traceback pytest is trying to display and crashing:

```
Traceback (most recent call last):
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/runner.py", 
line 311, in from_call
result: Optional[TResult] = func()
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/runner.py", 
line 341, in 
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/python.py", 
line 503, in collect
self._inject_setup_module_fixture()
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/python.py", 
line 516, in _inject_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/python.py", 
line 291, in obj
self._obj = obj = self._getobj()
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/python.py", 
line 500, in _getobj
return self._importtestmodule()
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/python.py", 
line 578, in _importtestmodule
mod = import_path(self.fspath, mode=importmode)
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/pathlib.py", 
line 524, in import_path
importlib.import_module(module_name)
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/__init__.py", 
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1050, in _gcd_import
  File "", line 1027, in _find_and_load
  File "", line 1006, in _find_and_load_unlocked
  File "", line 688, in _load_unlocked
  File 
"/tmp/rinohtype/venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py",
 line 170, in exec_module
exec(co, module.__dict__)
  File "/tmp/rinohtype/tests/test_attribute.py", line 11, in 
from rinoh.attribute import Attribute, Bool
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/__init__.py", 
line 41, in 
from . import resource
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/resource.py", 
line 205, in 
from .template import DocumentTemplate
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/template.py", 
line 42, in 
from .stylesheets import sphinx
  File 
"/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/stylesheets/__init__.py",
 line 42, in 
.format(stylesheet.description, stylesheet))
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/style.py", line 
670, in __str__
for name, entry_point in self.installed_resources:
  File "/tmp/rinohtype/venv/lib/python3.10/site-packages/rinoh/resource.py", 
line 54, in installed_resources
for entry_point in ilm.entry_points()[cls.entry_point_group]:
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/__init__.py",
 line 979, in entry_points
return SelectableGroups.load(eps).select(**params)
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/__init__.py",
 line 437, in load
ordered = sorted(eps, key=by_group)
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/__init__.py",
 line -1, in 
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/_itertools.py",
 line 16, in unique_everseen
k = key(element)
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/__init__.py",
 line 600, in _normalized_name
return Prepared.normalize(self.name)
  File 
"/home/asottile/workspace/cpython/prefix/lib/python3.10/importlib/metadata/__init__.py",
 line 841, in normalize
return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "/home/asottile/workspace/cpython/prefix/lib/python3.10/re.py", line 
187, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
```

--

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-06-18 Thread Anthony Sottile


Anthony Sottile  added the comment:

this appears to have regressed in 3.10 as well according to some reports on 
pytest: https://github.com/pytest-dev/pytest/pull/8227#issuecomment-864327090

--
nosy: +Anthony Sottile, pablogsal
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



[issue6871] decimal.py: more format issues

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

Issue #2 still exists in 3.11:

>>> format(float(123), "00")
'123.0'
>>> format(Decimal(123), "00")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid format string

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



[issue23565] local_clear walks the list of threads without holding head_lock.

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +pitrou, vstinner

___
Python tracker 

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



[issue16959] rlcompleter doesn't work if __main__ can't be imported

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

Your traceback indicates you had this problem on Python 2.7. Are you still 
seeing it on a current version?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue24888] FileNotFoundException raised by subprocess.call

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The FileNotFoundException exception is coming from the Popen call, and the docs 
for subprocess.check_call already mention that it delegates to Popen.

There are quite a few different exceptions that Popen could raise, so I think 
David's general comment is valid, it would not make sense to mention just this 
one, or to try and list all of them.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-18 Thread Matej Cepl


Matej Cepl  added the comment:

Actually, for 3.8.10 I had to add one more keyword which confused Sphinx: 
default.

--
nosy: +mcepl
Added file: 
https://bugs.python.org/file50117/bpo44426-complex-keyword-sphinx.patch

___
Python tracker 

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



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2021-06-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The 2014 patch to our copies of libffi eefd521f19ce included patches from 2009 
forward, including at least one about long double alignment on sparc.  If there 
are any problems now on current Solaris, they are likely to be different, and 
someone will find and report them.

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



[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy -patch
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue18961] Non-UTF8 encoding line

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

I've reproduced the same in 3.11:

> .\python.bat nonutf8_coding_line.py
Running Release|x64 interpreter...
> .\python.bat -m tokenize nonutf8_coding_line.py
Running Release|x64 interpreter...
nonutf8_coding_line.py: error: invalid or missing encoding declaration for 
'nonutf8_coding_line.py'

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27752] [doc] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator.

2021-06-18 Thread Jack DeVries


Jack DeVries  added the comment:

If you need semicolon delimiters, can't you just pass ``delimiter=';'`` to the 
reader or writer? I don't think there's a need for a separate dialect class for 
that, since dialect classes should only provide a baseline for the most broad 
use cases. Users have plenty of options for extending or customizing behavior 
without adding more dialect classes.

I also think the docs around dialects are confusing. I remember being confused 
by them when I was learning! I made quite a few changes to try to add clarity 
around dialects to the documentation. Let me know if anybody has feedback!

--

___
Python tracker 

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



[issue44413] OverflowError: mktime argument out of range after 2019

2021-06-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

An exception is not a 'crash', as defined for this tracker.  3.8 only gets 
security fixes.  A 3.9 or 3.10 test is needed and Windows does not have pytz.

--
nosy: +belopolsky, lemburg, p-ganssle, terry.reedy
type: crash -> behavior

___
Python tracker 

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



[issue27752] [doc] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator.

2021-06-18 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 3.0 -> 4.0
pull_requests: +25378
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26795

___
Python tracker 

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



[issue44446] linecache.getline TypeError when formatting tracebacks in stacks containing an async list comprehension

2021-06-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue44446] linecache.getline TypeError when formatting tracebacks in stacks containing an async list comprehension

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, can you take a look at this?

--
nosy: +pablogsal
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-18 Thread Brandt Bucher


Brandt Bucher  added the comment:

Yep, it's intentional.

And yep, I like the new error message better. :)

--

___
Python tracker 

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



[issue30379] multiprocessing Array create for ctypes.c_char, TypeError unless 1 char string arg used

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

I'm assuming Davin's alternative solved your problem. If not, please check that 
you're still seeing it version 3.9+ and create a new issue.

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



[issue44457] Finish format() change started in issue43945

2021-06-18 Thread Ethan Furman


New submission from Ethan Furman :

Finish the work started in issue43945 -- in 3.12 `format()` now uses the enum 
member itself instead of its `value`; e.g.:

>>> class Color(int, Enum):
... RED = 1

>>> f"{Color.RED}"
'RED'
>>> f"{Color.RED:d}"
'1'

--
assignee: ethan.furman
messages: 396098
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: Finish format() change started in issue43945
type: behavior

___
Python tracker 

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



[issue44457] Finish format() change started in issue43945

2021-06-18 Thread Ethan Furman


Change by Ethan Furman :


--
status: open -> pending

___
Python tracker 

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



[issue37832] Python requires /dev/urandom on HURD: _Py_HashRandomization_Init: failed to get random numbers

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43945] [Enum] standardize format() behavior

2021-06-18 Thread Ethan Furman


Change by Ethan Furman :


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



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The patch doesn't look anything like the current code. Is this issue still 
relevant?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue43945] [Enum] standardize format() behavior

2021-06-18 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 1b4addf3cbd0ef424939681ee67c802328d567ba by Ethan Furman in 
branch '3.10':
[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752) 
https://github.com/python/cpython/commit/1b4addf3cbd0ef424939681ee67c802328d567ba


--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The docstring for .after says the 2nd argument must be a 'function'.  Whether 
this issue is a bugfix or enhancement request depends whether one interprets 
'function' as 'callable' or something narrower that only includes objects that 
necessarily have __name__ attributes.  The latter would exclude partials and 
instances of user classes with __call__ methods.

While a one-time-use partial as in the example is superfluous, I think other 
uses and parameterized callback classes should be supported.  So I agree with 
changing the tkinter code rather than qualifying 'function' with 'has a 
.__name__ attribute'.  I think 'type(func).__name__' should be safe.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue43329] Multiprocessing Manager Client Not Reconnecting

2021-06-18 Thread Michael L. Boom


Michael L. Boom  added the comment:

I don't think I even got this working on the small scale.  The unit test in the 
bug report is about as small as it gets and it doesn't work.  The issue still 
exists in Python 3.9.5.

--

___
Python tracker 

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



[issue43329] Multiprocessing Manager Client Not Reconnecting

2021-06-18 Thread Ethan Furman


Ethan Furman  added the comment:

Michael Boon wrote:
---
> The [above] issue is pretty serious and it is preventing me from using a
> system I wrote on a larger scale.

That statement suggests you were able to get this working on a small scale -- 
is that correct?  What does the working small-scale code look like?

--
nosy: +ethan.furman

___
Python tracker 

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



[issue44368] Invalid mapping patterns give confusing SyntaxErrors

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a8c418d5ed1103106db547aa576b82c6031985a4 by Pablo Galindo in 
branch '3.10':
[3.10] bpo-44368: Improve syntax errors with invalid as pattern targets 
(GH-26632) (GH-26792)
https://github.com/python/cpython/commit/a8c418d5ed1103106db547aa576b82c6031985a4


--

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

If this is supposed to mirror function calls, maybe the error should be::

>>> match a:
...case A(foo=3, t):
  File "", line 2
case A(foo=3, t):
  ^
SyntaxError: positional patterns follow keyword patterns

--

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Btw, I noticed this is allowed:

>>> match x:
...case A(foo, t=3):
......
...

but this is not:

>>> match x:
...case A(foo=3, t):

Is that on pourpose?

--

___
Python tracker 

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



[issue20513] Python 2.7. Script interruption on logoff from 0 session under Win2003 and earlier

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The patch doesn't look anything like the current code. Is this issue still 
relevant?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-18 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

This got me confused for a sec when doing some live demo:

>>> match x:
...case A(y=1, foo):
  File "", line 2
case A(y=1, foo):
   ^
SyntaxError: invalid syntax

I propose to improve this to:

>>> match x:
...case A(y=1, foo):
  File "", line 2
case A(y=1, foo):
^^^
SyntaxError: cannot mix keyword patterns and positional patterns

--
messages: 396088
nosy: brandtbucher, pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax error for mixing keyword/positional in max patterns

___
Python tracker 

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



[issue18182] xml.dom.createElement() does not take implicit namespaces into account

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


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



[issue44455] compileall should exit nonzero for nonexistent directories

2021-06-18 Thread Aaron Meurer


New submission from Aaron Meurer :

$ ./python.exe -m compileall doesntexist
Listing 'doesntexist'...
Can't list 'doesntexist'
$ echo $?
0

It's standard for a command line tool that processes files to exit nonzero when 
given a directory that doesn't exist.

--
messages: 396087
nosy: asmeurer
priority: normal
severity: normal
status: open
title: compileall should exit nonzero for nonexistent directories

___
Python tracker 

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



[issue44368] Invalid mapping patterns give confusing SyntaxErrors

2021-06-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25376
pull_request: https://github.com/python/cpython/pull/26792

___
Python tracker 

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



[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The discussion is leading to yes, but the patch needs some more work on the 
test.

(The link was pointing at me being past my bedtime when I pasted it :-)

--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread miss-islington


miss-islington  added the comment:


New changeset bf55a799e0c19285b094d71f794c301c1afaa28d by Miss Islington (bot) 
in branch '3.10':
bpo-44451: Reset DeprecationWarning filters in 
test_importlib.test_entry_points_by_index (GH-26784)
https://github.com/python/cpython/commit/bf55a799e0c19285b094d71f794c301c1afaa28d


--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Big thanks Miro for the detailed work on this matter.

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



[issue43945] [Enum] standardize format() behavior

2021-06-18 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +25375
pull_request: https://github.com/python/cpython/pull/26791

___
Python tracker 

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



[issue43945] [Enum] standardize format() behavior

2021-06-18 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset f60b07ab6c943fce084772c3c7731ab3bbd213ff by Ethan Furman in 
branch 'main':
bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)
https://github.com/python/cpython/commit/f60b07ab6c943fce084772c3c7731ab3bbd213ff


--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +25374
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26790

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Jason R. Coombs

Jason R. Coombs  added the comment:


New changeset df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6 by Miro Hrončok in 
branch 'main':
bpo-44451: Reset DeprecationWarning filters in 
test_importlib.test_entry_points_by_index (GH-26784)
https://github.com/python/cpython/commit/df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6


--

___
Python tracker 

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



[issue44310] Document that lru_cache uses hard references

2021-06-18 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +25373
pull_request: https://github.com/python/cpython/pull/26789

___
Python tracker 

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



[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel
nosy_count: 4.0 -> 5.0
pull_requests: +25372
pull_request: https://github.com/python/cpython/pull/26788

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-18 Thread HEY GOOGLE


HEY GOOGLE  added the comment:

Addes aggreement

--
components: +Build
nosy: +hectorizdaone
type:  -> security

___
Python tracker 

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



[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2021-06-18 Thread Brett Cannon


Brett Cannon  added the comment:

No idea, I was just trying to understand what the link was meant to point at. :)

--

___
Python tracker 

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



[issue44447] Syntax Error not as detailed as shown

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Indeed, as Andre mentions your example is different because in you case the 
call is interpreted as a generator comprehension, not as a function call.

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



[issue40412] [subinterpreters] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue35714] Document that the null character '\0' terminates a struct format spec

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

This seems resolved, can it be closed?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44454] Spam

2021-06-18 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue44454] Spam

2021-06-18 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -fixofflineprinters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: How to find canon printer default wifi password -> Spam

___
Python tracker 

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



[issue44454] How to find canon printer default wifi password

2021-06-18 Thread fix offline printers


New submission from fix offline printers :

You cannot use the Canon Printer for printing purpose until and unless you do 
not have Canon Printer Password. However, Canon Printer password 
troubleshooting can be done in short span of time by following technical steps. 
Therefore, Canon Printer Default Password setup steps mentioned below and if 
you cannot fix it yourself then feel free to ask for help through our chat 
window and get help from experts.
https://fixofflineprinters.com/how-to-find-canon-printer-default-wifi-password/

--
messages: 396077
nosy: fixofflineprinters
priority: normal
severity: normal
status: open
title: How to find canon printer default wifi password

___
Python tracker 

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



[issue44447] Syntax Error not as detailed as shown

2021-06-18 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
components: +Parser -Regular Expressions
nosy: +lys.nikolaou, pablogsal
type: performance -> behavior

___
Python tracker 

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



[issue31743] Proportional Width Font on Generated Python Docs PDFs and in mobile browser

2021-06-18 Thread Paul Du Bois


Change by Paul Du Bois :


--
title: Proportional Width Font on Generated Python Docs PDFs -> Proportional 
Width Font on Generated Python Docs PDFs and in mobile browser

___
Python tracker 

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



[issue31743] Proportional Width Font on Generated Python Docs PDFs

2021-06-18 Thread Paul Du Bois


Paul Du Bois  added the comment:

For what it's worth, I also see proportional-width fonts when looking at the 
docs in Android Chrome. For example, the binary tree in 
https://docs.python.org/3/library/heapq.html is mangled.

--
nosy: +paul.dubois

___
Python tracker 

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



[issue34371] File reading gets stuck if you read at eof on macos

2021-06-18 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



[issue33367] Multiprocessing Pool workers initiated with maxtasksperchild do not execute when sharing logging

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as this is a Python 2.7-only issue and 2.7 is no longer 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



[issue31398] TypeError: gdbm key must be string, not unicode

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


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



[issue30563] [Cygwin] multiprocessing module with pool object issue

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


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



[issue31398] TypeError: gdbm key must be string, not unicode

2021-06-18 Thread STINNER Victor


STINNER Victor  added the comment:

IMO you can close it immediately. Fixing Python 2.7 is not going to happen ever.

--
status: pending -> open

___
Python tracker 

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



[issue28877] Cannot compile _ssl.o on HP-UX

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2.7 is past EOL. Please create a new issue if you are still having this 
problem on 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



[issue27752] [doc] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator.

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: CSV DictReader default dialect name 'excel' is misleading, as MS Excel 
doesn't actually use ',' as a separator. -> [doc] CSV DictReader default 
dialect name 'excel' is misleading, as MS Excel doesn't actually use ',' as a 
separator.
versions: +Python 3.11 -Python 2.7

___
Python tracker 

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



[issue31398] TypeError: gdbm key must be string, not unicode

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

This seems like a python 2-only issue, if nobody objects I will close it in a 
couple of weeks.

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue34773] sqlite3 module inconsistently returning only some rows from a table

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The python bug tracker is not the right place to ask for help debugging your 
application, it's for reporting bugs in python.

If you have evidence of an issue in python, please create a new issue with full 
reproduction instructions so that we can look into it.

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



[issue28412] os.path.splitdrive documentation out of date

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

This was updated in the Python 3 docs:
https://docs.python.org/3/library/os.path.html#os.path.splitdrive

The 2.7 docs are no longer 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



[issue32581] A bug of the write funtion of ConfigParser.py

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

I trued this on 3.11/Windows and 3.10/Linux and could not reproduce the issue. 
The Password remained "" in both cases.

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



[issue32536] ast and tokenize disagree about line number

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 2.7

___
Python tracker 

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



[issue26608] RLock undocumented behavior in case of multiple acquire

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The RLock documentation is a bit more verbose than it needs to be (for 
instance, there is no reason to specify the "no args" case separately from the 
"blocking=True" case (since True is the default value of blocking).

The issue of balancing acquire/release calls is mentioned as Josh says, but 
could perhaps be stated more simply as well.

--
keywords: +easy
nosy: +iritkatriel
versions: +Python 3.11 -Python 2.7

___
Python tracker 

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



[issue27824] update ConfigParser docs regarding in-line comments

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

This is explained in the example now, just above
https://docs.python.org/3.10/library/configparser.html#interpolation-of-values


It was changed here:
https://github.com/python/cpython/commit/b25a791802a1915097e02bfba04e27a41ae55ebf

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2021-06-18 Thread Jack DeVries


Jack DeVries  added the comment:

Alternatively, my latest PR implements what @ronaldoussoren suggested: capping 
OS X memory allocations at 4TB.

--

___
Python tracker 

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



[issue26236] urllib2 initiate irregular call to gethostbyaddr

2021-06-18 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 2.7

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2021-06-18 Thread Jack DeVries


Change by Jack DeVries :


--
pull_requests: +25371
pull_request: https://github.com/python/cpython/pull/26786

___
Python tracker 

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



[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-06-18 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-06-18 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

https://docs.python.org/3/library/sysconfig.html#sysconfig.get_path says it 
returns None if the name is not found, but the implementation 
(https://github.com/python/cpython/blame/main/Lib/sysconfig.py) uses [] and 
will raise KeyError instead.

Noticed by @srittau in https://github.com/python/typeshed/pull/5659. I will 
submit a PR.

--
assignee: Jelle Zijlstra
components: Documentation
messages: 396065
nosy: Jelle Zijlstra
priority: normal
severity: normal
status: open
title: Documented return type of sysconfig.get_path() is wrong
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue26231] HTTPResponse.close() should consume all remaining data in body if any

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

> If close() does not consume the remaining data, the user would have to do it 
> after invoking close(), regardless of how large the data is.


Martin's point was that you can abandon the connection and create a new one if 
you choose not to consume all the data.

>  But how do do it, the HTTPResponse has been closed. 

Right, if you want to consume the data you should do it before calling close().

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

Submitted to both.

https://github.com/python/cpython/pull/26784
https://github.com/python/importlib_metadata/pull/325

--
components: +Tests -Library (Lib)

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Other tests reset the filters? Good observation. I’d missed that detail. If 
it’s easier to submit a PR to importlib_metadata, feel free to do that as I’ll 
want the change in both places.

--
components: +Library (Lib) -Tests
stage: patch review -> 

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Change by Miro Hrončok :


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

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Change by Miro Hrončok :


--
components: +Tests -Library (Lib)

___
Python tracker 

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



[issue19402] AbstractBasicAuthHandler

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

I think Perry means HTTPBasicAuthHandler.http_error_401, which seems to still 
be missing a reset_retry_count() call.

https://github.com/python/cpython/blob/0982ded179f280176868c1c4eccf77bf70687816/Lib/urllib/request.py#L1050

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

Adding the reset to the context manager:

with warnings.catch_warnings(record=True) as caught:
warnings.resetwarnings()
eps[0]

Or even better explicitly:

with warnings.catch_warnings(record=True) as caught:
warnings.filterwarnings("default", category=DeprecationWarning)
eps[0]

Makes it pass and makes the tests framework happy. I still don't understand why 
it is filtered, but other tests in the file (e.g. 
test_entry_points_dict_construction) already o this, so I will submit a pull 
request.

--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

I've added warnings.resetwarnings() to the test. it makes it pass.

It says:


Warning -- warnings.filters was modified by test_importlib
  Before: (140568295281984, [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)], [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)])
  After:  (140568295281984, [('default', None, , 
'__main__', 0), ('ignore', None, , None, 0), 
('ignore', None, , None, 0), ('ignore', 
None, , None, 0), ('ignore', None, , None, 0)], []) 
test_importlib failed (env changed)

--

___
Python tracker 

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



[issue44452] Allow paths to be joined without worrying about a leading slash

2021-06-18 Thread Zbyszek Jędrzejewski-Szmek

New submission from Zbyszek Jędrzejewski-Szmek :

pathlib.Path.__truediv__(), i.e. pathlib.Path.joinpath() is surprising when the 
second argument starts with a slash.

>>> pathlib.Path('/foo') / '/bar'
>>> PosixPath('/bar')

I know that this follows the precedent set by os.path.join(), and
probably makes sense in some scenarios. But for the general operation
of "concatenating paths", it doesn't fit very well. In particular,
when concatenating multiple components this becomes even stranger:

>>> pathlib.Path('/var/tmp/instroot') / '/some/path' / '/suffix'
>>> PosixPath('/suffix')

In my particular use case, I'm concatenating some user specified paths
relative to some root. The paths may or may not be absolute.
 
To avoid this pitfall, something like this is necessary:

>>> pathlib.Path('/var/tmp/instroot') / p.lstrip('/') / q.lstrip('/')

Please provide a way to do this natively. I think it'd be nice to
use // or + for this:

>>> pathlib.Path('/var/tmp/instroot') // '/some/path' // '/suffix'
>>> PosixPath('/var/tmp/instroot/some/path/suffix')

--
components: Library (Lib)
messages: 396058
nosy: zbysz
priority: normal
severity: normal
status: open
title: Allow paths to be joined without worrying about a leading slash
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

I get the DeprecationWarning the tests assumes when not running via the test:

$ cat distinfo_pkg-1.0.0.dist-info/entry_points.txt 
[entries]
main = mod:main
ns:sub = mod:main

$ ./python
Python 3.11.0a0 (heads/main:0982ded179, Jun 18 2021, 14:14:16) [GCC 10.3.1 
20210422 (Red Hat 10.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> sys.path.insert(0, os.path.abspath('.'))
>>> from importlib.metadata import distribution
>>> distribution('distinfo-pkg')

>>> eps = distribution('distinfo-pkg').entry_points
>>> eps[0]
:1: DeprecationWarning: Accessing entry points by index is deprecated. 
Cast to tuple if needed.
EntryPoint(name='main', value='mod:main', group='entries')


Not sure why I don't get it in the test yet.

--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

The test_entry_points_by_index test also fails on Fedora. See issue44451.

--
nosy: +hroncok

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

Also reproducible without --enable-shared.

[cpython (main)]$ ./configure && make
[cpython (main)]$ ./python --version
Python 3.11.0a0

[cpython (main)]$ ./python -m test test_importlib
0:00:00 load avg: 5.40 Run tests sequentially
0:00:00 load avg: 5.40 [1/1] test_importlib
test test_importlib failed -- Traceback (most recent call last):
  File 
"/home/churchyard/Dokumenty/RedHat/cpython/Lib/test/test_importlib/test_metadata_api.py",
 line 145, in test_entry_points_by_index
expected = next(iter(caught))
StopIteration

test_importlib failed

== Tests result: FAILURE ==

1 test failed:
test_importlib

Total duration: 3.5 sec
Tests result: FAILURE

--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to have been reported also at 
https://bugs.python.org/issue44246#msg395202

--
nosy: +xtreak

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2021-06-18 Thread Jack DeVries


Jack DeVries  added the comment:

>From my pr, "This is a bandaid to help people save time debugging this 
>non-bug. I don't think this solution is very strong; I'm just hoping to move 
>the discussion forward on the bpo, and hoping for a hint on how to suppress 
>these warnings all together or come up with some other optimal solution.

I applied the function in test_decimal because that test consistently generates 
these malloc warnings on my system."

I'm still trying to find a true solution. Can anyone help to point me in a 
better direction?

--

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

Miro Hrončok  added the comment:

Also reproduced on the main branch.

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2021-06-18 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 4.0 -> 5.0
pull_requests: +25368
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26783

___
Python tracker 

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



[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

2021-06-18 Thread Miro Hrončok

New submission from Miro Hrončok :

Hello.

When we attempted to upgrade to Python 3.10.0b3 on Fedora 33 and 34, we see the 
following test failure:



==
ERROR: test_entry_points_by_index 
(test.test_importlib.test_metadata_api.APITests)
Prior versions of Distribution.entry_points would return a
--
Traceback (most recent call last):
  File 
"/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py",
 line 145, in test_entry_points_by_index
expected = next(iter(caught))
StopIteration
--
Ran 1402 tests in 2.125s
FAILED (errors=1, skipped=18, expected failures=1)


I've reproduced it without any Fedora's patches:

$ cd cpython
$ git switch -d v3.10.0b3  # or the tip of 3.10 today, 77eaf14d27

$ ./configure --enable-shared && make

$ LD_LIBRARY_PATH=. ./python -m test test_importlib
0:00:00 load avg: 13.59 Run tests sequentially
0:00:00 load avg: 13.59 [1/1] test_importlib
test test_importlib failed -- Traceback (most recent call last):
  File 
"/home/churchyard/Dokumenty/RedHat/cpython/Lib/test/test_importlib/test_metadata_api.py",
 line 145, in test_entry_points_by_index
expected = next(iter(caught))
StopIteration

test_importlib failed

== Tests result: FAILURE ==

1 test failed:
test_importlib

Total duration: 11.0 sec
Tests result: FAILURE

--
components: Library (Lib)
messages: 396051
nosy: hroncok, jaraco
priority: normal
severity: normal
status: open
title: test_entry_points_by_index 
(test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-18 Thread Mark Dickinson


Change by Mark Dickinson :


--
assignee: docs@python -> mark.dickinson

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-18 Thread Ned Batchelder


New submission from Ned Batchelder :

Here is a trace involving generator expressions.  Using 3.10.0b3 on Mac, there 
are "line" events within the expression.  Those events are missing on Windows.

--- 8< ---
import linecache, sys

def trace(frame, event, arg):
# The weird globals here is to avoid a NameError on shutdown...
if frame.f_code.co_filename == globals().get("__file__"):
lineno = frame.f_lineno
print("{} {}: {}".format(event[:4], lineno, linecache.getline(__file__, 
lineno).rstrip()))
return trace

def doit():
o = ((1,2), (3,4))
o = (a for a in o)
for tup in o:
x = tup[0]
y = tup[1]

print(sys.version)
sys.settrace(trace)
doit()
---

When run on Mac, it produces this output:


3.10.0b3 (default, Jun 18 2021, 06:43:38) [Clang 12.0.0 (clang-1200.0.32.29)]
call 10: def doit():
line 11: o = ((1,2), (3,4))
line 12: o = (a for a in o)
line 13: for tup in o:
call 12: o = (a for a in o)
line 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
line 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
retu 13: for tup in o:


When run on Windows, it produces this output:

3.10.0b3 (tags/v3.10.0b3:865714a, Jun 17 2021, 20:39:25) [MSC v.1929 64 bit 
(AMD64)]
call 10: def doit():
line 11: o = ((1,2), (3,4))
line 12: o = (a for a in o)
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
retu 13: for tup in o:

On Windows, the "line 12" events are missing.

--
components: Interpreter Core
keywords: 3.10regression
messages: 396050
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Generator expressions trace differently on Windows than on Mac
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



[issue25946] configure should pick /usr/bin/g++ automatically if present

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as 2.7 is past EOL and distutils is deprecated. Please create a new 
issue if you have a current problem with this.

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



  1   2   >