[issue9441] increase logging handlers test coverage

2010-09-28 Thread Vinay Sajip
Vinay Sajip added the comment: You're right about there not being tests, but if there had been, they would be using the PyWin32 libraries as well and so would need to be reimplemented (if the purpose is to remove the dependency). Perhaps ctypes would be an alternative implementation approach.

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: I've tweaked the loghelper algorithm in r85048. Looking at [n for n in range(100) if log(2**n) != n], I get: Python 3.1: 14 bad values out of 1st 100; first is 29 Python 3.2 (patched): 10 bad values; first is 29 Python 3.2 (unpatched): 25 bad values; first

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: > [n for n in range(100) if log(2**n) != n] Should be: [n for n in range(100) if log(2**n, 2) != n] -- ___ Python tracker ___

[issue9967] encoded_word regular expression in email.header.decode_header()

2010-09-28 Thread Ned Deily
Changes by Ned Deily : -- nosy: +barry, r.david.murray stage: -> patch review versions: -Python 2.5, Python 2.6 ___ Python tracker ___ __

[issue9950] socket.sendall() crash when receiving a signal

2010-09-28 Thread Ned Deily
Changes by Ned Deily : Removed file: http://bugs.python.org/file19042/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue9961] Identity Crisis! variable assignment using strftime fails comparison test.

2010-09-28 Thread Bill Hawkes
Bill Hawkes added the comment: Yes, it is working now. Thanks for the timely response. In looking at the tutorial, the only "strings" used with boolean operators ("<" | ">" | "==" | ">=" | "<=" | "!=") were strings of the numeric variety. I saw no examples using words. I know the datetime mod

[issue4111] Add Systemtap/DTrace probes

2010-09-28 Thread Mark Wielaard
Mark Wielaard added the comment: > - renamed the probepoints: > "function__entry" -> "frame__entry" > "function__return" -> "frame__exit" >as I believe this better describes what these do Are you sure you want to do this? You are right that it better describes the action tha

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mardi 28 septembre 2010 à 03:11 +, Lenard Lindstrom a écrit : > > Let's consider Pygame, and the SDL surface it wraps as a > pygame.Surface. Pygame exposes a surface's data through the buffer > protocol for manipulation by a NumPy array. Now some SDL sur

[issue9968] Let cgi.FieldStorage have named uploaded file

2010-09-28 Thread phep
New submission from phep : Hi, Presently, in cgi.FieldStorage, uploaded file are accessible through a file-like object created by a call to tempfile.TemporaryFile(), probably in order to ensure the file is deleted when the process terminates. The problem is that when one wants to save the dat

[issue9968] Let cgi.FieldStorage have named uploaded file

2010-09-28 Thread phep
phep added the comment: Oops. I forgot to aknowledge the fact that presently cgi.FieldStorage class documentation (but not the cgi module documentation) tells about the possibility to override the make_file() method in a user subclass to change the present limitation (which is actually how I

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-09-28 Thread MunSic JEONG
Changes by MunSic JEONG : -- nosy: +ruseel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue4111] Add Systemtap/DTrace probes

2010-09-28 Thread anatoly techtonik
anatoly techtonik added the comment: I don't understand the last request. Is there already a practice to depend on patches that were applied by people, but were not released, reviewed or documented in some PEP? -- ___ Python tracker

[issue7980] time.strptime not thread safe

2010-09-28 Thread MunSic JEONG
Changes by MunSic JEONG : -- nosy: +ruseel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue4111] Add Systemtap/DTrace probes

2010-09-28 Thread Mark Wielaard
Mark Wielaard added the comment: The original patch was created to be as close as possible to the support that Sun and Apple added to their python implementation for Solaris and MacOS. Changing the probe point names would make the current patch slightly different for scripts written against t

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Meador Inge
New submission from Meador Inge : Currently with 'py3k' only 'bytes' objects are accepted for tokenization: >>> import io >>> import tokenize >>> tokenize.tokenize(io.StringIO("1+1").readline) Traceback (most recent call last): File "", line 1, in File "/Users/minge/Code/python/py3k/Lib/tok

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Meador Inge
Changes by Meador Inge : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9935] Faster pickling of instances

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: My patch breaks pickling of transparent proxies such as weakref.proxy(). (since these have a different __class__ than Py_TYPE(self), through tp_getattr hackery). I will need to remove a couple of optimizations. (unfortunately, there don't seem to be any tests

[issue9970] PyMemoryView_FromBuffer is not documented

2010-09-28 Thread Ronald Oussoren
New submission from Ronald Oussoren : PyMemoryView_FromBuffer() in Include/memoryobject.h is undocumented. The function name seems to indicate that it intended to be a public API. -- assignee: d...@python components: Documentation messages: 117518 nosy: d...@python, ronaldoussoren prior

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue4111] Add Systemtap/DTrace probes

