[issue12052] round() erroneous for some large arguments

2011-05-10 Thread Neil
New submission from Neil : round() returns incorrect results for certain large real-integer arguments. Demonstration via interpreter session: >>> x = 2.0**52+1 # Huge, odd double integer near limits of what IEEE format >>> can fully represent in its mantissa par

[issue46657] Add mimalloc memory allocator

2022-02-06 Thread Neil Schemenauer
Neil Schemenauer added the comment: Thanks, I'm indeed interested. Most credit goes to Christian for advancing this. For the missing stdatomic.h, would it be appropriate to have an autoconfig check for it? Can just disable mimalloc if it doesn&#x

[issue46657] Add mimalloc memory allocator

2022-02-07 Thread Neil Schemenauer
Neil Schemenauer added the comment: My preference would be for --with-mimalloc=yes in an upcoming release. For platforms without the required stdatomic.h stuff, they can manually specify --with-mimalloc=no. That will make them aware that a future release of Python might no longer build (if

[issue46730] Please consider mentioning property without setter when an attribute can't be set

2022-02-12 Thread Neil Girdhar
New submission from Neil Girdhar : class C: @property def f(self) -> int: return 2 class D(C): pass D().f = 2 Gives: Traceback (most recent call last): File "/home/neil/src/cmm/a.py", line 10, in D().f = 2 AttributeError: can't set attribute

[issue46730] Please consider mentioning property without setter when an attribute can't be set

2022-02-12 Thread Neil Girdhar
Neil Girdhar added the comment: Thank you, this would have saved me a lot of time! On Sat, Feb 12, 2022 at 8:37 PM Alexander wrote: > > Alexander added the comment: > > Indeed, the error message does not help to identify the problem. Moreover, > it collides with si

[issue46757] dataclasses should define an empty __post_init__

2022-02-15 Thread Neil Girdhar
New submission from Neil Girdhar : When defining a dataclass, it's possible to define a post-init (__post_init__) method to, for example, verify contracts. Sometimes, when you inherit from another dataclass, that dataclass has its own post-init method. If you want that method to also d

[issue46757] dataclasses should define an empty __post_init__

2022-02-19 Thread Neil Girdhar
Neil Girdhar added the comment: On Sat, Feb 19, 2022 at 2:51 AM Vedran Čačić wrote: > > Vedran Čačić added the comment: > > That "except AttributeError" approach is a powerful bug magnet, since it > can very easily mask real attribute errors stemming from misspelled

[issue46757] dataclasses should define an empty __post_init__

2022-02-19 Thread Neil Girdhar
Neil Girdhar added the comment: > I'm not crazy about adding a method to every dataclass just for the 0.1% of > the times it's needed. I'm not sure I totally understand the cost here. You can have a single shared global function that you set on each dataclass. So the

[issue46757] dataclasses should define an empty __post_init__

2022-02-20 Thread Neil Girdhar
Neil Girdhar added the comment: > How would an arbitrary derived class know how to call this? It can't. There > has to be knowledge of the base class's requirements already. Surely knowing > "__post_init__ must be called with some_arg" isn't too diffe

[issue46757] dataclasses should define an empty __post_init__

2022-02-21 Thread Neil Girdhar
Neil Girdhar added the comment: @Raymond yeah I've been thinking about this some more, and there's no way to have a "top level" method with the dataclass decorator. I think I will make a case to have a class version of dataclasses that works with inheritance. Class ver

[issue46828] math.prod can return integers (contradicts doc)

2022-02-22 Thread Neil Webber
New submission from Neil Webber : The math module documentation says: Except when explicitly noted otherwise, all return values are floats. But this code returns an integer: from math import prod; prod((1,2,3)) Doc should "explicitly note otherwise" here, I imagine. The i

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Neil Girdhar
Neil Girdhar added the comment: @eric Good thinking. Would it make sense to add to the documentation as well that the __post_init__ methods aren't collected, and you should call super's __post_init__ if there is one using something like if hasattr(super(), &quo

[issue1185] py3k: Completely remove nb_coerce slot

2007-09-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: I made the changes as suggest by Guido. Commited as SVN rev 58226. Thanks for the patch. -- nosy: +nas __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1134] Parsing a simple script eats all of your memory

2007-09-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: It looks to me like fp_readl is no longer working as designed and the patch is not really the right fix. The use of "decoding_buffer" is tricky and I think the conversion to bytes screwed it up. It might be clearer to have a separate "de

[issue1518] Fast globals/builtins access (patch)

2007-11-29 Thread Neil Toronto
Neil Toronto added the comment: Christian: Thanks for that, I'll have to remember DEBUG_LEAK in the future. :) It looks like it may be acting correctly since there *is* now a fastglobals object that needs collecting, and also a new tuple built from co_names + "__builtins__". I do

[issue9637] docs do not say that urllib uses HTTP_PROXY

2012-01-09 Thread Neil Muller
Neil Muller added the comment: This patch is now more than a year old with no comment. What needs to happen to get this bug fixed? -- ___ Python tracker <http://bugs.python.org/issue9

[issue11439] subversion keyword breakage

2011-07-05 Thread Neil Muller
Neil Muller added the comment: SVN_Revision.diff replaces the remaining "$Revision$" keywords in 2.7 with the values from the last SVN checkout I have. This seems the correct minimal fix for the issues caused by code parsing the revision tag in Python 2. I've left the various

[issue11439] subversion keyword breakage

2011-07-05 Thread Neil Muller
Neil Muller added the comment: This patch removes or replaces a number SVN keywords which aren't buried in comments. I've removed '__revision__ = "$Id$"' cases - mainly present in distutils - as no-one appears to using these. I've replaced values in t

[issue3605] Py_FatalError causes infinite loop

2011-07-28 Thread Neil Aspinall
Neil Aspinall added the comment: Would it be possible for this issue's fix (PyErr_Occurred() returning null when the thread state is null) to be applied to the 2.7 branch? -- nosy: +naspinal ___ Python tracker <http://bugs.python.org/i

[issue9616] copy.deepcopy() copying pointers from a dict/dict/list, should copy values

2010-08-15 Thread Neil Harkins
New submission from Neil Harkins : hi. after using deepcopy() on a nested dict/list structure, i noticed that modifications to the deepcopied structure were affecting the original. this looks to me like a serious bug: >>> import copy >>> foo = { 'a':[1,2,3

[issue9616] copy.deepcopy() copying pointers from a dict/dict/list, should copy values

2010-08-15 Thread Neil Harkins
Neil Harkins added the comment: thanks for the quick response. that was just my working up a simplified repro, but you are correct: on modification there, it gets a new id() location. totally not what i would've expected (python flags it for copying when it changes, to save space?) ho

[issue9616] copy.deepcopy() copying pointers from a dict/dict/list, should copy values

2010-08-15 Thread Neil Harkins
Neil Harkins added the comment: learn something everyday. i have found the bug in my code, deepcopy() is not to blame. thx for your time! -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue1512791] module wave does no rounding

2010-08-25 Thread Neil Tallim
Neil Tallim added the comment: The differences are small enough that it probably doesn't matter which one of us makes the extra changes. It'll take one step less for you to implement them while applying the fixes, so it's probably easiest if I leave that in your court. Thanks

[issue1512791] module wave does no rounding

2010-08-28 Thread Neil Tallim
Neil Tallim added the comment: I use the wave module a fair bit and never once encountered this issue, so, yeah, it's probably a pretty low priority for backporting. It's definitely an edge-case sort of thing, the likes of which anyone affected has already handled in their applica

[issue9747] os.getresgid() documentation mentions "user ids", not "group ids"

2010-09-02 Thread Neil Tallim
New submission from Neil Tallim : Super-low-priority (it's obvious from context and unlike to confuse anyone who knows what they're looking at), but the os module's description for getresgid() is "Return a tuple (rgid, egid, sgid) denoting the current process’s real, effec

[issue1466065] base64 module ignores non-alphabet characters

2010-09-10 Thread Neil Tallim
Neil Tallim added the comment: I agree that it does look like RFC 3548 implicitly denies the use of \r and \n. A few *very* simple tests also makes it look like ommitting them breaks nothing, but we'd need to add a test that includes them before applying the patch. Other than that, I

[issue10120] concurrent.futures module is not installed properly

2010-10-16 Thread Neil Muller
New submission from Neil Muller : with make install (r85564), lib/python3.2/concurrent is created, but the futures module is not installed there. The attached trivial patch fixes this here. -- files: futures-Makefile.diff keywords: patch messages: 118858 nosy: Neil Muller priority

[issue10120] concurrent.futures module is not installed properly

2010-10-16 Thread Neil Muller
Neil Muller added the comment: There isn't an entry for anyone in maintainers.rst for concurrent.futures either. That should probably also be fixed. -- nosy: +bquinlan ___ Python tracker <http://bugs.python.org/is

[issue1343] XMLGenerator: nice elements

2010-10-16 Thread Neil Muller
Neil Muller added the comment: So what still needs to happen to get this in? Patch still applies to current python 3.2 trunk (r85564). -- ___ Python tracker <http://bugs.python.org/issue1

[issue9011] ast_for_factor unary minus optimization changes AST

2010-10-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: I'm late to the party but looks like Mark has a good handle on the issues. I would recommend not changing behavior in a bugfix release. I'm pretty sure code "in the wild" would be broken. -- __

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-10-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: Closing this bug. I don't think it makes sense to change the mhlib module in bugfix release. My patch is fairly simple but not simple enough to make me feel comfortable. -- resolution: -> wont fix status: open -

[issue10241] gc fixes for module m_copy attribute

2010-10-29 Thread Neil Schemenauer
New submission from Neil Schemenauer : I'm trying implement some saner module shutdown procedure (similar to issue 812369). One of the many problems I've run into is that the GC doesn't know about the m_copy attribute of modules. I think the attached patch is correct. tp_tr

[issue10255] refleak in initstdio

2010-10-30 Thread Neil Schemenauer
New submission from Neil Schemenauer : It looks to me like initstdio leaks a reference to "open". AFAIK, PyObject_SetAttrString() does not steal a reference. -- assignee: pitrou components: Interpreter Core files: initstdio_refleak.txt messages: 120008 nosy: nascheme, pitro

[issue10241] gc fixes for module m_copy attribute

2010-10-31 Thread Neil Schemenauer
Neil Schemenauer added the comment: Oops, my patch doesn't work since m_base can be shared by more than one module instance. I guess a different solution would be to cleanup the m_copy references on interpreter shutdown. Somehow they would have to be found t

[issue10241] gc fixes for module m_copy attribute

2010-11-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: The attached patch seems better. The copies of module dicts stored in the interpreter state are dereferenced when the interpreter shuts down. -- Added file: http://bugs.python.org/file19509/module_m_copy2.txt

[issue10333] Remove ancient backwards compatibility GC API

2010-11-05 Thread Neil Schemenauer
New submission from Neil Schemenauer : I think it should be safe to remove some backwards compatibility cruft. This was introduced during the 2.3 development cycle. -- files: gc_cruft.txt messages: 120554 nosy: nascheme priority: low severity: normal status: open title: Remove ancient

[issue11384] Deprecate, remove or document (correctly) os.popen

2011-03-03 Thread Neil Muller
Neil Muller added the comment: See issue6490 , which covers much of the same ground. -- nosy: +Neil Muller ___ Python tracker <http://bugs.python.org/issue11

[issue11439] subversion keyword breakage

2011-03-16 Thread Neil Muller
Neil Muller added the comment: This also affects a number of files under Lib, including some that set their version using "$Revision$". Since I stumbled on this issue by encountering some code that checks the version string in tkinker breaking, this is an issue that can break exis

[issue10465] gzip module calls getattr incorrectly

2010-11-20 Thread Neil Muller
New submission from Neil Muller : gzip._PaddedFile.__getattr__ chains out to getattr, but does so incorrectly (found via running the numpy test suite). The attached patch fixes this. -- files: gzip_getattr.diff keywords: patch messages: 121607 nosy: Neil Muller priority: normal

[issue10465] gzip module calls getattr incorrectly

2010-11-20 Thread Neil Muller
Neil Muller added the comment: Add a test demonstrating the error. -- Added file: http://bugs.python.org/file19653/gzip_getattr_test.diff ___ Python tracker <http://bugs.python.org/issue10

[issue6490] os.popen documentation in 2.6 is probably wrong

2010-11-20 Thread Neil Muller
Neil Muller added the comment: The attached patch grabs the os.popen documentation from python 2.7, throws away the deprecation notes, and adds a pointer to subprocess.Popen for more details. -- keywords: +patch nosy: +Neil Muller Added file: http://bugs.python.org/file19674

[issue9637] docs do not say that urllib uses HTTP_PROXY

2010-11-20 Thread Neil Muller
Changes by Neil Muller : -- versions: +Python 3.2 -Python 2.7 ___ Python tracker <http://bugs.python.org/issue9637> ___ ___ Python-bugs-list mailing list Unsub

[issue9637] docs do not say that urllib uses HTTP_PROXY

2010-11-20 Thread Neil Muller
Neil Muller added the comment: The problem is that the getproxies_environment function converts all environment variables to lower case before deciding whether to use the name. This means that whichever ends up last in os.environment will be used. The attached patch does two things. It

[issue1486713] HTMLParser : A auto-tolerant parsing mode

2010-11-20 Thread Neil Muller
Neil Muller added the comment: #975556 and #1046092 look like they should also be superseded by this. -- nosy: +Neil Muller ___ Python tracker <http://bugs.python.org/issue1486

[issue975556] HTMLParser lukewarm on bogus bare attribute chars

2010-11-20 Thread Neil Muller
Neil Muller added the comment: This should probably be solved as part of #1486713 . -- nosy: +Neil Muller ___ Python tracker <http://bugs.python.org/issue975

[issue1046092] HTMLParser fix to accept mailformed tag attributes

2010-11-20 Thread Neil Muller
Neil Muller added the comment: I think this change is makes the parser far too lenient. Something like the explicit tolerant mode proposed in #1486713 is a better solution. -- nosy: +Neil Muller ___ Python tracker <http://bugs.python.

[issue6490] os.popen documentation in 2.6 is probably wrong

2010-12-04 Thread Neil Muller
Changes by Neil Muller : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue6490> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: Looks like this has exposed some ugly code. From setup.py: # Figure out the location of the source code for extension modules # (This logic is copied in distutils.test.test_sysconfig, # so building in a separate directory do

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: I think my previous patch combined with sysconfig_builddir.patch fixes this issue. Someone will need to test on other platforms. Note that the messy code in setup.py and in the tests should still be cleaned up. BTW, distutils is a

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: One final patch for today (get_python_inc.patch). The patch combines my previous two patches and also cleans up some ugly code in setup.py and test_sysconfig.py. The source of the ugliness was that get_python_inc() did not wor

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10659/test_ext_src.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3054] test_disutils fails

2008-06-19 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10660/sysconfig_builddir.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1491] BaseHTTPServer incorrectly implements response code 100

