[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str
Antoine Pitrou added the comment: Raymond, we can't just backport this without breaking compatibility with installed Python versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Charles-François Natali added the comment: Charles gave this example of code that would fall over: size = 0 for name, st in scandir(path): if stat.S_ISREG(st.st_mode): size += st.st_size I don't see it, though. In this case you need both .st_mode and .st_size, so a caller would check that those are not None, like so: Well, that's precisely the point. A normal caller would never expect a stat object to be partially populated: if a function has a prototype returning a stat object, then I definitely expect it to be a regular stat object, with all the fields guaranteed by POSIX set (st_size, st_ino, st_dev...). By returning a dummy stat object, you break the stat interface, and I'm positive this *will* puzzle users and introduce errors. Now, if I'm the only one who finds this trick dangerous and ugly, you can go ahead, but I stand by my claim that it's definitely a bad idea (between this and the explicit Enum value assignent, I feel somewhat lost lately :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Antoine Pitrou added the comment: (between this and the explicit Enum value assignent, I feel somewhat lost lately :-) Don't worry, it sometimes happens :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str
Alexandre Vassalotti added the comment: Our hands are pretty much tied here. The pickle bytearray as unicode hack is likely the best we can do without pickling compatibility between Python 2 and 3. I can't think of a solution that could work here. For example. 1. Pickling bytearrays as a Python 2 str doesn't work because Python 2 strs are unpickled as unicode in Python 3. 2. Pickling bytearrays as an int lists makes the growth factor is much worst: 2x instead of the expected 1.5x. 3. Using a custom constructor breaks pickling compatibility with all the minor releases which doesn't implement the custom constructor. 4. Implementing special support in pickle for bytearrays requires a pickle protocol bump, which is disallowed for bugfixes releases. 5. Creating a special tag type to pickle Python 2 str as bytes in Python 3 has the same problem as #3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Ben Hoyt added the comment: A normal caller would never expect a stat object to be partially populated: if a function has a prototype returning a stat object, then I definitely expect it to be a regular stat object, with all the fields guaranteed by POSIX set (st_size, st_ino, st_dev...). I don't think that's true in general, or true of how other Python APIs work. For instance, many APIs return a file-like object, and you can only do certain things on that object, depending on what the documentation says, or what EAFP gets you. Some file-like object don't support seek/tell, some don't support close, etc. I've seen plenty of walk-like-a-duck checks like this: if hasattr(f, 'close'): f.close() Anyway, my point boils down to: * scandir() is a new function, so there aren't old trends or things that will break * we clearly document it as returning a tuple of (name, st), where st is a stat-like object whose invididual fields are None if they couldn't be determined for free with the directory scanning * in fact, that's kind of the point of the st object in this function, so the example could be the one I gave above where you call os.stat() if either of the fields you want is None * if that's clear in the documentation (of this new function) and the first example shows you exactly how it's meant to be used, I think that's pretty sane and sensible... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17913] stat.filemode returns - for sockets and unknown types
New submission from Christian Heimes: The function stat.filemode() has a fallback to - for file type when it is unable to properly detect the type of a file. This gives wrong results for any file type that is not in the lookup table. For example it doesn't check for S_ISSOCK: s = os.stat(/var/run/sdp) t stat.filemode(s.st_mode) '-rw-rw-rw-' $ ls -la /var/run/sdp srw-rw-rw- 1 root root 0 Mai 2 16:08 /var/run/sdp Also see #11016 for more file types. I'm going to work on the matter soonish. -- messages: 188496 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: stat.filemode returns - for sockets and unknown types type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: [Victor] Ok, I think I understood the issue :-) The problem is when the uint32_t type is present but is not exactly 32-bit width. No, that's still not the issue :-). In any case, it would be a fairly serious violation of C99 to use uint32_t for something that *wasn't* exactly 32 bits in width. More generally, padding bits, trap representations, and non two's complement representations for signed integers seem to be a thing of the past; having integer types be exact width seems to be one of the few things that we *can* reasonably rely on. Concentrating on uint32_t for specificity, there are essentially three cases: (1) The platform (either in stdint.h or inttypes.h) #defines uint32_t. (2) The platform (either in stdint.h or inttypes.h) makes a typedef for uint32_t. (3) The platform doesn't do (1) *or* (2), but nevertheless, there's an unsigned integer type that has exact 32-bit width (and it's probably called unsigned int). [Oh, and (4) Windows. Let's leave that out of this discussion, since there don't seem to be any Windows-specific problems in practice here, and we don't use autoconf.] We've encountered all three of these cases, and as far as I know in recent history we haven't encountered a platform that doesn't match at least one of these three cases. With respect to the autoconf and pyport machinery: In case (1): AC_TYPE_UINT32_T does nothing, because uint32_t is already available, while the AC_CHECK_TYPE(uint32_t) #defines HAVE_UINT32_T. In case (2): AC_TYPE_UINT32_T still does nothing, and again AC_CHECK_TYPE(uint32_t) #defines HAVE_UINT32_T. In case (3): AC_TYPE_UINT32_T #defines uint32_t to be the appropriate type, and AC_CHECK_TYPE(uint32_t) will fail. So cases (1) and (3) lead to uint32_t being #defined, while cases (1) and (2) lead to HAVE_UINT32_T being defined. We want to catch all 3 cases, so we have to check for *both* uint32_t and HAVE_UINT32_T in pyport.h. Note that using AC_TYPE_UINT32_T and checking whether uint32_t is defined is not enough on platforms that do (2): because uint32_t is a typedef rather than a #define, there's no easy way for pyport.h to find it. Prior to the issue #10052 fix, we assumed that any platform doing (2) would, following C99, also define UINT32_MAX, but that turned out not to be true on some badly-behaved platforms. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: Stefan: sounds reasonable. I'd be happy to make availability of exact-width 32-bit and 64-bit, signed and unsigned integer types a requirement for building Python, provided that we run that by the python-dev mailing list first. I agree that this is what we seem to be doing in practice anyway, so we'd just be codifying existing practice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe
Kristján Valur Jónsson added the comment: My quick and dirty fix is simple: _PyOS_ReadlineTState = PyThreadState_GET(); /* CCP change, cannot release the GIL here because PyOS_StdioReadline uses * the regular MALLOC */ /* Py_BEGIN_ALLOW_THREADS */ #ifdef WITH_THREAD PyThread_acquire_lock(_PyOS_ReadlineLock, 1); #endif /* This is needed to handle the unlikely case that the * interpreter is in interactive mode *and* stdin/out are not * a tty. This can happen, for example if python is run like * this: python -i test1.py */ if (!isatty (fileno (sys_stdin)) || !isatty (fileno (sys_stdout))) rv = PyOS_StdioReadline (sys_stdin, sys_stdout, prompt); else rv = (*PyOS_ReadlineFunctionPointer)(sys_stdin, sys_stdout, prompt); /* Py_END_ALLOW_THREADS */ #ifdef WITH_THREAD PyThread_release_lock(_PyOS_ReadlineLock); #endif Basically, we just comment out the lock release since we don't need it. The reason we found this was that we were using GIL a custom mallocator which should have been run with the GIL but wasn´t. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Charles-François Natali added the comment: I don't think that's true in general, or true of how other Python APIs work. For instance, many APIs return a file-like object, and you can only do certain things on that object, depending on what the documentation says, or what EAFP gets you. Some file-like object don't support seek/tell, some don't support close, etc. I've seen plenty of walk-like-a-duck checks like this: Yes, I'm fully aware duck-typing ;-) But here, you're saying that a duck has a beak, but it *may* have legs, a tail, etc. It's just looks wrong to me on so many levels. Please bring this up on python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8918] distutils test_config_cmd failure on Solaris
Delhallt added the comment: For your information, with AIX 6.1, with both print line and preserve comment the output is not empty. Option -o, with i suffix always give error message /usr/vac/bin/xlc_r: 1501-218 (S) file _configline.i contains an incorrect file suffix #/usr/vac/bin/xlc_r -P _configtest.c -qppline -C #cat _configtest.i #line 1 _configtest.c /* xxx */ -- nosy: +delhallt versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Thomas Kluyver added the comment: Ping - the latest patches (dis_api3 test_peepholer) are ready for review when someone's got a moment. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13813] sysconfig.py and distutils/util.py redundancy
Roundup Robot added the comment: New changeset c4f92b597074 by Richard Oudkerk in branch 'default': Issue #13813: Embed stringification of remote traceback in local http://hg.python.org/cpython/rev/c4f92b597074 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13813 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11734] Add half-float (16-bit) support to struct module
Mark Dickinson added the comment: Refreshed patch, with a few minor updates: - Use copysign instead of signbit (we don't currently check for signbit in the configure scripts); only check for negative zero when we've already checked equality with 0.0. - Use Py_IS_NAN and Py_IS_INFINITY instead of isinf and isnan. - Add an extra check for really tiny numbers in _PyFloat_Pack2 to avoid binary64 subnormals in intermediate calculations. - Remove a duplicate check for the case x == 0.0 in _PyFloat_Pack2. - Make unpacking of ints and nans behave in the same way as float(inf) or float(nan): use _Py_dg_infinity and _Py_dg_stdnan if available, else fall back to Py_HUGE_VAL and Py_NAN. - Minor style nits (braces; use floating-point constants when comparing with floats; consistent capitalization for hex literals, etc.) -- Added file: http://bugs.python.org/file30145/cpython-struct-float16-v6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Mark Dickinson added the comment: On OS X 10.6, I now get the following message at interpreter startup: iwasawa:cpython mdickinson$ ./python.exe Python 3.4.0a0 (default:d5ef330bac50, May 6 2013, 13:05:57) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more information. Failed calling sys.__interactivehook__ Traceback (most recent call last): File /Users/mdickinson/Python/cpython/Lib/site.py, line 481, in register_readline readline.read_init_file() OSError: [Errno -1] Unknown error: -1 -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
New submission from Charles-François Natali: multiprocessing.cpu_count() implementation should be made available in the os module, where it belongs. -- keywords: easy messages: 188506 nosy: neologix priority: normal severity: normal stage: needs patch status: open type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Charles-François Natali added the comment: Note that I think it might be interesting to return 1 if the actual value cannot be determined, since that's a sensible default, and likely what the caller will do anyway. This contrasts with the current multiprocessing's implementation which raised NotImplementedError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17915] Encoding error with sax and codecs
New submission from Simon Conseil: There is an encoding issue between codecs.open and sax (see attached file). The issue is reproducible on Python 3.3.1, it is working fine on Python 3.3.0 -- components: Library (Lib) files: report.txt messages: 188508 nosy: sconseil priority: normal severity: normal status: open title: Encoding error with sax and codecs versions: Python 3.3 Added file: http://bugs.python.org/file30146/report.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Ned Batchelder added the comment: If you can't determine the number of CPUs, return a clear can't determine value, such as 0 or -1. Returning 1 will hide information, and it's an easy default for the caller to apply if they want to. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17805] No such class: multiprocessing.pool.AsyncResult
Roundup Robot added the comment: New changeset 2684176519ef by Richard Oudkerk in branch '2.7': Issue #17805: Add AsyncResult alias for ApplyResult http://hg.python.org/cpython/rev/2684176519ef New changeset bb4bb2db6106 by Richard Oudkerk in branch '3.3': Issue #17805: Add AsyncResult alias for ApplyResult http://hg.python.org/cpython/rev/bb4bb2db6106 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Mark Dickinson added the comment: More information: readline.read_init_file() produced the same traceback before this commit, so all that's changed is that we're now calling this at interpreter startup. It looks like I'm using the system libedit: iwasawa:cpython mdickinson$ otool -L build/lib.macosx-10.6-x86_64-3.4-pydebug/readline.so build/lib.macosx-10.6-x86_64-3.4-pydebug/readline.so: /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.11.0) /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) iwasawa:cpython mdickinson$ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13813] sysconfig.py and distutils/util.py redundancy
Roundup Robot added the comment: New changeset a2928dd2fde4 by Richard Oudkerk in branch 'default': Correct issue number for c4f92b597074 in Misc/NEWS from #13813 to #13831 http://hg.python.org/cpython/rev/a2928dd2fde4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13813 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13831] get method of multiprocessing.pool.Async should return full traceback
Roundup Robot added the comment: New changeset a2928dd2fde4 by Richard Oudkerk in branch 'default': Correct issue number for c4f92b597074 in Misc/NEWS from #13813 to #13831 http://hg.python.org/cpython/rev/a2928dd2fde4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17805] No such class: multiprocessing.pool.AsyncResult
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13831] get method of multiprocessing.pool.Async should return full traceback
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Kushal Das added the comment: I am interested to submit a patch on this. Should I move the implementation to os module and made the multiprocessing one as an alias ? or keep it in both places ? I prefer the idea of returning -1 instead of the current way of raising NotImplementedError in case we can not determine the number of CPU(s). -- nosy: +kushaldas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Charles-François Natali added the comment: I am interested to submit a patch on this. Should I move the implementation to os module and made the multiprocessing one as an alias ? or keep it in both places ? Yes, you should move it, add a corresponding documentation to Doc/modules/os.rst (you can probably reuse the multiprocessing doc), and add a test in Lib/test/test_os.py (you can also probably reuse the multiprocessing test). I prefer the idea of returning -1 instead of the current way of raising NotImplementedError in case we can not determine the number of CPU(s). Seriously, I don't see what this brings. Since the user can't do anything except using 1 instead, why not do this in the library? I've searched a bit, and other platforms (.e.g Java, Ruby) don't raise an exception, and always return a positive value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Ned Batchelder added the comment: Seriously, return zero, and I can use it as: cpu_count = os.cpu_count() or 1 Why throw away information? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Mark Dickinson added the comment: So I'm failing to find any documentation for libedit, but it looks as though this error occurs if rl_read_init_file fails to find an .editrc file in the appropriate place. If I create an empty .editrc file in my home directory, the error disappears. (Having an .inputrc file doesn't seem to make a difference either way.) Perhaps the solution is to ignore an OSError from readline.read_init_file in register_readline---i.e., add a try / except OSError there. The other option would be to ignore a nonzero errno from rl_read_init_file, but that doesn't sound so good: I'd expect someone deliberately calling readline.read_init_file to get an exception if the initialization file isn't found. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
STINNER Victor added the comment: 2013/5/6 Mark Dickinson rep...@bugs.python.org: Concentrating on uint32_t for specificity, there are essentially three cases: (1) The platform (either in stdint.h or inttypes.h) #defines uint32_t. (2) The platform (either in stdint.h or inttypes.h) makes a typedef for uint32_t. (3) The platform doesn't do (1) *or* (2), but nevertheless, there's an unsigned integer type that has exact 32-bit width (and it's probably called unsigned int). So in all these 3 cases, it is possible to use uint32_t in the code. [Oh, and (4) Windows. Let's leave that out of this discussion, since there don't seem to be any Windows-specific problems in practice here, and we don't use autoconf.] Windows issues can be fixed in PC/pyconfig.h. So cases (1) and (3) lead to uint32_t being #defined, while cases (1) and (2) lead to HAVE_UINT32_T being defined. We want to catch all 3 cases, so we have to check for *both* uint32_t and HAVE_UINT32_T in pyport.h. Sorry I still don't understand why do you need HAVE_UINT32_T define. According to what you wrote above, uint32_t can always be used on any platform. Note that using AC_TYPE_UINT32_T and checking whether uint32_t is defined is not enough on platforms that do (2): because uint32_t is a typedef rather than a #define, there's no easy way for pyport.h to find it. Prior to the issue #10052 fix, we assumed that any platform doing (2) would, following C99, also define UINT32_MAX, but that turned out not to be true on some badly-behaved platforms. Why should Python do extra checks in pyport.h (ex: check if UINT32_MAX is available)? Can't we rely on stdint.h? If stdint.h is not available, we can ask configure to build it for us using AX_CREATE_STDINT_H. Oh, it looks like this macro is not part of autotools directly. It's a third party module released under the GNU GPLv3+ license. Can we include a GPL script in our tool chain? I contacted the author by email to ask him if we can distribute it under a different license (compatible with the Python license). http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_create_stdint_h.m4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Christian Heimes added the comment: I have created a C implementation of the stat module for Python 3.4. It implements all current features, handling for DOOR, PORT, WHT and a fix for #17913. The first half of the file has lots of #ifndef checks. I'm not sure if they are really required. I guess they are required for the tarfile module on Windows. -- stage: - patch review Added file: http://bugs.python.org/file30147/statmodule.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: According to what you wrote above, uint32_t can always be used on any platform. The issue is in *detecting* whether uint32_t exists or not. In cases (1) and (3), that can be done in the preprocessor with an #ifdef uint32_t. In case (2), it can't: the check fails, because uint32_t isn't a preprocessor define---it's a typedef. *That's* why we need the HAVE_UINT32_T check. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: So I'm failing to find any documentation for libedit, but it looks as though this error occurs if rl_read_init_file fails to find an .editrc file in the appropriate place. If I create an empty .editrc file in my home directory, the error disappears. (Having an .inputrc file doesn't seem to make a difference either way.) Perhaps the solution is to ignore an OSError from readline.read_init_file in register_readline---i.e., add a try / except OSError there. This sounds fine to me. Can you propose a patch? I'm unlikely to ever have an OS X machine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Antoine Pitrou added the comment: Returning 0 or None sounds better to me than 1 or -1. (I have a preference for None) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Mark Dickinson added the comment: The attached fixes the issue for me. I'm not sure whether the try / except should only be done on Apple, though. What's the behaviour on Linux if there's no .inputrc file? -- Added file: http://bugs.python.org/file30148/issue5845_osx_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: The attached fixes the issue for me. I'm not sure whether the try / except should only be done on Apple, though. What's the behaviour on Linux if there's no .inputrc file? Everything works fine under Linux (as usual :-)). There's no need to restrict the try / except to Apple platforms, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Steven D'Aprano added the comment: I'm not able to test the patch at the moment, but since it essentially just uses the recipe in the docs, I expect it will have the same side-effect. Namely, it prevents you using the tab key to indent in the interactive interpreter. Now I don't know if I'm missing something painfully obvious, but having to bang out space-space-space-space for every indent is surely not going to be a win for usability ;-) Even if I am missing something, surely so will a lot of other users. I use a readline completer that (in my opinion) does the Right Thing: at the start of the line, hitting TAB inserts a tab, otherwise it does completion. It also sets a history file, adds a couple of key bindings that I sometimes find useful, and wraps it all up in a class. (Attached.) If you think there is any value in this, I'm happy to update it to Python 3.3 and polish it up as a patch to the readline module. Or someone can just mine it for ideas. -- Added file: http://bugs.python.org/file30149/completer.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Charles-François Natali added the comment: Christian, could you post it as a mercurial diff for review? Also, it would maybe be better to rename this issue to rewrite stat module in C. Shouldn't we also remove the Python version? -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Guido Draheim 2011 added the comment: Relicensing to Python core from my Opensource-licensed material is always permitted, including ax_create_stdint_h.m4 -- nosy: +guidod-2011 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17916] Provide dis.Bytecode based equivalent of dis.distb
New submission from Nick Coghlan: Issue 11816 adds a new dis.Bytecode API that replaces most of the dis functions, but doesn't cover dis.distb. A dis.Bytecode.from_tb class method, or a TracebackBytecode subclass to handle that use case may be desirable. -- messages: 188528 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Provide dis.Bytecode based equivalent of dis.distb type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17916 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17916] Provide dis.Bytecode based equivalent of dis.distb
Changes by Nick Coghlan ncogh...@gmail.com: -- dependencies: +Refactor the dis module to provide better building blocks for bytecode analysis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17916 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Nick Coghlan added the comment: I created issue 17916 after realising that the new OO API doesn't yet provide an equivalent to dis.distb that returns an appropriate Bytecode object. (I don't think it makes sense to hold up this patch for that change) -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Changes by Nick Coghlan ncogh...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17911] Extracting tracebacks does too much work
Antoine Pitrou added the comment: I think instead we may want to add a finalize() or close() method on frame objects which would clear all local variables (as well as dereference the globals dict, perhaps), after having optionally run a generator's close() method (if the frame belongs to a generator). If I'm not mistaken, it should allow breaking reference cycles, and remove the need for complex traceback processing, which Twisted currently also does: http://twistedmatrix.com/trac/browser/trunk/twisted/python/failure.py#L89 Note that generator cleanup through the frame has a patch in issue17807. -- nosy: +ncoghlan, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable
New submission from Charles-François Natali: In many cases, PyModule_AddIntMacro() could be used instead of PyModule_AddIntConstant(), e.g. in socketmodule.c and posixmodule.c: PyModule_AddIntMacro(m, AF_INET6); vs (currently) PyModule_AddIntConstant(m, AF_INET6, AF_INET6); It reduces the possibility of typo and is less verbose. -- keywords: easy messages: 188531 nosy: neologix priority: low severity: normal stage: needs patch status: open title: use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: Now I don't know if I'm missing something painfully obvious, but having to bang out space-space-space-space for every indent is surely not going to be a win for usability ;-) Even if I am missing something, surely so will a lot of other users. What *looks* painfully obvious to me is that Python doesn't force you to use 4 spaces (or tabs) for indents :-) I use a readline completer that (in my opinion) does the Right Thing: at the start of the line, hitting TAB inserts a tab, otherwise it does completion. It also sets a history file, adds a couple of key bindings that I sometimes find useful, and wraps it all up in a class. The indent at beginning of line thing sounds useful. The rest seems to conflate the concept of a completer with the readline module itself. Even though it's called rlcompleter, the rlcompleter module is actually generic and could be used with other input schemes, so I don't think it's the right place to set history options or key bindings. In any case, you should post your patch as part of a separate issue, IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Roundup Robot added the comment: New changeset 82e92da929eb by Mark Dickinson in branch 'default': Issue #5845: avoid an exception at startup on OS X if no .editrc file exists. http://hg.python.org/cpython/rev/82e92da929eb -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Mark Dickinson added the comment: Applied the OS X fix; reclosing. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
R. David Murray added the comment: The tab-doesn't-indent still needs to be fixed before 3.4 is released. -- nosy: +larry priority: normal - release blocker resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Nick Coghlan added the comment: Good thing test_peepholer was moved out to a separate patch - a failure of that picked up a bug in the new disassembly output (unifying the handling of name and constant dereferences had changed the way constant strings were reported in the disassembly, and the error was consistent in both the new implementation and in the new tests due to the way the expected test results had been generated) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Roundup Robot added the comment: New changeset f65b867ce817 by Nick Coghlan in branch 'default': Issue #11816: multiple improvements to the dis module http://hg.python.org/cpython/rev/f65b867ce817 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Roundup Robot added the comment: New changeset d3fee4c64654 by Nick Coghlan in branch 'default': Issue #11816: switch test_peepholer to bytecode_helper http://hg.python.org/cpython/rev/d3fee4c64654 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Nick Coghlan added the comment: And two-and-a-bit years later, we're done - thanks all, any further feedback or problems can be filed as a new issue :) -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: The tab-doesn't-indent still needs to be fixed before 3.4 is released. I don't really understand why this would be a release blocker? The interpreter prompt is a convenience, we don't guarantee compatibility like with stdlib APIs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15494] Move test/support.py into a test.support subpackage
Nick Coghlan added the comment: Ah, I *thought* there was another module that started me down this path. Issue 11816 (a dis module upgrade that I finally deemed ready enough to commit) added test.bytecode_helper, so the new test.support package will consist of at least: support/__init__.py # Current test.support support/bytecode_helper.py # Current test.bytecode_helper support/pkg_helper.py # New for test_runpy test_pkgutil support/script_helper.py# Current test.script_helper -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
R. David Murray added the comment: It is a release blocker because it is a major usability regression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
R. David Murray added the comment: Just to be clear how important I consider this, I would advocate for backing out this patch rather than releasing 3.4 with a broken tab key at the interactive prompt. But I'd rather have the patch *and* a working tab key. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17918] failed incoming SSL connection stays open forever
New submission from Peter Saveliev: Important: only Python2 versions are affected. Python3 works OK. Possibly related issue: http://bugs.python.org/issue12378 (differs: see the line above) Having a server with SSLSocket waiting for connections, the incoming connection, failed on automatic do_handshake(), stays open forever — accept() raises the SSLError and does not return client connection socket. Steps to reproduce == server side: 1. create a SOCK_STREAM socket 2. wrap it with wrap_socket() 3. listen() 4. accept() client side: 1. telnet to this port 2. enter any random text How reproducible In all 146% Expected results 1. Incoming connection is closed and client disconnected Actual results == 1. On the server side, due to exception, the reference to the incoming connection gets lost. 2. The client stays connected as long as the server operates. -- files: ssl_handshake_testcase.py messages: 188544 nosy: Peter.Saveliev priority: normal severity: normal status: open title: failed incoming SSL connection stays open forever type: resource usage versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file30150/ssl_handshake_testcase.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16316] Support xz compression in mimetypes module
Éric Araujo added the comment: Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Charles-François Natali added the comment: We've been *adding* python implementations for other modules, so I don't see why we would remove this one. Because it's buggy, and cannot be implemented correctly in python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
R. David Murray added the comment: Well, post it to python-dev and see what reaction you get :) I could be wrong, but I don't think I am (obviously). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Éric Araujo added the comment: No, patch is good to go, I just need to find some time to commit it. If another core dev wants to do it sooner, please feel free to do so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: It is a release blocker because it is a major usability regression. Really? You can press the space key to indent, it works as well as the tab key... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
R. David Murray added the comment: We've been *adding* python implementations for other modules, so I don't see why we would remove this one. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17911] Extracting tracebacks does too much work
Guido van Rossum added the comment: I'm not snubbing my nose at something that breaks these types of cycles more easily, but I still think that the abstractions offered by the traceback module could be improved. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Antoine Pitrou added the comment: We've been *adding* python implementations for other modules, so I don't see why we would remove this one. Well, the one reason is that the C constants aren't accessible from Python code. Once the constants are there, the rest is so trivial that it doesn't really deserve a pure Python alternative, IMHO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Ronald Oussoren added the comment: I expect that a lot of users use the tab key to indent in the repl (as well as in editors, smart enough editors can convert the tab presses to spaces) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17911] Extracting tracebacks does too much work
Guido van Rossum added the comment: On Mon, May 6, 2013 at 6:06 AM, Antoine Pitrou rep...@bugs.python.org wrote: Note that generator cleanup through the frame has a patch in issue17807. Sadly that doesn't help with my issue. I applied path gen3.patch and ran various versions of the code I have. There's still something holding on to the Task or the exception. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: Well, post it to python-dev and see what reaction you get :) I'm not interested in python-dev reactions here. For this kind of issue, we'll have hundreds of messages for and against the change without any useful content. The commit adds an often-requested feature (to the point that many people were already taking the pain of activating it manually). But, yes, we could add Steven's refinement so that all bases are covered. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17911] Extracting tracebacks does too much work
Antoine Pitrou added the comment: On Mon, May 6, 2013 at 6:06 AM, Antoine Pitrou rep...@bugs.python.org wrote: Note that generator cleanup through the frame has a patch in issue17807. Sadly that doesn't help with my issue. It won't. It's just a building block for the change I've proposed here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: I expect that a lot of users use the tab key to indent in the repl (as well as in editors, smart enough editors can convert the tab presses to spaces) The interpreter prompt is not a text editor at all. You can misuse it as one, but that's a loss of time and energy IMO. Really, everyone I've ever showed tab-completion to has always been enthusiastic about it (why isn't this enabled by default?). None has ever raised the concern of being able to use the tab key to indent code under the prompt. (probably because noone is crazy enough to type long chunks of code under the interactive prompt anyway) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17919] AIX POLLNVAL definition causes problems
New submission from Delhallt: I encounted exactly the same issue http://bugs.python.org/issue923315 with test_asyncore, test_asynchat and test_poll. On AIX6.1, POLLNVAL=0x8000=SHRT_MIN=SHRT_MAX+1 (on 2 bytes) and parsing events with PyArg_ParseTuple as a signed short 'h' do not work, i.e OverflowError: signed short integer is greater than maximum occurs. I changed 'h' to 'H' in the attached patch, and delete associated Overflow test. Perhaps, they're a better way to handle that ? -- components: Extension Modules files: Python-2.7.4-pollnval.patch keywords: patch messages: 188558 nosy: delhallt priority: normal severity: normal status: open title: AIX POLLNVAL definition causes problems type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file30151/Python-2.7.4-pollnval.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17913] stat.filemode returns - for sockets and unknown types
Changes by Christian Heimes li...@cheimes.de: -- components: +Library (Lib) keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file30152/filemode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17918] failed incoming SSL connection stays open forever
Peter Saveliev added the comment: Possible solution would be something like that in SSLSocket.do_handshake(): try: self._sslobj.do_handshake() except SSLError as e: # or even any Exception? self._sock.close() raise e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Alexander Belopolsky added the comment: I am in AP's camp on the tab issue, but I think we can preserve tab inserts tab behavior at the continuation prompt. I don't like indent at beginning of line. I have rlcompleter enabled in Python 2.6 and i get the following when I press tab: Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2 Type help, copyright, credits or license for more information. tab Display all 173 possibilities? (y or n) y ArithmeticError(abs(input( AssertionError( all(int( AttributeError( and intern( BaseException( any(is .. I find this rather useful. At the ... prompt, however, a tab (or better four spaces) is arguably the right completion at the beginning of the line. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
R. David Murray added the comment: Cannot be implemented correctly in Python is a darned good reason :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Changes by Christian Heimes li...@cheimes.de: -- keywords: +patch Added file: http://bugs.python.org/file30153/statmodule.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17883] Fix buildbot testing of Tkinter
Zachary Ware added the comment: Here's the relevant bit of the output from that buildbot after Terry's change: == FAIL: testLoadWithUNC (test.test_tcl.TclTest) -- Traceback (most recent call last): File E:\Data\buildslave\cpython\2.7.snakebite-win2k3r2sp2-x86\build\lib\test\test_tcl.py, line 151, in testLoadWithUNC self.assertIn('Tkinter.py', f.read()) AssertionError: 'Tkinter.py' not found in '' -- ...which doesn't say much. Here's a patch that updates the test to use subprocess.Popen instead of os.popen and add some useful debugging information. The test passes on my machine with and without the patch, so I can't do much more debugging until we get some useful output from the buildbot. -- Added file: http://bugs.python.org/file30154/issue17883.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17883 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14187] add function annotation entry to Glossary
Zachary Ware added the comment: Would anyone mind committing this? It was approved by Raymond almost a year ago now, and is still accurate. The patch still applies cleanly to 3.3 and default, though with some fuzz. -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14187] add function annotation entry to Glossary
Roundup Robot added the comment: New changeset e2a805281d26 by R David Murray in branch '3.3': #14187: Add glossary entry for 'function annotations'. http://hg.python.org/cpython/rev/e2a805281d26 New changeset 3e1c45f5c585 by R David Murray in branch 'default': Merge #14187: Add glossary entry for 'function annotations'. http://hg.python.org/cpython/rev/3e1c45f5c585 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14187] add function annotation entry to Glossary
R. David Murray added the comment: Done. Thanks for the ping. And thanks for the suggestion and patch, Chris. -- nosy: +r.david.murray resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Gregory P. Smith added the comment: Actually I'm thinking this duck may only have a beak. Instead of a bunch of fields of None I'd prefer just not having that attribute defined on the object. I consider the os specific stat-like info from reading a directory to be so os specific that i'd rather not let someone be confused by it if it were to be returned up to a higher level caller. It's not a stat. On May 6, 2013 2:36 AM, Charles-François Natali rep...@bugs.python.org wrote: Charles-François Natali added the comment: I don't think that's true in general, or true of how other Python APIs work. For instance, many APIs return a file-like object, and you can only do certain things on that object, depending on what the documentation says, or what EAFP gets you. Some file-like object don't support seek/tell, some don't support close, etc. I've seen plenty of walk-like-a-duck checks like this: Yes, I'm fully aware duck-typing ;-) But here, you're saying that a duck has a beak, but it *may* have legs, a tail, etc. It's just looks wrong to me on so many levels. Please bring this up on python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13831] get method of multiprocessing.pool.Async should return full traceback
Richard Oudkerk added the comment: The relevant changeset was c4f92b597074, but I wrote the wrong issue number in the commit message and Misc/NEWS. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11016] Add S_ISDOOR to the stat module
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3982] support .format for bytes
Changes by Ecir Hana ecir.h...@gmail.com: -- nosy: +ecir.hana ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17833] test_gdb broken PPC64 Linux
Roundup Robot added the comment: New changeset f4a6b731905a by David Malcolm in branch '3.3': #17833: fix test_gdb failures seen on PPC64 Linux in test_threads (test.test_gdb.PyBtTests) http://hg.python.org/cpython/rev/f4a6b731905a New changeset 6d971b172389 by David Malcolm in branch 'default': #17833: merge with 3.3 http://hg.python.org/cpython/rev/6d971b172389 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17833] test_gdb broken PPC64 Linux
Changes by Dave Malcolm dmalc...@redhat.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1545463] New-style classes fail to cleanup attributes
Roundup Robot added the comment: New changeset f0833e6ff2d2 by Antoine Pitrou in branch 'default': Issue #1545463: Global variables caught in reference cycles are now garbage-collected at shutdown. http://hg.python.org/cpython/rev/f0833e6ff2d2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1545463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1545463] New-style classes fail to cleanup attributes
Antoine Pitrou added the comment: This issue is endly fixed in 3.4. Since changing the shutdown sequence is a delicate change, I won't backport to bugfix branches. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1545463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15535] Fix pickling efficiency of named tuples in 2.7.3
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
Roundup Robot added the comment: New changeset c6c2b216bd14 by Charles-Francois Natali in branch '2.7': Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit http://hg.python.org/cpython/rev/c6c2b216bd14 New changeset f6c50b437de6 by Charles-Francois Natali in branch '3.3': Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit http://hg.python.org/cpython/rev/f6c50b437de6 New changeset 557599a32821 by Charles-Francois Natali in branch 'default': Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit http://hg.python.org/cpython/rev/557599a32821 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Charles-François Natali added the comment: test_dis is failing on some buildbots: http://buildbot.python.org/all/builders/AMD64 Ubuntu LTS 3.x/builds/1674/steps/test/logs/stdio Re-running test 'test_dis' in verbose mode test test_dis crashed -- Traceback (most recent call last): File /opt/python/3.x.langa-ubuntu/build/Lib/test/regrtest.py, line 1294, in runtest_inner the_module = importlib.import_module(abstest) File /opt/python/3.x.langa-ubuntu/build/Lib/importlib/__init__.py, line 92, in import_module return _bootstrap._gcd_import(name[level:], package, level) File frozen importlib._bootstrap, line 1603, in _gcd_import File frozen importlib._bootstrap, line 1584, in _find_and_load File frozen importlib._bootstrap, line 1551, in _find_and_load_unlocked File frozen importlib._bootstrap, line 591, in _check_name_wrapper File frozen importlib._bootstrap, line 1053, in load_module File frozen importlib._bootstrap, line 1034, in load_module File frozen importlib._bootstrap, line 567, in module_for_loader_wrapper File frozen importlib._bootstrap, line 901, in _load_module File frozen importlib._bootstrap, line 297, in _call_with_frames_removed File /opt/python/3.x.langa-ubuntu/build/Lib/test/test_dis.py, line 4, in module from test.bytecode_helper import BytecodeTestCase ImportError: No module named 'test.bytecode_helper' -- nosy: +neologix status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Antoine Pitrou added the comment: Yes, this is bytecode_helper hasn't been added to the repository. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis
Antoine Pitrou added the comment: (this is *because*, sorry) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17912] thread states should use a doubly-linked list
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17289] readline.set_completer_delims() doesn't play well with others
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
Charles-François Natali added the comment: Sorry for the delay, it should be fixed now. Federico, thanks for the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable
Charles-François Natali added the comment: Here's a (gigantic) patch. I used an ad-hoc script for the conversion (next time I might try with coccinelle). I tested it on Linux, FreeBSD, Openindiana, OS-X and Windows. -- keywords: +needs review, patch nosy: +pitrou stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable
Changes by Charles-François Natali cf.nat...@gmail.com: Added file: http://bugs.python.org/file30155/ins_macro.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com