2010-09-28 Thread anatoly techtonik
anatoly techtonik added the comment: So, it was released. But why they didn't send their patches here? We could review them, or we want Sun and Apple create Python specifications unilaterally? It would be best to contact them and notify about the change. Is it something a PSF should do?

[issue9873] Allow bytes in some APIs that use string literals internally

2010-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch is a very rough first cut at this. I've gone with the basic approach of simply assigning the literals to local variables in each function that uses them. My rationale for that is: 1. Every function has to have some kind of boilerplate to switch ba

[issue4111] Add Systemtap/DTrace probes

2010-09-28 Thread John Levon
John Levon added the comment: Anatoly, see above. We have done exactly that. (Honestly, when I first wrote the changes, I saw them as too hacky to ever be accepted upstream). This name change seems frivolous and will indeed break existing scripts. -- _

[issue9935] Faster pickling of instances

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Corrected patch, including new tests for pickling of weak proxies. -- Added file: http://bugs.python.org/file19044/pickleinst2.patch ___ Python tracker

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Michael Foord
Michael Foord added the comment: Note from Nick Coghlan from the Python-dev discussion: A very quick scan of _tokenize suggests it is designed to support detect_encoding returning None to indicate the line iterator will return already decoded lines. This is confirmed by the fact the standard li

[issue9701] Update ZSH profile on Mac OS installation

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed in r85059 (3.2), r85060 (2.7), r85061 (3.1) Thanks again. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue9594] typo on Mac/Makefile.in? s/pythonw/python/

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: There is no typo. The python and pythonw executables are the same and are build as 'pythonw' and installed with the right name. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed versions: +Python 2.7

[issue9568] test_urllib2_localnet fails on OS X 10.3

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Applied the patch in r85062 (3.2), r85063 (3.1), r85064 (2.7) -- status: open -> closed ___ Python tracker ___

[issue5131] pprint doesn't know how to print a defaultdict

2010-09-28 Thread Ben Bass
Ben Bass added the comment: Same applies to collections.deque, which seems closely related (being another collections class). Can this get addressed here or should I open another issue? (just been pprinting defaultdict(deque) objects, which clearly fails :) -- nosy: +bpb ___

[issue9948] findCaller is slow and loses case information on Windows

2010-09-28 Thread Vinay Sajip
Vinay Sajip added the comment: I made a temporary change to logging to time the two different approaches: see this gist: http://gist.github.com/601162 According to these findings, the use of module globals seems to make only a marginal difference: vi...@eta-jaunty:~/projects/scratch$ python

[issue9907] interactive mode TAB does not insert on OS X built with editline instead of GNU readline

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: On second thought, the patch isn't quite as harmless as I first thought: the default key-bindings that are created after the call to rl_initialize will replace custom bindings in the users .editrc file. I've attached a new version of the py3k patch that work

[issue9971] Optimize BufferedReader.readinto

2010-09-28 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The readinto() method is intended to offer better performance than read() by allowing the caller to read into a preallocated buffer rather than constantly allocate and deallocate buffers. However, bufferediobase_readinto() calls read(), so the extra alloc

[issue9972] PyGILState_XXX missing in Python builds without threads

2010-09-28 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : I've built Python-2.6.5 form with this : $ ./configure --without-threads --prefix=$HOME/python-without-threads $ make && make install $ cd ~/python-without-threads/lib $ nm libpython2.6.so | grep PyGILState $ At Include/pystate.h, PyGILState_{Ensure|Rele

