Changes by Qiangning Hong hon...@gmail.com:
--
nosy: +hongqn
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14562
___
___
Python-bugs-list mailing
Stefan Krah stefan-use...@bytereef.org added the comment:
The SystemError has changed to a KeyError:
http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2004/steps/test/logs/stdio
At least that makes it easy to spot the location in import.c. The
Mark Dickinson dicki...@gmail.com 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. :-)
--
___
Guy Taylor thebigguy.co...@gmail.com 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
clikkeb clik...@gmail.com 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
Serhiy Storchaka storch...@gmail.com 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 rep...@bugs.python.org
New submission from Dave Reid seabass...@gmail.com:
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
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Updated the patch with better documentation, and recursion safety.
--
Added file: http://bugs.python.org/file25236/basedealloc.diff
___
Python tracker rep...@bugs.python.org
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13959
___
___
Serhiy Storchaka storch...@gmail.com 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:
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14591
___
___
Python-bugs-list
New submission from Stefan Behnel sco...@users.sourceforge.net:
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
R. David Murray rdmur...@bitdance.com 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
New submission from Antoine Pitrou pit...@free.fr:
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
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14588
___
___
New submission from Stefan Behnel sco...@users.sourceforge.net:
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
Dave Reid wrote:
New submission from Dave Reid seabass...@gmail.com:
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
New submission from Robert E. rob...@re-factory.de:
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
R. David Murray rdmur...@bitdance.com 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
Robert E. rob...@re-factory.de 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
STINNER Victor victor.stin...@gmail.com added the comment:
The precision of mach_absolute_time() is known: it is timebase.numer /
timebase.denom * 1e-9.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14428
Raymond Hettinger raymond.hettin...@gmail.com 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 rep...@bugs.python.org
New submission from Robert Elsner robert.elsn...@googlemail.com:
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
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org
Robert Elsner robert.elsn...@googlemail.com 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
Mark Dickinson dicki...@gmail.com 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
Robert Elsner robert.elsn...@googlemail.com 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:
Robert Elsner robert.elsn...@googlemail.com 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
Martin v. Löwis mar...@v.loewis.de 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.
--
R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org
Andrew Svetlov andrew.svet...@gmail.com 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
Antoine Pitrou pit...@free.fr 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
Robert E. rob...@re-factory.de 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
Serhiy Storchaka storch...@gmail.com 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
Martin v. Löwis mar...@v.loewis.de 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
Antoine Pitrou pit...@free.fr 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
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12723
___
New submission from Pat Lynch plync...@gmail.com:
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,
Andrew Svetlov andrew.svet...@gmail.com 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
R. David Murray rdmur...@bitdance.com 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
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14592
___
___
Pat Lynch plync...@gmail.com 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
Martin v. Löwis mar...@v.loewis.de 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
Benjamin Peterson benja...@python.org added the comment:
Relative imports are no longer supported in python 3, so this makes sense.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14592
Benjamin Peterson benja...@python.org added the comment:
By relative I meant sibling.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14592
___
R. David Murray rdmur...@bitdance.com 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
___
Antoine Pitrou pit...@free.fr added the comment:
Ok, let's redocument them, then :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14594
___
___
Martin v. Löwis mar...@v.loewis.de 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.
Mark Dickinson dicki...@gmail.com 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
R. David Murray rdmur...@bitdance.com 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
Antoine Pitrou pit...@free.fr 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) {
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14588
___
___
Python-bugs-list
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brian.curtin, meador.inge, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14597
___
Mark Dickinson dicki...@gmail.com added the comment:
There is a guarantee that the shortest form must always be used.
Okay, sounds good. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14339
Pat Lynch plync...@gmail.com 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?
Roundup Robot devn...@psf.upfronthosting.co.za 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
Martin v. Löwis mar...@v.loewis.de 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
Kristján Valur Jónsson krist...@ccpgames.com 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
Jim Jewett jimjjew...@gmail.com added the comment:
On Fri, Apr 13, 2012 at 6:19 AM,
Antoine Pitrou pit...@free.fr 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
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org
Antoine Pitrou pit...@free.fr 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)
Antoine Pitrou pit...@free.fr 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
Pat Lynch plync...@gmail.com 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
Andrew Suffield asuffi...@suffields.me.uk 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
Robert Elsner robert.elsn...@googlemail.com 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
R. David Murray rdmur...@bitdance.com 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.
--
R. David Murray rdmur...@bitdance.com 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
sbt shibt...@gmail.com added the comment:
New patch which calculates endtime outside loop.
--
Added file: http://bugs.python.org/file25240/cond_wait_for.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14087
Serhiy Storchaka storch...@gmail.com added the comment:
Example:
'\u0100'
'Ā'
'\u0100\U0001'
'\u0100\U0001'
print('\u0100')
Ā
print('\u0100\U0001')
Traceback (most recent call last):
File pyshell#33, line 1, in module
print('\u0100\U0001')
UnicodeEncodeError: 'UCS-2'
Alexey Luchko l...@ank-sia.com 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 rep...@bugs.python.org
http://bugs.python.org/issue14437
Mark Dickinson dicki...@gmail.com 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.
--
sbt shibt...@gmail.com 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 rep...@bugs.python.org
Roundup Robot devn...@psf.upfronthosting.co.za 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
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org
Brett Cannon br...@python.org 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
Andrew Svetlov andrew.svet...@gmail.com added the comment:
The way is named 'codec'.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14304
___
Senthil Kumaran sent...@uthcode.com 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
Brett Cannon br...@python.org 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.
--
Martin v. Löwis mar...@v.loewis.de 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.
Brett Cannon br...@python.org 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
Brett Cannon br...@python.org 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
Brett Cannon br...@python.org 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
Brett Cannon br...@python.org 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
Amaury Forgeot d'Arc amaur...@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org/issue14437
Mark Dickinson dicki...@gmail.com 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'
sbt shibt...@gmail.com added the comment:
s/_win32/_winapi/g
--
Added file: http://bugs.python.org/file25241/winapi_module.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11750
___
R. David Murray rdmur...@bitdance.com 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
Serhiy Storchaka storch...@gmail.com 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
Antoine Pitrou pit...@free.fr 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.
--
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14592
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14594
___
___
Python-bugs-list
New submission from Peter Häring p.haer...@gmx.net:
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:
Pat Lynch plync...@gmail.com 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
R. David Murray rdmur...@bitdance.com 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
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
you could find how to resolve in last patch attached to issue 3754
--
nosy: +rpetrov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14598
Roumen Petrov bugtr...@roumenpetrov.info 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
Serhiy Storchaka storch...@gmail.com 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
Serhiy Storchaka storch...@gmail.com added the comment:
Sorry, the mail daemon has eaten a piece of example.
'\u0410\u0433\u043e\u0432!\U0001'
'Агов!\U0001'
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14304
Brett Cannon br...@python.org 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
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14593
___
___
Python-bugs-list
1 - 100 of 147 matches
Mail list logo