[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.

2007-10-31 Thread Simon
Changes by Simon: -- nosy: +bind _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1651995> _ ___ Python-bugs-list mailing list Unsubs

[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5

2007-11-01 Thread Simon
Simon added the comment: The 255 -> 127 change works for me. Let me know if I can help with unit tests or whatever to get this patched. _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue8534] multiprocessing not working from egg

2010-04-26 Thread simon
New submission from simon : testmultiprocessing.py: def main(): import multiprocessing proc = multiprocessing.Process(target=runhi) proc.start() proc.join() def runhi(): print 'hi' if __name__ == "__main__": main() testmultiprocessing.py

[issue8534] multiprocessing not working from egg

2010-04-26 Thread simon
Changes by simon : -- keywords: +patch Added file: http://bugs.python.org/file17092/forking.patch ___ Python tracker <http://bugs.python.org/issue8534> ___ ___

[issue8093] IDLE processes don't close

2011-06-21 Thread Simon
Simon added the comment: Not sure if this is related, but for me none of the F5 processes (command line "pythonw.exe -c __import__('idlelib.run').run.main(True) ") ever exit on either 2.7.2 or 3.2.1rc1. ------ nosy: +Simon ___ P

[issue15901] multiprocessing sharedctypes Array don't accept strings

2012-09-10 Thread Simon
Changes by Simon : -- assignee: -> docs@python components: +Documentation -ctypes nosy: +docs@python type: crash -> behavior ___ Python tracker <http://bugs.python.org/i

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
New submission from simon : works in 2.6, fails in 3.2.2 import unittest class MyTest(unittest.TestCase): def test_a(self): exec(compile("a = 1", '', 'single')) assert a == 1 if __name__ == '__main__': unittest.main() -

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon added the comment: seems i need to use exec(compile("a = 1", '', 'single'), globals()) -- ___ Python tracker <http://bugs.python.org/issue12928> ___ __

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon added the comment: Can't get this one working: import unittest class MyTest(unittest.TestCase): def test_a(self): b = 1 exec(compile("a = b + 1", '', 'single')) assert a == 2 if __name

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread simon
New submission from simon : def __getattr__(self, attr): # XXX this is a fallback mechanism to guard against these # methods getting called in a non-standard order. this may be # too complicated and/or unnecessary. # XXX should the __r_XXX attributes be public

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-09-01 Thread Simon Anders
Changes by Simon Anders: -- components: Build, Interpreter Core severity: normal status: open title: ''.find() gives wrong result in Python built with ICC versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-09-01 Thread Simon Anders
New submission from Simon Anders: I have just encountered a strange bug affecting Python 2.5.1 on an x86_64 Linux, but only when compiled with the Intel C Compiler (ICC) 10.0, not a GCC-compiled Python. On my Intel-compiled one, which otherwise seems to work fine, ''.find() works incor

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-09-02 Thread Simon Anders
Simon Anders added the comment: Martin, you are right: is is related to compiler optimization. I have boiled it down to a call of stringlib_find (defined in Python-2.5.1/Objects/stringlib/find.h) and this runs fine with 'icc -O2' but incorrectly for 'icc -O3'. (The test co

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-09-02 Thread Simon Anders
Simon Anders added the comment: Martin: I've boiled down the test case a bit more and removed all Python-specific types and macros, so that it can now be compiled stand-alone. (Updated test case 'findtest.c' attached.) I didn't feel like diving into the code much deeper, and

[issue1358] Compile error on OS X 10.5

2007-11-22 Thread Simon Percivall
Simon Percivall added the comment: It has to do with the MACOSX_DEPLOYMENT_TARGET. If it's set to 10.4, the legacy version of setpgrp is used (with args), it it's 10.5, setpgrp expects no arguments. It seems configure won't detect the difference. -- n

[issue1084] ''.find() gives wrong result in Python built with ICC

2007-12-04 Thread Simon Anders
Simon Anders added the comment: Update to the story: After I submitted the bug report to Intel, they investigated and quickly confirmed it to be a compiler bug, whcih they then managed to fix. I have just got an e-mail from Intel that the newest available version of ICC, namely version

[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-02-11 Thread Simon Percivall
New submission from Simon Percivall: _safe_repr() tries to handle the case where two objects are unorderable by ordering on (str(type(key)), key, value), but this fails when str(type(key)) is equal for two objects, but key is different and unorderable. Easy fix: order just on the string

[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-03-18 Thread Simon Percivall
Changes by Simon Percivall <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file9746/test_pprint30_bug.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2074] pprint._safe_repr() unsafe on ordering differently types objects with same str represenation

2008-03-18 Thread Simon Percivall
Simon Percivall <[EMAIL PROTECTED]> added the comment: It's still a problem, as the test case demonstrates. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2074> __ ___

[issue8158] documentation of 'optparse' module incomplete

2010-03-16 Thread Simon Anders
New submission from Simon Anders : The class optparse.OptionParser supports a number of useful keyword arguments to the initializer, which are not documented in the Python Standard Library documentation, here: http://docs.python.org/library/optparse.html This is a bit unfortunate. For example

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-11 Thread Simon Jagoe
New submission from Simon Jagoe : I have been using sqlalchemy and sqlamp in a project for a while with Python 2.5.x and Python 2.6.4. With a recent upgrade to Python 2.6.5 (on Ubuntu Lucid Lynx), a particular operation began to fail when using sqlite. I have tracked this to using the sqlite3

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Simon Jagoe
Simon Jagoe added the comment: I will try to test this with the different combinations of python and sqlite versions. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Simon Jagoe
Simon Jagoe added the comment: Sorry for the waste of time. I have compiled Python 2.6.5 against sqlite3 3.6.22 (Lucid version) and 3.6.16-1ubuntu1 (Karmic version). The test I posted originally fails with sqlite3 3.6.22 and passes with sqlite3 3.6.16-1ubuntu1, so it would appear to be a

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2010-08-04 Thread Simon Cross
Simon Cross added the comment: I can confirm that I see the ('debian', 'squeeze/sid', '') on py3k and trunk but that the Python 2.6 under Ubuntu reports ('Ubuntu', '10.04', 'lucid'). -- _

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2010-08-04 Thread Simon Cross
Simon Cross added the comment: I think the problem might be that linux_distribution() reads /etc/debian_version first. The contents of the relevant files in /etc look like: $ cat /etc/debian_version squeeze/sid $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2010-08-04 Thread Simon Cross
Simon Cross added the comment: Patch attached to check /etc/lsb-release before checking other files. Taken from Ubuntu Python 2.6 copy of platform.py. Applies against trunk (r83728) with a small offset against py3k (r83728). -- keywords: +patch Added file: http://bugs.python.org

[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')

2010-08-04 Thread Simon Cross
Simon Cross added the comment: I think the intended means of accessing this information is via the lsb_release command (http://refspecs.freestandards.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html). That said, I don't know if the file format will change drastically u

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Simon Liedtke
New submission from Simon Liedtke : I'd like to have the method `index` not only for list, but also for collections.deque. Here is my attempt: http://bitbucket.org/derdon/hodgepodge/src/tip/extended_deque.py I'm looking forward to see this method implemented in

[issue10059] add the method `index` to collections.deque

2010-10-10 Thread Simon Liedtke
Simon Liedtke added the comment: I see that adding this method to a deque is useless. A list is better for this kind of operation. I just wrote it for fun and realized that it was implemented rather slow. -- resolution: -> rejected status: open ->

[issue12345] Add math.tau

2011-06-16 Thread Simon Baird
Changes by Simon Baird : -- nosy: +sbaird ___ Python tracker <http://bugs.python.org/issue12345> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12590] First line and cursor not visible when opening files

2011-07-19 Thread Simon Forman
New submission from Simon Forman : In IDLE if you open a file that is longer than the editor window the first line, with the cursor, is scrolled off the top of the window making it appear as though the file begins at the second line. This can be fixed by adding 'text.see("insert&quo

[issue10469] test_socket fails using Visual Studio 2010

2011-07-26 Thread Simon Buchan
Simon Buchan added the comment: Confirming this patch fixes the test_aynsc* tests in my VS10 build. Shouldn't it swap all WSA* defines to protect against this in the future, though? Alternatively, should the check for WSA* codes existing be in Lib\asyncore.py? -- nosy: +

[issue12590] First line and cursor not visible when opening files

2011-07-26 Thread Simon Forman
Simon Forman added the comment: You're very welcome. -- ___ Python tracker <http://bugs.python.org/issue12590> ___ ___ Python-bugs-list mailing list Unsubsc

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-16 Thread Simon Sapin
Simon Sapin added the comment: heapq_merge_key_duplicate.patch is a new patch with two code path. It also updates the function’s docstring (which the previous patch did not). Raymond, do you think the speed is worth the DRY violation? -- Added file: http://bugs.python.org/file24248

[issue14196] Unhandled exceptions in pdb return value display

2012-03-04 Thread Simon Chopin
New submission from Simon Chopin : This issue occurred at least in Python 2.7, I haven't checked in other versions. When stepping on a return statement, pdb calls the return value __str__() method to display it at the end of the line. Only, it doesn't handle the potential excepti

[issue4236] Crash when importing builtin module during interpreter shutdown

2010-11-20 Thread Simon Cross
Simon Cross added the comment: I'm attaching a patch to relax the check in PyModule_Create2 as suggested by the Amaury (http://bugs.python.org/issue4236#msg75409). The patch uses "PyThreadState_Get()->interp->modules == NULL" to determine whether the import machinery ha

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-20 Thread Simon Cross
Simon Cross added the comment: I made the minor changes needed to get Eli Bendersky's patch to apply against 3.2. Diff attached. -- nosy: +hodgestar Added file: http://bugs.python.org/file19675/issue2986.fix32.5.patch ___ Python tracker

[issue8647] PyUnicode_GetMax is undocumented

2010-11-20 Thread Simon Cross
Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue8

[issue8646] PyUnicode_EncodeDecimal is undocumented

2010-11-20 Thread Simon Cross
Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue8

[issue8645] PyUnicode_AsEncodedObject is undocumented

2010-11-20 Thread Simon Cross
Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue8

[issue10435] Document unicode C-API in reST

2010-11-20 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue10435> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-24 Thread Simon Cross
Simon Cross added the comment: My vote is that this bug be closed and a new feature request be opened. Failing that, it would be good to have a concise description of what else we would like done (and the priority should be downgraded, I guess

[issue15345] HOWTOs Argparse tutorial - code example raises SyntaxError

2012-07-13 Thread Simon Hayward
New submission from Simon Hayward : HOWTOs - Argparse Tutorial, the code example will raise a syntax error when run. A trailing python3 reference (if called as a function): 'end=""', to suppresses a newline remains. print "{}^{} == ".format(args.x, args.y

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-08-13 Thread Simon Sapin
Simon Sapin added the comment: I just remembered about this. I suppose it is too late for 3.3? -- ___ Python tracker <http://bugs.python.org/issue13742> ___ ___

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Simon Feltman
New submission from Simon Feltman: This came up while trying to build pygobject with Python 3.3. The problem is there are some erroneous imports in the fromlist with these bindings that can easily be fixed. But it is a behavioral change so I just wanted to raise awareness if it is not already

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Simon Feltman
Changes by Simon Feltman : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue15715> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Simon Feltman
Simon Feltman added the comment: I think pygobject still supports Python 2.5 which it look like importlib is available. I've submitted a patch to pygobject which will work regardless of if this regression is fixed or not: https://bugzilla.gnome.org/show_bug.cgi?id=6

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Simon Feltman
Simon Feltman added the comment: Should have been "...Python 2.5 which it looks like importlib is NOT available." -- ___ Python tracker <http://bugs.python.o

[issue15901] multiprocessing sharedctypes Array don't accept strings

2012-09-10 Thread Simon R
New submission from Simon R: I've simply tested the example reported in the py3k documentation, and it don't works. See the site: http://docs.python.org/py3k/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing.sharedctypes The program exit with this error:

[issue12688] ConfigParser.__init__(iterpolation=None) documentation != behavior

2011-08-03 Thread John Simon
New submission from John Simon : The ConfigParser docs say that when __init__ is called with interpolation=None, no interpolation occurs. But when this is done in Python 3.2.1, it actually results in an AttributeError upon getting or setting a value, due to self._interpolation being set to

[issue444582] Finding programs in PATH, adding shutil.which

2011-08-08 Thread Simon Law
Changes by Simon Law : -- nosy: +sfllaw ___ Python tracker <http://bugs.python.org/issue444582> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13194] zlib (de)compressobj copy() method missing on Windows

2011-10-16 Thread Simon Elén
New submission from Simon Elén : The zlib (de)compressobj copy() method is missing on Windows. Tested on Python 2.7.2 and 3.2.2 Windows binaries. I have not tried to build from source. (In the source code I can see a check for HAVE_ZLIB_COPY. Does the Windows binaries statically link the

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
New submission from Simon Sapin : Hi, The attached patch adds a 'key' optional parameter to the heapq.merge function that behaves as in sorted(). Related discussion: http://mail.python.org/pipermail/python-ideas/2012-January/013295.html This is my first contribution

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: The attached script benchmarks the basline (current implementation) against 3 new implementations, as suggested on http://mail.python.org/pipermail/python-ideas/2012-January/013296.html On my machine, the output is: merge_baseline per run, min of 3

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: Oops, the patch to the documentation would also need 'New in 3.3: the key parameter', with the right Sphinx directive. But that depends on whether this change ends up in 3.3 or 3.4. Does 3.3 still get ne

[issue5441] Convenience API for timeit.main

2012-01-09 Thread Simon Sapin
Changes by Simon Sapin : -- nosy: +ssapin ___ Python tracker <http://bugs.python.org/issue5441> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Simon Sapin
Simon Sapin added the comment: Raymond, please have a look at merge_3 in benchmark_heapq_merge.py. It is implemented as you say. Do you think the speed is worth the code duplication? -- ___ Python tracker <http://bugs.python.org/issue13

[issue16362] _LegalCharsPatt in cookies.py includes illegal characters

2012-10-30 Thread Simon Blanchard
New submission from Simon Blanchard: _LegalCharsPatt = r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=]" The above regex in cookies.py includes the the comma character but RFC 6265 https://tools.ietf.org/html/rfc6265 section 4.1.1 says: cookie-octet = %x21 / %x

[issue16362] _LegalCharsPatt in cookies.py includes illegal characters

2012-10-30 Thread Simon Blanchard
Simon Blanchard added the comment: I have a real world example. Using Apache, mod_wsgi and Django. Given this in the META dict: 'HTTP_COOKIE': 'yaean_djsession=23ab7bf8b260cbb2f2bc80b1c1fd98fa, yaean_yasession=ff2a3030ee3f428f91c6f554a63b459c', Django via the Python c

[issue16362] _LegalCharsPatt in cookies.py includes illegal characters

2012-10-31 Thread Simon Blanchard
Simon Blanchard added the comment: 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)', It's the Baidu spider according to the user agent string. (Baidu is the biggest search engine in China.) The serving app is D

[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law
New submission from Simon Law: The documentation in Python 2.7, 3.2, and 3.3 claim that: PyObject* PySequence_Fast(PyObject *o, const char *m) Return value: New reference. Returns the sequence o as a tuple, unless it is already a tuple or list, in which case o is returned... Unfortunately

[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law
Simon Law added the comment: It looks like this was caught in the 3.3 branch, but only fixed it in the comment: changeset: 75448:d8f68195210e user:Larry Hastings date:Mon Mar 05 22:59:13 2012 -0800 summary: Fix a comment: PySequence_Fast() creates a list, not a tuple

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: >> But patching the module to allow explicitly setting dest via keyword >> argument shouldn't hurt anybody. > > I agree that it wouldn't hurt anybody. If you can find a way to do > this, feel free to provide a patch. > > However,

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: Sorry, there was a small typo in the previous patch. Here's the newer version. -- Added file: http://bugs.python.org/file27860/15125-1.patch ___ Python tracker <http://bugs.python.org/is

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: Note that 15125-1.patch applies to Python 2.7 cleanly as it is a bugfix. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: 15125-2.patch applies to the default branch. It makes dest behave the same for positional and optional arguments in terms of name mangling. Also, there is a backward-compatibility path in Namespace to support old-style getattr() access. However, it'

[issue16398] deque.rotate() could be much faster

2012-11-03 Thread Simon Law
New submission from Simon Law: If you look at the implementation of deque.rotate(), it does the equivalent of deque.append(deque.popleft()) or deque.appendleft(deque.pop()). Unfortunately, for larger rotations, the pop() and append() calls just do too much work. Since the documentation

[issue16452] Add support for weak reference to bound methods

2012-11-11 Thread Simon Feltman
New submission from Simon Feltman: This is a feature request to include a "WeakMethod" or similar object to the weakref module. The object decomposes a bound method and holds a weakref to the object and unbound function. This can be a very useful utility in signal and ui based p

[issue16452] Add support for weak reference to bound methods

2012-11-11 Thread Simon Feltman
Simon Feltman added the comment: Indeed a duplicate of: http://bugs.python.org/issue14631 -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue14631] Instance methods and WeakRefs don't mix.

2012-11-11 Thread Simon Feltman
Simon Feltman added the comment: Just a note this is also referred to as a "WeakMethod" by some folks (so this ticket shows up in those searches). See also: http://bugs.python.org/issue813299 http://bugs.python.org/issue7464 http://bugs.python.org/

[issue14631] Instance methods and WeakRefs don't mix.

2012-11-11 Thread Simon Feltman
Simon Feltman added the comment: The WeakCallableRef that was attached seemed to support regular functions (or anything callable) which is nice. The naming also leaves room for a WeakCallableProxy. -- ___ Python tracker <http://bugs.python.

[issue14631] Instance methods and WeakRefs don't mix.

2012-11-11 Thread Simon Feltman
Simon Feltman added the comment: Some more complex examples from various libraries: https://github.com/django/django/blob/master/django/dispatch/saferef.py https://github.com/11craft/louie/blob/master/louie/saferef.py I think both of these originated in pydispatcher

[issue9974] tokenizer.untokenize not invariant with line continuations

2012-12-03 Thread Simon Law
Changes by Simon Law : -- nosy: +sfllaw ___ Python tracker <http://bugs.python.org/issue9974> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Simon Law
Simon Law added the comment: Raymond, looking at your patch, can we assert that deque->leftblock is never equal to deque->rightblock? If not, you need to use memmove() instead of memcpy(), which is unsafe for overlapping arrays. It is not clear to me that this invariant is true. At th

[issue12345] Add math.tau

2013-02-25 Thread Simon Baird
Simon Baird added the comment: https://github.com/search?q=%22TAU+%3D+2+%2A+Math.PI%22&type=Code https://github.com/search?q=%22TAU+%3D+PI+*+2%22&type=Code -- ___ Python tracker <http://bugs.python.org

[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue6230> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue6232> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-08-06 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker <http://bugs.python.org/issue6280> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6444] multiline exception logging via syslog handler

2009-08-19 Thread Simon Litchfield
Simon Litchfield added the comment: >From the manual for logging.handlers.SysLogHandler -- emit(record) The record is formatted, and then sent to the syslog server. If exception information is present, it is not sent to the server. Ideal, for me, would be to have each traceback line logged

[issue1175004] Export more libreadline API functions

2009-09-26 Thread Simon Arlott
Simon Arlott added the comment: Access to rl_reset_line_state (and possibly others in the Redisplay section) are also required, otherwise it's not possible to recover from KeyboardInterrupt during raw_input() if readline isn't in the expected editing mode. Example: 1. call raw_i

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-10-09 Thread Simon Cross
Simon Cross added the comment: The attached patch adds a simple implementation of time.timegm that calls calendar.timegm. It includes a short test to show that time.timegm(time.gmtime(ts)) == ts for various timestamps. I implemented a pure C version by pulling in the various functions needed

[issue2742] example code does not work

2008-05-10 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: This also affects Python 2.4 and 2.6 on Linux systems. Bug http://bugs.python.org/issue2763 is a duplicate of this one. The issue is that socketmodule.c doesn't convert empty strings to NULLs before passing hptr through to the underl

[issue2742] example code does not work

2008-05-10 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Attached a patch to correct the getaddrinfo(...) documentation and the code example in socket.rst. -- keywords: +patch Added file: http://bugs.python.org/file10237/getaddrinfo-doesnt-treat-empty-string-as-non

[issue2746] ElementTree ProcessingInstruction uses character entities in content

2008-05-10 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: cElementTree.ElementTree is a copy of ElementTree.ElementTree with the .parse(...) method replaced, so the original patch for ElementTree should fix cElementTree too. The copying of the ElementTree class into cElementTree happens in the c

[issue2736] datetime needs and "epoch" method

2008-05-10 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Attached a patch which adds a .totimetuple(...) method to datetime.datetime and tests for it. The intention is that the dt.totimetuple(...) method is equivalent to: mktime(dt.timetuple()) + (dt.microsecond / 100.0) -- ke

[issue2736] datetime needs and "epoch" method

2008-05-10 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Patch adding documentation for datetime.totimestamp(...). Added file: http://bugs.python.org/file10256/add-datetime-totimestamp-method-docs.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1491] BaseHTTPServer incorrectly implements response code 100

2008-05-11 Thread Simon Cross
Changes by Simon Cross <[EMAIL PROTECTED]>: -- nosy: +hodgestar __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1491> __ ___ Python-bugs-list mailin

[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Some quick digging in the code on trunk has revealed that by the time the base reaches PyInt_FromString in intobject.c, -909 has become 10. Surrounding numbers seem to come through fine. -- nosy: +hod

[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: In int_new in intobject.c the base -909 is used to indicate that no base has been passed through (presumably because NULL / 0 is a more common pitfall that -909). Thus -909 is equivalent to base 10. __ T

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: One of the examples Christoph tried was unicode(Exception(u'\xe1')) which fails quite oddly with: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 0: ordinal not in ran

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Concerning http://bugs.python.org/issue1551432: I'd much rather have working unicode(e) than working unicode(Exception). Calling unicode(C) on any class C which overrides __unicode__ is broken without tp_uni

[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Benjamin Peterson wrote: > What version are you using? In Py3k, str is unicode so __str__ can > return a unicode string. I'm sorry it wasn't clear. I'm aware that this issue doesn't apply to Python 3.0. I'm

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Attached a patch which implements Nick Coghlan's suggestion. All existing tests in test_exceptions.py and test_unicode.py pass as does the new unicode(Exception(u"\xe1")) test. Added file: http://bugs.python.org/file10

[issue2517] Error when printing an exception containing a Unicode string

2008-06-11 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Re msg67974: > Minor cleanup of Simon's patch attached - aside from a couple of > unneeded whitespace changes, it all looks good to me. > > Not checking it in yet, since it isn't critical for this week's beta &

[issue2517] Error when printing an exception containing a Unicode string

2008-06-19 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Justing prodding the issue again now that the betas are out. What's the next step? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3161] Missing import for sys in _abcoll

2008-06-21 Thread Simon Cross
New submission from Simon Cross <[EMAIL PROTECTED]>: The _hash method of the Set ABC uses sys.maxsize but doesn't import sys. The attached patch (against trunk) imports sys and adds a test to show the problem. There are also still some other _abcoll.py cleanups waiting in

[issue3161] Missing import for sys in _abcoll

2008-06-21 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: One could also make a case for simply removing the _hash method since it doesn't look like anything is using it? And anything that was using it would already be broken? ___ Python tracker <[E

[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

2008-06-21 Thread Simon Cross
New submission from Simon Cross <[EMAIL PROTECTED]>: It appears that ssl.SSLSocket attempts to override some of the methods socket.socket delegates to the underlying _socket.socket methods. However, this overriding fails because socket.socket.__init__ replaces all the methods mentio

[issue1923] meaningful whitespace can be lost in rfc822_escape

2008-08-28 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: I've just checked that the patch still applies cleanly to 2.6 and it does and the tests still passes. It looks like the patch has already been applied to 3.0 but without the test. The test part of the part applies cleanly

[issue1923] meaningful whitespace can be lost in rfc822_escape

2008-09-03 Thread Simon Cross
Simon Cross <[EMAIL PROTECTED]> added the comment: Poking the issue. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1923> ___ ___ Python

  1   2   >