[issue14339] Optimizing bin, oct and hex

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the updates. > The same assumption is used above in long_to_decimal_string(). I added > the same assert and changed maxchar to 'f'. I think 'x' would be more appropriate. :-) -- ___ Python tracker

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread Guy Taylor
Guy Taylor added the comment: What ever change is made to the new CPythons the old docs should be updated to prevent confusion, with truncate([size]). On fixing it for the future I would agree that supporting it as a keyword argument is preferred, as it is more pythonic (in my opinion). Howev

[issue14576] IDLE cannot connect to subprocess - New solution

2012-04-16 Thread clikkeb
clikkeb added the comment: I think that lines 207-210 of GetUserCfgDir should be modified like this: try: sys.stderr.write(warn) except (IOError, AttributeError):# < pass#^^ because when you start IDLE via pythonw.exe (that sets sys.stderr to "None"), the f

[issue14339] Optimizing bin, oct and hex

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I think 'x' would be more appropriate. :-) Oops. You are right, of cause. -- Added file: http://bugs.python.org/file25234/long_to_binary_base_3.patch ___ Python tracker _

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Dave Reid
New submission from Dave Reid : A particular combination of seed and jumpahead calls seems to force the MT generator into a state where it produces a random variate that is outside the range 0-1. Problem looks like it might be in _randommodule.c:genrand_int32, which produces a value > 0xff

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Updated the patch with better documentation, and recursion safety. -- Added file: http://bugs.python.org/file25236/basedealloc.diff ___ Python tracker _

[issue13959] Re-implement parts of imp in pure Python

2012-04-16 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, jumpahead may have problems on non-32-bit platforms. The proposed patch fixes it. Porting to Python 3 is not required. -- keywords: +patch nosy: +storchaka Added file: http://bugs.python.org/file25237/random_jumpahead_64bit.patch ___

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Stefan Behnel
New submission from Stefan Behnel : Up to the early Py3.3 developer versions, calling __import__() with a level of -1 worked as in Python 2, i.e. it tried a relative import first and then a global import. This no longer seems to be available after the importlib rewrite (e.g. as of rev f341b99

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread R. David Murray
R. David Murray added the comment: There wouldn't be serious backward incompatibility. Truncate(0) would still mean the same thing as truncate(size=0). I don't remember if we treat supporting the keyword form when it is doced that as a bug or not, though, so you might be right that it can't

[issue14593] PyErr_SetFromImportErrorWithNameAndPath lacks error checking

2012-04-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : The PyErr_SetFromImportErrorWithNameAndPath implementation never checks for the various results returned by the C API functions it invokes. (also, it needs documenting, see python-dev) As for PyErr_SetExcWithArgsKwargs, there's a potential refleak when args

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-16 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14594] document imp.load_dynamic()

