[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-09-29 Thread puddly


New submission from puddly :

The following code worked in 3.8.5 but does not in 3.8.6 due to the fix for 
#39587:

```
import enum


class MyInt(int):
def __new__(cls, value):
return super().__new__(cls, value)

class HexMixin:
def __repr__(self):
return hex(self)

class MyIntEnum(HexMixin, MyInt, enum.Enum):
pass


class Foo(MyIntEnum):
TEST = 1

assert isinstance(Foo.TEST, MyInt)
assert repr(Foo.TEST) == "0x1"
```


In 3.8.6, the `Foo` enum itself fails to be created because `HexMixin` is now 
considered the member type instead of `MyInt`:

```
Traceback (most recent call last):
  File "enum_test.py", line 18, in 
class Foo(MyIntEnum):
  File 
"/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py",
 line 215, in __new__
enum_member = __new__(enum_class)
TypeError: object.__new__(Foo) is not safe, use int.__new__()
```

--
components: Library (Lib)
messages: 377692
nosy: barry, eli.bendersky, ethan.furman, puddly
priority: normal
severity: normal
status: open
title: enum: Mixin and int base class regression in 3.8.6
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue12836] ctypes.cast() creates circular reference in original object

2020-09-29 Thread Eryk Sun


Change by Eryk Sun :


--
stage:  -> needs patch
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3

___
Python tracker 

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



[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2020-09-29 Thread Eryk Sun


Eryk Sun  added the comment:

> `data_as` method which has the desired behavior: "The returned 
> pointer will keep a reference to the array."

I don't think it's the desired behavior at all. data_as() sets an _arr 
attribute of which ctypes isn't aware. It should cast the address to the given 
type and manually set the array reference in the _objects dict, which ctypes 
will automatically carry forward in all instances of aggregate types (structs 
and arrays) that reference the numpy array. For example:

>>> p = a.ctypes.data_as(ptype)
>>> p._objects['1'] = a

Adding p to an array carries its _objects dict forward:

>>> ptarr = (ptype * 1)(p)
>>> ptarr._objects['0']['1'] is a
True

If the returned pointer is cast() again, then bpo-12836 is an issue. For 
example:

>>> p2 = ctypes.cast(p, ctypes.c_void_p)
>>> p._objects is p2._objects
True
>>> for k in p._objects:
... if p._objects[k] is p:
... print('circular reference')
... 
circular reference

That needs to be fixed. But relying on _arr instead of correctly integrating 
with ctypes isn't a good idea, IMO. Work around the actual bug instead of 
introducing behavior that risks crashing just for the sake of resolving an 
uncommon circular reference problem.

--

___
Python tracker 

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


Change by anthony shaw :


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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


anthony shaw  added the comment:

No, this is intentional. sorry. closing
https://github.com/python/cpython/blob/34cd3e9f6a87f9c50edac893b0d5ae46c4e48ee3/Doc/library/dis.rst#L1194

--

___
Python tracker 

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


anthony shaw  added the comment:

Or is this some sort of obscure month python reference!?

--

___
Python tracker 

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


New submission from anthony shaw :

I noticed that HAVE_ARGUMENT and STORE_NAME have the same value (90) in 
Include/opcode.h in both the source code and in the 2bd31b5f revision 
(3.9.0rc2).

This must be creating some weird bugs.

https://github.com/python/cpython/blob/582aaf19e8b94a70c1f96792197770d604ba0fdf/Include/opcode.h#L70-L71

--
components: Interpreter Core
messages: 377688
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: Duplicate Opcode value in master and 3.9rc2
type: compile error
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue41887] ast.literal_eval does not accept strings with leading whitespaces

2020-09-29 Thread Saiyang Gou


New submission from Saiyang Gou :

`ast.literal_eval` does not accept code with leading whitespaces, while `eval` 
accepts them, which is an inconsistency.

```
>>> import ast
>>> eval(' 1')
1
>>> ast.literal_eval(' 1')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
  File "/usr/local/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
  File "", line 1
1
IndentationError: unexpected indent
```

--
components: Library (Lib)
messages: 377687
nosy: gousaiyang
priority: normal
severity: normal
status: open
title: ast.literal_eval does not accept strings with leading whitespaces
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41870] Use PEP 590 vectorcall to speed up calls to bool()

2020-09-29 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +21486
pull_request: https://github.com/python/cpython/pull/22460

___
Python tracker 

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



[issue36424] Pickle fails on frozen dataclass that has slots

