[issue20899] Nested namespace imports do not work inside zip archives

2020-03-24 Thread Thomas Heller
Change by Thomas Heller : -- nosy: -theller ___ Python tracker <https://bugs.python.org/issue20899> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32745] ctypes string pointer fields should accept embedded null characters

2018-02-01 Thread Thomas Heller
New submission from Thomas Heller <thel...@ctypes.org>: ctypes Structure fields of type c_char_p or c_wchar_p used to accept strings with embedded null characters. I noticed that Python 3.6.4 does refuse them. It seems this has been changed in recent version(s). There ARE use

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29294> ___ _

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
Thomas Heller added the comment: Yes, seems that it is fixed in the repository. So I have to use 2.7.12 or wait for 2.7.14. Thanks! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
New submission from Thomas Heller: ctypes.windll.LoadLibrary refuses unicode argument; this is a regression in Python 2.7.13: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
Thomas Heller added the comment: Thanks Martin and eryk for correcting me and finding the real cause of the problem. Am 21.12.2016 um 13:04 schrieb eryk sun: > ... the private names _COORD, _FILETIME, _LARGE_INTEGER, > _POINTL, _RECTL, _SMALL_RECT, and _ULARGE_INTEGER are skipped by a

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
New submission from Thomas Heller: The documentation states that 'from module import *' imports all symbols that are listed in the module's __all__ list. In Python 3, unlike Python 2, only symbols that do NOT start with an underscore are actually imported. The following code works in Python

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- nosy: +theller ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26137> ___ __

[issue27417] Call CoInitializeEx on startup

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- nosy: +theller ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27417> ___ __

[issue20899] Nested namespace imports do not work inside zip archives

2014-11-26 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20899 ___ ___ Python-bugs-list

[issue5950] Make zipimport work with zipfile containing comments

2014-05-28 Thread Thomas Heller
Thomas Heller added the comment: As for progress, the answer is no as the hope is to eventually replace zipimport with something in pure Python thanks to importlib. Does this mean there is no chance to put this into 3.4 and 3.3, do we really have to wait until 3.5 with it's pure-python

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-17 Thread Thomas Heller
Thomas Heller added the comment: When you say os.path.isdir(...) works fine, you mean it's returning False? As shown in the original report (http://bugs.python.org/issue21516#msg218664) os.path.isdir() returns True; which is correct since c:\Users\admin is a directory on my machine

[issue21516] pathlib.Path(...).is_dir() crashes on readonly directories (Windows)

2014-05-16 Thread Thomas Heller
New submission from Thomas Heller: On Windows, pathlib.Path(...).is_dir() crashes on readonly directories while os.path.isdir(...) works fine. Example on Windows7: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Thomas Heller
Thomas Heller added the comment: Well, not 'readonly' directories but directories where the user has no access rights. I corrected the title of this bug. -- title: pathlib.Path(...).is_dir() crashes on readonly directories (Windows) - pathlib.Path(...).is_dir() crashes on some

[issue21130] equivalent functools.partial instances should compare equal

2014-04-04 Thread Thomas Heller
Thomas Heller added the comment: My usecase is: I create kind of bound methods with functools.partial. Apologies for the confusion by using the word 'equivalent'; what I mean is that partial instances should (IMO) compare equal when they contain the same function and args/keywords which

[issue21157] Update imp docs for a PEP 451 world