[issue9970] PyMemoryView_FromBuffer is not documented

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed, thank you. -- nosy: +pitrou resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue9675] segfault: PyDict_SetItem: Assertion `value' failed.

2010-09-28 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue812750] OSA support for properties broken

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've applied the documentation patch that Ned suggests in r I'm furthermore closing this issue as "Won't Fix" because the OSA bindings are no longer developed and we'll therefore not implement the new feature that Jack mentions. -- nosy: +ronaldouss

[issue812750] OSA support for properties broken

2010-09-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Sent the message too soon... the documentation update is in r85069. -- ___ Python tracker ___ ___

[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an updated patch wrapping all variants of recv() and send(), except sendall() which already has its own retry loop. -- Added file: http://bugs.python.org/file19046/selectretry2.patch ___ Python tracker

[issue9973] Sometimes buildbot fails to cleanup working copy

2010-09-28 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Sometimes, buildbot fails to clean working copy. / (snip) Clean started: Project: _hashlib, Configuration: Debug|Win32 Deleting intermediate and output files for project '_hashlib', configuration 'Debug|Win32'

[issue3674] test_dbm_ndbm skip is unexpected on win32?

2010-09-28 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- resolution: -> out of date status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Lenard Lindstrom
Lenard Lindstrom added the comment: >I don't know why you're saying that. The purpose of PyBuffer_Release is >precisely to solve these kinds of use cases (where you want timely >release of a resource rather than rely on the garbage collector). Yes, I was unclear. This refers to Python 3.2, not

[issue9666] 'hasattr' fix to suppress only AttributeError

2010-09-28 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9974] tokenizer.untokenize not invariant with line continuations

2010-09-28 Thread Brian Bossé
New submission from Brian Bossé : Executing the following code against a py file which contains line continuations generates an assert: import tokenize foofile = open(filename, "r") tokenize.untokenize(list(tokenize.generate_tokens(foofile.readline))) (note, the list() is important due to issue

[issue9701] Update ZSH profile on Mac OS installation

2010-09-28 Thread Sylvain Mora
Sylvain Mora added the comment: You're welcome, and thank you for you work. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9975] Incorrect use of flowinfo and scope_id in IPv6 sockaddr tuple

2010-09-28 Thread Vilmos Nebehaj
New submission from Vilmos Nebehaj : Module/socketmodule.c incorrectly treats both sockaddr_in6->sin6_flowinfo and sockaddr_in6->sin6_scope_id as signed integers. They are 32-bit unsigned integers (even though sin6_flowinfo is just 20 bits). sin6_flowinfo also lacks the necessary endian conve

[issue6640] urlparse should parse mailto: URL headers as query parameters

2010-09-28 Thread Jeffrey Finkelstein
Jeffrey Finkelstein added the comment: Adding the 'mailto' scheme to the urllib.parse.uses_query list changes the behavior as described in msg91249. A patch with a test is attached. Note that this changes the behavior of urllib.parse.urlparse() on 'mailto:' URLs: with this patch, the function

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-28 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: open("/proc/self/cmdline").read() should work on linux (note that the arguments are separated by NULs). -- nosy: +mattheww ___ Python tracker __

[issue9976] Make TestCase._formatMessage public

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : It would be pleasant if TestCase._formatMessage, or something similar, could be made part of the documented API; I think pretty much anyone writing a custom TypeEqualityFunc is going to end up reimplementing it. (This is the code that makes the TestCase.lo

[issue1665333] Documentation missing for OptionGroup class in optparse

2010-09-28 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, attached is a patch to improve the OptionGroup documentation. I've also changed usage->Usage and options->Options in the examples output, since now the code tries to guess the lower case word and rewrites with the capitalized one. I'm willing to improve t

[issue9977] TestCase.assertItemsEqual's description of differences

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : TestCase.assertItemsEqual uses two different techniques to describe the differences in the inputs that it compares. If the inputs are sortable, it sorts them and then uses assertSequenceEqual to describe the difference between them considered as ordered se

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Yes, I was unclear. This refers to Python 3.2, not the 2.x series. > PyObject_AsReadBuffer (defined at line 270 in abstract.c, code of > routine attached) calls bf_getbuffer with the PyBUF_SIMPLE flag to > retrieve a bytes buffer. It then calls bf_releasebuffe

[issue1665333] Documentation missing for OptionGroup class in optparse

2010-09-28 Thread Sandro Tosi
Sandro Tosi added the comment: sorry, I forgot to wrap at column 80, this patch just changes that. -- Added file: http://bugs.python.org/file19052/issue1665333-py3k-v2.patch ___ Python tracker __

[issue3612] Add some missing basic types in ctypes.wintypes

2010-09-28 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry for too late. I've committed in r85073(py3k). -- ___ Python tracker ___ ___ Python-bugs-lis

[issue3612] Add some missing basic types in ctypes.wintypes

2010-09-28 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 2.6 ___ Python tracker ___ _

[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in 3.2 in r85074. I don't plan to backport it, since the _PyTime_gettimeofday abstraction is not available on earlier versions. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending versions: -Python 2.7,

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 28 septembre 2010 22:24:56, vous avez écrit : > I disagree. PyObject_As*Buffer functions are remnants of the old buffer > API in Python 2.x. They are here only to ease porting of existing C > code, but carefully written 3.x code should switch to > PyObj

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Le mardi 28 septembre 2010 22:24:56, vous avez écrit : > > I disagree. PyObject_As*Buffer functions are remnants of the old buffer > > API in Python 2.x. They are here only to ease porting of existing C > > code, but carefully written 3.x code should switch to

[issue9962] GzipFile doesn't have peek()

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Same patch with tests. -- Added file: http://bugs.python.org/file19053/gzippeek2.patch ___ Python tracker ___ __

[issue9518] PyModuleDef_HEAD_INIT does not explicitly initialize all fields of m_base

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: the patch looks OK, but out of curiosity: do you really declare all the fields of a PyTypeObject? This structure is really designed so that newer members are left at the end; most types don't need to initialize them, C standard ensures that they will be

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Possible approach (untested): def get_tokens(source): if hasattr(source, "encode"): # Already decoded, so bypass encoding detection return _tokenize(io.StringIO(source).readline, None) # Otherwise attempt to detect the correct encoding

[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-28 Thread R. David Murray
R. David Murray added the comment: Thanks, Jeffrey. I've applied your patch (with minor doc tweaks) to the email6 branch. -- ___ Python tracker ___

[issue9873] Allow bytes in some APIs that use string literals internally

2010-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: A possible duck-typing approach here would be to replace the "instance(x, str)" tests with "hasattr(x, 'encode')" checks instead. Thoughts? -- ___ Python tracker __

[issue9977] TestCase.assertItemsEqual's description of differences

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) versions: +Python 3.2 ___ Python tracker ___ ___ P

[issue9976] Make TestCase._formatMessage public

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) versions: +Python 3.2 ___ Python tracker ___ ___ P

[issue9962] GzipFile doesn't have peek()

2010-09-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6031] BaseServer.shutdown documentation is incomplete

2010-09-28 Thread R. David Murray
R. David Murray added the comment: Hmm. It seems as though since issue 2302 is now closed, the comment about deadlocking if called before serve_forever may no longer be true. Gabriel? -- nosy: +r.david.murray ___ Python tracker

[issue4684] sys.exit() exits program when non-daemonic threads are still running

2010-09-28 Thread Thomas Wouters
Changes by Thomas Wouters : -- resolution: -> fixed status: open -> closed superseder: -> Thread shutdown exception in Thread.notify() ___ Python tracker ___ ___

[issue6031] BaseServer.shutdown documentation is incomplete

2010-09-28 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 2.6, Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-09-28 Thread Ryan Seto
Ryan Seto added the comment: I came across this issue while trying to install mercurial using easy_install. I applied the vcvars4.diff to my distutils and this solved the problem. Environment: Python 2.6.6 (64 bit) setuptools-0.6c11.tar.gz installed using the following instructions: http://

[issue9628] runtests.sh -x doesn't work with more than two args (sed error)

2010-09-28 Thread R. David Murray
R. David Murray added the comment: Fixed in py3k r85078, 3.1 r85079. Note that the only fix required was to the 'PAT' line, the other sed expressions are operating only on single filenames-per-line and so don't need the 'g' added. I don't see runtests.sh in 2.7 (or 2.6), yet the history goes

[issue9518] PyModuleDef_HEAD_INIT does not explicitly initialize all fields of m_base

2010-09-28 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks. The code in question is a wrapper to a security-sensitive library (user-space SELinux code), hence the compilation warnings have been turned up as much as possible. The .c code in question is generated by SWIG, and that does indeed appear to be writin

[issue9978] test_os failures on XP-4 buildbot

2010-09-28 Thread Antoine Pitrou
New submission from Antoine Pitrou : This has started showing up since r85073. == ERROR: test_CTRL_BREAK_EVENT (test.test_os.Win32KillTests) -- Traceback (most

[issue7346] Redirected stdout fires [Errno 9]

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, mingw uses a different C runtime (msvcrt.dll) than Python (msvcr90.dll), so file descriptors are completely different and this causes the error. I can see two solutions: - Use the same compiler as python26; I've also heard about a way to force ming

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, 3.x documentation is fixed to recommend the new buffer API funcs over the old compatibility funcs. On Victor's private suggestion, I'm now closing the issue. -- resolution: -> wont fix status: open -> closed _

[issue7938] makesetup interprets macros -DA=B as a Make variable definition

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: "man sh" does not list [[:alpha:]]* as an accepted pattern. This is a glob pattern, not a regular expression. While the proposed patch may work for some environments, we should find a more compatible way. Maybe a new case "[ ]*=") ;; (a space somewhe

[issue5131] pprint doesn't know how to print a defaultdict

2010-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ben, I don't think there is any value is opening more issues like pprint-doesn't-handle-object-x (named tuples, defautdicts, deques, generators, etc). As it is currently designed, pprint doesn't offer usable hooks and it is not easy to build-out to handle

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
New submission from STINNER Victor : PyUnicode_AsWideChar() doesn't merge surrogate pairs on a system with 32 bits wchar_t and Python compiled in narrow mode (sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) == 2) => see issue #8670. It is not easy to fix this problem because the callers of PyUnic

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-09-28 Thread STINNER Victor
STINNER Victor added the comment: #9979 proposes to create a new PyUnicode_AsWideCharString() function. -- ___ Python tracker ___ ___

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-09-28 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I know enough about Unicode to have reported this bug, but I don't feel knowledgeable enough about Python's Unicode implementation to comment on your suggested solution. I'm adding the other people listed in Misc/maintainers.rst as interested in Unicode to

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +ezio.melotti, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue7938] makesetup interprets macros -DA=B as a Make variable definition

2010-09-28 Thread Willem de Bruijn
Willem de Bruijn added the comment: Good call. The posix regular expression character class [[:alpha:]] is apparently not as universally supported as I thought. Posix mandates it for filepath expansion[1], but that's not of much help on older and non-compliant systems. However, from what I ca

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - fix PyUnicode_AsWideCharString() :-) - replace PyUnicode_AsWideChar() by PyUnicode_AsWideCharString() in most functions using PyUnicode_AsWideChar() - indicate that PyUnicode_AsWideCharString() raises a MemoryError on error Keep

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19054/pyunicode_aswidecharstring.patch ___ Python tracker ___ ___ Python-b

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread STINNER Victor
STINNER Victor added the comment: See also issue #4626 which introduced PyCF_IGNORE_COOKIE and PyPARSE_IGNORE_COOKIE flags to support unicode string for the builtin compile() function. -- nosy: +haypo ___ Python tracker

[issue7110] Output test failures on stderr in regrtest.py

2010-09-28 Thread R. David Murray
R. David Murray added the comment: Looks good to me. Committed in r85086. Thanks, Sandro. -- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue9974] tokenizer.untokenize not invariant with line continuations

2010-09-28 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- nosy: +krisvale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-09-28 Thread R. David Murray
R. David Murray added the comment: Added version print to test_sqlite in r85807. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9975] Incorrect use of flowinfo and scope_id in IPv6 sockaddr tuple

2010-09-28 Thread R. David Murray
Changes by R. David Murray : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue9980] str(float) failure

2010-09-28 Thread Kiriakos Vlahos
New submission from Kiriakos Vlahos : I am the author of PyScripter a popular python IDE (pyscripter.googlecode.com). Following a user report I found out that str(float) occasionally produces wrong results with Python 2.7 and 3.1. eg. >>> str(38210.0) //wrong '3820:.0' >>> str(37210.0) // co

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-28 Thread Lenard Lindstrom
Lenard Lindstrom added the comment: That is perfectly fine with me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9981] let make_buildinfo use a temporary directory on windows

2010-09-28 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : make_buildinfo currently creates temporary files getbuildinfo2.c and getbuildinfo.o in the current build directory. This update allows the caller to specify a temp directory to put those files in. The PCBuild pythoncore.vcproj now makes use of this,

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > PyUnicode_AsWideChar() doesn't merge surrogate pairs on a system with 32 bits > wchar_t and Python compiled in narrow mode (sizeof(wchar_t) == 4 and > sizeof(Py_UNICODE) == 2) => see issu