2020-09-29 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 6.0 -> 7.0
pull_requests: +21485
pull_request: https://github.com/python/cpython/pull/22459

___
Python tracker 

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



[issue41870] Use PEP 590 vectorcall to speed up calls to bool()

2020-09-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> You can put ok<0 test in the if (nargs) branch, to avoid the test when 
> nargs=0.
 
+1

--
nosy: +pablogsal

___
Python tracker 

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



[issue35103] format_exception() doesn't work with PyErr_Fetch

2020-09-29 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

> FWIW, I believe that you have to call `PyErr_NormalizeException` on the 
> values returned from `PyErr_Fetch`. It looks like this is working as expected.


Indeed that is the case, from the docs:

Under certain circumstances, the values returned by PyErr_Fetch() below can be 
“unnormalized”, meaning that *exc is a class object but *val is not an instance 
of the same class. This function can be used to instantiate the class in that 
case. If the values are already normalized, nothing happens. The delayed 
normalization is implemented to improve performance.

--
nosy: +pablogsal

___
Python tracker 

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



[issue35103] format_exception() doesn't work with PyErr_Fetch

2020-09-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Closing as not a bug, feel free to reopen if we are missing something here :)

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



[issue41826] test_peg_generator compilation warnings

2020-09-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue41886] PyType_Type is documented incorrectly

2020-09-29 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +21483
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22454

___
Python tracker 

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



[issue41886] PyType_Type is documented incorrectly

2020-09-29 Thread da-woods


New submission from da-woods :

In the documentation PyType_Type is listed as a "PyObject*" 
(https://docs.python.org/3/c-api/type.html#c.PyType_Type). This is misleading 
because it is both not a pointer and is a PyTypeObject.

Other type objects are documented as "PyTypeObject" (see unicode 
https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_Type as an arbitrary 
example) so I think the documentation is just inconsistent for PyType_Type 
alone.

--
assignee: docs@python
components: Documentation
messages: 377683
nosy: da-woods, docs@python
priority: normal
severity: normal
status: open
title: PyType_Type is documented incorrectly
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue41519] `pkgutil.get_data` causes future imports of children modules to fail.

2020-09-29 Thread Cory Nezin


Cory Nezin  added the comment:

Wow, I did not know about that (probably because I've been stuck with Python3.6 
for a while). Thank you!

--

___
Python tracker 

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



[issue41183] [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures

2020-09-29 Thread Larry Hastings


Larry Hastings  added the comment:

A day and a half to go!  Again, assuming that this won't be fixed and 3.5 will 
go EOL without supporting this year's Linux distro updates.

--

___
Python tracker 

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



[issue41871] Add PyList_Remove() in listobject.c

2020-09-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PyList_SetSlice() allows to remove an item by index, as in `del a[i]`. 
list.remove() searches the item by value and removes the first occurrence. You 
can implement it via PySequence_Index() and PyList_SetSlice(), but it is more 
convenient to just call the method.

There is no C API for most methods of builtin types. C API is only added for 
the following cases:

1. Conversion between Python and C values. There is no other way to do this. 
PyLong_AsLong() and PyLong_FromLong().
2. Access to general protocols. PyNumber_Add(), PyObject_GetAttr(), 
PySequence_etc.
3. Specialized versions for concrete types if they are much more convenient and 
performant. They are also often preceded the more general API. 
PyObject_GetItem() -> PySequence_GetItem() -> PyList_GetItem() -> 
PyList_GET_ITEM().
4. High-level common operations. From PyImport_ImportModule() to 
PyRun_SimpleString().

--

___
Python tracker 

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



[issue41519] `pkgutil.get_data` causes future imports of children modules to fail.

2020-09-29 Thread Brett Cannon


Brett Cannon  added the comment:

I wouldn't use pkgutil.get_data() -- or pkgutil, period -- and instead use 
importlib.resources to read data files from a package (which is available as a 
third-party package on PyPI if you need it for older versions of Python).

--

___
Python tracker 

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



[issue41356] Convert bool.__new__ to argument clinic

2020-09-29 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Superseded by https://bugs.python.org/issue41870

--
nosy:  -larry
resolution:  -> works for me
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



[issue35103] format_exception() doesn't work with PyErr_Fetch

2020-09-29 Thread Jason Haslam


Jason Haslam  added the comment:

FWIW, I believe that you have to call `PyErr_NormalizeException` on the values 
returned from `PyErr_Fetch`. It looks like this is working as expected.

--
nosy: +jason.haslam

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-09-29 Thread Thomas Holder


Thomas Holder  added the comment:

All good, thanks for opening PR 22453! I'll close my old PR.

--

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-09-29 Thread E. Paine


Change by E. Paine :


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

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-09-29 Thread E. Paine


E. Paine  added the comment:

I do think we should close the existing PR (TBH, I completely forgot about this 
issue). Briefly looking again at the issue, it does indeed look like the GIL 
hasn't seen the thread before the attempted call to restore the tstate (as 
Steve said). If its alright with you, Thomas, I will open a new PR with the 
attached patch so it can be formally reviewed (though you can open the PR if 
you would prefer).

--
components:  -Windows

___
Python tracker 

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



[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2020-09-29 Thread Ian M. Hoffman


Ian M. Hoffman  added the comment:

You are correct.

After further review, I found an older ctypes issue #12836 which was then 
enshrined in a workaround in the numpy.ndarray.ctypes interface to vanilla 
ctypes.

https://numpy.org/doc/stable/reference/generated/numpy.ndarray.ctypes.html

Numpy ctypes has both a `data` method for which "a reference will not be kept 
to the array" and a `data_as` method which has the desired behavior: "The 
returned pointer will keep a reference to the array."

So, we've all got our workarounds. What remains is whether/how to implement a 
check in Python for the dangling pointer. I have no advice on that, except that 
it is desirable to avoid the fault crash, no matter who is to blame.

--

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> If space is not an issue, the list comprehension may be fastest.

I think there is still a misunderstanding here.  The generator variant does not 
save space.  It uses slightly *more* space than the list variant.

The list_ass_slice()¹ function runs PySequence_Fast² on its input.  If the 
input is already a list or tuple, it is returned immediately.  If not, the 
iterator is run to exhaustion and a new list is built.  Either way, when the 
actual update occurs, the source will be a list or tuple.

¹ https://github.com/rhettinger/cpython/blob/master/Objects/listobject.c#L597
² https://github.com/rhettinger/cpython/blob/master/Objects/abstract.c#L2014

--

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-09-29 Thread Thomas Holder


Thomas Holder  added the comment:

I finally managed to test tstate_acquire.diff and it works perfectly! Should I 
close my pull request? Or update it with your patch?

--

___
Python tracker 

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



[issue31391] Forward-port test_xpickle from 2.7 to 3.x

2020-09-29 Thread Ken Jin


Change by Ken Jin :


--
keywords: +patch
nosy: +kj
nosy_count: 2.0 -> 3.0
pull_requests: +21481
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22452

___
Python tracker 

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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread Matthew Barnett


Matthew Barnett  added the comment:

Arguments are evaluated first and then the results are passed to the function. 
That's true throughout the language.

In this instance, you can use \g<1> in the replacement string to refer to group 
1:

re.sub(r'([a-z]+)', fr"\g<1>{REPLACEMENT}", 'something')

--

___
Python tracker 

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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

f-strings are indeed evaluated when the value of the string is needed. Your 
example is equivalent to:

>>> re.sub(r'([a-z]+)', fr"\112345", 'something')
'J345'

As always with regexes, you need to be careful when dynamically composing them.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread dkreeft


New submission from dkreeft :

Steps to reproduce (Windows/Python 3.7.7):

1. Define replacement string that starts with an integer:

REPLACEMENT = '12345'

2. Use re.sub() as follows:

re.sub(r'([a-z]+)', fr"\1{REPLACEMENT}", 'something')

3. The outcome is not 'something12345' as expected, but 'J345'.

Note that I am using the group in the replacement argument, which is a raw 
f-string.

A quick investigation with other replacement strings renders similar unexpected 
behavior:

REPLACEMENT = '1': leads to re.error (invalid group reference 11 at position 1)
REPLACEMENT = '13': 'K'
etc.

So it seems like the f-string is evaluated first, yielding a string starting 
with an integer. Python then interprets the '\1' to indicate group 1 as 
'\1', which leads to the behavior described above. Even if this 
is by design, it seems confusing and makes using groups with re.sub() 
cumbersome if the replacement f-string starts with an integer.

--
components: Regular Expressions, Windows
messages: 377669
nosy: dkreeft, ezio.melotti, mrabarnett, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Unexpected behavior re.sub() with raw f-strings
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue41519] `pkgutil.get_data` causes future imports of children modules to fail.

2020-09-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +barry, brett.cannon, p-ganssle

___
Python tracker 

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



[issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument

2020-09-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You can change permissions after creating the directory.

The C function mkdtemp() creates the directory with permissions 0o700.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument

2020-09-29 Thread Raymond Sit


New submission from Raymond Sit :

`tempfile.TemporaryDirectory` always creates the directory with 0o700 
permissions. So other applications which could run as a different user (i.e. 
root) cannot access the directory.

To improve the usability I would like to add the option to set the permissions 
of the directory.

Proposed Change is in the PR linked 
(https://github.com/python/cpython/pull/22451)

--
components: Library (Lib)
files: tempfile.py
messages: 377667
nosy: ray-sit
priority: normal
pull_requests: 21480
severity: normal
status: open
title: tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose 
to add mode argument
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file49477/tempfile.py

___
Python tracker 

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



[issue36125] Cannot cross-compile to more featureful but same tune

2020-09-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue26053] regression in pdb output between 2.7 and 3.5

2020-09-29 Thread Irit Katriel


Irit Katriel  added the comment:

As you see in the PR, this regression was in the commit I linked to which was 
made by Georg, but he has removed himself from the nosy list of this issue and 
was unavailable to review the PR when I asked him to. Can someone else review 
this?

It's a 1-line fix (reverting to previous) plus unit test.

--

___
Python tracker 

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



[issue41878] python3 fails to use custom mapping object as symbols in eval()

2020-09-29 Thread Robert Haschke


Robert Haschke  added the comment:

Thanks, Josh, for this clarification. What is the suggested mitigation?
Obviously, I need to pass all symbols from my hierarchical dictionary in a 
flattend version as a dict to globals. Or do you see another option?

--

___
Python tracker 

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



[issue11414] Add import fix for email.Message

2020-09-29 Thread Irit Katriel


Irit Katriel  added the comment:

I've added a PR with this fixer, which is quite a simple addition because the 
mechanism for such renames is already there.

If we don't want to add features to lib2to3 (since I understand it will be 
deprecated in the future), then shall we instead close this issue as won't-do?

--

___
Python tracker 

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



[issue41878] python3 fails to use custom mapping object as symbols in eval()

2020-09-29 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Yes, list comprehensions having their own local scope was a change from Py2 to 
Py3. Python 2 did not do this for list comps initially, and it was left that 
way during the 2.x timeframe due to back compat constraints, but 2.x did it 
from the start for generator expressions, as well set and dict comps, and they 
were all made consistent for Py3.

--
nosy: +josh.r

___
Python tracker 

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



[issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment

2020-09-29 Thread Vinay Sajip


Vinay Sajip  added the comment:

FYI I'm in the process of updating distlib to add the get_platform() / 
get_host_platform() distinction. The next release should have it.

--
keywords: +3.5regression

___
Python tracker 

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



[issue41876] Add __repr__ for Tkinter Font objects

2020-09-29 Thread Anatoliy Platonov


Change by Anatoliy Platonov :


--
keywords: +patch
nosy: +p4m.dev
nosy_count: 3.0 -> 4.0
pull_requests: +21479
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22450

___
Python tracker 

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



[issue41876] Add __repr__ for Tkinter Font objects

2020-09-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a new feature. We do not backport new features to old versions unless 
they fix some design bug. Nothing bad will happen if we DO NOT backport it.

--

___
Python tracker 

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



[issue41876] Add __repr__ for Tkinter Font objects

2020-09-29 Thread E. Paine


E. Paine  added the comment:

Serhiy, while I agree this is an enhancement, I don't see that it would break 
*anyone's* code (this will mostly just affect the REPL output) so is it worth 
considering a backport?

Diohabara, the Python devguide (https://devguide.python.org/) is a very good 
place to start. The first contribution is always the hardest so please do ask 
if you need clarification on something. Likely the first thing you will need to 
do, though, is sign the CLA which means we can legally accept your patch.

--
nosy: +epaine

___
Python tracker 

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



[issue41670] ceval traces code differently with USE_COMPUTED_GOTOS

2020-09-29 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 17b5be0c0a3f74141014e06a660f1b5ddb002fec by Mark Shannon in 
branch 'master':
bpo-41670: Remove outdated predict macro invocation. (GH-22026)
https://github.com/python/cpython/commit/17b5be0c0a3f74141014e06a660f1b5ddb002fec


--

___
Python tracker 

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



[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-09-29 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue41876] Add __repr__ for Tkinter Font objects

2020-09-29 Thread diohabara


diohabara  added the comment:

Hi, Storchaka!.
I would like to tackle this issue.
Because I am new to Python bug tracking, I am unsure that this is the right 
approach to bug fixing.

--
nosy: +diohabara

___
Python tracker 

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