2008-06-21 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: The attached patch is against recent svn (r64442), and adds samwyse's refactoring of the class. The test for server responses is made less restrictive when the request isn't HTTP/1.1. -- nosy: +Neil Muller

[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-09-13 Thread Neil Hodgson
Neil Hodgson <[EMAIL PROTECTED]> added the comment: The recommended addition includes the 'excluded license' section which appears unnecessary as Python does not distribute any source code redistributables, only the .DLL file which is a binary executable. Including this is l

[issue7753] newgil backport

2010-01-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: Looks like the 2.7 patch has a spurious change to /Lib/unittest/runner.py. -- nosy: +nascheme ___ Python tracker <http://bugs.python.org/issue7

[issue7753] newgil backport

2010-01-22 Thread Neil Schemenauer
Neil Schemenauer added the comment: Here is an updated set of patches that includes the ceval_gil.h file as well as the documentation changes. -- Added file: http://bugs.python.org/file15974/gil-2.7.txt ___ Python tracker <http://bugs.python.

[issue4698] Solaris buildbot failure on trunk in test_hostshot

2010-01-22 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue4698> ___ ___ Python-bugs-list

[issue1220756] Re-importing embedded thread dumps core

2010-01-22 Thread Neil Schemenauer
Changes by Neil Schemenauer : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue1220756> ___ ___ Python-bugs-

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-22 Thread Neil Schemenauer
New submission from Neil Schemenauer : Btrfs does not maintain a link count for directories (MacOS does the same I think). That confuses mhlib.py because it uses os.stat().st_nlinks as an optimization. The attached patch removes the optimization and make test_mhlib pass on Btrfs (and

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sat, Jan 23, 2010 at 06:09:33PM +, Antoine Pitrou wrote: > The documentation mentions that mhlib is deprecated and mailbox > should be used instead. Is there any point in trying to fix it? It looks like Btrfs will eventually conform to tradi

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sun, Jan 24, 2010 at 01:25:18AM +, Antoine Pitrou wrote: > That wasn't really my question. What I ask is: since mhlib is > deprecated, why do we need to fix it while people are encouraged to use > mailbox instead? Sorry, I don't

[issue7881] Hardcoded path, unsafe tempfile in test_logging

2010-02-07 Thread Neil Schemenauer
New submission from Neil Schemenauer : The commit for issue #7868 added the following line to test_logging: print >> open('/tmp/tmp.txt', 'w'), type(logger) I'm not sure if that was intentional but it should be fixed. For one, that path does not necessarily e

[issue7885] test_distutils fails if Python built in separate directory

2010-02-08 Thread Neil Schemenauer
New submission from Neil Schemenauer : Lib/test/test_distutils.py crashes if Python was built in a directory other than the source directory. Using a separate build directory is handy if you are building Python with different sets of configure options since you only need one copy of the

[issue6231] ElementInclude may drop text

2010-03-25 Thread Neil Muller
Neil Muller added the comment: It looks like this issue was missed in the recent ElementTree update. Attached is an updated diff for py3k. -- nosy: +flox Added file: http://bugs.python.org/file16646/ElementInclude_py3k.diff ___ Python tracker

[issue6231] ElementInclude may drop text

2010-03-25 Thread Neil Muller
Neil Muller added the comment: Similiarly updated patch against current trunk -- Added file: http://bugs.python.org/file16647/ElementInclude.diff ___ Python tracker <http://bugs.python.org/issue6

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller
Neil Muller added the comment: Poking this issue with updated patches. Patch against py3k. -- Added file: http://bugs.python.org/file16650/posixmodule_comb_py3k.patch ___ Python tracker <http://bugs.python.org/issue2

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller
Changes by Neil Muller : Added file: http://bugs.python.org/file16651/posixmodule_comb.patch ___ Python tracker <http://bugs.python.org/issue2768> ___ ___ Python-bug

[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-03-25 Thread Neil Muller
Neil Muller added the comment: Poking the issue with an updated patch for trunk. -- Added file: http://bugs.python.org/file16652/BaseHTTPServer_continue_3.patch ___ Python tracker <http://bugs.python.org/issue1

[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-03-25 Thread Neil Muller
Neil Muller added the comment: And a py3k version (although the conversion can be improved). -- Added file: http://bugs.python.org/file16653/BaseHTTPServer_continue_3_py3k.patch ___ Python tracker <http://bugs.python.org/issue1

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller
Neil Muller added the comment: Fair enough. Possible doc patch attached. -- Added file: http://bugs.python.org/file16654/fileno_doc.diff ___ Python tracker <http://bugs.python.org/issue2

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller
Neil Muller added the comment: More fleshed out doc patch. Mention caveats about using file descriptors directly, add note to ftruncate similar to that for other dangerous methods. -- Added file: http://bugs.python.org/file16655/fileno_doc.diff

[issue3409] ElementPath.Path.findall problem with unicode input

2010-03-30 Thread Neil Muller
Neil Muller added the comment: With the recent ElementTree changes on trunk, this bug no longer applies, AFAICS. -- nosy: +Neil Muller, flox ___ Python tracker <http://bugs.python.org/issue3

[issue1028432] Specify a source baseurl for bdist_rpm.

2010-03-30 Thread Neil Muller
Neil Muller added the comment: > Is it preferable to specify a URL for the "Source" > field in a .spec file (rather than just a filename)? Fedora (see for example http://fedoraproject.org/wiki/Packaging/SourceURL ) encourages using a full url when available, so having some w

[issue1560] PATCH: Attribute lookup caching

2007-12-05 Thread Neil Toronto
New submission from Neil Toronto: I've attached a patch to accelerate type and instance lookups using a specialized cache. It includes a benchmarking script (fastattr_test.py) that tests both successful and failing lookups on list, dict and tuple, and a simple, deep hierarchy. Benchmark re

[issue1700288] Armin's method cache optimization updated for Python 2.6

2007-12-06 Thread Neil Toronto
Neil Toronto added the comment: Attribute access that happens only once or very infrequently probably shouldn't go through the cache machinery - it'll only slow things down. (Updating slots for example.) Maybe _PyType_Lookup should remain the same, with _PyType_CachingLookup added for

[issue1700288] Armin's method cache optimization updated for Python 2.6

2007-12-06 Thread Neil Toronto
Neil Toronto added the comment: I've attached the microbenchmarks I was using for my own version of attribute caching. For list, tuple, dict, and a deep hierarchy, it tests accessing type attributes (cls.__class__), class attributes (cls.__init__), class attributes via instance (inst.__cl

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2007-12-07 Thread Neil Toronto
New submission from Neil Toronto: This is a half-port of the patches in #1685986 and #1700288 to Python 3.0. Speedups are about the same as in those patches applied to their respective Python versions for minibenchmarks (included in the patch as fastattr_test_py3k.py): 5%-30% or more depending

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2007-12-07 Thread Neil Toronto
Neil Toronto added the comment: This patch adds the ability to invalidate all of a subclasses' cache entries upon setattr rather than updating just one cache entry. It's not clear which of these is the Right Thing To Do, so I've made it an #ifdef for now. It defaults to updati

[issue1266570] PEP 349: allow str() to return unicode

2007-12-08 Thread Neil Schemenauer
Neil Schemenauer added the comment: On Sat, Dec 08, 2007 at 05:14:45AM -, Alexandre Vassalotti wrote: > The PEP has been deferred and the patch is out of date. So, is this > change still wanted? I still think it would make things easier for people using Unicode with Python 2.x. H

[issue1560] PATCH: Attribute lookup caching

2007-12-10 Thread Neil Toronto
Neil Toronto added the comment: Yes, as well #1700288 (Armin's attribute lookup caching patch ported to 2.6) or #1685986 (Armin's original for 2.4), or whatever Raymond finds most convenient. __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1560] PATCH: Attribute lookup caching

2007-12-10 Thread Neil Toronto
Neil Toronto added the comment: Sorry - I'll be more clear. I'd love to see 2.6 get attribute lookup caching, and Kevin's port (#1700288) of Armin's original 2.4 patch (#1685986) does that for 2.6. #1685986 (2.4) should be closed and #1700288 (2.6) should remain open. But R

[issue1604] collections.deque.__init__ doesn't initialize

2007-12-12 Thread Neil Cerutti
New submission from Neil Cerutti: Passing an interable to the __init__ method of an existing deque appends those elements, rather than reinitializing the deque with the items. This is contrary to how list.__init__ works. test_deque.py verifies the (possibly) incorrect behavior

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2008-01-16 Thread Neil Toronto
Neil Toronto added the comment: Well horse pucky. I plum forgot about deletes. I've attached an update that properly clears the cache entry for the deleted attribute for all non-shadowing subclasses. (It was a small change.) Undef'ing ATTRCACHE_SETATTR_INVALIDATES should wor

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2008-01-23 Thread Neil Toronto
Neil Toronto added the comment: There's nothing it tests that standard unit tests don't, so it shouldn't stick around as a unit test. I used it to time different types of attribute lookups and left it in as an optimization aid. The main test groups are '.' access, su

[issue1984] The raw string r'\' fails

2008-01-31 Thread Neil Roques
New submission from Neil Roques: Python's raw strings are supposed to prevent characters being interpreted as special. However entering the raw string r'\' into an interactive session will result in: Traceback ( File "", line 1 r'\' ^ SyntaxErro

[issue2150] Broken Link to New Style Classes Documentation

2008-02-21 Thread Neil Roques
New submission from Neil Roques: http://docs.python.org/ref/node33.html (also packaged in the Python documentation which comes with Python) links to: http://www.python.org/doc/newstyle.html for information on new style classes However, this link has moved, as should now read: http

[issue628842] Deprecate PyNumber_Check

2008-03-20 Thread Neil Schemenauer
Changes by Neil Schemenauer <[EMAIL PROTECTED]>: -- status: open -> closed Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue628842> ___ Pyt

[issue1251748] compiler package: "global a; a=5"

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Sun, Mar 23, 2008 at 04:17:12PM +, Antoine Pitrou wrote: > Armin, if you still care about the compiler package, could you (or some > other pypy coder) take a look at #2459? As part of the patch, it > rewrites the f

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Thu, Mar 20, 2008 at 08:49:32PM +, Sean Reifschneider wrote: > Is a straightforward patch, but I'd like NAS to comment on the change in > behavior. Probably would also need a documentation change, are you up > f

[issue2467] gc.DEBUG_STATS reports invalid "elapsed" times

2008-03-24 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: The original code is pretty icky. I'm attaching a patch that improves it, IMO. Before the elapsed time was only shown if garbage was found. I think it should always be shown if DEBUG_STATS is set. -- nosy: +nas Added

[issue1251748] compiler package: "global a; a=5"

2008-03-25 Thread Neil Schemenauer
Neil Schemenauer <[EMAIL PROTECTED]> added the comment: On Tue, Mar 25, 2008 at 09:18:38AM +, Armin Rigo wrote: > The situation is that by now PyPy has found many many more bugs in > trying to use the compiler package to run the whole stdlib and > real-world applications. Wha

[issue2742] example code does not work

2008-05-10 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: The documentation says: For *host* and *port*, by passing either an empty string or ``None``, you can pass ``NULL`` to the C API, so the documentation says it should work. This doesn't work because PyString_AsString retruns an e

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2008-05-10 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: The attached patch changes most functions in posixmodule which require a filedescriptor to use PyObjectAsDescriptor There are a few cases, where I'm not certain of the usefulness of changing the functions to support objects with

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2008-05-10 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: Patches to test_posix.py to also test using file objects in os.fstat and such. Added file: http://bugs.python.org/file10243/test_posix.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1153769] String interpolation needs PEP 237 update

2008-05-10 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: Update stdtypes.rst to note that %x, %X, %o can take signed values. Note that %u is consider obsolete (referring to PEP 237) Add a note on the length modifier description to clarify the meaning. -- keywords: +patch nosy: +Neil

[issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ')

2008-05-10 Thread Neil Muller
New submission from Neil Muller <[EMAIL PROTECTED]>: split with no sep specified will not return an empty string, whereas split with sep specified will. The attached patch updates the docstring to reflect this for str.split and unicode.split. -- files: split_docstring.diff ke

[issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ')

2008-05-10 Thread Neil Muller
Changes by Neil Muller <[EMAIL PROTECTED]>: -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2736] datetime needs and "epoch" method

2008-05-11 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: datetime has fromtimestamp already, so using totimestamp keeps naming consistency (see toordinal and fromordinal). -- nosy: +Neil Muller __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2008-05-11 Thread Neil Muller
Neil Muller <[EMAIL PROTECTED]> added the comment: This patch combines the two earlier patches, and also updates the docstrings and os.rst to reflect the changed behaviour. Added file: http://bugs.python.org/file10281/posixmodule_2.patch __ Tracker &

[issue4151] Separate build dir broken

2008-10-20 Thread Neil Schemenauer
New submission from Neil Schemenauer <[EMAIL PROTECTED]>: Building in a separate directory got broken at some point. The code is hairy but it looks like the source of the problem was a lame sysconfig.get_python_inc() function. The attached patches fix things and hopefully do not introdu

  1   2   3   4   5   6   7   >