[issue37863] Speed up hash(fractions.Fraction)

2019-08-14 Thread ppperry


Change by ppperry :


--
title: Speed hash(fractions.Fraction) -> Speed up hash(fractions.Fraction)

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



[issue38084] multiprocessing cannot recover from crashed worker

2019-09-10 Thread ppperry


ppperry  added the comment:

Is this not a duplicate of issue22393?

--
nosy: +ppperry

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



[issue38229] ClientConnectionError exception doesn't serialize propertly

2019-09-19 Thread ppperry


ppperry  added the comment:

This seems more likely to be a bug in aiohttp than in python.

--
nosy: +ppperry
type: crash -> behavior

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



[issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters

2019-09-24 Thread ppperry


Change by ppperry :


--
type: compile error -> behavior

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



[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread ppperry


Change by ppperry :


--
nosy:  -ppperry

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



[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread ppperry


ppperry  added the comment:

Duplicate of issue32615

--
nosy: +ppperry

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



[issue11105] Compiling evil ast crashes interpreter

2019-12-31 Thread ppperry


ppperry  added the comment:

What about indirect cycles like below:

>>> e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
>>> f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
>>> e.operand = f
>>> f.operand = e
>>> compile(ast.Expression(e), "", "eval")

(I tested, this also crashes)

--
nosy: +ppperry

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



[issue39344] ImportError: DLL load failed while importing _ssl: The specified module could not be found."

2020-01-15 Thread ppperry


Change by ppperry :


--
title: Getting error while importing ssl " import _ssl # if we 
can't import it, let the error propagate ImportError: DLL load failed while 
importing _ssl: The specified module could not be found." -> ImportError: DLL 
load failed while importing _ssl: The specified module could not be found."

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



[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread ppperry


ppperry  added the comment:

I was not attempting to run untrusted Python code when I filed this bug report.

--

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



[issue39585] Delete a pending item in _warning.c

2020-02-10 Thread ppperry


ppperry  added the comment:

What if a warning has a metaclass with a custom __getattribute__ method?

--
nosy: +ppperry

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



[issue39665] Cryptic error message when creating types that don't include themselves in their MRO

2020-02-17 Thread ppperry


New submission from ppperry :

I was trying to create a class that didn't have any references to itself to 
test issue39382 and ran the following code:

class Meta(type):
def mro(cls):
return type.mro(cls)[1:]
class X(metaclass=Meta):
pass

This produced an extremely cryptic error message:

Traceback (most recent call last):
  File "", line 1, in 
class X(metaclass=Meta):
TypeError: super(type, obj): obj must be an instance or subtype of type

While what I am trying to do may well not be supported, the error message 
referencing the `super` function, which I didn't use, is not helpful.

--
components: Build, Interpreter Core
messages: 362152
nosy: ppperry
priority: normal
severity: normal
status: open
title: Cryptic error message when creating types that don't include themselves 
in their MRO
type: behavior
versions: Python 3.7, Python 3.8

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



[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-02-17 Thread ppperry


ppperry  added the comment:

I posted a test on the PR

--
nosy: +ppperry

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



[issue39665] Cryptic error message when creating types that don't include themselves in their MRO

2020-03-25 Thread ppperry


Change by ppperry :


--
components:  -Build
versions: +Python 3.9

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



[issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API

2020-04-09 Thread ppperry


Change by ppperry :


--
title: [C API] Make PyGC_Head structure opaque, or even more it to the internal 
C API -> [C API] Make PyGC_Head structure opaque, or even move it to the 
internal C API

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



[issue33065] IDLE debugger: failure stepping through module loading

2020-04-23 Thread ppperry


Change by ppperry :


--
nosy:  -ppperry

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



[issue42849] pool worker can't be terminated

2021-01-15 Thread ppperry


ppperry  added the comment:

duplicate of issue22393?

--
nosy: +ppperry

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



[issue30953] Fatal python error when jumping into except clause

2020-09-27 Thread ppperry


Change by ppperry :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-23 Thread ppperry


ppperry  added the comment:

Indeed, you are right that this should be reopened.

--

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread ppperry


Change by ppperry :


--
nosy:  -ppperry

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread ppperry


ppperry  added the comment:

Unfortunately, there's a similar bug for `break` in a finally inside two nested 
loops, so just re-banning `continue` won't fix the crash.
The code below segfaults:
```
def simple():
for number in range(2):
for number in range(2):
try:
return number
finally:
break
simple()
```

--
nosy: +ppperry

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



[issue13220] print function unable while multiprocessing.Process is being run

2017-07-07 Thread ppperry

ppperry added the comment:

Duplicate of issue11820.

--
nosy: +ppperry

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



[issue30873] `SystemError: returned NULL without setting an error` from imp.create_builtin

2017-07-07 Thread ppperry

New submission from ppperry:

The following rather long code, reduced from the same example as issue30626, 
produces a SystemError:

import builtins
from importlib.machinery import PathFinder
import importlib
import sys
import _imp
from functools import partial
def copy_module(module):
new = type(sys)(module.__name__)
new.__dict__.update(module.__dict__)
return new
_absent = object()
def new_exec(code, globals=_absent, locals=_absent, *, new_builtins):
if globals == _absent:
frame = sys._getframe(2)
globals = frame.f_globals
locals = frame.f_locals
elif locals == _absent:
locals = globals
globals.setdefault("__builtins__", new_builtins);
return exec(code, globals, locals)
dct={}
dct["__builtins__"] = b = copy_module(builtins)
b.exec = partial(new_exec, new_builtins=b)
spec = PathFinder.find_spec("_bootstrap",importlib.__path__)
source_bootstrap = type(sys)("_bootstrap");
spec.loader.exec_module(source_bootstrap);
external_spec = PathFinder.find_spec("_bootstrap_external",importlib.__path__)
source_bootstrap_external = type(sys)("_bootstrap_external");
external_spec.loader.exec_module(source_bootstrap_external);
source_bootstrap.__name__ = "importlib._bootstrap";
source_bootstrap_external.__name__ = "importlib._bootstrap_external";
new_sys = copy_module(sys)
new_sys.path_importer_cache = {}
new_sys.path_hooks = []
new_sys.meta_path = []
new_sys.modules = {
"importlib._bootstrap":source_bootstrap,
"importlib._bootstrap_external":source_bootstrap_external,
  }
for mod in new_sys.modules.values():
mod.__builtins__ = b
b.__import__ = source_bootstrap.__import__
source_bootstrap._install(new_sys,_imp)
exec("import _pickle", dct)

------
components: Interpreter Core, Library (Lib)
messages: 297924
nosy: brett.cannon, eric.snow, ncoghlan, ppperry
priority: normal
severity: normal
status: open
title: `SystemError:  returned NULL without 
setting an  error` from imp.create_builtin
type: behavior
versions: Python 3.6

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



[issue30873] `SystemError: returned NULL without setting an error` from importing _pickle

2017-07-07 Thread ppperry

Changes by ppperry :


--
title: `SystemError:  returned NULL without 
setting an  error` from imp.create_builtin -> `SystemError:  returned NULL without setting an  error` from importing _pickle

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



[issue30873] `SystemError: returned NULL without setting an error` from importing _pickle

2017-07-08 Thread ppperry

ppperry added the comment:

Interesting. For you, `_pickle` seems to be an extension module, which is thus 
trying to call `imp.create_dynamic`, whereas for me it is a builtin module. 
Perhaps that explains why you get a KeyError and I get a SystemError (my 
traceback ends with):
  File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 560, in 
module_from_spec
module = spec.loader.create_module(spec)
  File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 725, in 
create_module
return _call_with_frames_removed(_imp.create_builtin, spec)
  File "C:\Program Files\Python36\lib\importlib\_bootstrap.py", line 205, in 
_call_with_frames_removed
return f(*args, **kwds)
SystemError:  returned NULL without setting 
an error
(and is the same as your 3.6 traceback up to that point)

--

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



[issue30873] `SystemError: returned NULL without setting an error` from importing _pickle on Windows

2017-07-08 Thread ppperry

Changes by ppperry :


--
title: `SystemError:  returned NULL without 
setting an  error` from importing _pickle -> `SystemError:  returned NULL without setting an  error` from importing _pickle 
on Windows

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



[issue30876] SystemError on importing module that deletes itself from sys.modules

2017-07-08 Thread ppperry

Changes by ppperry :


--
title: SystemError on import -> SystemError on importing module that deletes 
itself from sys.modules

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



[issue30949] Provide assertion functions in unittest.mock

2017-07-17 Thread ppperry

ppperry added the comment:

You can already do this, although it it somewhat of a hack:

>>> assert_called_once=Mock.assert_called_once # This will be an AttributeError
>>> assert_called_once_with=Mock.assert_called_once_with
>>> example = Mock()
>>> assert_caled_once_with(example, ...)  # A NameError
>>> assert_called_once_with(example, ...)  # Great success!

--
nosy: +ppperry

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



[issue30953] Fatal python error when jumping into except clause

2017-07-17 Thread ppperry

New submission from ppperry:

trying to execute the following code:
import sys
def trace(frame, event, arg):
if event == "line" and frame.f_lineno > 12:
frame.f_lineno = 12
return None
return trace
sys.settrace(trace)
def error():
try:
pass
except:
pass
pass
pass
error()
Produces a fatal error:
Fatal Python error: XXX block stack underflow

Current thread 0x0af4 (most recent call first):
  File "jumpintoexception.py", line 12 in error
  File "jumpintoexception.py", line 15 in 

--
components: Interpreter Core, Library (Lib)
messages: 298556
nosy: ppperry
priority: normal
severity: normal
status: open
title: Fatal python error when jumping into except clause
type: crash
versions: Python 3.7

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



[issue30958] Scripts folder is empty

2017-07-18 Thread ppperry

Changes by ppperry :


--
type: performance -> behavior

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



[issue30990] Calls to C functions using `.__call__` don't get sent to profiler.

2017-07-22 Thread ppperry

New submission from ppperry:

If you create a file called `inputtest.py` with the contents 
`input.__call__()`, and run the built-in profile module on it, it doesn't 
notice the call to `input`, and produces a report not including that call.
 4 function calls in 0.000 seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 :0(exec)
10.0000.0000.0000.000 :0(setprofile)
10.0000.0000.0000.000 inputtest.py:1()
10.0000.0000.0000.000 profile:0( 
at 0x029880C0, file "inputtest.py", line 1>)
00.000 0.000  profile:0(profiler)

--
components: Interpreter Core, Library (Lib)
messages: 298847
nosy: ppperry
priority: normal
severity: normal
status: open
title: Calls to C functions using `.__call__` don't get sent to profiler.
type: behavior
versions: Python 2.7, Python 3.7

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



[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread ppperry


ppperry  added the comment:

The thing is, though, that the same error occurs if a larger code being 
debugged calls `exec` or `eval` with such a mapping 
(`pdb.run("eval('1+1',{},FakeContainer())" also crashes with the same error), 
and the test suite contains code that evals other code in an incomplete mapping 
(test_var_annot_custom_maps in test_grammar)

--

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry


ppperry  added the comment:

According to the error message, this is a duplicate of 
https://bugs.python.org/issue25532

--
nosy: +ppperry

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-01-16 Thread ppperry


ppperry  added the comment:

Sorry, looks like I was wrong about it being a duplicate. The actual bug 
appears to be "doctest can't run on a module that contains un-unwrappable 
objects", which there probably is an issue for but I don't know what it is.

--

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



[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-16 Thread ppperry


ppperry  added the comment:

You have to step into the eval for the error to be raised.

--

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-10 Thread ppperry

ppperry added the comment:

Does this work with wacky code like this?
@functools.total_ordering
class ClassAssignmentCanBreakChecks():
def __init__(self, i):
self._i = i
def __lt__ (self, other):
last.__class__ = OrdinaryOldInteger
return self._i < (other._i if hasattr(other, '_i') else 
other)
@functools.total_ordering
class OrdinaryOldInteger:
def __init__(self, i):
self._i = i
def __lt__(self, other):
return self._i < (other._i if hasattr(other, '_i') else 
other)
lst = [ClassAssignmentCanBreakChecks(i) for i in range(10)]
random.shuffle(lst)
last = lst[-1]
lst.sort()
It looks like it will initially say that all are the same type, and attempt 
that optimization, which will probably lead to unexpected results as that 
condition is no longer true after the first compare.

--
nosy: +ppperry

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-10 Thread ppperry

ppperry added the comment:

>
> Elliot Gorokhovsky added the comment:
>
> Your code changes __class__, not type, which would remain equal to
> "instance". (my understanding, could be wrong). The docs say the
> following:
>
Nope:
class A:pass
class B:pass
a = A()
a.__class__ = B
type(a)
returns ""

--

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-10 Thread ppperry

ppperry added the comment:

And what about even wackier code like this?
class A(int):
def __lt__(self, other):
print("zebra")
A.__lt__ = A.__false_lt__
return int.__lt__(self, other)
__true_lt__ = __lt__
def __false_lt__(self, other):
print("gizmo")
A.__lt__ = A.__true_lt__
return int.__lt__(self, other)


[A(i) for i in range(20, 5, -1)].sort()

This alternates printing "zebra" and "gizmo" for every comparison, and there is 
no way to add some sort of caching without changing this behavior.

--

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-11 Thread ppperry

ppperry added the comment:

What about if one of the relevant comparison functions is implemented in C?

class WackyComparator(int):
def __lt__(self, other):
elem.__class__ = WackyList2
return int.__lt__(self, other)

class WackyList1(list):pass
class WackyList2(list):
def __lt__(self, other):
raise ValueError
lst =
list(map(WackyList1,[[WackyComparator(3),5],[WackyComparator(4),6],[WackyComparator(7),7]]))
random.shuffle(lst)
elem = lst[-1]
lst.sort()

This code raises ValueError, and caching seems like it would cache the
comparator for WackyList1 objects, which is the same as the comparator for
'list' objects -- and midway through comparison, one of them changes type
to WackyList2, which has its own (broken) comparison function.

Python is very very dynamic ...

--

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



[issue29794] Incorrect error message on invalid __class__ assignments

2017-03-11 Thread ppperry

New submission from ppperry:

If you try to set the __class__ of a type which doesn't support "__class__" 
assignments, you get the error message:

TypeError: __class__ assignment only supported for heap types or ModuleType 
subclasses

However, the actual restriction doesn't require a subclass of "ModuleType"; the 
below code works:

import random
class M(type(random)):pass
random.__class__ = M

Thus the error message is incorrect.

--
components: Interpreter Core
messages: 289448
nosy: ppperry
priority: normal
severity: normal
status: open
title: Incorrect error message on invalid __class__ assignments
type: behavior
versions: Python 3.6

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-11 Thread ppperry

ppperry added the comment:

Wouldn't the assignment of "__lt__" change the value of the tp_richcompare 
slot? That seems to be what the code in Objects/typeobject.c is doing with  the 
update_slot method and the related helper functions.

--

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-12 Thread ppperry

ppperry added the comment:

-

Doesn't youre skipping PyObject_RichCompareBool and directly getting
tp_richcompare also mean that you bypass the NotImplemented checking?
Thus, wouldn't this code, which raises a TypeError currently, silently
work?

class PointlessComparator:
def __lt__(self, other):
return NotImplemented
[PointlessComparator(),PointlessComparator()].sort()

... ... ...

--

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



[issue19675] Pool dies with excessive workers, but does not cleanup

2017-03-13 Thread ppperry

ppperry added the comment:

Can't you just mock the Process class to have a start method that always raises 
an error?

--
nosy: +ppperry

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



[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread ppperry

Changes by ppperry :


--
pull_requests: +729

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



[issue30626] "SystemError: SystemError: returned NULL without setting an error

2017-06-10 Thread ppperry

Changes by ppperry :


--
nosy: ppperry
priority: normal
severity: normal
status: open
title: "SystemError: SystemError:  returned NULL 
without setting an error

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



[issue30626] "SystemError: SystemError: returned NULL without setting an error" from open function

2017-06-10 Thread ppperry

New submission from ppperry:

This code (reduced from an example I had of trying to debug code including the 
module-level code of already imported modules), raises a SystemError:
import builtins
from importlib.machinery import PathFinder
from importlib.util import find_spec
import importlib
import sys
import _imp
dct={}
def copy_module(module):
new = type(sys)(module.__name__)
new.__dict__.update(module.__dict__)
return new

dct["__builtins__"] = b = copy_module(builtins)

spec = PathFinder.find_spec("_bootstrap",importlib.__path__)
source_bootstrap = type(sys)("_bootstrap");
spec.loader.exec_module(source_bootstrap);
source_bootstrap.__name__ = "importlib._bootstrap";
new_sys = copy_module(sys)

new_sys.path_hooks = []
new_sys.meta_path = []
new_sys.modules = {
"importlib._bootstrap":source_bootstrap,
"importlib._bootstrap_external":importlib._bootstrap_external,
}
b.__import__ = source_bootstrap.__import__
source_bootstrap._install(new_sys,_imp)
dct["__file__"]=__file__
exec("open(__file__)",dct)

The actual file passed to the open function doesn't matter, as long as it would 
work

--
components: +IO, Interpreter Core, Library (Lib)
title: "SystemError: SystemError:  returned NULL 
without setting an error -> "SystemError: SystemError:  returned NULL without setting an error"  from open function

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



[issue30626] "SystemError: SystemError: returned NULL without setting an error" from open function

2017-06-10 Thread ppperry

Changes by ppperry :


--
nosy: +benjamin.peterson, brett.cannon, eric.snow, ncoghlan, stutzbach

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



[issue30626] "SystemError: returned NULL without setting an error" from open function

2017-06-10 Thread ppperry

Changes by ppperry :


--
title: "SystemError: SystemError:  returned NULL 
without setting an error"  from open function -> "SystemError:  returned NULL without setting an error"  from open function

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



[issue30626] "SystemError: returned NULL without setting an error" from open function

2017-06-10 Thread ppperry

Changes by ppperry :


--
type:  -> behavior

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



[issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...)

2019-04-14 Thread ppperry


ppperry  added the comment:

See also issue32615

--
nosy: +ppperry

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



[issue32615] Inconsistent behavior if globals is a dict subclass

2018-01-21 Thread ppperry

New submission from ppperry :

Take the following code:

import builtins
class K(dict):
def __getitem__(self, k):
if k not in builtins.__dict__:
print("get %s" % k)
return dict.__getitem__(self, k)
def __setitem__(self, k, v):
print("set %s" % k)
dict.__setitem__(self, k, v)
exec("""
foo = "bar"
foo
try:
qyz
except NameError:
pass
class K:
baz = foo
def f(ggg=foo): pass
def g(ggg=foo):
global f
f = 87
f
g()
""",K())

This should consitently either call or not call the overridden methods on the 
dictionary, producing either no output or:

set foo
get foo
get qyz
get foo
get foo
set K
get foo
set g
get g
set f
get f

Instead, only sometime the override gets called, producing

set foo
get foo
get qyz
set K
get foo
set g
get g
get f

meaning that 
(a) modifications of global variables via global statements
(b) code at class-level

ignore overridden methods, whereas everything else follows them

------
components: Interpreter Core
messages: 310388
nosy: ppperry
priority: normal
severity: normal
status: open
title: Inconsistent behavior if globals is a dict subclass
versions: Python 3.6

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



[issue32615] Inconsistent behavior if globals is a dict subclass

2018-01-22 Thread ppperry

Change by ppperry :


--
type:  -> behavior

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



[issue32615] Inconsistent behavior if globals is a dict subclass

2018-01-26 Thread ppperry

ppperry  added the comment:

Uh, I'm not undertsanding the relevance of whether the code is run at 
module-level or not. It can't possibly be a feature that * some code * uses the 
overrides and *other code* doesn't.

--

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



[issue32621] Problem of consistency in collection.abc documentation

2018-01-27 Thread ppperry

Change by ppperry :


--
title: Problem of consistence in collection.abc documentation -> Problem of 
consistency in collection.abc documentation

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



[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2018-01-27 Thread ppperry

Change by ppperry :


--
title: Built-in module _io can lose data from buffered files at exit -> 
Built-in module _io can lose data from buffered files in reference cycles

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



[issue14010] deeply nested itertools objects segfault

2018-01-27 Thread ppperry

Change by ppperry :


--
title: deeply nested filter segfaults -> deeply nested itertools objects 
segfault

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



[issue28685] Optimizing list.sort() by performing safety checks in advance

2018-01-28 Thread ppperry

ppperry  added the comment:

... and I'm still trying to come up with even more pathological mutating cases

--

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



[issue8525] Display exceptions' subclasses in help()

2018-02-08 Thread ppperry

Change by ppperry :


--
title: Display exception's subclasses in help() -> Display exceptions' 
subclasses in help()

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



[issue32895] Make general function sum() use Numpy's sum when obviously possible

2018-02-21 Thread ppperry

Change by ppperry :


--
components: +Library (Lib) -2to3 (2.x to 3.x conversion tool)

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



[issue32895] Make general function sum() use Numpy's sum when obviously possible

2018-02-21 Thread ppperry

Change by ppperry :


--
type: enhancement -> performance

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



[issue32895] Make general function sum() use Numpy's sum when obviously possible

2018-02-21 Thread ppperry

Change by ppperry :


--
type: performance -> enhancement

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



[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry

ppperry  added the comment:

This feature already exists and doesn't need to be reimplemented; use 
`pdb.Pdb(skip={"trio", "contextlib", ...}).run(...)`, and in any case should be 
disableable. I don't use asyncio, but happen to have a habit of running pdb 
through the standard library for no reason and don't want to have that option 
taken away.

--
nosy: +ppperry

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



[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry

ppperry  added the comment:

Just to be clear, I'm not opposing having the default value for `skip` be 
something other than the empty set, but it should be overridable, and the 
default should include some other things this patch omits, like 
`importlib._bootstrap(_external)?`

--

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



[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread ppperry

Change by ppperry :


--
versions: +Python 3.8

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-23 Thread ppperry

Change by ppperry :


--
title: Doc strings omitted from AST -> Doc strings no longer stored in body of 
AST

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



[issue32926] Add public TestCase method/property to get result of current test

2018-02-23 Thread ppperry

Change by ppperry :


--
versions: +Python 3.8

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



[issue32926] Add public TestCase method/property to get result of current test

2018-02-23 Thread ppperry

Change by ppperry :


--
components: +Library (Lib)

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



[issue30953] Fatal python error when jumping into except clause

2018-03-22 Thread ppperry

ppperry  added the comment:

... with a bad error message, because there are no finally blocks in the code

--

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



[issue33093] Fatal error on SSL transport

2018-03-23 Thread ppperry

Change by ppperry :


--
type:  -> behavior

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



[issue33120] infinite loop in inspect.unwrap(unittest.mock.call)

2018-03-23 Thread ppperry

ppperry  added the comment:

This is a dupe of https://bugs.python.org/issue25532

--
nosy: +ppperry

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



[issue31925] test_socket creates too many locks

2017-11-02 Thread ppperry

Change by ppperry :


--
title: test_socket creates too much locks -> test_socket creates too many locks

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



[issue32140] IDLE debugger fails with non-trivial __new__ super call

2017-12-03 Thread ppperry

ppperry  added the comment:

Simplified reproducer for same bug without any imports:

class BadRepr:
def __repr__(self):
1/0
def broken():
x=BadRepr()
x=x #filler line for debugger

In this case, the problematic BadRepr object in the "broken" function explictly 
has a broken __repr__, but the uninitialized Fraction object in the "__new__" 
function of the Fraction class has a similarly broken __repr__

--
nosy: +ppperry

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



[issue33460] "..." is used to confusingly indicate many different things in chapter 3

2018-06-25 Thread ppperry


Change by ppperry :


--
title: ... used to indicate many different things in chapter 3, some are 
confusing -> "..." is used to confusingly indicate many different things in 
chapter 3

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



[issue29199] test_regrtest fails if PCBuild directory doesn't exist

2018-07-14 Thread ppperry


ppperry  added the comment:

This issue seems to have been fixed in 3.7

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

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



[issue29199] test_regrtest fails if PCBuild directory doesn't exist

2018-07-14 Thread ppperry


ppperry  added the comment:

To be precise, fixed as part of issue33352

--

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



[issue33120] infinite loop in inspect.unwrap(unittest.mock.call)

2018-07-15 Thread ppperry


Change by ppperry :


--
type: crash -> behavior

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



[issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments

2018-07-16 Thread ppperry


New submission from ppperry :

`{}.get()`
Traceback (most recent call last):
  File "", line 1, in 
TypeError: get expected at least 1 arguments, got 0

Shouldn't that be "TypeError: get expected at least 1 argument, got 0" instead?

--
components: Interpreter Core
messages: 321752
nosy: ppperry
priority: normal
severity: normal
status: open
title: Gramatically incorrect error message for some descriptor calls with 
wrong number of arguments
versions: Python 3.6, Python 3.7

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



[issue34126] Profiling certain invalid calls crash Python

2018-07-16 Thread ppperry


Change by ppperry :


--
type:  -> crash

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



[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread ppperry


ppperry  added the comment:

um, something doesn't make sense about this. the python implementation of 
pickle never released the GIL (it can't, by definition -- it's written in 
python). The C implementation releasing the GIL wouldn't make sense, as the 
pickle api involves calls into python everywhere (for example, `__reduce__`)

--
nosy: +ppperry

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-16 Thread ppperry


Change by ppperry :


--
title: Profiling certain invalid calls crash Python -> Profiling certain 
invalid calls crashes Python

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



[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread ppperry


Change by ppperry :


--
components: +Library (Lib)
title: Do not block threads when pickle/unpickle -> Release GIL periodically in 
_pickle module

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



[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread ppperry


Change by ppperry :


--
nosy:  -ppperry

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



[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-20 Thread ppperry


ppperry  added the comment:

Another test case: 

>> classmethod()

Traceback (most recent call last):
  File "", line 2, in check
TypeError: classmethod expected 1 arguments, got 0

--
title: Gramatically incorrect error message for some descriptor calls with 
wrong number of arguments -> Gramatically incorrect error message for some 
calls with wrong number of arguments

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



[issue21600] mock.patch.stopall doesn't work with patch.dict

2018-07-20 Thread ppperry


Change by ppperry :


--
title: mock.patch.stopall doesn't work with patch.dict to sys.modules -> 
mock.patch.stopall doesn't work with patch.dict

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



[issue34188] Allow dict choices to "transform" values in argpagse

2018-07-22 Thread ppperry


Change by ppperry :


--
title: Use dicts to "transform" argparse arguments to values -> Allow dict 
choices to "transform" values in argpagse

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



[issue34193] Fix pluralization in TypeError messages in getargs.c

2018-07-23 Thread ppperry


Change by ppperry :


--
nosy: +ppperry

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



[issue34266] Bad behavior with "restart \" in pdb

2018-07-28 Thread ppperry


New submission from ppperry :

(Pdb) restart \
Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
  File "C:\Program Files\Python36\lib\pdb.py", line 1548, in _runscript
self.run(statement)
  File "C:\Program Files\Python36\lib\bdb.py", line 431, in run
exec(cmd, globals, locals)
  File "", line 1, in 
  
  File "C:\Program Files\Python36\lib\bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
  File "C:\Program Files\Python36\lib\bdb.py", line 66, in dispatch_line
self.user_line(frame)
  File "C:\Program Files\Python36\lib\pdb.py", line 261, in user_line
self.interaction(frame, None)
  File "C:\Program Files\Python36\lib\pdb.py", line 352, in interaction
self._cmdloop()
  File "C:\Program Files\Python36\lib\pdb.py", line 321, in _cmdloop
self.cmdloop()
  File "C:\Program Files\Python36\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
  File "C:\Program Files\Python36\lib\pdb.py", line 418, in onecmd
return cmd.Cmd.onecmd(self, line)
  File "C:\Program Files\Python36\lib\cmd.py", line 217, in onecmd
return func(arg)
  File "C:\Program Files\Python36\lib\pdb.py", line 1025, in do_run
sys.argv = shlex.split(arg)
  File "C:\Program Files\Python36\lib\shlex.py", line 305, in split
return list(lex)
  File "C:\Program Files\Python36\lib\shlex.py", line 295, in __next__
token = self.get_token()
  File "C:\Program Files\Python36\lib\shlex.py", line 105, in get_token
raw = self.read_token()
  File "C:\Program Files\Python36\lib\shlex.py", line 206, in read_token
raise ValueError("No escaped character")

--
components: Library (Lib)
messages: 322595
nosy: ppperry
priority: normal
severity: normal
status: open
title: Bad behavior with "restart \" in pdb
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue34266] Bad behavior with "restart \" in pdb

2018-07-28 Thread ppperry


ppperry  added the comment:

Just to be clear, even though the traceback is python 3.6, the same bug occurs 
in 3.7 with an identical traceback except for some changes in line number

--

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



[issue34266] Bad behavior with "restart \" or "restart "" in pdb

2018-07-28 Thread ppperry


ppperry  added the comment:

`restart "` also crashes with the same tb

--
title: Bad behavior with "restart \" in pdb -> Bad behavior with "restart \" or 
"restart "" in pdb

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



[issue34266] Bad behavior with "restart \" or "restart "" in pdb

2018-07-28 Thread ppperry


ppperry  added the comment:

Both of those work and don't produce an error

--

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



[issue34284] Nonsensical exception message when calling `__new__` on some sys objects

2018-07-30 Thread ppperry


New submission from ppperry :

> type(sys.flags).__new__(type(sys.flags))
Traceback (most recent call last):
  File "", line 1, in 
type(sys.flags).__new__(type(sys.flags))
TypeError: tuple.__new__(sys.flags) is not safe, use sys.flags.__new__()

Ignoring the confusion caused by both the type and the instance being called 
"sys.flags", this error doesn't make sense. I am using "sys.flags" (the 
type).__new__, so why is it complaining?

"type(sys.flags)()" produces the standard "non-instantiable type" error. 

The same behavior also happens for "sys.version_info", but strangely not for 
any of the other sys constants.

--
components: Interpreter Core, Library (Lib)
messages: 322688
nosy: ppperry
priority: normal
severity: normal
status: open
title: Nonsensical exception message when calling `__new__` on some sys objects
type: behavior
versions: Python 3.7, Python 3.8

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



[issue34284] Nonsensical exception message when calling `__new__` on some sys objects

2018-07-30 Thread ppperry


ppperry  added the comment:

Your PR is not an improvement:
1. In this case, this will produce the error "tuple.__new__(sys.flags) is not 
safe". But I didn't call "tuple.__new__", I called sys.flags.__new__, and 
type(X).__new__(type(X)) should always be safe
2. The change in error message for namedtuples (A) isn't related and (B) isn't 
correct. `tuple.__new__(NamedTuple)` works, and produces a namedtuple object, 
so tuple.__new__ is what the error should point to.

--

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



[issue34284] Nonsensical exception message when calling `__new__` on non-instaniable object

2018-07-30 Thread ppperry


ppperry  added the comment:

Same thing happens for other objects, like 
`type(sys._getframe(0)).__new__(type(sys._getframe_))`, and presumably any 
object that one cannot instantiate by calling

--
title: Nonsensical exception message when calling `__new__` on some sys objects 
-> Nonsensical exception message when calling `__new__` on non-instaniable 
object

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



[issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects

2018-07-30 Thread ppperry


ppperry  added the comment:

The error I'm expecting here is "cannot create sys.flags objects". Anything 
else violates the fact that type(*args) is sugar for:

result = type.__new__(type, *args)
if isinstance(result, type):
result.__init__(*args)

("type" in the above snippet is a variable name, not the actual builtin "type")

--
title: Nonsensical exception message when calling `__new__` on some sys objects 
-> Nonsensical exception message when calling `__new__` on non-instaniable 
objects

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



[issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects

2018-07-30 Thread ppperry


ppperry  added the comment:

Thus, I think the bug is that "type(sys.flags).__new__" is an alias for 
"tuple.__new__" and is not in the code for __new__ calls that your PR touches.

--

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



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread ppperry


ppperry  added the comment:

issue30990 is related

--
nosy: +ppperry

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



[issue34279] RFC: issue a warning in regrtest when no tests have been executed?

2018-08-01 Thread ppperry


Change by ppperry :


--
title: RFC: issue a warning in regrtest when no test have been executed? -> 
RFC: issue a warning in regrtest when no tests have been executed?

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



[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2018-08-02 Thread ppperry


Change by ppperry :


--
title: setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX -> 
setup.py: _ctypes won't get built when system ffi is only in $PREFIX

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



[issue34327] test_subprocess fails

2018-08-02 Thread ppperry


Change by ppperry :


--
components: +Tests -Build
title: CPython make test crash -> test_subprocess fails
type: crash -> behavior

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



[issue34331] Incorrectly pluralized abstract class error message

2018-08-03 Thread ppperry


New submission from ppperry :

>>> class abstract(abc.ABC):
... @abc.abstractmethod
... def meth():
... pass
...
>>> x()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Can't instantiate abstract class x with abstract methods meth

Error should be "Can't instantiate abstract class abstract with abstract method 
meth" in the singular, because there is only one abstract method.

--
components: Interpreter Core, Library (Lib)
messages: 323059
nosy: Anjali Bansal, ppperry, rhettinger, serhiy.storchaka, terry.reedy, xtreak
priority: normal
severity: normal
status: open
title: Incorrectly pluralized abstract class error message
versions: Python 3.8

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



[issue34331] Incorrectly pluralized abstract class error message

2018-08-03 Thread ppperry


ppperry  added the comment:

No, this isn't causing me an actual problem, however the related issue34127 was 
accepted, and this one should be no harder to fix.

--

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



  1   2   3   >