[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: +1 on the general idea of abstracting out repeated code. I will take a closer look at the details within the next few days. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-10 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: In bltinmodule.c, it looks like some of the indentation doesn't line up? Bikeshedding aside, it looks good to me. I agree with Eric Smith that the first part macro name usually refers to the type of the first argument (or the type the first argument p

[issue8040] It would be nice if documentation pages linked to other versions of the same document

2010-12-14 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue8040> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2226] Small _abcoll Bugs / Oddities

2010-12-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Minor point of clarity: you mean __rand__ not __radd__, right? Set objects do not support addition at all. Adding the __rand__ methods to collections.Set in and of itself is straightforward: def __rsub__(self, other): return self

[issue8743] set() operators don't work with collections.Set instances

2010-12-14 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Would it be sufficient to: 1) Restrict collections.Set()'s operators to accept collection.Set but not arbitrary iterables, and 2) Fix Issue2226 and let set() | MySimpleSet() work via collections.Set.__ror__ Attached is a patch that implements this app

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-15 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Attached is a patch to add documentation for Py_ReprEnter and Py_ReprLeave. Assigning to d...@python for review. -- assignee: stutzbach -> d...@python keywords: +needs review, patch nosy: +d...@python stage: needs patch -> patch review Adde

[issue10711] Rip out HTTP 0.9 support

2010-12-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Would it be worth keeping (but modifying) test_http_0_9 to verify that the server complains in the expected way? -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue10

[issue10711] Rip out HTTP 0.9 support

2010-12-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: At minimum, I think we should apply this part of Antoine's patch: -# Most web servers default to HTTP 0.9, i.e. don't send a status line. -default_request_version = "HTTP/0.9" +default_request

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Good point. My perspective is skewed by all of the time that I spend working on container types. :-) How about if I change the first sentence to the following? Properly implementing :attr:`tp_repr` for container types requires special recursion

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-15 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file20071/repr-2.patch ___ Python tracker <http://bugs.python.org/issue8753> ___ ___ Python-bugs-list m

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-15 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks. New patch attached with a cross-reference to reprlib.recursive_repr. -- Added file: http://bugs.python.org/file20072/repr-3.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8040] It would be nice if documentation pages linked to other versions of the same document

2010-12-16 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Tue, Dec 14, 2010 at 7:22 PM, Ezio Melotti wrote: > If you want to work on this you should also consider that the URLs used on > docs.python.org don't necessary match the directory structure present when > building the doc locally. For e

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Committed in r87339. Thanks everyone for the feedback! -- assignee: eric.araujo -> stutzbach keywords: -needs review resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed versions:

[issue2226] Small _abcoll Bugs / Oddities

2010-12-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Raymond, Do you have around 10 minutes today to look at the patch I submitted in Issue 8743? It appears to solve both this issue and that one, which have priorities critical and high, respectively. It's a reasonably small patch: around 20 lines ch

[issue2690] Precompute range length and enhance range subscript support

2010-12-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Doc change committed to py3k in r87346. Thanks, SilentGhost! I also committed r87349 to reverse r87162 (which was in the wrong branch). -- ___ Python tracker <http://bugs.python.org/issue2

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Fri, Dec 17, 2010 at 2:17 PM, Amaury Forgeot d'Arc wrote wrote: > Err... in r87339 there is a typo in all occurrences of > 'Py_ReprEntr': Py_ReprEnter of course! Well, that's emba

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-17 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue8753> ___ ___ Python-bugs-list mailing list Unsubscri

[issue7111] abort when stderr is closed

2011-02-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: That's an interesting point. Do you know of places where we use fd 2 instead of sys.stderr? -- ___ Python tracker <http://bugs.python.org/i

[issue7111] abort when stderr is closed

2011-02-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Thu, Feb 3, 2011 at 11:56 AM, Alexander Belopolsky wrote: > 3rd party extensions.    What is the use case for "python >&-"?    Is > it important enough to justify the risk of accidental data loss? I don't think closing stder

[issue7111] abort when stderr is closed

