[issue16853] add a Selector to the select module
Charles-François Natali added the comment: Please consider my patches instead; it seems our patches crossed. Merging is now difficult because I already submitted my version to Tulip. That's fine, I don't think there's a point into maintaining a standalone patch for now: we can see how it goes with Tulip, flesh out the API and merge it when it's ready (or when Tulip goes in)? Also my version makes fewer syscalls when unregistering a FD that has both read and write events registered. It did it on purpose, because I wasn't sure whether kqueue ops can accept more than one filter at a time. If that's the case, then you can do the same thing for register(). Regarding the _Key return value: I think it's asking for trouble if the signature of the base class differs from that of the subclass. The return value may even be useful occasionally. Agreed (but then it might be better to change _Key to Key if it's public). Given that no spurious FD events are now reported by the unittests, I'm not sure that it is useful to log and ignore them; it may be better to have the exception be raised, as it might expose an app bug, and in my experience it usually ends up in an infinite busy-wait loop once it happens. Sounds good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
New submission from brian-cameron-oracle: Solaris supports OSS, but the attached patch is needed to get it to build. Note that some of the EXPORT_INT lines in Modules/ossaudiodev.c need to be #ifndef'ed out on Sun since OSS on Solaris doesn't support them all. Does it make sense to use #ifndef like this, or should each EXPORT_INT be encapsulated by its own #ifdef? -- components: Extension Modules files: ossaudiodev.patch keywords: patch messages: 179424 nosy: brian-cameron-oracle priority: normal severity: normal status: open title: Add OSS module support for Solaris type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file28644/ossaudiodev.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2
New submission from Serhiy Storchaka: On 3.2 subprocess.Popen.communicate with universal_newlines=True accepts bytes and doesn't accept strings. $ ./python -c import subprocess; subprocess.Popen(['cat'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True).communicate('qwerty') Traceback (most recent call last): File string, line 1, in module File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 833, in communicate return self._communicate(input) File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 1470, in _communicate stdout, stderr = self._communicate_with_poll(input) File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 1537, in _communicate_with_poll input_offset += os.write(fd, chunk) TypeError: 'str' does not support the buffer interface On 3.3+ it accepts strings and doesn't accept bytes. -- components: IO, Library (Lib), Unicode messages: 179425 nosy: ezio.melotti, serhiy.storchaka priority: normal severity: normal status: open title: subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2 type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16903 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False
Serhiy Storchaka added the comment: See also issue16903. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2
Serhiy Storchaka added the comment: As quick fix I propose add support of strings (in additional to bytes) in 3.2. Perhaps we must also add support of bytes with warning in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16903 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
Charles-François Natali added the comment: I realize this bugreport cannot fix 35 years of a bad design decision in linux. Well... Ruby made a brave choice :-) Ruby (2.0?) does set close-on-exec flag on *ALL file descriptors (except 0, 1, 2) *by default*: http://bugs.ruby-lang.org/issues/5041 This change solves the problem of having to close all file descriptor after a fork to run a new program (see closed Python issues #11284 and #8052)... if you are not using C extensions creating file descriptors? But we can't simply change the default to FD_CLOEXEC, for two reasons: - we can't silently change the Unix semantics - this is going to break some applications: for example, FD inherited across exec is used by super servers such as inetd, and there are others very legitimate uses Yes, changing the default value of the flag (enable close-on-exec by default) will break some applications. But if we chose to do it, developers of these applications can still disable close-on-exec (because the option must be configurable) to fix their application for Python 3.4. Changing all FDs to close-on-exec by default would be a bold move (and even just for SocketServer). It ought to be default, but it's going to break some applications. That's definitely something which needs discussion (at not only on the tracker, I would could bring it up on python-dev). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16903 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16904] Avoid unnecessary and possibly unsafe code from http.client.HTTPConnection.send
New submission from Attila Gerendi: In http.client.HTTPConnection's send(data) method if data has attribute read after is handled correctly as file-like object and sent out successfully the code continues to what should be an else branch (~line 858) and tries to send out again the data. This is harmless in most situations but only by chance and also run's unnecessary code. I propose either to use an else branch for the code after line 858 or simply instead break return at line 853. Cheers, Sanyi -- components: Library (Lib) messages: 179429 nosy: sanyi priority: normal severity: normal status: open title: Avoid unnecessary and possibly unsafe code from http.client.HTTPConnection.send type: performance versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16491] IDLE and except: raise from
Roundup Robot added the comment: New changeset f28aff31900a by Serhiy Storchaka in branch '3.2': Issue #16491: IDLE now prints chained exception tracebacks. http://hg.python.org/cpython/rev/f28aff31900a New changeset 3feead75c7a5 by Serhiy Storchaka in branch '3.3': Issue #16491: IDLE now prints chained exception tracebacks. http://hg.python.org/cpython/rev/3feead75c7a5 New changeset 0793d68a0eba by Serhiy Storchaka in branch 'default': Issue #16491: IDLE now prints chained exception tracebacks. http://hg.python.org/cpython/rev/0793d68a0eba -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16491] IDLE and except: raise from
Serhiy Storchaka added the comment: Fixed. Thank you for report, Hans. -- components: +IDLE resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16905] Fix test discovery for test_warnings
Changes by Berker Peksag berker.pek...@gmail.com: -- components: Tests files: test_warnings_discovery.diff keywords: patch nosy: berker.peksag, brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_warnings type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28645/test_warnings_discovery.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16906] Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c
New submission from Prashant Kurnawal: I have embedded python3.3 in my application. I got a crash when I ran a python script containing sample TK window creation code in it. On interpreter shutdown, all strings are released (through _PyUnicode_ClearStaticStrings). (I Found this description in one of the comments of object.h header file) When I tried to debug python source, I found a defect in _PyUnicode_ClearStaticStrings() method. Existing function definition in python3.3 source (unicodeobject.c) is as follows void _PyUnicode_ClearStaticStrings() { _Py_Identifier *i; for (i = static_strings; i; i = i-next) { Py_DECREF(i-object); i-object = NULL; i-next = NULL; } } Here, for loop will not free all the static strings. It will free only the first static string in the list. This loop needs to be corrected. I corrected the loop in following way and its working fine for me. void _PyUnicode_ClearStaticStrings() { _Py_Identifier *i; while(static_strings-next != NULL) { i = static_strings; static_strings = static_strings-next; Py_DECREF(i-object); i-object = NULL; i-next = NULL; } Py_DECREF(static_strings-object); static_strings-object = NULL; static_strings = NULL; } Is this a bug or it is done so intentionally..? -- components: None files: unicodeobject.c messages: 179432 nosy: benjamin.peterson, brett.cannon, georg.brandl, goodger, larry, prashantkurnawal, python-dev priority: normal severity: normal status: open title: Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c type: crash versions: Python 3.3 Added file: http://bugs.python.org/file28646/unicodeobject.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16906] Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c
Martin v. Löwis added the comment: It's a bug; thanks for pointing this out. I always suspected that there was something wrong, but never found the time to look into it. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
New submission from klo uo: I noticed this issue, while trying to compile Cython extension, when source file is in path with spaces. Extension wouldn't compile because LIBDIR is passed to MinGW g++ (though not to gcc) or MSVC compilers unquoted. I tracked the problem to distutils/build_ext.py in get_ext_fullpath() function. I patched it, this way: --- build_ext.bak +++ build_ext.py @@ -647,6 +647,11 @@ package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) +try: +from win32api import GetShortPathName +package_dir = GetShortPathName(package_dir) +except: +pass # returning # package_dir/filename return os.path.join(package_dir, filename) which is just one way to do it. -- assignee: eric.araujo components: Distutils messages: 179434 nosy: eric.araujo, klo.uo, tarek priority: normal severity: normal status: open title: Distutils fails to build extension in path with spaces versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16908] Enhancing performance and memory usage
New submission from Sworddragon: On my system (Linux 64 Bit) I figured out that python 3 needs a little more memory than python 2 and it is a little bit slower. Here are some examples: sworddragon@ubuntu:~$ execution-time 'python2 -c print\(0\)' 0.21738 sworddragon@ubuntu:~$ execution-time 'python2 -OO -c print\(0\)' 0.22559 sworddragon@ubuntu:~$ execution-time 'python3 -c print\(0\)' 0.37962 sworddragon@ubuntu:~$ execution-time 'python3 -OO -c print\(0\)' 0.37825 Checking the memory usage after python 2 and python 3 are started in a terminal shows the following: python2: RES 4780 / SHR: 2212 python3: RES 6168 / SHR: 2660 -- components: Interpreter Core messages: 179435 nosy: Sworddragon priority: normal severity: normal status: open title: Enhancing performance and memory usage type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16908 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
STINNER Victor added the comment: That's definitely something which needs discussion (at not only on the tracker, I would could bring it up on python-dev). I agree, I started a thread on python-dev mailing list: https://mail.python.org/pipermail/python-dev/2013-January/123552.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16908] Enhancing performance and memory usage
Ramchandra Apte added the comment: What is the problem? Python 3 uses more memory because many things that were earlier ASCII strings in Python 2 are Unicode strings. Same reason for performance AFAIK. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16908 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16908] Enhancing performance and memory usage
Georg Brandl added the comment: The performance you're measuring here is mostly startup, i.e. loading all necessary modules. On Python 3, there is more to load, e.g. the filesystem encoding, therefore startup takes a little longer. There are efforts to improve startup time, see e.g. #16101. The memory consumption is expected, again due to more modules loaded. You cannot make any statement about the memory usage of a real-world application by just measuring the overhead of the interpreter. The memory usage due to strings should be very similar to Python 2 starting with Python 3.3, due to PEP 393. -- nosy: +georg.brandl resolution: - works for me status: open - closed superseder: - Verify all imported modules at startup are needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16908 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
Ramchandra Apte added the comment: Can you fix the bare except? -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
klo uo added the comment: Can you fix the bare except? ... except ImportError: pass -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Ramchandra Apte added the comment: Here's a patch on revision 75fe7f5fda9a (I did it on a trip without an internet connection) There might be some mistakes of this type: I incorrectly changed instances like this ` try: something except: close file raise ` to ` try: something finally: close file ` (the incorrect version closes the file always) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Ramchandra Apte added the comment: Sorry, I entered the wrong filename for the patch and so it didn't get attached. Now I have attached it. -- keywords: +patch Added file: http://bugs.python.org/file28647/patch.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16906] Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c
Prashant Kurnawal added the comment: When are you planning to submit a fix for it..? This bug will be fixed in python3.3 and a new version of python3.3 will be released..? Or it will be fixed in python3.4..? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
Serhiy Storchaka added the comment: get_ext_fullpath() has no relations to this bug. The bug is probably in spawn() functions, perhaps in _nt_quote_args() or something like. It looks as Windows specific bug (Posix passes command arguments as a list, not joining it into string). -- components: +Windows nosy: +serhiy.storchaka stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Serhiy Storchaka added the comment: Unhappy Rietveld hasn't recognize your patch. I have regenerated it. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file28648/bare_except.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Zachary Ware added the comment: Version 4 looks good to me! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16909] urlparse: add userinfo attribute
New submission from Olof Johansson: Hi, The urlparse library's netloc attribute is today further split into the following attributes: username, password, hostname, port. The attributes preceding the @ (username, password) are refered to in RFC 3986 [1] as userinfo, the format of which is scheme dependant. E.g. the (expired) internet draft for SSH/SFTP urls [2] have connection parameters within the userinfo (user;cparams@host). In some cases, the deprecated username:password syntax is required to be supported even with, e.g. connection parameters. For this reason, I propose a new attribute, userinfo, that exposes the raw userinfo string, without any splitting on : etc. I've had a go at a patch, with updated unit tests and documentation. Any feedback is welcome! Regards, 1: http://tools.ietf.org/rfc/rfc3986.txt 2: http://tools.ietf.org/id/draft-ietf-secsh-scp-sftp-ssh-uri-04.txt -- components: None files: urlparse_userinfo.diff keywords: patch messages: 179447 nosy: olof priority: normal severity: normal status: open title: urlparse: add userinfo attribute type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file28649/urlparse_userinfo.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Richard Oudkerk added the comment: try: _MAXFD = os.sysconf(SC_OPEN_MAX) -except: +except ValueError: _MAXFD = 256 os.sysconf() might raise OSError. I think ValueError is only raised if _SC_OPEN_MAX was undefined when the module was compiled. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Serhiy Storchaka added the comment: See my comments on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16852] Fix test discovery for test_genericpath.py
Zachary Ware added the comment: Version 4 replaces test_main() with unittest.main() -- Added file: http://bugs.python.org/file28650/issue16852.v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace
Changes by Christian Heimes li...@cheimes.de: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Lars Buitinck added the comment: Any reason why this issue is still open? I just got a lot of compiler warnings when building Numpy, so this isn't just relevant to C++ programmers. (Btw., I did RTFM: the issue's Resolution is accepted but that option is not documented.) -- nosy: +larsmans ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: Brian, is this supported in Solaris 10 or Solaris 11?. How can I actually try it?. I use Solaris on servers, and have Solaris 10/11 virtual machines in my laptop but never ever used sound under Solaris... Also, I am unsure about this being a new feature (available in future Python 3.4) or a bugfix (to be available on 2.7, 3.2, 3.3 and 3.4). Opinions? -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Christian Heimes added the comment: Let's try this again for 3.4 -- nosy: +christian.heimes versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: fixed - out of date ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16897] Fix test discovery for test_bisect.py
Zachary Ware added the comment: Here's version 2 of the patch, which converts the doctests to a standard testcase and removes test_main(). -- Added file: http://bugs.python.org/file28651/test_bisect_fix.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16897 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16896] Fix test discovery for test_asyncore.py
Zachary Ware added the comment: Patch v2, in which test_main() goes away. -- Added file: http://bugs.python.org/file28652/test_asyncore_fix.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16261] Fix bare excepts in various places in std lib
Serhiy Storchaka added the comment: Want to make a few warnings. Accepting your confirmation may take a long time. And it is very unlikely that your patch can be applied as a whole. The maintainers of the individual modules can apply it by parts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16261 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Lars Buitinck added the comment: Redid the patch. -- Added file: http://bugs.python.org/file28653/constness.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex
Amaury Forgeot d'Arc added the comment: libffi still has no support for _Complex. Did you try with a pure Python solution, like the one suggested in http://objectmix.com/python/112374-re-ctypes-c99-complex-numbers.html -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16888] Fix test discovery for test_array.py
Zachary Ware added the comment: Version 2 removes test_main() and associated ``tests`` list. -- Added file: http://bugs.python.org/file28654/test_array.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16906] Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c
Roundup Robot added the comment: New changeset 3e18ccaa537e by Benjamin Peterson in branch '3.3': correct static string clearing loop (closes #16906) http://hg.python.org/cpython/rev/3e18ccaa537e New changeset 0c04ed40eeaf by Benjamin Peterson in branch 'default': merge 3.3 (#16906) http://hg.python.org/cpython/rev/0c04ed40eeaf -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16898] Fix test discovery for test_bufio.py
New submission from Zachary Ware: Version 2 replaces test_main() with unittest.main(). -- Added file: http://bugs.python.org/file28655/test_bufio_fix.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Serhiy Storchaka added the comment: Docs update needed. Perhaps some other functions which accepts char* (i.e. PyObject_CallMethodObjArgs or PyDict_GetItemString) should be fixed. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Lars Buitinck added the comment: Oops, forgot to save changes to Doc/c-api/object.rst. PyObject_CallMethodObjArgs takes a PyObject*, mustn't that be non-const for reference counting to work? PyDict_GetItemString already has const, just not in refcounts.dat. Fixed. -- Added file: http://bugs.python.org/file28656/constness.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16905] Fix test discovery for test_warnings
New submission from Zachary Ware: Patch looks good to me. Thank you, Berker! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15239] Abandoned Tools/unicode/mkstringprep.py
Serhiy Storchaka added the comment: Georg, now Tools/unicode/mkstringprep.py is broken in all Python 3 branches (it not usable at all, under 3.2 it even raises SyntaxError). Do you object against fixing it in 3.2 and 3.3? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15239 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13454] crash when deleting one pair from tee()
Serhiy Storchaka added the comment: If no one objects I will commit this next week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6975] symlinks incorrectly resolved on Linux
Georg Brandl added the comment: I'd like to see a review first. I don't have time to do it myself right now though. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6975] symlinks incorrectly resolved on Linux
Serhiy Storchaka added the comment: If no one objects I will commit this next week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
brian-cameron-oracle added the comment: OSS is the default audio system in Solaris 11 and 12. In Solaris 10 and earlier, the sunaudio (or SADA) interfaces are still used. You can only test this if you are using Solaris 11 or later, on a machine with a sound card supported by OSS. I would say this is really more of a bugfix. The main problem is that the configure script was avoiding even trying to build the OSS module on Solaris, and that the code only builds if the ioctls unsupported on Solaris are #ifdef'ed out on Solaris. So it would make sense to support the ability to build the OSS module in 2.7, 3.x and onwards. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15239] Abandoned Tools/unicode/mkstringprep.py
Georg Brandl added the comment: No need to hurry; no one apparently needs it anyway, and if there is a change let Martin review it before commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15239 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: Brian, then this module should be compiled only under Solaris 11 and up and, presumably, OpenSolaris/Illumos derivatives. Does your patch compiles cleanly under previous Solaris versions?. I am +1 to consider this a bugfix. Any other python-dev opinion? PS: My virtual machines are configured with AC97 sound. Is that supported under Solaris 11?. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6975] symlinks incorrectly resolved on Linux
Serhiy Storchaka added the comment: OK. Perhaps I will prepare similar patches for ntpath and macpath. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
Martin v. Löwis added the comment: klo.uo: can you kindly provide a working (or, rather, failing) example? A trivial hello-world kind of package could do, along with a report what path you unpacked it in, and what error you get. Your patch is not applicable to Python, since it requires the win32 extensions, which we cannot assume to be present. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
brian-cameron-oracle added the comment: Correct, OSS should work out-of-the-box on Solaris 11 and up since it is the default audio system there. OSS was also integrated into OpenSolaris, so it is probably the most sensible audio plugin to use there also. Some end-users may build and install their own OSS code on Solaris 10 or earlier, so it should not hurt to try and build the OSS plugin even on older versions of Solaris. Also, I'm not sure if the way I'm doing the #ifndef's in the patch is right. Looking at the rest of the code, I see that each EXPORT_INT is surrounded by its own #ifdef. I added similar #ifdef's around SNDCTL_DSP_BIND_CHANNEL SNDCTL_DSP_MAPINBUF, and SNDCTL_DSP_MAPOUTBUF. However I just put #ifndef __sun around the SNDCTL_COPR_* and SNDCTL_DSP_* ioctls because it seemed to make the patch more simple. But, I'm not sure this was the right decision. Maybe it just might be more consistent to use an #ifdef around each one separately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16910] Fix test discovery for bytes/string tests
New submission from Zachary Ware: This patch fixes discovery for test_bytes.py. That fix changes string_tests.py, which breaks test_unicode.py and test_userstring.py, so those two files have been changed as well. All three test files also use unittest.main() now instead of test_main(). -- components: Tests files: bytes_string_tests_discovery.diff keywords: patch messages: 179475 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for bytes/string tests versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28657/bytes_string_tests_discovery.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16910] Fix test discovery for bytes/string tests
Changes by Zachary Ware zachary.w...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16909] urlparse: add userinfo attribute
Senthil Kumaran added the comment: If it does go in, due the RFC requirement, then it would be only in 3.4 (default branch) and the feature may not be backported. Without reading the RFC section, I have an intuitive -1 for this proposal because the suggestion may be a corner case rather than a default scenario. It is a bad idea to change parsing logic for corner cases. -- nosy: +orsenthil versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: The problem with your approach is that different Solaris release could support different flags. So I rather prefer specific #ifdef's. I wonder about compiling OSS module under Solaris without OSS support. Compiling a module acting as NULL is OK, compiling a node that will crash on import, for instance, it is not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16904] Avoid unnecessary and possibly unsafe code from http.client.HTTPConnection.send
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
brian-cameron-oracle added the comment: Sure, doing multiple #ifdef's makes sense. Do you need me to provide an updated patch, or is this something easier for someone who has commit access to the source code repository to just go ahead and do. I would think this Module would fail to compile if OSS isn't present, no? So I guess I do not understand your comment about this possibly causing any sort of crash on import at runtime. The Modules/ossaudiodev.c file should not compile if /usr/include/sys/soundcard.h isn't available with OSS definitions. It wouldn't be on Solaris 10 or earlier. Is it okay to try and compile this plugin and let it fail if it does? Or does the configure script need to check this first and only try building it on Solaris 11 or later? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6975] symlinks incorrectly resolved on Linux
Hynek Schlawack added the comment: I will review this first thing tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()
Roundup Robot added the comment: New changeset be8e6b81284e by Charles-François Natali in branch 'default': Issue #16876: Optimize epoll.poll() by keeping a per-instance epoll events http://hg.python.org/cpython/rev/be8e6b81284e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: - How shall we go forward? I've made a variety of small changes to the Tulip version (selector.py) now. Can you work those into a fresh unified patch for CPython 3.4? - I tried making a single combined kqueue call in register(), and it caused the SSL test to hang, so I reverted that and changed my unregister code to make two syscalls as wel. (This makes me think however that KqueueSelector should override modify() to avoid redundant syscalls when flipping only one of the two bits.) - I'll change _Key to Key in the Tulip copy (though I wonder if maybe it should be a longer name -- 'Key' is rather generic). - Are you going to implement the SELECT_CONNECT flag? - Thanks for being so responsive! It's great to be able to factor the selector functionality out of Tulip. - Have you submitted a PSF contributor form yet? (Probably yes, years ago, just making sure. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
Éric Araujo added the comment: I think this is a duplicate report; could you please search for an existing open report for the same bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E
Éric Araujo added the comment: Code patch looks good, but for tests, I prefer to run subprocesses with the options and output I want, instead of changing the expected results depending on the python-running-tests’ options (and thus, having two tests into one, but always running only one). -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16826 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
klo uo added the comment: klo.uo: can you kindly provide a working (or, rather, failing) example? A trivial hello-world kind of package could do, along with a report what path you unpacked it in, and what error you get. As mentioned in opening thread, this doesn't happen with Cython's hello world example, as `gcc` somehow doesn't trigger this problem. Maybe because it's handled by Cython's own distutils copies, maybe it's handled by Numpy's distutils version or it could be by Python's distutils. I noticed this issue while using Numpy with Cython. Here is simple example: C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyx: cimport numpy def sum(x): cdef numpy.ndarray[int, ndim=1] arr = x cdef int i, s = 0 for i in range(arr.shape[0]): s += arr[i] return s C:\Documents and Settings\klo\My Documents\code\python\misc\setup.py: from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from numpy.distutils.misc_util import get_numpy_include_dirs setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension(test, [test.pyx], include_dirs=get_numpy_include_dirs())] ) command line: `python setup.py build_ext --inplace` MinGW result: ... g++ -shared build\temp.win32-2.7\Release\test.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd Found executable C:\MinGW\bin\g++.exe g++.exe: error: and: No such file or directory g++.exe: error: Settings\klo\My: No such file or directory g++.exe: error: Documents\code\python\misc\test.pyd: No such file or directory error: Command g++ -shared build\temp.win32-2.7\Release\test.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd failed with exit status 1 Similar result if I use MSVC compiler: MSVC result: building 'test' extension c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC /Tctest.c /Fobuild\temp.win32-2.7\Release\test.obj Found executable c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild /EXPORT:inittest build\temp.win32-2.7\Release\test.obj /OUT:C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd /IMPLIB:build\temp.win32-2.7\Release\test.lib /MANIFESTFILE:build\temp.win32-2.7\Release\test.pyd.manifest /MANIFEST Found executable c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe LINK : fatal error LNK1181: cannot open input file 'and.obj' error: Command c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild /EXPORT:inittest build\temp.win32-2.7\Release\test.obj /OUT:C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd /IMPLIB:build\temp.win32-2.7\Release\test.lib /MANIFESTFILE:build\temp.win32-2.7\Release\test.pyd.manifest /MANIFEST failed with exit status 1181 So issue is with unquoted path for output file, and not for LIBDIR as I wrote previously (perhaps I misread the logs, as I was trying to fix similar issue for Theano, at the same time) Your patch is not applicable to Python, since it requires the win32 extensions, which we cannot assume to be present. Yes, I provided patch that worked for me temporarily, as I'm not familiar with distutils, and that's as far as I went. But source issue is probably elsewhere, as Serhiy suggested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16907] Distutils fails to build extension in path with spaces
klo uo added the comment: I found two similar issues: 1. distutils compiler not handling spaces in path to output/src files: http://bugs.python.org/issue4508 with patches for unix compiler and cygwin compiler 2. Distutils does not put quotes around paths that contain spaces when compiling with MSVC: http://bugs.python.org/issue13765 with some patch for MSVC Problem seems to be deeper than provided patches, as evident also from my report -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()
Changes by Charles-François Natali neolo...@free.fr: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Charles-François Natali added the comment: - How shall we go forward? I've made a variety of small changes to the Tulip version (selector.py) now. Can you work those into a fresh unified patch for CPython 3.4? Yes, but I think we could wait a little, to make sure the API is good enough to fulfill all tulip's need? There are a couple things I'm not completely happy with: - if we add a CONNECT event, then I think SELECT_IN/SELECT_OUT aren't good names anymore: I think that EVENT_READ/EVENT_WRITE/EVENT_CONNECT would be more consistent (since it embeds the operation that should now succeed on the socket). Maybe even shorter names like EVT_READ? - right now, selectors don't handle EINTR, which means that upon reception of a signal, Selector.select() can fail with EINTR (the original tulip implementation also had this problem). I've been more or less midly advocating to change all Python syscalls wrappers to handle EINTR because it's really just a nuisance, but I think Selector.select() should definitely handle EINTR and retry the syscalls (with an updated timeout). Note: the test testAddSignalHandler() added recently doesn't demonstrate this problem because os.kill(os.getpid(), signal.SIGINT) because the signal is delivered synchronously (when kill() syscall returns to user-space), before select()/poll()/epoll() gets called. - I'll change _Key to Key in the Tulip copy (though I wonder if maybe it should be a longer name -- 'Key' is rather generic). SelectorKey, or something along those lines? - Are you going to implement the SELECT_CONNECT flag? Unfortunately, I don't know anything about Windows, so I won't be able to. But I guess that porting Pollster.WSAPollster to selectors shouldn't be too hard. - Have you submitted a PSF contributor form yet? (Probably yes, years ago, just making sure. :-) Actually, I already have commit rights ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16911] Socket Documentation Error
New submission from Ronnie Ghose: Running the example given in the docs gives the following: In [8]: socket.getaddrinfo('www.python.org',80) Out[8]: [(2, 1, 6, '', ('82.94.164.162', 80)), (2, 2, 17, '', ('82.94.164.162', 80)), (2, 3, 0, '', ('82.94.164.162', 80)), (10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0)), (10, 2, 17, '', ('2001:888:2000:d::a2', 80, 0, 0)), (10, 3, 0, '', ('2001:888:2000:d::a2', 80, 0, 0))] In [9]: socket.getaddrinfo('www.python.org',80,socket.SOL_TCP) --- gaierror Traceback (most recent call last) /home/sghose/ADAPT/dns/ipython-input-9-faa58a2f7926 in module() 1 socket.getaddrinfo('www.python.org',80,socket.SOL_TCP) gaierror: [Errno -6] ai_family not supported -- assignee: docs@python components: Documentation messages: 179487 nosy: docs@python, sghose priority: normal severity: normal status: open title: Socket Documentation Error versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16911] Socket Documentation Error
Changes by Ronnie Ghose ronnie.gh...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16911] Socket Documentation Error
Ronnie Ghose added the comment: sorry - my error. accidentally omitted somethings -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16911] Socket Documentation Error
Changes by Ronnie Ghose ronnie.gh...@gmail.com: -- nosy: -docs@python, sghose ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: On Wed, Jan 9, 2013 at 12:47 PM, Charles-François Natali rep...@bugs.python.org wrote: - How shall we go forward? I've made a variety of small changes to the Tulip version (selector.py) now. Can you work those into a fresh unified patch for CPython 3.4? Yes, but I think we could wait a little, to make sure the API is good enough to fulfill all tulip's need? Sure. I think in terms of API, it is pretty good except for the 'connect' issue below (and the related issue of a WSAPoll() wrapper, which Tulip had before the switch). In terms of implementation, I expect there's plenty to do, but it will be a long time before we'll know. It's probably best to do this incrementally. There's also the question of IOCP support, but I expect that it is too unwieldy to add to the select module -- it'll be a separate project. Hopefully Richard can help with this. There are a couple things I'm not completely happy with: - if we add a CONNECT event, then I think SELECT_IN/SELECT_OUT aren't good names anymore: I think that EVENT_READ/EVENT_WRITE/EVENT_CONNECT would be more consistent (since it embeds the operation that should now succeed on the socket). Maybe even shorter names like EVT_READ? I like the longer names, EVENT_READ; they aren't used enough to need abbreviating, and it's always hard to remember exactly what abbreviation is used. - right now, selectors don't handle EINTR, which means that upon reception of a signal, Selector.select() can fail with EINTR (the original tulip implementation also had this problem). I've been more or less midly advocating to change all Python syscalls wrappers to handle EINTR because it's really just a nuisance, but I think Selector.select() should definitely handle EINTR and retry the syscalls (with an updated timeout). I'm not sure what the pros and cons would be of doing this for all syscall wrappers, but I do know I want Tulip to work with Python 3.3 out of the box, so we need to add this to the select() calls. I imagine it's a bit tricky to test... Maybe I could use alarm() or setitimer() for testing? Note: the test testAddSignalHandler() added recently doesn't demonstrate this problem because os.kill(os.getpid(), signal.SIGINT) because the signal is delivered synchronously (when kill() syscall returns to user-space), before select()/poll()/epoll() gets called. I know. :-( - I'll change _Key to Key in the Tulip copy (though I wonder if maybe it should be a longer name -- 'Key' is rather generic). SelectorKey, or something along those lines? Sounds good. - Are you going to implement the SELECT_CONNECT flag? Unfortunately, I don't know anything about Windows, so I won't be able to. But I guess that porting Pollster.WSAPollster to selectors shouldn't be too hard. Just check out the last rev of Tulip before I switched: http://code.google.com/p/tulip/source/browse/tulip/unix_events.py?spec=svn28b7efd465b8529cdaa34e6b710f291c835c657br=28b7efd465b8529cdaa34e6b710f291c835c657b - Have you submitted a PSF contributor form yet? (Probably yes, years ago, just making sure. :-) Actually, I already have commit rights ;-) Doesn't surprise me. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16911] Socket Documentation Error
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: I've fixed the signal handling issue. Please check Tulip revision 1c4db3d1a688: http://code.google.com/p/tulip/source/detail?r=1c4db3d1a68874dc22c84f9c1c376c5371037f09 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: And the next Tulip rev renames Key to SelectorKey. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction
Serhiy Storchaka added the comment: PyObject_CallMethodObjArgs takes a PyObject*, mustn't that be non-const for reference counting to work? Then refcounts.dat wrong. PyDict_GetItemString already has const, just not in refcounts.dat. Fixed. There are a lot of char* arguments in refcounts.dat. If refcounts.dat differs from actual function signature, this is a bug, and fix must be applied to other versions too. If they conform, perhaps this argument can be enhanced to const char* in 3.4. Therefore two issues are needed, one for the new feature, and one for the bugfixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10156] Initialization of globals in unicodeobject.c
Stefan Krah added the comment: Nick, I'm adding you to the nosy list since this issue seems related to PEP 432. Quick summary: Globals are used in unicodeobject.c before they are initialized. Also, Unicode objects are created before PyType_Ready(PyUnicode_Type) has been called. This happens during startup: _Py_InitializeEx_Private(): _Py_ReadyTypes(): PyType_Ready(PyType_Type); [...] Many Unicode objects like or __add__ are created. Uninitialized globals have led to a crash (#16143). This is fixed by Serhiy's patch, which always dynamically checks all globals for NULL before using them. However, Unicode objects are still created at this point. [...] PyType_Ready(PyUnicode_Type); /* Called for the first time */ [...] _PyUnicode_Init: for (i = 0; i 256; i++) /* Could leak if latin1 strings unicode_latin1[i] = NULL; have already been created. */ PyType_Ready(PyUnicode_Type); /* Called a second time! */ So, considering PEP 432: Are these pre-type-ready Unicode objects safe to use, or should something be done about it? -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16912] Wrong float sum w/ 10.14+10.1 and 10.24+10.2
New submission from fenrirsoul: When 10.14+10.1 is typed, it's result is 20.242 and when 10.24+10.2 is typed, it's result is 20.438, i just found these two occurences. -- components: None messages: 179495 nosy: fenrirsoul priority: normal severity: normal status: open title: Wrong float sum w/ 10.14+10.1 and 10.24+10.2 type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16912] Wrong float sum w/ 10.14+10.1 and 10.24+10.2
Ezio Melotti added the comment: See http://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16912] Wrong float sum w/ 10.14+10.1 and 10.24+10.2
Ezio Melotti added the comment: See also http://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16398] deque.rotate() could be much faster
Changes by John O'Connor tehj...@gmail.com: -- nosy: +jcon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16465] dict creation performance regression
Changes by John O'Connor tehj...@gmail.com: -- nosy: +jcon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10156] Initialization of globals in unicodeobject.c
Nick Coghlan added the comment: There should still be a check in tp_new (IIRC) that calls PyType_Ready on unready types. While doing something systematic about this kind of problem is part of the rationale of PEP 432, that won't help earlier versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: Brian, this patch would try to compile OSS module on any Solaris machine, even if not OSS support is provided. That is, compilation would fail in that case. That is not acceptable. Some kind of OSS detection is needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16850] Add e mode to open(): close-and-exec (O_CLOEXEC) / O_NOINHERIT
STINNER Victor added the comment: There is another way to set close-on-exec flag on a file descriptor: ioctl(fd, FIOCLEX, 0); (and ioctl(fd, FIONCLEX, 0); to unset the flag). It is interesting because it avoids the need to get the flags before setting new flags (old | FD_CLOEXEC): 1 syscall instead of 2. ioctl(fd, FIOCLEX) is available on at least: Linux, Mac OS X, QNX, NetBSD, OpenBSD, FreeBSD. I don't know if it's available in old versions of these operating systems. (It is *not* supported by Interix.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: Making these into real unit tests and switching the patch to 3.3 should be no problem. Is 2.7 still open for changes to tests? I might back port to 2.7 as well so that I can delete the customized Jython test in 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16829] IDLE on POSIX can't print filenames with spaces
Roger Serwy added the comment: The attached patch changes %%s to %%r. This should handle file names containing quotes automatically. Ramchandra's point of using a subprocess instead would fix the issue as well. That would require changing print_window in Lib/idlelib/IOBinding.py Terry's observation about Windows' Notepad omitting the file extension is just a behavior of Notepad. -- keywords: +patch Added file: http://bugs.python.org/file28662/16829_print.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16829 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16829] IDLE on POSIX can't print filenames with spaces
Roger Serwy added the comment: See also issue12274. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16829 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10156] Initialization of globals in unicodeobject.c
Stefan Krah added the comment: Nick Coghlan rep...@bugs.python.org wrote: There should still be a check in tp_new (IIRC) that calls PyType_Ready on unready types. Indeed there is one in type_new(), but that isn't used here AFAICS. If you apply this patch and start up python, there are many str: not ready instances: diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -14282,6 +14282,10 @@ PyUnicode_InternFromString(const char *cp) { PyObject *s = PyUnicode_FromString(cp); + +fprintf(stderr, %s: %s\n, PyUnicode_Type.tp_name, + (PyUnicode_Type.tp_flags Py_TPFLAGS_READY) ? ready : not ready); + if (s == NULL) return NULL; PyUnicode_InternInPlace(s); -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
brian-cameron-oracle added the comment: I'm not sure how to write such OSS detection code. I do know that OSS is only on Solaris systems that have this OSS-specific file: /usr/include/sys/soundcard.h So that's probably the best way to check and it should work even on Solaris 10 if OSS is already installed by the end-user. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: Brian, Linux has that include file too. So, yes, I think that detection would be appropiate. If we could confirm that all platforms with OSS support have that file, we could have something :-). If not, or we are not sure, just check for that file *IF* the platform is sunos5. Could you possibly provide a new patch with that test and independent #ifdef's? I am assigning this issue to me. Lets move :-). -- assignee: - jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16902] Add OSS module support for Solaris
Jesús Cea Avión added the comment: For user installed packages, the usual path would be /usr/local/include/sys/soundcard.h. So, maybe check both paths. Do you agree? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16852] Fix test discovery for test_genericpath.py
Roundup Robot added the comment: New changeset 6f71e6aa9041 by Ezio Melotti in branch '3.3': #16852: test_genericpath, test_posixpath, test_ntpath, and test_macpath now work with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/6f71e6aa9041 New changeset 3a7cd8efc19f by Ezio Melotti in branch 'default': #16852: merge with 3.3. http://hg.python.org/cpython/rev/3a7cd8efc19f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16852] Fix test discovery for test_genericpath.py
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16406] move the Uploading Packages section to distutils/packageindex.rst
Chris Jerdonek added the comment: Attached is a proposed patch. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file28663/issue-16406-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com