2014-04-04 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21157 ___ ___ Python-bugs-list

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
New submission from Thomas Heller: I think that 'equivalent' functools.partial objects should compare equal, so the following snippet SHOULD print True: import functools f = lambda x: x a = functools.partial(f, 42) b = functools.partial(f, 42) a == b False -- components: Library

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
Thomas Heller added the comment: Sure. I'm not sure 'equivalent' is the word I should have used. I suggest (and I would have expected) that partial instances (a, b) should compare equal when a.func == b.func \ and a.args == b.args \ and a.keywords == b.keywords

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Thomas Heller
New submission from Thomas Heller: With python 3.4 and pywin32 version 218 it is only possible to import win32com or win32api when pywintypes has been imported before. Here is part of a session with 'python -v': import win32api Traceback (most recent call last): File stdin, line 1

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Thomas Heller
Thomas Heller added the comment: It was most certainly an issue on my side, something with leftover files or directories from a previous installation. After cleaning everything up it works now. Sorry for the confusion. (A personal remark: sometimes, the bdist_wininst uninstaller does

[issue16296] Patch to fix building on Win32/64 under VS 2010

2014-02-04 Thread Thomas Heller
Thomas Heller added the comment: Hm, what's the problem? For me, the patch applies cleanly (in Python 3.4.0b3, 32-bit and 64-bit on Windows), and py -3.4(-32) -m pip install numpy works correctly. At least py -3.4(-32) -c import numpy; print(numpy.__version__) prints 1.8.0

[issue17633] zipimport's handling of namespace packages is incorrect

2014-01-31 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17633 ___ ___ Python-bugs-list

[issue20391] windows python launcher should support explicit 64-bit version

2014-01-25 Thread Thomas Heller
New submission from Thomas Heller: The windows python launcher supports the '-3.3' resp. '-3.3-32' command line switches to ask for 'the best 3.3' version resp. 'the 32-bit 3.3' version, but does not support a '-3.3-64' switch to explicitely request the 64-bit version of Python. I suggest

[issue20020] modernize the modulefinder module

2013-12-19 Thread Thomas Heller
Thomas Heller added the comment: I have written a new modulefinder based on importlib. It is not a refactoring of the old one, so it is no plug-in replacement. Instead it has some new features: - Better logging output - collects dependencies (self._depgraph maps module names to callers

[issue19538] Changed function prototypes in the PEP 384 stable ABI

2013-11-09 Thread Thomas Heller
New submission from Thomas Heller: (As requested by email in python-dev I'm reporting this problem) Some function prototypes in the stable ABI have been changed between Python 3.3 and 3.4. PyObject_CallFunction is an example, the second parameter has been changed from 'char *' to 'const char

[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986 ___ ___ Python-bugs-list

[issue18852] site.py does not handle readline.__doc__ being None

2013-09-06 Thread Thomas Heller
Thomas Heller added the comment: I suggest to remove the comment part from the patch and then apply it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852

[issue18852] Problem with pyreadline

2013-08-27 Thread Thomas Heller
New submission from Thomas Heller: In site.py, line 477, I find this code: # Reading the initialization (config) file may not be enough to set a # completion key, so we set one first and then read the file if 'libedit' in getattr(readline, '__doc__

[issue15767] add ModuleNotFoundError

2013-07-02 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15767 ___ ___ Python-bugs-list

[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Thomas Heller
Thomas Heller added the comment: Brett, can these changes be merged into 3.3 also? -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18058

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-08 Thread Thomas Heller
Thomas Heller added the comment: The modulefinder usage is directly exposed in its API as the return value of a find_module method, which makes removal a pain. Adding Thomas Heller to see what he has to say. Some months ago, I have started to implement a brand-new modulefinder, which

[issue17623] Typo in Doc/whatsnew/3.3.rst

2013-04-03 Thread Thomas Heller
New submission from Thomas Heller: Typo: trucate instead of truncate -- assignee: docs@python components: Documentation files: work.patch keywords: patch messages: 185901 nosy: docs@python, theller priority: normal severity: normal status: open title: Typo in Doc/whatsnew/3.3.rst Added

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Thomas Heller
Thomas Heller added the comment: Patch looks good. Please apply. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17378 ___ ___ Python-bugs-list

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: I have only tried my code with 3.4; but still get problems with the modules 'builtins' and '_frozenimportlib'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: I confirm that the bug is fixed, my test-code works now (a modulefinder using importlib instead of imp to find modules). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: Thanks for the very fast fix Brett :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098 ___ ___ Python-bugs

[issue17028] launcher does not read shebang line when arguments are given

2013-01-29 Thread Thomas Heller
Thomas Heller added the comment: Hope it is ok to assign this to you, vinay. -- assignee: - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17028

[issue17028] launcher

2013-01-25 Thread Thomas Heller
New submission from Thomas Heller: The python launcher does not parse the shebang if arguments for the Python interpreter are given on the command line. For example: py.exe test.py # uses shebang line py.exe -u test.py # does NOT use shebang line The attached patch fixes

[issue17028] launcher does not read shebang line when arguments are given

2013-01-25 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- title: launcher - launcher does not read shebang line when arguments are given ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17028

[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Thomas Heller
New submission from Thomas Heller: It seems the statement import importlib is missing in 3.3's modulefinder.py -- components: Library (Lib) messages: 177951 nosy: theller priority: normal severity: normal status: open title: Missing import in modulefinder.py versions: Python 3.3

[issue15459] ctypes Structures with subclassed types in the _fields_ list

2012-07-26 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: When a ctypes Structure uses a subclass of c_int, c_short, c_byte in the _fields_ list to define bitfields, the results are wrong. The attached script showbug.py demonstrates this behaviour. -- components: ctypes files: showbug.py

[issue15459] ctypes Structures with subclassed types in the _fields_ list

2012-07-26 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The attached patch for branch default fixes this issue. It also contains a unittest. -- Added file: http://bugs.python.org/file26530/bitfields.patch ___ Python tracker rep...@bugs.python.org http

[issue14201] libc.time != libc['time']

2012-03-07 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The rationale was to allow different packages (for example) in the same process to have their own private instance of a foreign function, with possibly different definitions of restype, argtypes and/or errcheck

Re: [issue10296] ctypes catches BreakPoint error on windows 32

2010-12-23 Thread Thomas Heller
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

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-09 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thomas, it seems this change doesn't work for py3k. Buildbots complain and my working copy does as well. Example: http://www.python.org/dev/buildbot/all/builders/x86%20gentoo%203.1/builds/990 I do not know why this happens. It works

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: issue5504-py27-2.patch is the updated patch that now also works on Windows. -- Added file: http://bugs.python.org/file18439/issue5504-py27-2.patch ___ Python tracker rep...@bugs.python.org http

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev 83836 (release27-maint branch) and rev. 83837 (py3k branch). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5504

[issue6869] Embedded python crashed on 4th run, if ctypes is used

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev 83841 (py3k), rev 83842 (release31-maint), and rev 83843 (release27-maint). Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-03 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The libffi library included with Python has been updated in the meantime, so most of the issue5504-linux.patch is unneeded now. Here is a new patch, issue5504-py27.patch, against the current release27-maint branch. Seems it is exactly

[issue9055] test_issue_8959_b fails when run from a service

2010-06-22 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: To test windows callbacks, I suggest to use EnumResourceTypes() instead, which is more likely to work in any condition: Unfortunately the proposed test doesn't detect the problem in Python2.7 rc1. It runs without crashing, even

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev. 82127 (trunk) and rev 82138 (py3k). Added test for the issues reported here so that it doen't happen again. -- resolution: - fixed status: open - closed ___ Python tracker rep

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thanks, Michael, for reporting this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-20 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Is r80761 something that can be safely reverted? Yes, I think so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The commit that breaks the examples is revision 80761. Tested on WinXP 32 bit. Someone should test on Win 64bit too ;-). -- priority: normal - release blocker ___ Python tracker rep

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2010-04-26 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I'm not sure this issue is really done. The current state works fine, but there is one problem remaining: There are Python extensions that seem to need a manifest pointing to the MSVC runtime libs: dlls that start in-process com servers

[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Martin, you should probably post your patch to upstream libffi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8314

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-23 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: It appears to me that no-one is maintaining this separate ctypes code-base anymore so I'll have to ditch dependencies that use it (Shapely) unfortunately. This is correct, the separate ctypes code base is linked via svn:external

[issue8142] libffi update to 3.0.9

2010-03-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: We should revert the following chunk for configure.ac to generate the Makefile's again, so that we are able to run the testsuite at least with dejagnu: -AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man

[issue8142] libffi update to 3.0.9

2010-03-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: done, and updated the patch for the merge from the trunk. -- Added file: http://bugs.python.org/file16590/libffi-update3.diff This patch passes the ctypes tests and libffi testsuite on this system: Linux tubu64 2.6.24-27

[issue8142] libffi update to 3.0.9

2010-03-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: the ports which are maintained separately still need an update: libffi_msvc libffi trunk now has a port to x86/msvc. might require some extra updates from libffi. I'll take care of this one. Would it be a good idea to upgrade

[issue8154] os.execlp('true') crashes the interpreter on 2.x

2010-03-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thomas, Do you remember why your patch for issue1039 was not backported? Probably an oversight only. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8154

[issue887237] Machine integers

2010-03-05 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Code duplication is unavoidable because the goal is to give access to machine arithmetics which means (# types) x (# operations) of very similar looking functions. I considered reducing (perceived) code duplication through some pre

[issue7959] ctypes memory leak

2010-02-23 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: CThunkObject is not registered correctly with the cycle GC. The attached patch, against trunk, fixes the issue. -- keywords: +patch Added file: http://bugs.python.org/file16345/issue7957.patch

[issue7959] ctypes memory leak

2010-02-18 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: This little script 'ctypes-leak.py' leaks memory: import gc from ctypes import * PROTO = WINFUNCTYPE(None) class Test(object): def func(self): pass def __init__(self): self.v = PROTO(self.func) while 1: try

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2009-11-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I'm curious: Which output do you get from: 'LANG=C /sbin/ldconfig -p | fgrep GL' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7356

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2009-11-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I assume the patch is fine, would you like to apply it? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7356

[issue6958] Add Python command line flags to configure logging

2009-10-01 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I retract this request. It seems the idea is not liked or a solution is not easy. (The solution I now use is to start Python from a batch file that parses some command line flags itself, sets environment variables, and my sitecustomize.py

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Jean-Paul Calderone: How about putting this into the logging module instead? Instead of python logging options program program options, making it python -m logging logging options program program options. This: * involves

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: How do these global settings (either via the interpreter or a wrapper in the logging module) change what an app might do on its own? IOW, if my app is already written to configure logging, and someone invokes it with these other settings

[issue6958] Add Python command line flags to configure logging

2009-09-21 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: I want the Python executable to have command line flags which allow simple configuration of the logging module. Use cases are to run applications/scripts (which use libraries that use logging calls) with different logging output without

[issue6958] Add Python command line flags to configure logging

2009-09-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I get the idea. The Python part of the patch demonstrates what you're getting at, though it can't be used as is - for example the getattr(logging, a, a) could lead to problems. However a more intelligent parser (which looked for specific

[issue6958] Add Python command line flags to configure logging

2009-09-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Why does this need to be built into the interpreter? The script / app should have logging config support. It does not need to, but it would be nice. I think the '-l' flag should be similar to the -W flag. Or consider for example using

[issue6918] ctypes compilation error on SnowLeopard

2009-09-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: This one is fixed, isn't it? See for example the buildbot output at http://www.python.org/dev/buildbot/2.6/builders/x86%20osx.5%202.6/builds/566/steps/compile/logs/stdio (Search for building '_ctypes' extension on the page) -- nosy

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Is that any help? Not really ;-). Here is a patch I just wrote - it must still be checked for correctness, and tests for it must be added. I hope the comment in the code explains how it works. ctypes-structinit.patch -- keywords

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I've commited a slightly changed patch plus a test. trunk: 74917, py3k: 74918, release26-maint: 74919, release31-maint: 74920. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- resolution: - fixed status: open - closed versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5042

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-09-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Comitted as trunk: 74921, py3k: 74922, release31-maint: 74923, release26-maint: 74924 -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-09-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I guess this is a bug in your code, as mentioned in my last comment, so closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6729] Add support for ssize_t

2009-09-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Find where c_size_t is defined: in Lib/ctypes/__init__.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6729

[issue6882] uuid creates zombies

2009-09-17 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Since ctypes should stay compatible with Python versions down to 2.4, a with block cannot be used. Of course would closing the object returned by os.popen() explicitely be better style, but I wonder what the real problem is. My observations

[issue6729] Add support for ssize_t

2009-09-17 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Would you like to work on a patch? -- versions: +Python 2.7, Python 3.0, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6729

[issue6882] uuid creates zombies

2009-09-17 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The py3k version of the file already contains 3.x only code, and it's missing the comment at the top that it should be compatible. But it's not really a big deal to me. Yes, I had deleted the comment since the 3.x code cannot be compatible

[issue6882] uuid creates zombies

2009-09-17 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- assignee: theller - eric.smith resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-17 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5042

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-17 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The problem is the implementation of the current __init__ method, in Modules/_ctypes/_ctypes.c, line 4024. Rewritten in Python, and slightly simplified it looks like this: def __init__(self, *args, **kw): The current BUGGY

[issue6239] c_char_p return value returns string, not bytes

2009-09-04 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Commited as svn rev 74664 (py3k) and rev 74665 (release31-maint). -- stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue6735] restype pointer to Structure subclass never initialized

2009-08-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: This is on purpose. The idea is that the function call returns an existing pointer to an existing object, so __init__ (or __new__, IIRC) is never called in this case. -- resolution: - invalid status: open - closed

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I agree that the C type 'char' is a byte, not a character. So Python3 should creates a Python bytes object for the ctypes c_char_p type. Since Python 3.1 is out, is it too late to change it in the 3.x branch? :-) Maybe for Python 3.2? I

[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I have no time to figure out what the attached script is supposed to do. Please provide a standalone test-script and describe exactly how it should be used to reproduce the bug. However, I guess the problem is that the signature

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Andrew McNabb schrieb: I just looked at ConvParam in a little more detail, and it seems that the problem is caused because setting pa-value.i to 0 only works for the lower-order bits. Apparently the higher order bits in pa-value are non

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Python 3.0 is dead ;-). -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4606

[issue6239] c_char_p return value returns string, not bytes

2009-07-31 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file14615/c_char_p.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6239

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-30 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thanks for bringing my attention to this problem again, and for the review. Andrew McNabb schrieb: I looked at the attached patch, and it seems to me the only alternative approach would be to use PyLong_FromLong instead of PyInt_FromLong

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-07-30 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Here's a corrected patch against svn trunk. -- Added file: http://bugs.python.org/file14608/patch-ctypes-none-arg-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4606

[issue6493] Can not set value for structure members larger than 32 bits

2009-07-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: One of the new tests in r74134 is failing on my box (Gentoo x86), and on a number of the buildbots: I've seen that, but do not yet have a patch. -- title: Can not set value for structure members larger than 32 bits - Can not set

[issue6493] Can not set value for structure members larger than 32 bits

2009-07-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: ctypes_workaround_2.patch from ocean-city seems to fix it so I'll apply that. -- title: Can not set value for structure members larger than 32 bits - Can not set value for structure members larger than 32 bits

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: This patch implements some pointer arithmetic operations for ctypes. -- files: ctypes-pointerarith.patch keywords: patch messages: 89225 nosy: theller severity: normal status: open title: ctypes pointer arithmetic type: behavior

[issue6259] ctypes pointer arithmetic

2009-06-10 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- assignee: - theller components: +ctypes versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6259

[issue6121] help('modules ') causes IndexError.

2009-05-27 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- assignee: theller - components: -ctypes nosy: -theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6121

[issue6013] json slower than simplejson

2009-05-13 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: The json package is a lot slower than the simplejson package. Both packages have their C compiled speedup module; however: C:\py26 -m timeit -s from json import dumps, loads loads(dumps(range(32))) 1000 loops, best of 3: 618 usec per

  1   2   3   4   >