[issue4236] Crash when importing builtin module during interpreter shutdown

2010-11-20 Thread Simon Cross
Simon Cross hodges...@gmail.com 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 has been

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-20 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

[issue8647] PyUnicode_GetMax is undocumented

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

[issue8646] PyUnicode_EncodeDecimal is undocumented

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

[issue8645] PyUnicode_AsEncodedObject is undocumented

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

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-24 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

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

2010-08-04 Thread Simon Cross
Simon Cross hodges...@gmail.com 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'). -- ___ Python tracker rep...@bugs.python.org

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

2010-08-04 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

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

2010-08-04 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

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

2010-08-04 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

[issue3932] HTMLParser cannot handle '' and non-ascii characters in attribute names

2008-09-26 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: I can't reproduce this on current trunk (r66633, 27 Sep 2008). I checked sys.getdefaultencoding() but that returned 'ascii' as expected and I even tried language Python with LANG=C ./python but that didn't fail either. Perhaps this has been fixed

[issue3932] HTMLParser cannot handle '' and non-ascii characters in attribute names

2008-10-03 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: I've tracked down the cause to the .unescape(...) method in HTMLParser. The replaceEntities function passed to re.sub() always returns a unicode character, even when matching string s is a byte string. Changing line 383 to: return

[issue4446] Distutils Metadata Documentation Missing platforms Keyword

2008-11-27 Thread Simon Cross
New submission from Simon Cross [EMAIL PROTECTED]: The section on Additional meta-data in Doc/distutils/setupscript.rst is missing any reference to the setup() platforms keyword. I've attached a patch which fills in the basics but there are some outstanding questions: - Does note (4) about

[issue4336] Fix performance issues in xmlrpclib

2008-12-01 Thread Simon Cross
Changes by Simon Cross [EMAIL PROTECTED]: -- nosy: +hodgestar ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4336 ___ ___ Python-bugs-list mailing list

[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 underlying system

[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-none.diff

[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 call

[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) -- keywords

[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.python.org/issue2736

[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 mailing list Unsubscribe

[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: +hodgestar

[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. __ Tracker

[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 range(128) The reason for this is Exception

[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_unicode anyway

[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 testing on both Python 2.5 and Python 2.6

[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/file10580/exception-unicode

[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 release - I'd prefer to leave it until

[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.python.org/issue2517

[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 issue 2226

[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 [EMAIL PROTECTED] http

[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 mentioned

[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 to 3.0 too

[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-bugs-list mailing list

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: I've attached a patch for trunk / 2.6 that adds recv_into and recvfrom_into methods to ssl.SSLSocket and does a minor re-ordering of the nasty lambdas in __init__. The recv_into method is a port of the one from 3.0. The recvfrom_into method

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Attach recvfrom_into method patch for 3.0. Added file: http://bugs.python.org/file11390/3k-ssl-methods.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3162

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Tests for recv* and send* methods in 3.0 (2.6 tests coming shortly). Added file: http://bugs.python.org/file11392/3k-ssl-tests.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3162

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: Test for recv* and send* in 2.6. The tests revealed some bugs so this patch fixes those and supercedes trunk-ssl-methods.patch. Of particular note is that recv_into called self.read(buf, nbytes) which isn't supported in _ssl.c in 2.6. I've

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: self.read(buf, nbytes) Shouldn't this function be named readinto()? There is no readinto function (and I suspect one is unlikely to be added now). In Py3k SSLSocket.read takes both len and buffer as optional arguments

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

2008-09-05 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: @Bill Janssen: There are currently two patch sets which I think should be applied. For 2.6 it's just trunk-ssl-tests.patch. For 3.0 it's 3k-ssl-methods.patch and 3k-ssl-tests.patch. @Amaury Forgeot d'Arc I agree it's not great nomenclature

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

2008-09-08 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: And thanks for looking at them and applying! :) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3162

[issue3823] ssl.wrap_socket() is incompatible with servers that drop privileges, due to keyfile requirement

2008-09-10 Thread Simon Cross
Simon Cross [EMAIL PROTECTED] added the comment: I've dug around in the code a bit and the keyfile, certfile and ca_certs filename arguments to SSLSocket.__init__ are passed down into newPySSLObject in _ssl.c and from there directly to SSL_CTX_* function from OpenSSL so making these arguments

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

2009-08-06 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list

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

2009-10-09 Thread Simon Cross
Simon Cross hodges...@gmail.com 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

[issue17423] libffi on 32bit is broken on linux

2013-03-15 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17423 ___ ___ Python-bugs-list

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

2009-06-07 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6230 ___ ___ Python-bugs-list

[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6232 ___ ___ Python-bugs-list

[issue16251] pickle special methods are looked up on the instance rather than the type

2014-02-16 Thread Simon Cross
Simon Cross added the comment: Genshi is affected by the 3.4 regression too (it has a class that defines __getnewargs__ and __getattr__). -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16251

[issue16251] pickle special methods are looked up on the instance rather than the type

2014-02-16 Thread Simon Cross
Simon Cross added the comment: I have an ugly work-around for those affected: def __getattr__(self, name): # work around for pickle bug in Python 3.4 # see http://bugs.python.org/issue16251 if name == __getnewargs_ex__: raise AttributeError(%r has

[issue26252] Add an example to importlib docs on setting up an importer

2016-02-03 Thread Simon Cross
Changes by Simon Cross <hodges...@gmail.com>: -- nosy: +hodgestar ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26252> ___ __

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
Simon Cross added the comment: The documentation for __ipow__ [4] suggests that the intention was to support the modulus argument, so perhaps that argues for fixing the behaviour of PyNumber_InPlacePower. [4] https://docs.python.org/3/reference/datamodel.html#object.__ipow__

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
New submission from Simon Cross : The documentation for PyNumber_InPlacePower [1] reads: This is the equivalent of the Python statement o1 **= o2 when o3 is Py_None, or an in-place variant of pow(o1, o2, o3) otherwise. If o3 is to be ignored, pass Py_None in its place (passing NULL for o3

[issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object

2020-11-04 Thread Simon Cross
Change by Simon Cross : -- nosy: +hodgestar ___ Python tracker <https://bugs.python.org/issue42262> ___ ___ Python-bugs-list mailing list Unsubscribe: