[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Clarifying the diagnosis, the offending spurious bytes are only present when we use 3.0's GET above. That's because urllib.request.HTTPHandler asks for a vanilla http.client.HTTPConnection, which uses HTTP 1.1. IIUC, either we change the request

[issue4631] urlopen returns extra, spurious bytes

2008-12-15 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: I think your patch is good, but there may be another bug around: I wrote a script to check results of 3.x against 2.x, but many pages (http://groups.google.com/, http://en.wikipedia.org/) give 403: Forbidden for 3.x... but work with 2.x! If you

[issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname?

2008-12-18 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Chris, Is there a chance that this is some sort of protection on LJ's side? Does a given instance mean the same connection being reused? What happens with longer sleeps? -- nosy: +ajaksu2 ___ Python

[issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname?

2008-12-18 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hmm, notice that AbstractDigestAuthHandler handles retries: class AbstractDigestAuthHandler: def __init__(self, passwd=None): ... self.retried = 0 ... def reset_retry_count(self): self.retried = 0 def

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hi Mark, I think there's an overflow for ndigits that predates your patch: round(2, -2**31 +1) 2 round(2, -2**31 +2) nan (it looks like these lines above make 2.6 hang :/) Now, I'm getting a segfault in 3.0 when Ctrl + C-ing during a long

[issue4707] round() shows undocumented behaviour

2008-12-21 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Mark Dickinson rep...@bugs.python.org wrote: I don't think the hang itself should be considered a bug, any more than the hang from 10**(2**31-1) is a bug. Well, besides the fact that you can stop 10**(2**31-1) with Ctrl+C but not round(2, -2

[issue4733] Add a decode to declared encoding version of urlopen to urllib

2008-12-23 Thread Daniel Diniz
New submission from Daniel Diniz aja...@gmail.com: This patch adds a version of urlopen that uses available encoding information to return strings instead of bytes. The main goal is to provide a shortcut for users that don't want to handle the decoding in the easy cases[1]. One added benefit

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2009-01-01 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hi Chris Since dir calls retrlines and retrlines has a 'while 1:' loop, the bug probably comes from there. Either it hangs in the fp.readline call or the break condition is never met. Can you put some print diagnostics inside Lib/ftplib.py

[issue4753] Faster opcode dispatch on gcc

2009-01-03 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: IIUC, this is what gcc 4.2.4 generates on a Celeron M for the code Alexandre posted: movl-272(%ebp), %eax movl8(%ebp), %edx subl-228(%ebp), %eax movl%eax, 60(%edx) movl-272(%ebp), %ecx

[issue4676] python3 closes + home keys

2009-01-04 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: I can't reproduce this with py3k on linux, but I do get a traceback in the terminal used to launch idle: Exception in Tkinter callback Traceback (most recent call last): File /home/ajaksu/py3k/Lib/tkinter/__init__.py, line 1399, in __call__

[issue4881] Python's timezon handling: daylight saving option

2009-01-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Pablo, As Martin says, Python does support DST changes. But it might not have enough information about your timezone. If that's the case, take a look at these links to see how adding (up-to-date) support for your tz can be achieved: Building

[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Neat, gives a 10% speedup on a Celeron M with gcc 4.2. -- nosy: +ajaksu2 versions: +Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12669/gcc_4.2.4_linux_ia32_bench.txt ___ Python tracker

[issue4753] Faster opcode dispatch on gcc

2009-01-09 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Paolo, Applying your patches makes no difference with gcc 4.2 and gives a barely noticeable (~2%) slowdown with icc. These results are from a Celeron M 410 (Core Solo Yonah-based), so it's a rather old platform to run benchmarks

[issue3881] IDLE won't start in custom directory.

2009-01-18 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Maybe it's install into a symbolic link pointing to a path with spaces in it, and idle fails? -- nosy: +ajaksu2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3881

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: Removed file: http://bugs.python.org/file12731/likely_decref.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: New version of the patch, as well as one that doesn't touch Py_DECREF but defines likely and unlikely. Then, three ceval patches that result in small speedups (2% to 8% here), but don't play well together (neither with the Py_DECREF one). Since I

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: Added file: http://bugs.python.org/file12814/likely_object.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: Added file: http://bugs.python.org/file12815/ceval_exception.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: Added file: http://bugs.python.org/file12816/ceval_tuple_unpack.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-20 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: Added file: http://bugs.python.org/file12817/ceval_function.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2009-01-28 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Brett, It might be worth to update tzinfo-examples.py to use your concrete UTC then: http://svn.python.org/view/python/trunk/Doc/includes/tzinfo-examples.py?rev=62214view=markup -- nosy: +ajaksu2

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hi Stephane, I think you're seeing different buffering behavior, which I suspect is correct according to docs. codecs.open should default to line buffering[1], while open uses the system default[2]. The read() where the assert fails

[issue8198] Importing pydoc and overwriting sys.stdout, causes one char to be sent to the console when calling help()

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Nice buglet, please take a look at Lib/pydoc.py to follow :) As you point out, this is issue 1700304. 'plainpager', which outputs the help in these cases, uses 'sys.stdout.write(plain(text))', but Helper.help has a self.output.write

[issue1700304] pydoc.help samples sys.stdout and sys.stdin at import time

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: From #8198: I see a solution by turning Helper.output into a property, but it smells of over-engineering :) Passing all output to pagers should work too, unless we need Helper.output as a sort of sys.stderr. -- keywords: +easy nosy

[issue6650] sre_parse contains a confusing generic error message

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Thanks for the patch, LGTM assuming we don't need a test for this. Do you think the vague message could be less cryptic for users that didn't want lookbehind (or don't know what it is)? -- nosy: +ajaksu2 priority: - low stage: - patch

[issue6700] inspect.getsource() returns incorrect source lines

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Confirmed in trunk and py3k. Also affects inspect.getsourcelines. -- nosy: +ajaksu2 priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6700

[issue6878] outdated docstring in tkinter.Canvas.coords

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: I think the obvious code fix of list(map()) is less likely to cause surprises than updating the docstring to the new map in 3.x. -- keywords: +easy nosy: +ajaksu2 priority: - low stage: - needs patch type: - behavior

[issue7007] Tiny inconsistency in the orthography of url encoded in the doc of urllib.parse

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hits from py3k: Doc/library/urllib.rst:239: Convert a mapping object or a sequence of two-element tuples to a url-encoded Doc/library/urllib.rst:263: Convert the path component *path* from an encoded URL to the local syntax for a Doc

[issue7163] IDLE suppresses sys.stdout.write() return value

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: sys.stdout is a idlelib.rpc.RPCProxy in IDLE. It calls Idlelib.PyShell.PseudoFile.write - .PyShell.write - .OutputWindow.OutputWindow.write - .Percolator.Percolator.insert - ... I suppose we could mimic the return value patching

[issue7370] patch: BaseHTTPServer reinventing rfc822

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Thanks for the patch. Per issue 2849, use of rfc822 should be gone from the stdlib. Please re-open if you disagree. -- nosy: +ajaksu2 priority: - normal resolution: - invalid stage: - committed/rejected status: open - closed

[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Nice improvement. This would also solve the help(), modules brokenness, right? -- nosy: +ajaksu2 priority: - normal stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org

[issue7378] unexpected truncation of traceback

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Patch still applies to py3k, not applying cleanly to trunk anymore. Tests pass with patch on py3k. -- nosy: +ajaksu2 priority: - normal stage: - patch review ___ Python tracker rep

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: It looks like feed generators need this feature[1]. See also issue 5207 and a current implementation[2]. [1] http://validator.w3.org/feed/docs/error/InvalidRFC3339Date.html [2] http://code.google.com/p/formattime/ -- keywords: +easy

[issue7865] io close() swallowing exceptions

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Wouldn't this break code that currently works? -- nosy: +ajaksu2 priority: - low stage: - needs patch type: - behavior versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http

[issue7842] py_compile.compile SyntaxError output

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Change went into py3k without tests, do we want them? If so, please update Stage to test needed. -- nosy: +ajaksu2 priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org

[issue7943] Memory leak due to circular references in ssl.SSLSocket

2010-04-08 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7943

[issue7927] SSL socket is not closed properly

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Confirmed on trunk. -- nosy: +ajaksu2 priority: - normal stage: - test needed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7927

[issue4007] make clean fails to delete .a and .so.X.Y files

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Skip, was there a patch here? I can't find it in the bug lists, so I think we both missed it? Pinging Martin in case the tracker ate the patch :) -- nosy: +ajaksu2, loewis stage: - needs patch versions: +Python 2.7, Python 3.1

[issue8026] strftime bug when timedelta is negative

2010-04-08 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Confirmed on trunk, needs a simpler repro :) -- components: +Library (Lib) -None nosy: +ajaksu2 priority: - normal stage: - test needed versions: +Python 2.6, Python 2.7 -Python 2.5 ___ Python

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-13 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- stage: unit test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue8370] change module builtins to __builtin__ in __import__ documentation

2010-04-13 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8370

[issue8297] AttributeError message text should include module name

2010-04-13 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +ajaksu2 stage: unit test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297

[issue2536] itertools.permutations docstring is misleading

2008-04-02 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: Currently, Modules/itertoolsmodule.c lines 2471-2475 are: PyDoc_STRVAR(permutations_doc, permutations(iterables[, r]) -- permutations object\n\ \n\ Return successive r-length permutations of elements in the iterable.\n\n\ permutations(range(4

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: This patch updates the behavior as per The Energy Policy Act of 2005: Start: Second Sunday in March End: First Sunday in November Time: 2 am local time -- keywords: +patch nosy: +ajaksu2 Added file: http

[issue2210] Nested module import clutters package namespace

2008-04-02 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Not a bug IMHO, but a gotcha. Change x.py to from pack import y as q and you get the desired result. Check http://effbot.org/zone/import-confusion.htm -- nosy: +ajaksu2 __ Tracker [EMAIL PROTECTED] http

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: The test fails on this: def g(): try: return g() except ValueError: return -1 self.assertRaises(RuntimeError, g) Changing that return -1 to return sys.exc_info() shows that a RuntimeError was raised indeed. Also, using

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Er... 2007- : from the second Sunday in March to the first Sunday in November. :/ __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2525

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9926/tzinfo-examples.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2525 __ ___ Python

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Thomas: I confirm your patch triggers this behavior. I can reliably get a __subclasscheck__ error by trying to import sys after the bogus catching happens: def g(): ... try: ... return g() ... except ValueError: ... return

[issue2542] PyErr_ExceptionMatches must not fail

2008-04-03 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: The tests pass and prints the ignores. But I still see an issue: import sys def g(): try: return g() except: return sys.exc_info() g() (type 'exceptions.RuntimeError', 'maximum recursion depth exceeded while calling

[issue2548] Undetected error in exception handling

2008-04-04 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2548 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-05 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: New patch. I added the new rule and changed the old behavior to be wrong (a bit) less often. It may mess with code that depended on the previous wrong results. Given the (AFAIK) exemplificative nature of this file, this should not be a big

[issue508157] urllib.urlopen results.readline is slow

2008-04-05 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Well, this issue is still hurting performance, the most recent example was with a developer of a download manager. I suggest adding a buffer size argument to HTTPResponse.__init__ (defaulting to zero), along with docs that explain the problems

[issue2548] Undetected error in exception handling

2008-04-06 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: I've identified rev58032 [1] as the one introducing this issue. It's Brett's code, fixing a nasty crasher and adding a pre-built exception (PyExc_RecursionErrorInst). [1] http://svn.python.org/view?rev=58032view=rev P.S.: Thanks Thomas

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-07 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Changed the local dststart, dstend variables to lowercase, dates to times (in find start and end times) and the diff was created from trunk/ this time (as opposed to trunk/Doc/includes/). Added file: http://bugs.python.org/file9969/tzinfo

[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2008-04-07 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: I don't think it should stop using raw_input just because you changed stdin, as you can change it to something that will work with raw_input. Consider: import sys sys.stdin = open(/dev/tty) raw_input() a 'a' You can tie it to any object (e.g

[issue2576] httplib read() very slow due to lack of socket buffer

2008-04-07 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: The code patch is trivial. I believe it needs docs (both explaining how to use and warning against the problems it may cause), a NEWS entry and tests (at least to check what happens when an invalid value lands). I can work on those changes

[issue1285086] urllib.quote is too slow

2008-04-08 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: This is what I found doing some timings: For the short-circuit path, the regexp can make quote 10x as fast in exceptional cases, even comparing to the faster version in trunk. The average win for short-circuit seems to be twice as fast

[issue2576] httplib read() very slow due to lack of socket buffer

2008-04-08 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: The code patch is trivial, he said, only to find out it was not :) Facundo, thanks in advance for taking a look at this! This patch tries to implement, document and test an optional argument to HTTPConnection, which passes it to HTTPResponse

[issue902061] pydoc insists upon producing file: URLs

2008-04-12 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- versions: +Python 2.6 Tracker [EMAIL PROTECTED] http://bugs.python.org/issue902061 ___ Python-bugs-list mailing list

[issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout

2008-04-12 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- versions: +Python 2.6 -Python 2.4, Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2600 __ ___ Python-bugs-list

[issue836088] Update htmllib to HTML 4.01

2008-04-12 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- versions: +Python 2.6 -Python 2.5 Tracker [EMAIL PROTECTED] http://bugs.python.org/issue836088 ___ Python-bugs-list

[issue2576] httplib read() very slow due to lack of socket buffer

2008-04-12 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Also reported in #1542407 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2576 __ ___ Python-bugs-list mailing list Unsubscribe

[issue1156280] cmd.Cmd().cmdloop() can't read from file

2008-04-12 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Superseded by #2571 The user can change cmd.Cmd.use_rawinput to False and get the desired behaviour. -- nosy: +ajaksu2 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1156280

[issue1721241] code that writes the PKG-INFO file doesnt handle unicode

2008-04-12 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Currently tracked in #2562 -- nosy: +ajaksu2 versions: +Python 2.6 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1721241

[issue1779700] urlparse.urljoin does not obey current uri rfc (rfc 3986)

2008-04-12 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Duplicate of #1591035 -- nosy: +ajaksu2 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779700 _ ___ Python

[issue2195] urlparse() does not handle URLs with port numbers properly

2008-04-12 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Discussed in #754016 -- nosy: +ajaksu2 versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2195

[issue2676] email/message.py [Message.get_content_type]: Trivial regex hangs on pathological input

2008-04-23 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: [Reported by Alberto Casado Martín [1]] Message.get_content_type() hangs when very large values are split by the regex: ctype = paramre.split(value)[0].lower().strip() #line 439 paramre comes from line 26: paramre = re.compile(r'\s*;\s

[issue2548] Undetected error in exception handling

2008-08-13 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: FWIW, rev58032 introduced this: tstate = PyThreadState_GET(); if (++tstate-recursion_depth Py_GetRecursionLimit()) { --tstate-recursion_depth; PyErr_SetObject(PyExc_RuntimeError, PyExc_RecursionErrorInst); return

[issue3555] Regression: nested exceptions crash (Cannot recover from stack overflow)

2008-08-14 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: The following code works[1] on trunk and 2.5.1, but crashes with Fatal Python error: Cannot recover from stack overflow, on py3k as of rev65676: ## # Python 3.0b2+ (py3k:65676, Aug 14 2008, 14:37:38) # [GCC 4.1.3 20070929 (prerelease

[issue3555] Regression: nested exceptions crash (Cannot recover from stack overflow)

2008-08-14 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Antoine, Thanks for your analysis. I still believe this is a regression for the case described, but take my opinion with a grain of salt :) looking at the code for _Py_CheckRecursiveCall(), I don't think it is a bug but a feature. It does

[issue3605] Py_FatalError causes infinite loop

2008-08-19 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3605 ___ ___ Python-bugs-list mailing list

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Two small clues. First, a backtrace: #0 0xb7df102a in strcmp () from /lib/tls/i686/cmov/libc.so.6 #1 0x0809e678 in warn_explicit (category=0x81dd140, message=0xb7ac58f4, filename=0xb7acced0, lineno=1, module=0xb7f53300, registry

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-22 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Brett, I don't think I know C (and CPython) enough to fix this. I was able to get rid of this specific segfault with this: -const char *text_char = _PyUnicode_AsString(text); +const char *text_char = _PyUnicode_AsString

[issue3555] Regression: nested exceptions crash (Cannot recover from stack overflow)

2008-08-22 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Antoine, All the cases I could find would be more test than use cases. Given that most ways to abort I find in 3.0 are related to undetected errors in trunk, I'm almost convinced that 3.0 is right here :) My last worry is that it'd be kinda easy

[issue3643] Add more checks to testcapi

2008-08-23 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3643 ___ ___ Python-bugs-list mailing list

[issue3653] segfault calling sys.excepthook with non-Exception argument

2008-08-23 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: Calling sys.excepthook(1,'1',1) crashes 3.0: Python 3.0b3+ (py3k:65987, Aug 23 2008, 10:04:31) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type help, copyright, credits or license for more information. import sys

[issue3661] sys.call_tracing segfaults

2008-08-24 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: The following code causes a segfault for me: import sys; sys.call_tracing(type,2) Running on: Python 3.0b3+ (py3k:66015, Aug 24 2008, 16:21:19) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 gdb output: [New Thread

[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: This snippet causes a segfault from fileio_init calling PyMem_Free: import _fileio; _fileio._FileIO(1,0, 0 ) Found using Fusil [Switching to Thread -1210070848 (LWP 10184)] 0x0805f5ff in _PyObject_DebugCheckAddress (p=0xb7b2f0e8

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-24 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: This script segfaults: ## import _pickle obj = _pickle.Pickler(open(/bin/ls)) #can be open(__file__) for scripts try: obj.__init__('pouet', 87) except Exception as err: pass obj.dump(0) ### [Switching to Thread -1210775360 (LWP 19096

[issue3666] atexit.register with bad input segfaults on exit

2008-08-24 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: The following crashes the interpreter on exit: import sys, atexit; atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0); sys.exit() Found with Fusil. -- messages: 71862 nosy: ajaksu2 severity: normal status: open title

[issue3638] tkinter.mainloop() is meanling less and crash: remove it

2008-08-25 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3638 ___ ___ Python-bugs-list mailing list

[issue3634] invalid result value of _weakref.__init__()

2008-08-25 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3634 ___ ___ Python-bugs-list mailing list

[issue3694] Undetected error in _struct.pack_into

2008-08-26 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: The following code leads to XXX Undetected errors in debug builds of trunk and 3.0: import _struct _struct.pack_into(b8, bytearray(1), None) Besides that, there's something fishy happening in non-debug builds: 2.6: _struct.pack_into(b8

[issue3692] improper scope in list comprehension, when used in class declaration

2008-08-26 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: I believe the problem is that list comprehensions in 3.0 have scope like that of genexprs in 2.5, but the change was deliberate (as it also avoids leaking of temp variables). Compare to 2.5: class Foo(object): ...class_attribute1 = 1

[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-08-27 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3623 ___ ___ Python-bugs-list mailing list

[issue3521] file.readline: bad exception recovery

2008-08-27 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Patch attached, suggested test below. def test_readline(): for mode in ('r', 'rb', 'r+', 'r+b'): f = open(__file__, mode) try: f.readline(0.1) except TypeError: tmp = f.readline

[issue3708] os.urandom(1.1): infinite loop

2008-08-27 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: Calling os.urandom(1 + float(x)) ends in a infinite loop due to a naive condition check: while len(bytes) n: bytes += read(_urandomfd, n - len(bytes)) Trivial patch attached. -- components: Library (Lib) files: urandom.diff

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2008-08-28 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Hagen, does this simple patch (against 2.6) solve it for you? Index: Lib/pickle.py === --- Lib/pickle.py (revision 66050) +++ Lib/pickle.py (working copy) @@ -1121,6

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2008-08-28 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: FWIW, there's a mapping of 2.6:3.0 modules in lib2to3: from lib2to3.fixes.fix_imports import MAPPING The attached patch uses that for a quick and dirty way of loading 3.0 pickles in 2.6. -- keywords: +patch Added file: http

[issue2501] xml.sax.parser() doesn't terminate when given a filename

2008-08-28 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: ISTM that this release blocker can be solved by changing xml.sax.xmlreader.py line 122 from: while buffer != : to while buffer != b: -- nosy: +ajaksu2 ___ Python tracker [EMAIL

[issue3708] os.urandom(1.1): infinite loop

2008-08-28 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Gregory, IMHO your patch is better in all aspects. Regarding my patch, the API wouldn't change at all, as the source reads: while len(bytes) int(n): bytes += read(_urandomfd, n - len(bytes)) So n - len(bytes) restricts

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: This patch fixes Armin's list of crashers for trunk. Looking for others like them. -- nosy: +ajaksu2 versions: +Python 2.6 Added file: http://bugs.python.org/file11311/itercrashers.diff ___ Python

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11311/itercrashers.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Hopefully the right patch this time :/ Added file: http://bugs.python.org/file11312/itercrashers.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Raymond, I think a different solution would be great, as the performance penalty might become nasty in tight loops if we miss some detail. Regarding the possible impact, I hope we can get a better estimate since the other examples

[issue2501] xml.sax.parser() doesn't terminate when given a filename

2008-09-01 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Looks like this is a duplicate of issue3590, so this patch fixes two release blockers ;) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2501

[issue2016] Crash when modifying the **kwargs passed to a function.

2008-09-08 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: -- nosy: +ajaksu2 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2016 ___ ___ Python-bugs-list mailing list

[issue3811] Update Unicode database to 5.1.0

2008-09-10 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: #66363 breaks test_unicode and test_format on 3.0. -- nosy: +ajaksu2 versions: +Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3811

[issue3844] Script: find untested C functions

2008-09-11 Thread Daniel Diniz
New submission from Daniel Diniz [EMAIL PROTECTED]: The attached script reports C functions not flexed by unittests. It needs a 'coverage' build and a run of the tests. Coverage data is then passed to gcov and those functions with zero calls written to a text file, grouped by source file. It's

  1   2   3   4   5   6   7   8   9   10   >