2012-04-16 Thread Stefan Behnel
New submission from Stefan Behnel : The imp.load_dynamic() function is used by third party code (e.g. Cython's pyximport) but is not currently documented. http://docs.python.org/dev/library/imp.html The latest changes to the import mechanism suggest that it should better be documented to give

Re: [issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Peter Otten
Dave Reid wrote: > > New submission from Dave Reid : > > A particular combination of seed and jumpahead calls seems to force the MT > generator into a state where it produces a random variate that is outside > the range 0-1. Problem looks like it might be in > _randommodule.c:genrand_int32, whic

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread Robert E.
New submission from Robert E. : Am 16.04.2012 13:49, schrieb Python tracker: > To complete your registration of the user "roberte" with > Python tracker, please do one of the following: > > - send a reply to rep...@bugs.python.org and maintain the subject line as is > (the > reply's additional

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread R. David Murray
R. David Murray added the comment: Something seems to have gone wrong with the 'reply' form. Sorry about that. Please use the URL instead. -- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Py

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread Robert E.
Robert E. added the comment: Well I did that first but the tracker replied: node with key "roberte" exists Seems the username is alread in use but I still could register but not complete the registration. Am 16.04.2012 13:54, schrieb R. David Murray: > > R. David Murray added the comment: >

[issue14428] Implementation of the PEP 418

2012-04-16 Thread STINNER Victor
STINNER Victor added the comment: The precision of mach_absolute_time() is known: it is timebase.numer / timebase.denom * 1e-9. -- ___ Python tracker ___ __

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report and patch. I've investigate and load a fix this week. -- assignee: -> rhettinger priority: normal -> high ___ Python tracker ___

[issue14596] struct.unpack memory leak

2012-04-16 Thread Robert Elsner
New submission from Robert Elsner : When unpacking multiple files with _variable_ length, struct unpack leaks massive amounts of memory. The corresponding functions from numpy (fromfile) or the array (fromfile) standard lib module behave as expected. I prepared a minimal testcase illustrating

[issue14596] struct.unpack memory leak

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: Do you see the same results with Python 2.7? Python 2.6 is only receiving security bugfixes at this point. -- nosy: +mark.dickinson ___ Python tracker __

[issue14596] struct.unpack memory leak

2012-04-16 Thread Robert Elsner
Robert Elsner added the comment: I would love to test but I am in a production environment atm and can't really spare the time to set up a test box. But maybe somebody with access to 2.7 on linux could test it with the supplied script (just start it and it should happily eat 8GB of memory - I

[issue14596] struct.unpack memory leak

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: I suspect that this is due to the struct module cache, which caches Struct instances corresponding to formats used. If that's true, there's no real leak as such. As a test, what happens if you increase your xrange(30) to xrange(300)? (And perhaps decrease

[issue14596] struct.unpack memory leak

2012-04-16 Thread Robert Elsner
Robert Elsner added the comment: Well seems like 3.1 is in the Debian repos as well. Same memory leak. So it is very unlikely it has been fixed in 2.7. I modified the test case to be compatible to 3.1 and 2.6. -- versions: +Python 3.1 Added file: http://bugs.python.org/file25239/unpac

[issue14596] struct.unpack memory leak

2012-04-16 Thread Robert Elsner
Robert Elsner added the comment: Well the problem is, that performance is severely degraded when calling unpack multiple times. I do not know in advance the size of the files and they might vary in size from 1M to 1G. I could use some fixed-size buffer which is inefficient depending on the fi

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: This codec is one that is equal to UTF-8, but restricted to the BMP. For non-BMP character, the error handler is called. It will be the stdout codec for the IDLE interactive shell, causing non-BMP results to be ascii() escaped. -- __

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread R. David Murray
R. David Murray added the comment: Hmm. The account *looks* normal, and has your email address attached. Can you log in using the password you chose? -- ___ Python tracker __

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: Tkinter (as Tcl itself) has no support of non-BMP characters in any form. It looks like support of UTF-16 without surrogates. I like to implement codec for that which will process different error modes (strict, replace, ignore etc) as well as others codecs doe

[issue14596] struct.unpack memory leak

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I suspect that this is due to the struct module cache, which caches > Struct instances corresponding to formats used. If that's true, > there's no real leak as such. Well, the posted code creates 30 struct instances. That shouldn't exhaust the memory of a 8

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread Robert E.
Robert E. added the comment: No I can't (says invalid login). I created a new account using my Google ID which works alright. If you want to debug this problem I am happy to help but otherwise this "bug entry" can be removed. Cheers Am 16.04.2012 14:47, schrieb R. David Murray: > > R. David M

[issue14596] struct.unpack memory leak

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the problem is the place to be in Python 2.7, in Python 3.2 and in Python 3.3. Random size of the structure is important -- if you remove the randint, leakage will not. The memory is not released in cached structuress, which are created in module-leve

[issue12081] Remove distributed copy of libffi

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Arfrever: I doubt anybody has contributed patches back, or that anybody is interested in doing so. I personally don't see a problem in using an old libffi version, so I fail to see Benjamin's issue. Figuring out how exactly to use the system libffi is more

[issue14596] struct.unpack memory leak

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: It appears the storage of Struct instances is rather inefficient when there's a repeat code such as "<48L". In this example, 48 almost identical structures describing the "L" format (struct _formatcode) will be created. You can guess what happens with large r

[issue12723] Provide an API in tkSimpleDialog for defining custom validation functions

2012-04-16 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Pat Lynch
New submission from Pat Lynch : If I load a dll in ctypes, then delete that loaded DLL instance, the DLL is not unloaded until the script finishes and exits. I'm trying to write some unit tests in python to exercise that DLL where each test case loads a DLL, does some work, then unloads the DL

[issue14576] IDLE cannot connect to subprocess - New solution

2012-04-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: I guess IdleConf should to have flag like 'writable'. If user environment points to invalid location (or there are no write access) this flag should be set. It flag can affect IDLE configuration dialog: user should be notified what him changes will not be perm

[issue14595] Complete your registration to Python tracker -- key 25rVzaHLDOR5lFuBNkq7ixbyp3WbqQlG

2012-04-16 Thread R. David Murray
R. David Murray added the comment: As long as you are good with a registered account, that's what's important. If I get time I'll take a deeper look, but most likely I won't unless this happens again. -- ___ Python tracker

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Pat Lynch
Pat Lynch added the comment: I should mention also, that this is mostly an issue for me on Win7 x64. It does behave 'slightly' better on WinXP x86. (I have the 64-bit version of python installed on Win7 x64 & the 32-bit version installed on WinXP) thanks, Pat. On 16 April 2012 14:09, Pat Lyn

[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Changes to ctypes should not affect the gdbm module. More likely, icc and python just don't work together. It may be a compiler bug in icc (it wouldn't be the first one discovered by Python), or it may be a portability defect in Python (where it wouldn't be

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Relative imports are no longer supported in python 3, so this makes sense. -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: By "relative" I meant "sibling". -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14594] document imp.load_dynamic()

2012-04-16 Thread R. David Murray
R. David Murray added the comment: This is essentially a duplicate of issue 14551, but perhaps with a bit more weight behind it. -- nosy: +brett.cannon, pitrou, r.david.murray versions: -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker

[issue14594] document imp.load_dynamic()

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, let's redocument them, then :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14339] Optimizing bin, oct and hex

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: > (1) The patch appears to assume that a Unicode string created with > PyUnicode_New(size, 127) will have 'kind' PyUnicode_1BYTE_KIND. > While this might be true in the current implementation, I don't know > whether this is guaranteed in general. Martin, any c

[issue14596] struct.unpack memory leak

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: > It appears the storage of Struct instances is rather inefficient when > there's a repeat code such as "<48L" Right. Repeat counts aren't directly supported in the underlying PyStructObject; a format string containing repeat counts is effectively 'compile

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread R. David Murray
R. David Murray added the comment: In general it is difficult to impossible to get Python2 to unload modules before the interpreter shuts down. See issue 9072. I'm not savvy enough with the C stuff to know if the fact that you loaded it via ctypes changes anything, but I doubt it. Note tha

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Urg, that's a horrible hack. How about instead having an API function to resurrect an object from a tp_dealloc? That way the iobase_dealloc code would be written: if (_PyIOBase_finalize((PyObject *) self) < 0) { _PyObject_ResurrectFromDealloc(self

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, meador.inge, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue14339] Optimizing bin, oct and hex

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: > There is a guarantee that the shortest form must always be used. Okay, sounds good. Thanks. -- ___ Python tracker ___ _

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Pat Lynch
Pat Lynch added the comment: thanks for the very quick response. Since LoadLibrary is called in the constructor, why can't FreeLibrary be called in the destructor? or at least expose a function to unload that calls FreeLibrary? http://msdn.microsoft.com/en-us/library/windows/desktop/ms683152%

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset af46a001d5ec by Vinay Sajip in branch '2.7': Issue #14452: remove BOM insertion code. http://hg.python.org/cpython/rev/af46a001d5ec New changeset 89ab589f6fa7 by Vinay Sajip in branch '3.2': Closes #14452: remove BOM insertion code. http://hg.pytho

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: In principle, it should be possible (but perhaps not desirable, see below) to call FreeLibrary in a CDLL's __del__. However, since this would be a new feature, it can't go into 2.7. Patches are welcome; make sure to support both FreeLIbrary and dlclose. The

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ok, that sounds reasonable, particularly in light of that _NewReference stuff. I'll work out a different patch then. But I think the API must be public, since it would need to work from extension modules. So: if a c type decides that it wants to liv

[issue14569] pystate.c #ifdef ordering problem

2012-04-16 Thread Jim Jewett
Jim Jewett added the comment: On Fri, Apr 13, 2012 at 6:19 AM, Antoine Pitrou added the comment: > I don't think you need anyone's permission to commit such a fix :) Well, *I* would, since I don't have commit privs, and don't currently have a C dev environment with which to test. But I figur

[issue14596] struct.unpack memory leak

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: Perhaps the best quick fix would be to only cache small PyStructObjects, for some value of 'small'. (Total size < a few hundred bytes, perhaps.) -- ___ Python tracker __

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok, that sounds reasonable, particularly in light of that > _NewReference stuff. I'll work out a different patch then. But I > think the API must be public, since it would need to work from > extension modules. Needing to work from (stdlib) extension module

[issue14596] struct.unpack memory leak

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Perhaps the best quick fix would be to only cache small > PyStructObjects, for some value of 'small'. (Total size < a few > hundred bytes, perhaps.) Or perhaps not care at all? Is there a use case for huge repeat counts? (limiting cacheability could decrease

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Pat Lynch
Pat Lynch added the comment: ok, that's fair enough if most usage of ctypes is from people accessing system libraries :) I wouldn't have thought my usage was that weird though (given the strength of using python for unit testing). In local tests, adding a function CDLL::ForceUnloadDll (which

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-16 Thread Andrew Suffield
Andrew Suffield added the comment: I think I've tripped over a variation on this theme using pyqt and 2.7: When working in a QThread, the PyGILState_Ensure call when transitioning control from Qt to python will frequently allocate a new thread state - because every time control returns to the

[issue14596] struct.unpack memory leak

2012-04-16 Thread Robert Elsner
Robert Elsner added the comment: Well I stumbled across this leak while reading big files. And what is the point of having a fast C-level unpack when it can not be used with big files? I am not adverse to the idea of caching the format string but if the cache grows beyond a reasonable size, it s

[issue14594] document imp.load_dynamic()

2012-04-16 Thread R. David Murray
R. David Murray added the comment: Yeah, they really need to be documented in order for us to document them as deprecated if we decide we really want to remove them later. "Obsolete" is not, I think, the same as "deprecated". -- ___ Python tracker

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-16 Thread R. David Murray
R. David Murray added the comment: This appears to be failing on the buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/3358/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/2037/steps/test/logs/st

[issue14087] multiprocessing.Condition.wait_for missing

2012-04-16 Thread sbt
sbt added the comment: New patch which calculates endtime outside loop. -- Added file: http://bugs.python.org/file25240/cond_wait_for.patch ___ Python tracker ___ __

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Example: >>> '\u0100' 'Ā' >>> '\u0100\U0001' '\u0100\U0001' >>> print('\u0100') Ā >>> print('\u0100\U0001') Traceback (most recent call last): File "", line 1, in print('\u0100\U0001') UnicodeEncodeError: 'UCS-2' codec can't encode char

[issue14437] _io build fails on cygwin

2012-04-16 Thread Alexey Luchko
Alexey Luchko added the comment: Final 2.7.3 didn't get the fix. Checked http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.xz -- ___ Python tracker ___ ___

[issue14596] struct.unpack memory leak

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Or perhaps not care at all? That's also possible. :-) IMO, Robert's use-case doesn't really match the intended use-case for struct (parsing structures of values laid out like a C-struct ). There the caching makes sense. -- _

[issue11750] Mutualize win32 functions

2012-04-16 Thread sbt
sbt added the comment: > How about _windowsapi or _winapi then, to ensure there are no clashes? I don't have any strong feelings, but I would prefer _winapi. -- ___ Python tracker

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 603301cfb194 by Vinay Sajip in branch 'default': Closes #14452: brought tests in line with removal of BOM insertion code. http://hg.python.org/cpython/rev/603301cfb194 -- status: open -> closed ___ Pytho

[issue11750] Mutualize win32 functions

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > How about _windowsapi or _winapi then, to ensure there are no clashes? > > I don't have any strong feelings, but I would prefer _winapi. Ditto here. -- ___ Python tracker __

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: What Benjamin said. PEP 328 should have done away with relative imports, but somehow the __import__() function itself was not updated even though its docs were changed to say that index defaulted to 0. So this isn't actually a regressions because of importlib b

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: The way is named 'codec'. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2193] Cookie Colon Name Bug

2012-04-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: I tested setting cookies with ":" in the cookie name in both firefox and google-chrome. They both seem to allow and store the cookie with ":" in them. Firefox sent a request header like this: Set-Cookie test:value=solution:is:he the cookie with name con

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: I should also mention that the support for -1 indexing in Python 3 was weird because support was partially removed, but some 'if' checks only did ``< 1`` and so negative indices didn't trigger an error. -- ___ Python

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: > But I think that it is too specific problem and too specific > solution. It would be better if IDLE itself escapes the string in the > most appropriate way. That is not implementable correctly. If you think otherwise, please submit a patch. If not, please tr

[issue14594] document imp.load_dynamic()

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: I'm fine w/ documenting load_dynamic() and leaving it as-is since importlib uses the function itself (plus the frozen/builtin functions, although the frozen stuff might be simplified since they can probably just return the bytes for the frozen module instead of

[issue14583] try/except import fails --without-threads

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: Just to clarify the failure for the bug history, somehow multiprocessing is not ending up in sys.modules as expected. It changed from a SystemError to a KeyError because I started to properly check a PyDict_GetItem() return value instead of blindly assuming som

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: David, did you find load_source() convenient because you could specify the file to use for the module's source? Did you actually like the file object argument? Just trying to gauge if some new API is needed on a loader of if the one-liner I proposed is good eno

[issue13959] Re-implement parts of imp in pure Python

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: >From Eric Smith on python-dev: > +suffix, mode, type_ = details > +if mode and (not mode.startswith(('r', 'U'))) or '+' in mode: > +raise ValueError('invalid file open mode {!r}'.format(mode)) Should this be: if mode and (not mode.startswith(('r

[issue14437] _io build fails on cygwin

2012-04-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, the 2.7.3 branch was cut long before the fix (end of February) so it was not included. -- ___ Python tracker ___ __

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Mark Dickinson
Mark Dickinson added the comment: Patch looks good to me. There's one other subtle bug in random_jumpahead, which is that it's not guaranteed that the resulting state is nonzero. The way to fix this is to add a line like the one near the end of the 'init_by_array' function. mt[0] = 0x80

[issue11750] Mutualize win32 functions

2012-04-16 Thread sbt
sbt added the comment: s/_win32/_winapi/g -- Added file: http://bugs.python.org/file25241/winapi_module.patch ___ Python tracker ___

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread R. David Murray
R. David Murray added the comment: The one-liner is "good enough", but... The use case is indeed loading a module from an arbitrary file without having to worry about sys.path, etc. For that load_source is intuitive. The one-liner is an adequate substitute, but feels like a step backward fo

[issue14596] struct.unpack memory leak

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The proposed patch uses a more compact encoding format of large structures. -- keywords: +patch Added file: http://bugs.python.org/file25242/struct_repeat.patch ___ Python tracker

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The one-liner is an adequate substitute, but feels like a step > backward for this particular use case. That is, load_source is a > *convenience* function, from my POV :) Agreed with David. -- ___ Python tracker

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14594] document imp.load_dynamic()

2012-04-16 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2012-04-16 Thread Peter Häring
New submission from Peter Häring : I need to define NCURSES_INTERNALS in py_curses.h before ncurses.h is included, even on my Linux system with ncurses-5.9. See the same issue for cygwin: 14438 -- components: Extension Modules messages: 158481 nosy: phaering priority: normal severity:

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread Pat Lynch
Pat Lynch added the comment: Just to update:- I've run this pretty extensively on multiple systems (XP x86 & Win7 64-bit) and it appears to behave as expected (haven't checked it on Linux). I have that code being called in 100s of unit tests. For python 3.1, would it make sense to add it as a

[issue14597] Cannot unload dll in ctypes until script exits

2012-04-16 Thread R. David Murray
R. David Murray added the comment: Current default will become 3.3. 3.1 has been out for a while :) Your thought sounds reasonable, though Martin may have further input. Would you are to propose a patch? Otherwise most like nothing will happen with this issue. 3.3 Beta is scheduled for mid

[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2012-04-16 Thread Roumen Petrov
Roumen Petrov added the comment: you could find how to resolve in last patch attached to issue 3754 -- nosy: +rpetrov ___ Python tracker ___

[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2012-04-16 Thread Roumen Petrov
Roumen Petrov added the comment: extracted as separate patch -- keywords: +patch Added file: http://bugs.python.org/file25243/0001-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch ___ Python tracker ___

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be I did not correctly understand the problem, but I can assume, that this patch solves it. 'Агов!\U0001' -- keywords: +patch Added file: http://bugs.python.org/file25244/idle_escape_nonbmp.patch ___ Pytho

[issue14304] Implement utf-8-bmp codec

2012-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, the mail daemon has eaten a piece of example. >>> '\u0410\u0433\u043e\u0432!\U0001' 'Агов!\U0001' -- ___ Python tracker ___ _

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: To help refine this, so you would expect all of the usual import stuff (e.g. sys.modules use, generating bytecode, etc.), you just want a short-circuit to the loading when you happen to already know the name and desired file path? Basically I want to kill off t

[issue14593] PyErr_SetFromImportErrorWithNameAndPath lacks error checking

2012-04-16 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14567] http.server query string handling is incorrect and inefficient

2012-04-16 Thread Jim Jewett
Changes by Jim Jewett : -- title: http.server query string handling incorrect and inefficient -> http.server query string handling is incorrect and inefficient ___ Python tracker __

[issue14599] Windows test_import failure

2012-04-16 Thread R. David Murray
New submission from R. David Murray : Not sure which revision triggered this, so opening a new bug: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6381/steps/test/logs/stdio There's also a test_reprlib failure, no idea if it is related. -- keywords: buildbot me

  1   2   >