2011-02-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Thu, Feb 3, 2011 at 12:18 PM, Antoine Pitrou wrote: > I just took a look at http://pypi.python.org/pypi/python-daemon/, and it > uses dup2() to redirect standard streams, which is far nicer. I'm more worried about the case where a daemon laun

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach <[EMAIL PROTECTED]>: I'm writing a C extension module and discovered that Py_CLEAR() causes a crash if the programmer happened to name their variable "tmp". The Py_CLEAR() macro internally uses the name "tmp" in a new scope

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-10 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: Appending _tmp is a good idea, but it won't work when the parameter isn't a simple symbol. For example, there's a line in cPickle.c like this: Py_CLEAR(*p). ___ Python tracker <

[issue3366] Add gamma and error functions to math module

2008-07-15 Thread Daniel Stutzbach
Changes by Daniel Stutzbach <[EMAIL PROTECTED]>: -- nosy: +stutzbach ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3366> ___ __

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: On Mon, Jul 21, 2008 at 5:34 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > There are several different approximations to choose from. Each of > them has their own implications for speed and accuracy. FWIW,

[issue3366] Add gamma and error functions to math module

2008-07-24 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: I think he just carried the names over from C, where: tgamma() is the "true gamma function" lgamma() is the log of the gamma function and gamma() might be tgamma() or lgamma() depending on which C library you use (sigh).

[issue3366] Add gamma and error functions to math module

2008-07-25 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: On Fri, Jul 25, 2008 at 1:37 PM, Raymond Hettinger <[EMAIL PROTECTED]>wrote: > Raymond Hettinger <[EMAIL PROTECTED]> added the comment: > > Can you also implement blending of approximations: (1-t)*f1(x) + t*f2

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2008-10-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach <[EMAIL PROTECTED]>: -- versions: +Python 2.5.3 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2810> ___ _

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-26 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue7784> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-01-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: For macro benchmarking, I suggest using the Unladen Swallow benchmark suite. -- ___ Python tracker <http://bugs.python.org/issue7

[issue8022] Leak when creating certain classes that subclass ABCs

2010-02-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Attached is a minimal example. It has a function called leak(). The end of the script calls that function, runs the garbage collector, and prints out the number of objects in the system. In Python 2.6, the number of objects increases after each

[issue8040] It would be nice if documentation pages linked to other versions of the same document

2010-03-02 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Currently, trying to use a web search engine to find something in the Python docs often returns the documentation for only one version of Python. Something a very old version like 2.3. It would be nice if the documentation pages on docs.python.org

[issue8041] No documentation for Py_TPFLAGS_HAVE_STACKLESS_EXTENSION or Py_TPFLAGS_HAVE_VERSION_TAG.

2010-03-02 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The documentation for Py_TPFLAGS_DEFAULT mentions Py_TPFLAGS_HAVE_STACKLESS_EXTENSION and Py_TPFLAGS_HAVE_VERSION_TAG, but neither of them is documented. They aren't mentioned in the 2.6 documentation (presumably because they were introduced i

[issue8044] Py_EnterRecursiveCall and Py_LeaveRecursiveCall are undocumented

2010-03-02 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Here's the original message proposing the addition of these routines to the C API, which might serve as the basis of documentation: http://mail.python.org/pipermail/python-dev/2003-October/039445.html -- assignee: georg.brandl compo

[issue2521] ABC caches should use weak refs

2010-03-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Now that WeakSet has been backported to trunk, I've backported the fix for this reference-leak (patch with test case attached). However, after making the patch, I discovered that old-style classes are not weak-referenceable. Consequently, the patch i

