New submission from Thomas Heller:
In a windows debug build, an assertion is triggered when os.execvpe is
called with an empty argument list:
self.assertRaises(OSError, os.execvpe, 'no such app-', [], None)
The same problem is present in the trunk version.
Attached is a patch that
New submission from Thomas Heller:
test test_builtin failed -- Traceback (most recent call last):
File "c:\svn\py3k\lib\test\test_builtin.py", line 1473, in test_round
self.assertEqual(round(1e20), 1e20)
AssertionError: 0 != 1e+020
--
components: Windows
messages:
New submission from Thomas Heller:
Unicode errors in various tests - not only in test_glob:
test_glob
test test_glob failed -- Traceback (most recent call last):
File "c:\svn\py3k\lib\test\test_glob.py", line 87, in
test_glob_directory_names
eq(self.glob('*',
Thomas Heller added the comment:
BTW, setting the environment variable TZ to, say, 'GMT' makes the
problem go away.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.p
New submission from Thomas Heller:
In my german version of winXP SP2, python3 cannot import the time module:
c:\svn\py3k\PCbuild>python_d
Python 3.0x (py3k:57600M, Aug 28 2007, 07:58:23) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits"
New submission from Thomas Heller:
Running the PCBuild\rt.bat script fails when it compares the expected output
with the actual output. Some inspection shows that the comparison fails
because
there are '\n' linefeeds in the expected and '\n\r' linefeeds in the
actual ou
Thomas Heller added the comment:
IMO the very best would be to avoid as many conversions as possible by
using the wide apis on Windows. Not for _tzname maybe, but for env
vars, sys.argv, sys.path, and so on. Not that I would have time to work
on that
Thomas Heller added the comment:
Applied in rev. 57731.
--
resolution: accepted -> fixed
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller added the comment:
Set to accepted. As pointed out in private email, please apply it to
the trunk.
Your thoughts about the 'length' of pointers make sense, and are very
similar to what I had in mind when I implemented pointer indexing.
For indexing pointers, negative i
Changes by Thomas Heller:
--
assignee: theller -> twouters
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1617699>
_
___
Python-bugs-li
Thomas Heller added the comment:
Yes.
But looking at your examples I think it would be better to forbid
missing indices completely instead of allowing them only where they
clearly mean 0.
Writing (and reading!) a 0 is faster than thinking about if a missing
index is allowed or what it means
Thomas Heller added the comment:
This is an experimental patch (solaris.patch). Can you please proofread
it and try it out on the solaris machine?
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1777530>
__
Thomas Heller added the comment:
Martin, here is a patch (solaris-2.patch), hopefully according to your
comments.
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1777530>
_In
Thomas Heller added the comment:
Can someone please test the patch and report back? -- Thanks
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1777530>
_
__
Thomas Heller added the comment:
Fixed in SVN: trunk rev 58155, release25-maint rev 58158.
Thanks.
--
resolution: -> fixed
status: open -> closed
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Thomas Heller added the comment:
Would you like to prepare a patch? I have no idea how the return values
of gestalt.gestalt("sysv") and platform.release() relate to each other...
--
nosy: +theller
__
Tracker <[EMAIL PROTECTED]>
<htt
Thomas Heller added the comment:
On the mac where I have access to platform.release() returns the string
'8.10.0'. gestalt.gestalt("sysv") returns 0x1049. Your patch does not
look correct to me.
__
Tracker <[EMAIL PROTECTED]>
<htt
Thomas Heller added the comment:
This patch looks better. However, the 'os.uname()' function seems to
return the information that we need; so I updated the patch to use this
instead. Can you please proofread it (osx.patch) ?
__
Tracker <[EMAIL PROT
Thomas Heller added the comment:
IMO os.uname() is preferable.
Committed as SVN rev 58415 in trunk.
Thanks.
--
assignee: -> theller
resolution: -> accepted
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.py
New submission from Thomas Heller:
I needed two logging handlers in my application, one notifiying the user
of errors, the other writing errors to a logfile. So I created a custom
subclass of logging.Formatter and redefined the formatException() method
that returned a summary of the exception
Thomas Heller added the comment:
> > This is tough. On the one hand you are right that different classes that
> > have different formatException() methods aren't treated correctly; on
> > the other hand I think the caching is important for other cases where
> > t
Thomas Heller added the comment:
I think that a warning or an example in the docs would be nice, but I
have no time to make a patch for that.
--
resolution: -> wont fix
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://
Thomas Heller added the comment:
Guido van Rossum schrieb:
> Looks good to me. I can check it in if Thomas is okay with that (or if
> he remains silent long enough :-).
Looks good to me too. Please check it in if you have time ;-)
__
Tracker <[EMAIL
Thomas Heller added the comment:
Looking again, I found a bug in the patch.
In the function _get_args(), the local variable 'name' was
changed from 'char *' to 'PyObject *'. In line 2995, it is
passed to PyErr_Format with a '%s' format code:
Thomas Heller added the comment:
Here's the bugfix - is it correct?
Added file: http://bugs.python.org/file8603/_ctypes.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1319>
__Index: Modules/
Thomas Heller added the comment:
Committed as rev 58642.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1319>
__
___
Python-bugs-list mailing list
Unsubs
Thomas Heller added the comment:
Maybe I should give up the idea to define the ffi_type_... types myself.
Committed as rev 58655. Thanks.
--
resolution: -> accepted
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller added the comment:
I'm unsure how to proceed with this.
Replacing the copy of libffi in the ctypes sources - I'm very afraid to
do that. It has it's own configure system, written by someone else.
Then it has several changes from various people for Python,
Thomas Heller added the comment:
In the branches_ctypes-branch I hacked setup.py to always use an
installed libffi if one is found. Then I triggered the trunk buildbots
which failed or crashed before in some c_longdouble tests; the tests
worked ok on them (ppc Debian unstable, and S-390 Debian
Thomas Heller added the comment:
I meant branches/ctypes_branch, of course.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1292>
__
___
Python-bugs-list
Thomas Heller added the comment:
I have now made --with-system-ffi default to "yes" for Linux/alpha*,
Linux/arm*, Linux/ppc*, and Linux/s390* machines. If you think it is
needed for mips machines also please add this - there's no buildbot
where I can c
Thomas Heller added the comment:
./python Lib/test/regrtest.py -R:: test_ctypes does not report a leak,
so I think there is no leak.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Thomas Heller added the comment:
> $ ./python Lib/test/regrtest.py -R:: test_ctypes
> test_ctypes
> beginning 9 repetitions
> 123456789
> .
> test_ctypes leaked [-33, 0, 0, 0] references, sum=-33
> 1 test OK.
> [101762 refs]
New submission from Thomas Heller:
This patch uses the windows widechar apis for os.environ. In this way,
environment variables that use umlauts can be accessed.
--
components: Interpreter Core, Windows
files: posixmodule.c.diff
keywords: patch, py3k
messages: 57265
nosy: theller
Thomas Heller added the comment:
Committed as rev 58916.
The getpath.c, sys.path, and sys.argv issues is much more difficult to
fix IMO.
If you write a testcase for THIS issue (os.environ), I'll start thinking
on them. No promises, though.
--
assignee: -> theller
resolution:
Thomas Heller added the comment:
Christian Heimes schrieb:
> Neal, Thomas, what do you think about the patch? Your knowledge of the
> Windows API is greater than mine. Is the duplicate_socket() function ok?
> I don't want to apply a patch I don't fully understand.
>
Thomas Heller added the comment:
Christian Heimes schrieb:
> > New submission from Christian Heimes:
> >
> > The problem is in _ctypes.c:create_comerror() around line 4620.
The code tries to populate a dict with methods and finally pass them to
PyErr_NewException("
Thomas Heller added the comment:
> Greg Couch added the comment:
>
> Turns out callproc.c forgot to include after
> which conditionally includes alloca.h. So it's a one-line fix.
>
This would not work. is a file private to libffi;
when Python is configured to use th
ctypes has _always_ catched exceptions raised in function calls.
On Windows ;-).
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Committed in trunk as rev. 63395. I've changed the code that Amaury
suggested so that None is returned when get_build_version() returns
None. Thanks.
--
resolution: -> fixed
status:
Thomas Heller <[EMAIL PROTECTED]> added the comment:
The OS X find_library code was not written by me, the code was ripped
from Bob Ippolitos macholib.
Can some OS X expert please look into this?
Shamelessly assigning to Ronald - feel free to unassign if you have no time.
--
as
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Thanks, Ronald. Sounds like this bug could be closed then.
Bill, if you want a library search function with different semantics,
I suggest you open a feature request, describe the sematics that
should be used and (ideally) provide a
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Has nothing to do with ctypes.
--
assignee: theller ->
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.py
Thomas Heller <[EMAIL PROTECTED]> added the comment:
That's a great idea.
> Just before doing a C library function call,
> ctypes would copy this variable into the real C-level errno; and
Is the ctypes.set_errno(...) function really needed? Wouldn't it be sufficient
if
Thomas Heller <[EMAIL PROTECTED]> added the comment:
But would it hurt to set errno to zero before *any* function call?
My experiments show that it is faster to clear errno always
instead of trying to get a previously set value from tls storage in a
ctypes-global object created by c
Thomas Heller <[EMAIL PROTECTED]> added the comment:
This does not work because Python can run arbitrary code,
even in the same thread, between the call to a function in
a shared library and the call to get_errno().
__
Tracker <[EMAIL PROTECTE
Thomas Heller <[EMAIL PROTECTED]> added the comment:
> How can Python run arbitrary code between the return from a ctypes
> method and the next Python instruction? None of the code should have any
> effect on errno.
By freeing objects because their refcount h
Thomas Heller <[EMAIL PROTECTED]> added the comment:
>> Using the native errno instead of a custom TLS value is bad because a
>> lot of things can occur
>
> So what's the semantics of set_errno then? Set the real errno? If so,
> what if it gets changed betwee
Thomas Heller <[EMAIL PROTECTED]> added the comment:
>> AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real
>> errno.
>> The copy is copied into the 'real' errno just before ffi_call (in
>> Modules/_ctypes/callproc.c),
>>
Thomas Heller <[EMAIL PROTECTED]> added the comment:
To be honest, I do not understand this request and the discussion.
ctypes.util.find_library(), as dcumented, is supposed to simulate what
the linker does: find the name of a shared library. For example,
it returns 'libc.so.6'
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Ok, here is the plan (basically Armin's proposal):
ctypes maintains a gloabl, but thread-local, variable that contains an error
number;
called 'ctypes_errno' for this discussion.
ctypes.set_errno(value) copies 'val
Changes by Thomas Heller <[EMAIL PROTECTED]>:
--
assignee: theller ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1779233>
___
__
Changes by Thomas Heller <[EMAIL PROTECTED]>:
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1797>
___
___
Python-bugs-list mailing list
Thomas Heller <[EMAIL PROTECTED]> added the comment:
NULL function pointers are have a boolean False value now; svn rev 63792
(trunk) and rev 63793 (py3k).
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Here is a patch implementing the plan. This text could serve as a start for the
documentation, but it also describes the current implementation. Usage recipes
should probably be added:
/*
ctypes maintains a module-global, but thread
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Thomas Heller schrieb:
> Here is a patch implementing the plan.
ctypes-errno-3.patch, in case of doubt.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Thomas Heller <[EMAIL PROTECTED]> added the comment:
> The question is, which linker? I think it should be ld.so, which links "on
> demand", and does pay attention to LD_LIBRARY_PATH. I'm not sure what the
> point of find_library() is, otherwise.
The best exp
Changes by Thomas Heller <[EMAIL PROTECTED]>:
--
resolution: -> invalid
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
New submission from Thomas Heller <[EMAIL PROTECTED]>:
On HP-UX, there is a compiler warning about _POSIX_C_SOURCE redefined:
bash-2.04$ make
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE
-o M
Thomas Heller <[EMAIL PROTECTED]> added the comment:
A different patch but implementing the same functionality was now
committed as trunk rev 63977.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PR
Thomas Heller <[EMAIL PROTECTED]> added the comment:
>> (Another note: the C-level errno and the TLS copy should also be
>> synchronized when the C code invokes a Python callback.)
>
> What I meant is what should occur when a pure Python function is used
> as a callba
New submission from Thomas Heller <[EMAIL PROTECTED]>:
When Python shuts down after running test_multiprocessing on Windows, a
segfault occurs (this is with a debug build from trunk):
> python26_d.dll!_Py_ForgetReference(_object * op=0x012de740) Line 2023
+ 0xf by
New submission from Thomas Heller <[EMAIL PROTECTED]>:
test_ctypes, when run after testmultiprocessing, fails:
...
==
ERROR: test_simple (ctypes.test.test_pickling.Pick
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Yes, the patch weakref_cycle.patch from #3100 fixes the problem.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
IMO this problem occurs because multiprocessing registers pickling
support for ctypes, but the ctypes in trunk already has support for
pickling.
___
Python tracker <[EMAIL PROTECTE
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Adam Olsen schrieb:
> Thomas, do you have a specific command to reproduce this? It runs fine
> if I do "./python -m test.regrtest -v test_multiprocessing test_ctypes".
> That's with amaury's patch from
Thomas Heller <[EMAIL PROTECTED]> added the comment:
> Adam Olsen <[EMAIL PROTECTED]> added the comment:
>
> I see no common symbols between #3102 and #3092, so unless I missed
> something, they shouldn't be involved.
>
> I second the notion that mul
Thomas Heller <[EMAIL PROTECTED]> added the comment:
> Thomas Heller <[EMAIL PROTECTED]> added the comment:
>
> Yes, the patch weakref_cycle.patch from #3100 fixes the problem.
BTW: I also get a segfault on Linux, which is fixed by this patch.
_
Thomas Heller <[EMAIL PROTECTED]> added the comment:
roudkerk schrieb:
> roudkerk <[EMAIL PROTECTED]> added the comment:
>
> This patch to sharedctypes should fix the problem by adding a
> __reduce_ex__() method to a shared ctype object instead of using copy_reg.
I ca
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Thanks for the heads up. Fixed in trunk (rev 64971) and py3k (rev 64972).
I used "&B" (pointer to bytes) as the format string for pointer to
incomplete structure, not "&P".
--
resolution
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I can confirm the problem on ubuntu linux.
--
assignee: -> theller
nosy: +theller
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Thanks for the patch, fixed in trunk rev 64977 and py3k rev 64978.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I can review and try out the fixer if someone provides a patch. OTOH I
have never used the dl module.
Note that dl exposed a lot of RTLD_ constants that ctypes does not yet,
so there should be a patch for ctype
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Well, I have no idea what the standard setup on posix boxes is - should
objdump and ldconfig be on $PATH or not?
Regarding the groups in the regexp: It is my understanding that the
parens do not matter because .group(0) is returned,
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Good catch! Indeed, when PyString_FromString or PyUnicode_FromWideChar
fail, Python crashes with
Fatal Python error: PyThreadState_Get: no current thread
in a debug build, and an access violation in a release build (tested on
W
Thomas Heller <[EMAIL PROTECTED]> added the comment:
This is fixed now in SVN, in trunk, branches/py3k, and
branches/release25-maint. Thanks again.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PR
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Here is a patch for Modules/_ctypes/malloc_closure.c that may work
(totally untested). The code snippet is copied from Modules/mmapmodule.c.
--
keywords: +patch
Added file: http://bugs.python.org/file11161/malloc_closure
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Corrected the patch.
Added file: http://bugs.python.org/file11162/malloc_closure.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Thomas Heller <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file11161/malloc_closure.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I have no objections against this patch - feel free to check it in if it
is not too late before the beta.
Also I think that LPDWORD and friends are a good idea, you should extend
the patch with them.
--
assignee: theller -&
Changes by Thomas Heller <[EMAIL PROTECTED]>:
--
nosy: +theller
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3617>
___
___
Python
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I think this is too fancy. I would prefer to spell the definitions out
like this:
LPDWORD = PDWORD = POINTER(DWORD)
LPCSTR = LPSTR = c_wchar_p
We could avoid the giant __all__ list when we 'import ctypes as _ctypes'
Thomas Heller <[EMAIL PROTECTED]> added the comment:
The test has already been fixed and reenabled in rev 65849.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I forgot to close this issue. Already implemented in svn rev 63962.
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Thomas Heller <[EMAIL PROTECTED]> added the comment:
The libffi library in Python 2.5 is too old and won't be upgraded to a
newer version.
I see several possibilities for you:
- Use Python 2.6 (if you can live with the beta or wait for the release)
- Use Python 2.5, compile with
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Cool.
--
resolution: -> invalid
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs
Thomas Heller <[EMAIL PROTECTED]> added the comment:
I think it would be a good idea to change the Makefile so that it
touches these files when no python interpreter is available.
--
nosy: +theller
___
Python tracker <[EMAIL PROTECTE
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Here is a patch, with test, that fixes this problem.
--
keywords: +needs review, patch
Added file: http://bugs.python.org/file11513/bitfields.patch
___
Python tracker <[EMAIL PROTECTE
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Updated patch.
Added file: http://bugs.python.org/file11514/bitfields-2.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Thomas Heller <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file11513/bitfields.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Updated the unittest so that it works on Windows, too.
Added file: http://bugs.python.org/file11515/bitfields-3.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Thomas Heller <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file11514/bitfields-2.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Is it too late to fix this for Python 2.6 and Python 3.0?
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Thomas Heller <[EMAIL PROTECTED]> added the comment:
This is already fixed in SVN, see issue #3554.
--
assignee: -> theller
nosy: +theller
resolution: -> duplicate
status: open -> closed
___
Python tracker <[EMAIL
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Make this a release blocker so hopefully someone will review it.
--
priority: -> release blocker
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Fredrik Lundh schrieb:
> Looks fine to me, except for the comment in the test suite. Should
>
> +# MS compilers do NOT combine c_short and c_int into
> +# one field, gcc doesn't.
>
> perhaps be
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Skip Montanaro schrieb:
> Looks reasonable, though I'm no ctypes maven. Trivial little nit:
> In the comment just before the start of CField_FromDesc it says,
> in part:
>
> * Expects the size, index and offse
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Does the following patch fix the test failure with MingW?
Index: cfield.c
===
--- cfield.c(revision 66611)
+++ cfield.c(working copy)
@@ -65,10
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Ok, here is an additional patch bitfields-mingw.patch.
It fixes the problem reported by rpetrov, and updates the comments.
Please review again ;-).
The previous patch bitfields-3.patch has already been applied.
Added file
Thomas Heller <[EMAIL PROTECTED]> added the comment:
Committed as SVN rev 66683 (trunk), 66684 (py3k), and 66685
(release25-maint).
--
resolution: -> fixed
status: open -> closed
___
Python tracker <[EMAIL PROTECTED]>
<h
1 - 100 of 352 matches
Mail list logo