[issue28776] Duplicate method names should be an error

2016-11-22 Thread Peter Inglesby
Peter Inglesby added the comment: OK, I'll defer to your collective decades of experience and wisdom! Thanks for all you all do for Python. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28776] Duplicate method names should be an error

2016-11-22 Thread Peter Inglesby
Peter Inglesby added the comment: Victor, I'm not talking about redefining a method, and David, I don't think I'm talking about changing dynamic nature of the class dictionary. All I'm suggesting is that if some code contains a class whose body defines the same method twice, Python should

[issue28776] Duplicate method names should be an error

2016-11-22 Thread Peter Inglesby
New submission from Peter Inglesby: It should be an error for a class to define a method twice. That is, Python should raise an exception when the following code is loaded: class C: def m(self): # do something def m(self): # do something I have just witnessed

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Peter Inglesby
New submission from Peter Inglesby: The following code raises `sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.` when I would expect it to raise `AssertionError: Problem in adapter`. import sqlite3 class Point: def __init__(self, x, y): self.x

[issue22377] %Z in strptime doesn't match EST and others

2016-05-16 Thread Peter Inglesby
Peter Inglesby added the comment: Given the difference between the documented and the actual behaviours, and given that it's apparently not obvious what the correct fix should be, would a patch that updates the docs (to say that %Z only matched GMT and UTC) be welcome? -- nosy

[issue26583] test_timestamp_overflow fails

2016-03-20 Thread Peter Inglesby
New submission from Peter Inglesby: I get the following test failure against changeset 100576 on OSX 10.9.5: $ ./python.exe -m test test_import [1/1] test_import test test_import failed -- Traceback (most recent call last): File "/Users/peteringlesby/src/cpython/Lib/test/test_import/__i

[issue26560] Error in assertion in wsgiref.handlers.BaseHandler.start_response

2016-03-19 Thread Peter Inglesby
Peter Inglesby added the comment: I found it while reading the source. Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file42188/issue26560.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26583] test_timestamp_overflow fails

2016-03-19 Thread Peter Inglesby
Peter Inglesby added the comment: The problem is that I have PYTHONDONTWRITEBYTECODE set in my environment. Should the setUp and tearDown methods ensure that PYTHONDONTWRITEBYTECODE is cleared and reset? -- ___ Python tracker <

[issue26583] test_timestamp_overflow fails

2016-03-19 Thread Peter Inglesby
Peter Inglesby added the comment: I can reproduce it reliably. I ran ./configure with --with-pydebug. I'm not using NFS, and I'm not aware of anything else unusual about my filesystem. The fact that a timestamp overflows in the failing test is a red herring -- the following also fails

[issue26560] Error in assertion in wsgiref.handlers.BaseHandler.start_response

2016-03-14 Thread Peter Inglesby
New submission from Peter Inglesby: The line: assert int(status[:3]),"Status message must begin w/3-digit code" should be something like: assert status[:3].isnumeric(), "Status message must begin w/3-digit code" -- components: Library (Lib) messages: 261773 no

[issue16482] pdb.set_trace() clobbering traceback on error

2015-01-29 Thread Peter Inglesby
Peter Inglesby added the comment: I've just hit this. Is there anything I can do to help get this fixed?` -- nosy: +inglesp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16482

[issue21924] Cannot import anything that imports tokenize from script called token.py

2014-07-05 Thread Peter Inglesby
New submission from Peter Inglesby: A script called token.py that imports anything that ends up importing tokenize, such as logging, triggers the following error when the script is run: $ cat token.py import tokenize $ python3 token.py Traceback (most recent call last): File token.py, line

[issue21435] Segfault in gc with cyclic trash

2014-05-09 Thread Peter Inglesby
Peter Inglesby added the comment: It was actually through playing with aiohttp that I first hit this issue. I think I originally hit the problem with something like: import asyncio import aiohttp @asyncio.coroutine def do_work(future): response = yield from aiohttp.request('get', 'http

[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-05 Thread Peter Inglesby
New submission from Peter Inglesby: The following code causes a segfault when run under Python3.4+ on OSX10.9. # segfaulter.py import asyncio class A: pass class B: def __init__(self, future): self.future = future def __del__(self): self.a = None

[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-30 Thread Peter Inglesby
Peter Inglesby added the comment: Ok, I've now attached a patch with tests. -- Added file: http://bugs.python.org/file27353/issue16055-fix-with-tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16055

[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Peter Inglesby
Peter Inglesby added the comment: This behaviour is correct. Years divisible by 4 are leap years, except years divisible by 100, except years divisible 400. Source http://en.wikipedia.org/wiki/Leap_year. -- nosy: +inglesp ___ Python tracker rep

[issue16078] Calendar.leapdays(y1,y2) bug

2012-09-28 Thread Peter Inglesby
Changes by Peter Inglesby peter.ingle...@gmail.com: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16078 ___ ___ Python-bugs-list

[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Peter Inglesby
Peter Inglesby added the comment: The attached patch updates the error message to: int(base=100, x='123') Traceback (most recent call last): File stdin, line 1, in module ValueError: int() base must be = 2 and = 36, or 0 -- keywords: +patch nosy: +inglesp Added file: http

[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-28 Thread Peter Inglesby
Peter Inglesby added the comment: Ah, sorry about that. Are you happy for me to write the test? Poking around the C API docs suggests that I should call PyErr_Fetch() to get the value of the a raised exception, but I can't see any precedent for this in existing test code. Can you point me

[issue16073] fix map() statement in list comprehension example

2012-09-28 Thread Peter Inglesby
Peter Inglesby added the comment: Have attached a patch with suggested update. Have also grepped for similar issues elsewhere in documentation, and haven't found anything, but may have missed something. -- keywords: +patch nosy: +inglesp Added file: http://bugs.python.org/file27332