[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2010-03-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a patch for configure.in and configure that implements Benjamin's suggestion. The patch sets things up to continue to use -fno-strict-aliasing on gcc versions that support -fno-strict-aliasing *and* generate spurious warnings witho

[issue2521] ABC caches should use weak refs

2010-03-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I hadn't realized that old style classes didn't support ABCs. That certainly simplifies things! I'm working on a new patch. -- ___ Python tracker <http://bugs.py

[issue2521] ABC caches should use weak refs

2010-03-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Are you sure the old-style classes don't support ABCs? ABCTestCase.validate_isinstance in Lib/test/test_collection.py specifically tests that both new-style and old-style classes work, unless I'm reading it wrong. (and those tests fail if I ma

[issue2521] ABC caches should use weak refs

2010-03-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: You can't register an old-style class, but many ABCs support duck-typing by implementing __subclasshook__. ABCMeta caches those results and stores a reference to old-style classes, sometimes in _abc_cache and sometimes in _abc_negative_cache. It

[issue2521] ABC caches should use weak refs

2010-03-31 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Cool! I will revise the patch based on your comments about my test case. -- ___ Python tracker <http://bugs.python.org/issue2

[issue2521] ABC caches should use weak refs

2010-03-31 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file16713/abc_leak.patch ___ Python tracker <http://bugs.python.org/issue2521> ___ ___ Python-bugs-list m

[issue2521] ABC caches should use weak refs

2010-03-31 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: New patches uploaded. I separated out the patch to add the test case, to make it easier to test before and after applying the fix. -- Added file: http://bugs.python.org/file16714/leak_test.patch ___ Python

[issue2521] ABC caches should use weak refs

2010-03-31 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16690/abc_leak.patch ___ Python tracker <http://bugs.python.org/issue2521> ___ ___ Python-bug

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a file that reliably produces the "More data is available" error from _winreg.EnumValue in Python 2.6. The script triggers the error via a race condition, by modifying the value after PyEnumValue() calls RegQueryInfoKey() but befor

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-01 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Here's another script that causes a "More data is available" error. This one creates a key with a name that's exactly 256 characters long. (The Windows Registry Editor can't display the key either) I'm testing this on XP. N

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: It was never 100% clear that it ever related to multi-byte strings, so (as the original reporter) I'd prefer to continue using this bug and just update the title to: _winreg.EnumValue sometimes raises WindowsError ("More data is available"

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I just wrote a C program that can read the long key name just fine, so it's not a Windows API bug. -- ___ Python tracker <http://bugs.python.org/i

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I just found a one line example of the problem: >>> EnumValue(HKEY_PERFORMANCE_DATA, 0) Traceback (most recent call last): File "", line 1, in WindowsError: [Error 234] More data is available Other functions are also affected

[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The Windows RegQueryValue function returns a registry value without returning the corresponding type information (e.g., REG_SZ for string, REG_BINARY for binary data, REG_DWORD for a 32-bit number, etc.). The corresponding wrapper winreg.QueryValue

[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Jumped the gun here. RegQueryValue returns ERROR_DATA_INVALID if the value isn't a string, so converting to Unicode is OK. -- status: open -> closed ___ Python tracker <http://bugs.python.or

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file16802/winreg_test.pach ___ Python tracker <http://bugs.python.org/issue2810> ___ ___ Python-bug

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +patch Added file: http://bugs.python.org/file16803/winreg.patch ___ Python tracker <http://bugs.python.org/issue2

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16728/more_data_is_available.py ___ Python tracker <http://bugs.python.org/issue2810> ___ ___ Pytho

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16729/more_data_is_available2.py ___ Python tracker <http://bugs.python.org/issue2810> ___ ___ Pytho

[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I've uploaded two patches (against trunk): one to add test cases that demonstrate this bug and another to fix the bug. -- ___ Python tracker <http://bugs.python.org/i

[issue8521] Allow some winreg functions to accept keyword arguments

2010-04-24 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Hi Brian, It looks like you had attached to issue5774 a patch to allow OpenKey to accept keyword arguments. Just thought I'd mention that here so there's a link back to it. -- nosy: +stutzbach

[issue2521] ABC caches should use weak refs

2010-04-26 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Someone with appropriate permissions want to update the "Stage"? -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-26 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thomas, could you write a unit test to go along with your patch? -- ___ Python tracker <http://bugs.python.org/issue8

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- title: _winreg.EnumValue fails when the registry data includes multibyte unicode characters -> _winreg.EnumValue sometimes raises WindowsError ("More data is available") ___ Python tracker <http:/

[issue1289118] timedelta multiply and divide by floating point

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker <http://bugs.python.org/issue1289118> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: You're right. I asked Thomas the wrong question, and the Keywords and Stage need updating. Thomas, do you still plan to submit a patch that fixes the problem? -- ___ Python tracker <http://bugs.py

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Great! If you get stuck or have a question, just ask. :-) -- ___ Python tracker <http://bugs.python.org/issue8005> ___ ___

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: -patch stage: unit test needed -> needs patch ___ Python tracker <http://bugs.python.org/issue8005> ___ ___ Python-

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- assignee: -> stutzbach keywords: +needs review stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/

[issue6672] Add Mingw recognition to pyport.h to allow building extensions

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- components: +Windows stage: -> patch review ___ Python tracker <http://bugs.python.org/issue6672> ___ ___ Python-bugs-list mai

[issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- assignee: -> stutzbach priority: -> low stage: -> needs patch type: -> performance versions: +Python 3.2 -Python 2.7, Python 3.0, Python 3.1 ___ Python tracker <http://bugs.pytho

[issue4295] closing stdout in a child process on cygwin means that process doesn't receive bytes from stdin anymore. I think.

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- resolution: -> works for me stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue808164] socket.close() doesn't play well with __del__

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- assignee: -> stutzbach versions: +Python 2.7, Python 3.2 -Python 2.5 ___ Python tracker <http://bugs.python.org/issue

[issue7079] file_close() ignores return value of close_the_file

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +needs review stage: -> patch review ___ Python tracker <http://bugs.python.org/issue7079> ___ ___ Python-bugs-lis

[issue7079] file_close() ignores return value of close_the_file

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- assignee: gregory.p.smith -> stutzbach stage: patch review -> unit test needed ___ Python tracker <http://bugs.python.org/

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- assignee: -> stutzbach ___ Python tracker <http://bugs.python.org/issue8005> ___ ___ Python-bugs-list mailing list Unsubscri

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-04-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks for pointing that out. For what it's worth, if I understand the documentation correctly the goal is to prevent the following misleading comparisons: date with time datetime with date datetime with time datetime w/ timezone with datetim

[issue808164] socket.close() doesn't play well with __del__

2010-04-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: The purpose of calling .close() in __del__ is to close the socket when the owner is destroyed yet the program is still running. This prevents the socket from staying open if some other part of the program has somehow acquired a reference to it. telnetlib

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-27 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thank for the feedback. I'll revise the patch tomorrow based on your code-cleanup suggestions. To answer your question about the thread and explain why the test sometimes passes: The goal of test_changing_value is to try to trigger a race condition

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-28 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a new test-case patch. -- Added file: http://bugs.python.org/file17122/winreg_test.patch ___ Python tracker <http://bugs.python.org/issue2

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-28 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16802/winreg_test.pach ___ Python tracker <http://bugs.python.org/issue2810> ___ ___ Python-bug

[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

2010-04-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: In the updated patch I uploaded yesterday, I increased the loop count from 100 to 1000 and it still runs virtually instantly. I also added a comment stating that the test is trying to trigger a race condition

[issue7079] file_close() ignores return value of close_the_file

2010-04-29 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file15076/fileobject.diff ___ Python tracker <http://bugs.python.org/issue7079> ___ ___ Python-bug

[issue7079] file_close() ignores return value of close_the_file

2010-04-29 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file15077/crash.py ___ Python tracker <http://bugs.python.org/issue7079> ___ ___ Python-bugs-list mailin

[issue7079] file_close() ignores return value of close_the_file

2010-04-29 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file17130/file_close_test.patch ___ Python tracker <http://bugs.python.org/issue7079> ___ ___ Python-bug

[issue7079] file_close() ignores return value of close_the_file

2010-04-29 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file17131/file_close.patch ___ Python tracker <http://bugs.python.org/issue7079> ___ ___ Python-bug

[issue7079] file_close() ignores return value of close_the_file

2010-04-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I reworked my test script into a unit test. Thanks for pointing me to test_file2k.py. I leveraged the infrastructure that was already there. I've also uploaded a new patch that uses tabs instead of spaces, to match the rest of fileobj

[issue808164] socket.close() doesn't play well with __del__

2010-04-29 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: How do I write a unit test to check that socket.__del__ doesn't refer to any globals? -- ___ Python tracker <http://bugs.python.org/iss

[issue1641] asyncore delayed calls feature

2010-04-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I like the idea of leveraging the sched module. It encapsulates the priority queue, allowing the user to be agnostic to the underlying data structure. If someday we have a data structure in the collections module that provides an efficient delete-key

[issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC

2010-04-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Attached is a patch. The diff to configure is just what autoconf produces as a result of the diff to configure.in. With the patch, pyconfig.h will: - do nothing if the compiler supports the "inline" keyword - #define inline to __inline or __i

[issue5553] Py_LOCAL_INLINE(type) doesn't actually inline except using MSC

2010-04-30 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I should add that the patch is against the py3k branch, since it's too late for performance improvements to land in trunk. -- ___ Python tracker <http://bugs.python.org/i

[issue8645] PyUnicode_AsEncodedObject is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : PyUnicode_AsEncodedObject is undocumented. It has the same signature as PyUnicode_AsEncodedString, although they do slightly different things based on a brief source code inspection (I'm not clear on what that difference is though). -- ass

[issue8646] PyUnicode_EncodeDecimal is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : PyUnicode_EncodeDecimal is undocumented (although it's referenced in passing in the documentation for PyLong_FromUnicode). There's a lengthy comment in unicodeobject.h describing PyUnicode_EncodeDecimal, which could be converted more or les

[issue8647] PyUnicode_GetMax is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Here's the relevant signature: /* Get the maximum ordinal for a Unicode character. */ PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void); -- assignee: d...@python components: Documentation messages: 105206 nosy: d...@python, stutzbach priority: n

[issue8648] The UTF-7 codec functions are undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The UTF-7 codec functions are undocumented: PyUnicode_DecodeUTF7Stateful PyUnicode_DecodeUTF7 PyUnicode_EncodeUTF7 -- assignee: d...@python components: Documentation messages: 105207 nosy: d...@python, stutzbach priority: normal severity: normal

[issue8649] Py_UNICODE_* functions are undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Python provides several functions for manipulating raw Py_UNICODE strings, but they aren't documented. Below are their signatures. PyAPI_FUNC(size_t) Py_UNICODE_strlen(const Py_UNICODE *u); PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcpy( Py_UNICOD

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Currently, Python can be built with an internal Unicode representation of UCS2 or UCS4. To prevent extension modules compiled with the wrong Unicode representation from linking, unicodeobject.h #defines many of the Unicode functions. For example

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +patch Added file: http://bugs.python.org/file17248/unicode.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Forcing the compile-time and link-time encodings to match is tricky. The goal is: - Allow Unicode-agnostic modules to link, regardless of unicode settings - Cause a link failure if the unicode settings are mismatched for a module that pokes into

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Adding people to the Nosy List who participated in the original thread on python-ideas, several months ago. Hope you don't mind. :-) -- nosy: +gvanrossum, scoder, zooko ___ Python tracker

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I've been thinking about this a bit more. There are three types of symbols in unicodeobject.h: 1. Functions that are always safe to use 2. Functions that are only safe if the module is compiled with the same Unicode settings as Python 3. Structure

[issue8659] ABS(x) == 0 can be simplified to x == 0

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : I noticed that in longobject.c, there are a few spots that take the absolute value of an int before comparing the int to 0. There's no -0 for C integers, so the absolute value isn't necessary. I traced back through the commit history, and it

[issue8659] ABS(x) == 0 can be simplified to x == 0

2010-05-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +needs review ___ Python tracker <http://bugs.python.org/issue8659> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-08 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Sat, May 8, 2010 at 5:03 AM, Marc-Andre Lemburg wrote: > If you can propose a different method of reliably protecting against > mixed Unicode build module loads, that would be great. We could then > get rid off the wrapping altogether. The follo

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-08 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Sat, May 8, 2010 at 10:16 AM, Marc-Andre Lemburg wrote: > Are you sure this doesn't get optimized away in practice ? I'm sure it doesn't get optimized away by gcc 4.3, where I tested it. :) > Sure, though, I don't see how this

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-08 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Sat, May 8, 2010 at 8:07 AM, Martin v. Löwis wrote: > 1. add a flag to PyModuleDef, indicating whether the module was built in > UCS-2 or UCS-4 mode. Then let the interpreter refuse the load the module, > instead of having the dynamic linker d

<    1   2   3   4   5   >