Simon Percivall added the comment:
Any and all code from astunparse is certainly available for inclusion. Go ahead.
--
nosy: +simon.percivall
___
Python tracker
<https://bugs.python.org/issue28
Simon Percivall added the comment:
It think it's important to document this caveat in `get_type_hints`, that there
is virtually _no_ way to use it safely with a class, and that there will always
be a high risk of getting an exception unless using this function in a highly
controlled setting
New submission from Simon Percivall:
For classes with ForwardRef annotations, typing.get_type_hints is unusable.
As example, we have two files:
a.py:
class Base:
a: 'A'
class A:
pass
b.py:
from a import Base
class MyClass(Base):
b: 'B'
class B:
pass
>>> from typi
Simon Percivall added the comment:
Run this a couple of times (it fails for me the first time, but it's a race, so
YMMV):
```
import enum
from concurrent.futures import ThreadPoolExecutor
class MyEnum(enum.IntFlag):
one = 1
with ThreadPoolExecutor() as executor:
print(list
New submission from Simon Percivall:
When called by `_create_pseudo_member_()`, the dictionary iteration of
`_value2member_map` in `_decompose()` in enum.py may lead to a "RuntimeError:
dictionary changed size during iteration". For me, it happened in `re.compile`.
```
Traceback (m
Simon Percivall [EMAIL PROTECTED] added the comment:
It's still a problem, as the test case demonstrates.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2074
__
___
Python-bugs
New submission from Simon Percivall:
_safe_repr() tries to handle the case where two objects are unorderable by
ordering on (str(type(key)), key, value), but this fails when
str(type(key)) is equal for two objects, but key is different and
unorderable. Easy fix: order just on the string
Simon Percivall added the comment:
It has to do with the MACOSX_DEPLOYMENT_TARGET. If it's set to 10.4, the
legacy version of setpgrp is used (with args), it it's 10.5, setpgrp
expects no arguments. It seems configure won't detect the difference.
--
nosy: +percivall