[issue17496] OS X test for Tk availability in runtktests.py doesn't work
Ned Deily added the comment: Um, yes, my tired eyes did skip over those added lines. Thanks, Glyph, and sorry, Alex. While the suggested change solves the issue for the non-framework build case, it appears to introduce new problems. For one, with the current skip test, it is possible to run the tests from a buildbot or ssh process as long as the user name is logged in. That no longer works with the proposed change. Also, launchctl managername does not appear to be available on releases prior to 10.6, releases we still support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17496] OS X test for Tk availability in runtktests.py doesn't work
Ned Deily added the comment: Granted, the current test is a kludge. We could make it a bigger kludge by trying launchctl first and if it fails move on to the current ctypes-based tests. Any better options? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
Georg Brandl added the comment: Sorry, I find your suggested termini more confusing. * first/last: the first that was put onto the stack (i.e. bottom) or the first to be popped off (i.e. top)? * root/terminal: that makes you think of trees, but a stack is not a tree. top/bottom is the established wording for referring to a stack's positions, and its internal representation as a list is secondary. -- nosy: +georg.brandl resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
New submission from anatoly techtonik: It is very annoying behavior of Python 3.3.0 that when you type in the console, replace mode is always on, and even after you press insert to go insert mode, it resets after every executed line. Windows Vista 32. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 -- components: Interpreter Core, Windows messages: 184848 nosy: techtonik priority: normal severity: normal status: open title: replace mode is always on in console versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17504] Dropping duplicated docstring explanation of what Mocks' side_effect does.
New submission from Radu Voicilas: Seems like there's a duplicated explanation in unittest.mock.Mock's docstring of what side_effect does. The attached patch should take care of that, if I'm not interpreting it wrong and it's actually on purpose there. -- components: Library (Lib) files: drop_side_effect_docstring_duplicate.diff keywords: patch messages: 184849 nosy: michael.foord, raduv priority: normal severity: normal status: open title: Dropping duplicated docstring explanation of what Mocks' side_effect does. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29526/drop_side_effect_docstring_duplicate.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17496] OS X test for Tk availability in runtktests.py doesn't work
Ronald Oussoren added the comment: A small helper program that does the equavalent of this should also work: import Cocoa Cocoa.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(((10, 10), (100, 100)), 0, 0, 0) If this code raises an exception you cannot create windows, if it doesn't you can. This doesn't actually show the window and shouldn't mess up the users desktop when running the testsuite interactively. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17496] OS X test for Tk availability in runtktests.py doesn't work
Ronald Oussoren added the comment: Wouldn't it be better to check for the actual problem, that is use subprocess to start a small Tcl script that creates a window and check if that crashes? That way the code for disabling the test doesn't have to try to guess whether or not Tk will crash in the current environment, and tests won't get skipped when the Tk folks get their act together and don't crash when the window manager isn't available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
anatoly techtonik added the comment: In Python 2 replace mode is always off. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
Amaury Forgeot d'Arc added the comment: Python has absolutely no code to control the Windows console. It has always used fgets(). On the other hand, Windows keeps independent settings per shortcut or executable, so if you started Python directly from the start menu (or by opening the python.exe executable from the Explorer), you may have set different options. To be sure, open a cmd.exe console, and start Python from there. The behavior should be the same in all versions. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
anatoly techtonik added the comment: Ok. From cmd.exe both work the same in insert mode, but when I execute them from different shell (http://www.farmanager.com/opensource.php?l=en), the Python 3 starts to misbehave. And Python 2 works ok, because there is pyreadline installed. With -s -S keys it also starts to misbehave. Any ideas why this external shell affects Python3 and not Python2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Amaury Forgeot d'Arc added the comment: - The patch contains a #ifdef OLD_17206 that should be removed. - I know that these macros are already used everywhere, but a test for the new feature would be nice (in _testcapimodule.c) For example, Py_DECREF(PyLong_FromLong(0)) does not fail or leak when tests are run with -R. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17505] email.header.Header.__unicode__ does not decode header
New submission from Hrvoje Nikšić: The __unicode__ method is documented to return the header as a Unicode string. For this to be useful, I would expect it to decode a string such as =?gb2312?b?1eLKx9bQzsSy4srUo6E=?= into a Unicode string that can be displayed to the user, in this case u'\u8fd9\u662f\u4e2d\u6587\u6d4b\u8bd5\uff01'. However, unicode(header) returns the not so useful u=?gb2312?b?1eLKx9bQzsSy4srUo6E=?=. Looking at the code of __unicode__, it appears that the code does attempt to decode the header into Unicode, but this fails for Headers initialized from a single MIME-quoted string, as is done by the message parser. In other words, __unicode__ is failing to call decode_header. Here is a minimal example demonstrating the problem: msg = email.message_from_string('Subject: =?gb2312?b?1eLKx9bQzsSy4srUo6E=?=\n\nfoo\n') unicode(msg['subject']) u'=?gb2312?b?1eLKx9bQzsSy4srUo6E=?=' Expected output of the last line: u'\u8fd9\u662f\u4e2d\u6587\u6d4b\u8bd5\uff01' To get the fully decoded Unicode string, one must use something like: u''.join(unicode(s, c) for s, c in email.header.decode_header(msg['subject'])) which is unintuitive and hard to teach to new users of the email package. (And looking at the source of __unicode__ it's not even obvious that it's correct — it appears that a space must be added before us-ascii-coded chunks. The joining is non-trivial.) The same problem occurs in Python 3.3 with str(msg['subject']). -- components: email messages: 184856 nosy: barry, hniksic, r.david.murray priority: normal severity: normal status: open title: email.header.Header.__unicode__ does not decode header versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17505] email.header.Header.__unicode__ does not decode header
Changes by Hrvoje Nikšić hnik...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
Amaury Forgeot d'Arc added the comment: I don't know Far Manager. Maybe it starts everything in overwrite mode (and check its console settings) pyreadline completely overrides Python's input methods and bypasses the console, so behavior is completely independent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17506] Improve IDLE news handling
New submission from Terry J. Reedy: Idle news items should be collected together in one place and released both in an IDLE section of each Misc/NEWS and in each idlelib/NEWS.txt. Once a decision is made where to collect them originally, a script should be written to make appropriate copies. If someone volunteers, scattered entries in current Misc/NEWS could be collected together. -- assignee: terry.reedy messages: 184858 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Improve IDLE news handling versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17506 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17506] Improve IDLE news handling
Ezio Melotti added the comment: I think it would be better to keep everything in an IDLE section in Misc/NEWS, and have something/someone extract the section(s) before the release. In Lib/idlelib/NEWS.txt we probably don't need to have separate sections for alphas/betas/rcs like we do in Misc/NEWS. -- nosy: +ezio.melotti type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17506 ___ ___ 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
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ 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
[issue17507] To add history time format in readline
New submission from Zulu: I'm using readline library, and would like to add date information in readline.write_history_file method without override it. I think the best way is to add a argument for a strftime string. By default it should be simply ''. -- components: Build messages: 184860 nosy: Zulu priority: normal severity: normal status: open title: To add history time format in readline type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17507] To add history time format in readline
Ezio Melotti added the comment: Would you like to propose a patch? You can find information about how to do it in the devguide. -- components: +Library (Lib) -Build nosy: +ezio.melotti stage: - needs patch versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17496] OS X test for Tk availability in runtktests.py doesn't work
Glyph Lefkowitz added the comment: Wouldn't it be better to check for the actual problem, that is use subprocess to start a small Tcl script that creates a window and check if that crashes? Yes, this sounds great. Doing it with Tcl means that we're not invoking any of the problematic code in question. It sounds like this check could be done on other platforms as well, in lieu of looking for e.g. $DISPLAY. If a tcl script can make tk windows, so should a Python script be able to. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17507] To add history time format in readline
Zulu added the comment: I unfortunatly can't write in C. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6931] dreadful performance in difflib: ndiff and HtmlDiff
Changes by Matt Wheeler m...@funkyhat.org: -- nosy: +funkyhat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17209] get_wch() doesn't handle KeyboardInterrupt
Roundup Robot added the comment: New changeset d98a515489db by Victor Stinner in branch '3.3': Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c) http://hg.python.org/cpython/rev/d98a515489db New changeset b9d9bba9dfe5 by Victor Stinner in branch 'default': (Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c) http://hg.python.org/cpython/rev/b9d9bba9dfe5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17209] get_wch() doesn't handle KeyboardInterrupt
STINNER Victor added the comment: The issue should now be fixed, it will be part of Python 3.3.1 (not released yet) and Python 3.4. Thanks for the report! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17209 ___ ___ 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
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ 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
[issue17508] logging.config.ConvertingDict issue with MemoryHandler
New submission from Pierre Le Marre: Hi, I use Python 3.2.3 and Python 3.3.0 on Windows 7 64 bits. I have an issue with the short script enclosed. I use the module logging to get a log file with logging.FileHandler. There were some issues about the file access on Windows, so I added a buffer with logging.handlers.MemoryHandler. I configure the logging using logging.config.dictConfig. The issue appears when it comes to flush the MemoryHandler, either by reaching the capacity or by calling logging.shutdown(). Please find hereinbelow the traceback: Traceback (most recent call last): File C:\temp\bug-logging.py, line 38, in module logger.info(n) File C:\Python32\lib\logging\__init__.py, line 1232, in info self._log(INFO, msg, args, **kwargs) File C:\Python32\lib\logging\__init__.py, line 1364, in _log self.handle(record) File C:\Python32\lib\logging\__init__.py, line 1374, in handle self.callHandlers(record) File C:\Python32\lib\logging\__init__.py, line 1436, in callHandlers hdlr.handle(record) File C:\Python32\lib\logging\__init__.py, line 835, in handle self.emit(record) File C:\Python32\lib\logging\handlers.py, line 1090, in emit self.flush() File C:\Python32\lib\logging\handlers.py, line 1150, in flush self.target.handle(record) AttributeError: 'ConvertingDict' object has no attribute 'handle' -- components: Library (Lib) files: bug-logging.py messages: 184866 nosy: plemarre priority: normal severity: normal status: open title: logging.config.ConvertingDict issue with MemoryHandler type: crash versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file29527/bug-logging.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17489] random.Random implements __getstate__() and __reduce__()
Raymond Hettinger added the comment: Possibly __getstate__ could be removed. That said, I would feel a sense of risk in taking it out -- that method has been present for a *very* long time who knows what might rely on it being there. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17509] Incorrect package version predicate parsing by distutils
New submission from ILja Orlovs: When `requires` list is present in the `distutils.core.setup` object, each element of that list is being parsed by `VersionPredicate` object (located in the `distutils/versionpredicate.py` file). In its `__init__` method, the VersionPredicate uses `re_validPackage` regexp object (line 105 in my local `distutils/versionpredicate.py` file) to separate package name from its version postfix. The `re_validPackage` regexp is declared as (?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*). AFAICU, this regexp is meant to separate package name (possibly dot-separated). However, in some Linux'es (e.g. CentOs) some packages are actually dash-separated (e.g. rpm-build. Technically that's minus sign, of course.). This mismatch leads to the following error when rpm-build is listed in requires section of a `setup` object: {{{ $ python setup.py bdist Traceback (most recent call last): File setup.py, line 14, in module package_dir = {...} File /usr/lib64/python2.6/distutils/core.py, line 113, in setup _setup_distribution = dist = klass(attrs) File /usr/lib64/python2.6/distutils/dist.py, line 258, in __init__ getattr(self.metadata, set_ + key)(val) File /usr/lib64/python2.6/distutils/dist.py, line 1196, in set_requires distutils.versionpredicate.VersionPredicate(v) File /usr/lib64/python2.6/distutils/versionpredicate.py, line 112, in __init__ raise ValueError(expected parenthesized list: %r % paren) ValueError: expected parenthesized list: '-build' }}} Is suggest that `re_validPackage` regexp is changed to the (?i)^\s*([a-z_]\w*(?:[.-][a-z_]\w*)*)(.*) to accommodate for such package names. -- assignee: eric.araujo components: Distutils messages: 184869 nosy: eric.araujo, ilja_o, tarek priority: normal severity: normal status: open title: Incorrect package version predicate parsing by distutils type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Changes by Charles-François Natali cf.nat...@gmail.com: -- stage: - commit review versions: +Python 3.4 Added file: http://bugs.python.org/file29528/queues_contention-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Antoine Pitrou added the comment: By the way, I forgot to mention it previously, but multiprocessing.connection uses a custom pickler (ForkingPickler). By replacing it with plain pickle.dumps() calls, you may produce regressions since some types won't be sendable anymore (although the test suite might not check for this). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Ezio Melotti added the comment: Should I write a Makefile patch using the venv/install from pypi approach? Or could somebody upload new versions to http://svn.python.org/projects/external/? I looked at this issue over the past few days and discussed briefly with Georg about it. The 3 main issues are: 1) Sphinx and its dependency have a 2to3-able source that needs to be converted to Python 3 before being used. Should this be done every time or should we provide the already converted source somewhere? 2) If we go for the latter, should it be on externals/ (which still uses SVN) or on a new hg repo? 3) since we don't actually need all the history, should we still just clone these repos or is it better to download the source only? IMHO for 1) it would be better to provide Python3-ready code. For 2) it would also be nice to get rid of the SVN dependency for the docs so if we are going to use a repo it might be better to make a new one on HG. For 3), I'm not sure it makes sense to use repos at all if we don't want the history. If we don't, we would have to put the files somewhere and write some code to download and extract the zip/tarball. OTOH, if we do, we will be able to use hg to clone and update the repo easily, and, if we still decide not to download the history, we can just use the zip/tarballs already provided by hg.python.org. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17490] Improve ast.literal_eval test suite coverage
Nick Coghlan added the comment: I don't think we should change the implementation, but I also discovered several holes in the test suite coverage while refactoring it. We should pursue some of the test suite changes, including switching them over to be data driven and take advantage of the new subtest support. -- title: Use converter functions to implement ast.literal_eval - Improve ast.literal_eval test suite coverage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Georg Brandl added the comment: A problem with using automatic tarballs from hg.python.org is that they take server load to generate, every time someone builds the docs from a new checkout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17025] reduce multiprocessing.Queue contention
Charles-François Natali added the comment: By the way, I forgot to mention it previously, but multiprocessing.connection uses a custom pickler (ForkingPickler). Thanks, I didn't know. Here's a patch using ForkingPickler. I did a bit of refactoring to move the pickling code from connection.py to forking.py. -- Added file: http://bugs.python.org/file29529/queues_contention-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -12,7 +12,6 @@ import io import os import sys -import pickle import select import socket import struct @@ -202,9 +201,7 @@ Send a (picklable) object self._check_closed() self._check_writable() -buf = io.BytesIO() -ForkingPickler(buf, pickle.HIGHEST_PROTOCOL).dump(obj) -self._send_bytes(buf.getbuffer()) +self._send_bytes(ForkingPickler.dumps(obj)) def recv_bytes(self, maxlength=None): @@ -249,7 +246,7 @@ self._check_closed() self._check_readable() buf = self._recv_bytes() -return pickle.loads(buf.getbuffer()) +return ForkingPickler.loads(buf.getbuffer()) def poll(self, timeout=0.0): Whether there is any input available to be read diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -7,7 +7,9 @@ # Licensed to PSF under a Contributor Agreement. # +import io import os +import pickle import sys import signal @@ -43,6 +45,15 @@ def register(cls, type, reduce): cls._extra_reducers[type] = reduce +@staticmethod +def dumps(obj): +buf = io.BytesIO() +ForkingPickler(buf, pickle.HIGHEST_PROTOCOL).dump(obj) +return buf.getbuffer() + +loads = pickle.loads + + def _reduce_method(m): if m.__self__ is None: return getattr, (m.__class__, m.__func__.__name__) diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py --- a/Lib/multiprocessing/queues.py +++ b/Lib/multiprocessing/queues.py @@ -22,7 +22,7 @@ from multiprocessing.connection import Pipe from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition from multiprocessing.util import debug, info, Finalize, register_after_fork -from multiprocessing.forking import assert_spawning +from multiprocessing.forking import assert_spawning, ForkingPickler # # Queue type using a pipe, buffer and thread @@ -69,8 +69,8 @@ self._joincancelled = False self._closed = False self._close = None -self._send = self._writer.send -self._recv = self._reader.recv +self._send_bytes = self._writer.send_bytes +self._recv_bytes = self._reader.recv_bytes self._poll = self._reader.poll def put(self, obj, block=True, timeout=None): @@ -89,14 +89,9 @@ def get(self, block=True, timeout=None): if block and timeout is None: -self._rlock.acquire() -try: -res = self._recv() -self._sem.release() -return res -finally: -self._rlock.release() - +with self._rlock: +res = self._recv_bytes() +self._sem.release() else: if block: deadline = time.time() + timeout @@ -109,11 +104,12 @@ raise Empty elif not self._poll(): raise Empty -res = self._recv() +res = self._recv_bytes() self._sem.release() -return res finally: self._rlock.release() +# unserialize the data after having released the lock +return ForkingPickler.loads(res) def qsize(self): # Raises NotImplementedError on Mac OSX because of broken sem_getvalue() @@ -158,7 +154,7 @@ self._buffer.clear() self._thread = threading.Thread( target=Queue._feed, -args=(self._buffer, self._notempty, self._send, +args=(self._buffer, self._notempty, self._send_bytes, self._wlock, self._writer.close, self._ignore_epipe), name='QueueFeederThread' ) @@ -210,7 +206,7 @@ notempty.release() @staticmethod -def _feed(buffer, notempty, send, writelock, close, ignore_epipe): +def _feed(buffer, notempty, send_bytes, writelock, close, ignore_epipe): debug('starting thread to feed data to pipe') from .util import is_exiting @@ -241,14 +237,16 @@ close() return +
[issue16475] Support object instancing and recursion in marshal
Kristján Valur Jónsson added the comment: Yes, they were fixed with #42bf74b90626 which also added unittests in test_marshal.py to make sure invalid EOFs are always caught. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Paul Price added the comment: Not sure how you want patches formatted, so I went for 'git format-patch'. Also, this is my first attempt at writing ReST and my first attempt at writing docs for Python, so you may want to double-check I didn't screw up the syntax or style. Hopefully this doesn't cause more work than writing it yourself -- keywords: +patch Added file: http://bugs.python.org/file29530/0001-Docs-clarify-use-of-1-for-resource.setrlimit-Issue17.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Paul Price added the comment: P.S. This is relative to the 'default' branch in the public cpython. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/
Matthias Klose added the comment: ohh, I didn't see. however these are binaries only, and they still promise to open the sources, however the latest information on this page is for Ubuntu dapper drake (6.06), now almost seven years old. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
anatoly techtonik added the comment: stack = [] stack.append(item) stack.append(item) stack.append(item) This is an appropriate explanation of the stack in Python, the first frame is the frame that was put in first. root/terminal - if you know what a stack is, you won't confuse it with a tree, if you don't - then in my opinion your top/bottom terminology won't help to gain understanding. root/terminal removes the ambiguity. right/left is also a good alternative. Nobody imagines a stack growing right to left. -- resolution: rejected - remind status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13564] ftplib and sendfile()
Giampaolo Rodola' added the comment: After digging a bit further it seems EAGAIN occurs in case a timeout was previously set against the socket as in ftplib.FTP(..., timeout=2) (at least on Linux, FWICT). As such, we can debate whether avoid using select/poll if timeout was not set. I'll that a look at the man pages of the other POSIX platforms and figure whether EAGAIN is interpreted as on Linux. Other than that, the patch is reasonably ok to me and can be committed as-is and blocksize argument tuning can be discussed in a separate ticket. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13564] ftplib and sendfile()
Antoine Pitrou added the comment: After digging a bit further it seems EAGAIN occurs in case a timeout was previously set against the socket as in ftplib.FTP(..., timeout=2) (at least on Linux, FWICT). Ah, indeed. That's because socket timeout makes the underlying fd non-blocking. Which means there probably should be a higher-level sendfile() facility for sockets, taking into account the socket timeout... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
Ezio Melotti added the comment: Using first makes some sense, since it's talking about previous, but I agree it might be confused with the top frame too. What about this wording then: -f_back is to the previous stack frame (towards the caller), -or None if this is the bottom stack frame; +f_back is to the previous stack frame (towards the caller), +or None if this is the first frame at the bottom of the stack; -- nosy: +ezio.melotti status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Ezio Melotti added the comment: Apparently they are cached, and unless the cache expires often, the server doesn't need to regenerate the tarball too often. However I don't know the details of the caching, and if they can be tweaked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
anatoly techtonik added the comment: +or None if this is the first frame (at the bottom of the stack); I'd avoid top/bottom altogether, but if it is what is needed to reach the consensus then I am fine with that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17503] replace mode is always on in console
anatoly techtonik added the comment: I've messed with some settings, upgraded Far, restarted it during yet another test and suddenly everything worked. I hate such stuff. Thanks for support. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17503 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
Eli Bendersky added the comment: Top/bottom is accepted and understood nomenclature when talking about stacks. Think about a stack of plates in the kitchen. You put a new plate on top, you take it out from top. That's it. Now, lists are just one way to implement stacks, and printing them is also inconclusive in direction. Therefore I don't think we should mix the implementation/definition here and keep top/bottom. -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17136] ctypes tests fail with clang on non-OS X
Benjamin Peterson added the comment: Fixed by libffi-3.0.13 import. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
anatoly techtonik added the comment: It appeared that I always thought that stacks grow down towards the end of memory, but it appears that they are growing down towards the beginning (x86 and friends). Spent some years with assembly to miss that. A shame on me. =) Even if title of the issue is still true, it is no more actual. I am closing this. Thanks for support. -- resolution: remind - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16310] zipfile: allow surrogates in filenames
Toshio Kuratomi added the comment: Version 2 of the patch * fixes for the style problems noted by ezio.melotti -- Added file: http://bugs.python.org/file29531/python3-zipfile-surrogate.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
Eli Bendersky added the comment: I actually find the growth direction confusing sometimes for the same reasons (too much x86 assembly). This is why I wrote this blog post a while back - mainly so I can always look at it and de-confuse myself: http://eli.thegreenplace.net/2011/02/04/where-the-top-of-the-stack-is-on-x86/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Georg Brandl added the comment: Ok, that sounds good then. BTW, for 3.3+ would it make sense instead to create a virtualenv and directly install the required versions from pypi? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10224] Build 3.x documentation using python3.x
Brett Cannon added the comment: I guess if we are willing to write a mini-pip to download the latest release directly from PyPI we could. Since there are no C extensions we don't have to care about the lack of header files in Include if we are going to build from the repo build directly. Or are you more thinking that we just require 3.3 externally to build and not rely on the repo build unless absolutely necessary? Just wondering about when the venv environment copies instead of symlinks the binary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17505] email.header.Header.__unicode__ does not decode header
Hrvoje Nikšić added the comment: An example of the confusion that lack of a clear convert to unicode method creates is illustrated by this StackOverflow question: http://stackoverflow.com/q/15516958/1600898 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17344] checking size of size_t... configure: error:
Joe Hsiao added the comment: I was brought here by google searching for the same issue. My system is MAC OSX 10.6.8 with gcc version 4.2.1. I downloaded Python-2.7.3 and used the following configure command: /configure --enable-framework --enable-universalsdk --with-universal-archs=intel and received the same error: checking size of size_t... configure: error: in `/Users/phsiao/dev/Python-2.7.3-universal': configure: error: cannot compute sizeof (size_t) See `config.log' for more details -- nosy: +phsiao ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17505] email.header.Header.__unicode__ does not decode header
R. David Murray added the comment: I agree that this is not the worlds best API. However, it is the API that we have in 2.7/3.2, and we can't change how Header.__unicode__ behaves without breaking backward compatibility. What we could do is add an example of how to use this API to get unicode strings to the top of the docs: unicode(make_header(decode_header('=?gb2312?b?1eLKx9bQzsSy4srUo6E=?='))) u'\u8fd9\u662f\u4e2d\u6587\u6d4b\u8bd5\uff01' But you already know about that. In Python 3.3 you get this: msg = message_from_string(subject: =?gb2312?b?1eLKx9bQzsSy4srUo6E=?=\n\n, policy=default) msg['subject'] '这是中文测试!' So, I'll make this a doc bug. -- assignee: - docs@python components: +Documentation nosy: +docs@python versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17505] email.header.Header.__unicode__ does not decode header
R. David Murray added the comment: Erg, somehow I failed to read the second half of your message before writing mine...clearly you *didn't* know about that idiom, so the doc patch is obviously an important thing to do. To clarify about the 3.3 example: the policy=default is key, it tells the email package to use the new (currently provisional) policy code to provide improved handling of header decoding and encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17508] logging.config.ConvertingDict issue with MemoryHandler
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17494] References to stack bottom are confusing
anatoly techtonik added the comment: @eli.bendersky: The article is awesome. One of the cases when I regret that many interesting Python posts don't have a +1 button. One more chapter about C stack overflow and it will get all top hits. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17487] wave.Wave_read.getparams should be more user friendly
R. David Murray added the comment: Looks good. Claudio, could you please submit a contributor agreement? (http:://www.python.org/psf/contrib). -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17487 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules
Éric Araujo added the comment: I was not disagreeing that there was an ambiguity, just trying to explain why some people would understand the text in a different way that what it meant. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17509] Incorrect package version predicate parsing by distutils
Éric Araujo added the comment: requires is supposed to take a Python module name (e.g. 'xml'), not a distribution name (e.g. 'PyXML') or a system package name ('rpm-build'). The hyphen is rejected because it’s not a valid character for a Python module name. That said, requires should not be used, as there is no tool at all that supports it. distutils effectively has no support for dependencies. I have a bug open to recommend to people that they shouldn’t use requires. Third-party tools support dependencies on Python distributions, i.e. names like PyXML which are registered on PyPI. There is no way to depend on non-Python stuff for the moment with distutils. A custom command could call the system package manager, or users need to install it manually, or you can use buildout, or a configuration management system like puppet or chef. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: Thanks for the patch. You got the patch mechanics correct. I did a little experimenting, and at least on my linux box, the exception is raised for any(*) resource whose hard limit is not unlimited. I'm attaching a revised patch that expresses this. Do you think this provides sufficient clarification? One question I have relates to the use of the word 'infinite'. In the shell, the term 'unlimited' is used, so I'm thinking that's what most people will be familiar with. On the other hand, the man page for the syscall we are wrapping uses the term 'infinite', so one can argue that it is more correct. I'm ambivalent about which term to use. (*) I tested this on NO_PROC, since that's the only other one my shell has a hard limit for, and by setting a hard limit via the shell ulimit command and then using (-1, -1) in the setrlimit call. -- Added file: http://bugs.python.org/file29532/setrlimit_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Paul Price added the comment: That's good; it doesn't have what I added to the description of RLIMIT_NOFILE, but perhaps you chose to leave that out on purpose. Since both unlimited and infinite are both used in different contexts, perhaps we should use both, e.g., infinite/unlimited? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Changes by florian-rathgeber florian.rathge...@gmail.com: -- nosy: +florian-rathgeber ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: infinite/unlimited sounds like a good compromise :) Yes, I left NOFILE out on purpose, because the issue applies to any resource that is not unlimited for whatever reason. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16754] Incorrect shared library extension on linux
Roundup Robot added the comment: New changeset 8f91014c8f00 by doko in branch '3.2': - Issue #16754: Fix the incorrect shared library extension on linux. Introduce http://hg.python.org/cpython/rev/8f91014c8f00 New changeset 14f0c9e595a5 by doko in branch '3.3': - Issue #16754: Fix the incorrect shared library extension on linux. Introduce http://hg.python.org/cpython/rev/14f0c9e595a5 New changeset f6a6b4eed5b0 by doko in branch 'default': - Issue #16754: Fix the incorrect shared library extension on linux. Introduce http://hg.python.org/cpython/rev/f6a6b4eed5b0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17510] assertEquals deprecated in test_program.py (unittest)
New submission from Daniel Black: Following #9424 here's a patch that changes assertEquals - assertEqual for Lib/unittest/test/test_program.py against hg tip as of now -- components: Tests files: unittest.patch keywords: patch messages: 184906 nosy: grooverdan priority: normal severity: normal status: open title: assertEquals deprecated in test_program.py (unittest) type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29533/unittest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/
Matthias Klose added the comment: besides the availability of the graphics program, would there be any objection to move the source.xar file to the python.org web site? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: Here's another attempt, using infinite/unlimited . I noticed that the following paragraph talks specifically about the error raised, so I moved the explanation to that paragraph. -- Added file: http://bugs.python.org/file29534/setrlimit_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16754] Incorrect shared library extension on linux
Matthias Klose added the comment: fixed, pep update is pending -- assignee: eric.araujo - barry resolution: - fixed stage: - committed/rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Paul Price added the comment: You missed out an is: Raises :exc:`ValueError` if an invalid resource is specified, if the new soft limit exceeds the hard limit, or if a process tries to raise its hard limit (unless the process has an effective UID of super-user). Specifying an infinite/unlmited limit when the hard or system limit for that resource **is** not unlimited will result in a :exc:`ValueError`. ``setrlimit`` may also raise :exc:`error` if the underlying system call fails. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Terry J. Reedy added the comment: in-finite literally means un-limited or un-bounded. However, 'infinte' has also taken on the meaning of 'actual infinity'. So in my algorithms book, when 'actual infinities' are not in play. I describe the set of counts as unbounded. I suggest you go with just 'unlimited'. I believe constructions such as and/or (which some style guides discourage. because they are a bit ugly) should suggest some contrast or difference, rather than exact synonyms but I could be wrong. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: Terry: well, we're trying to deal with the fact that the setrlimit man page says: The value RLIM_INFINITY denotes no limit on a resource (both in the structure returned by getrlimit() and in the structure passed to setr- limit()). Oh. RLIM_INFINITY is defined in the module. Let me update the patch again :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17344] checking size of size_t... configure: error:
Ned Deily added the comment: Joe, there are many reasons for seeing configure errors like that and they are almost always platform-specific. Ones seen on OS X are unlikely to be related to ones seen on Solaris so they should be covered in separate issues. In your case, --enable-universalsdk with no arguments means to use the OS X 10.4u SDK which does not support 64-bit builds (intel). As described in Mac/README, you need to specify --enable-universalsdk=/ to use the command-line-tool installed headers on your system or --enable-universalsdk=/path/to/SDK to use a specific Xcode-installed SDK. Also it is best to explicitly include MACOSX_DEPLOYMENT_TARGET=10.6 (or whatever) in the ./configure arguments. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: Here's a patch that adds RLIMIT_INFINITY and uses it. This constant exists in 2.7 and Python3, but has not been previously documented. -- Added file: http://bugs.python.org/file29535/setrlimit_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17511] Idle find function closes after each find operation
New submission from Sarah: When I use the 'find' function in Idle, the dialogue closes after the first instance is found. To find the next instance, one must then use the 'find again' function, rather than the 'find' function. One can also use Ctrl+G, but that may not be intuitive for new users, who may not frequently use keyboard shortcuts. It would be nice to have a persistent box so that users can simply click 'find' repeatedly to iterate the 'find again' function. We would then have to alter when highlighting happens, as it currently happens only after the box is closed. I think the relevant code is located in the SearchDialog.py file on line 55. Unfortunately, I can't figure out how to adjust this myself, as I am a n00b. Note: I am working on Windows 7 with python ver 2.7.3 -- components: IDLE messages: 184915 nosy: Kuchinsky priority: normal severity: normal status: open title: Idle find function closes after each find operation versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13150] Most of Python's startup time is sysconfig
Roundup Robot added the comment: New changeset 66e30c4870bb by doko in branch '2.7': - Issue #13150: sysconfig no longer parses the Makefile and config.h files http://hg.python.org/cpython/rev/66e30c4870bb -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13150 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
Terry J. Reedy added the comment: Both old and new have this sentence: Raises :exc:`ValueError` if an invalid resource is specified, if the new soft limit exceeds the hard limit, or if a process tries to raise its hard limit (unless the process has an effective UID of super-user). This strikes me as a bit awkward and ambiguous. As a naive reader that does not already know the facts, it is unclear whether the (unless...) applies to the overall sentence (Raise...) or just the last clause (if a process...). I would try moving the 'unless...' either before the whole sentence or before the clause, depending on which is true. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17429] platform.platform() can throw Unicode error
R. David Murray added the comment: Review comments added. -- nosy: +r.david.murray stage: - patch review type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin
New submission from Matthias Klose: The backport of #13150 to the 2.7 branch breaks the build on darwin. There is a special case for providing the _sysconfigdata module in _generate_posix_vars before get_platform is called (darwin only) and before the module is actually written. However get_platform is called before, in site.addbuilddir(). Wondering if this call can either be avoided, or worked around. options: - backport issue586680 too (http://hg.python.org/cpython/rev/4742e7aea2f5/) - fall back to generic values for osname, release, machine any other options? -- assignee: doko components: Build messages: 184919 nosy: benjamin.peterson, doko, ronaldoussoren priority: release blocker severity: normal stage: needs patch status: open title: backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17425] Update OpenSSL versions in Windows builds
Benjamin Peterson added the comment: Martin, is something that needs to be worked on before the rc this weekend? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17513] astrike(*) in argv
New submission from Amin: suppose the the following simple program argvtest.py: import sys print sys.argv[1] in my Python 2.6.6. if I run it with the following parameters: $ python argvtest.py tc* it returns: tc2 (or the first result of ls tc*) but it should return tc* -- components: Library (Lib) files: argvtest.py messages: 184921 nosy: Amin priority: normal severity: normal status: open title: astrike(*) in argv versions: Python 2.6 Added file: http://bugs.python.org/file29536/argvtest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17513 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17513] astrike(*) in argv
Alex Gaynor added the comment: This is a result of your shell automatically expeanding that, depending on what shell you use there'll be a way to escape the *. -- nosy: +alex resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17513 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin
Matthias Klose added the comment: untested work-around. we don't need the builddir to generate the _sysconfigdata.py. -- keywords: +patch Added file: http://bugs.python.org/file29537/workaround.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin
Changes by Matthias Klose d...@debian.org: -- nosy: +pitrou, twouters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17465] Gut devinabox
Brett Cannon added the comment: OK, rewrite is finished in changeset 2c20681befa8 . -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17513] astrike(*) in argv
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17513 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2/3.3, should be removed in 3.4
Roundup Robot added the comment: New changeset 62a988b3bf2e by Terry Jan Reedy in branch 'default': Issue #13248: NEWS and What's New items http://hg.python.org/cpython/rev/62a988b3bf2e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17409] resource.setrlimit doesn't respect -1
R. David Murray added the comment: How about this. -- Added file: http://bugs.python.org/file29538/setrlimit_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15392] Create a unittest framework for IDLE
Terry J. Reedy added the comment: Since writing this, I ran test_ttk_guionly by itself, so it would run, and saw the flickering windows. I have thought about using unitest.mock and Nick has offered to help particlarly with that. -- nosy: +ncoghlan versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15392 ___ ___ 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
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ 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
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ 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
[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin
Benjamin Peterson added the comment: Backporting 4742e7aea2f5 would seem to be the simplest and most correct solution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17514] Add the license to argparse.py
New submission from David James: Lib/argparse.py [1] doesn't mention a license in it. Could you please add a license to it? According to the argparse project [2], argparse is licensed under the Python license. Chromium OS uses argparse. If you would add information about the license to argparse, we'd appreciate it. Here's an example license string that passes the Debian licensecheck [3] script: # Licensed under the Python Software Foundation License version 2.7 In case you don't understand why Chromium wants include a license in argparse.py, rather than just consulting the global LICENSE file, here's a bit more detail: Chromium includes many files from different authors in its distribution. Many projects contain LICENSE files, but this doesn't mean that every file under the project is licensed under that license. So it's helpful if each file has a quick note that mentions what license it uses. This helps us ensure that we understand the license of all files we include. We automate this check using Debian's licensecheck.pl script. [1]: http://hg.python.org/cpython/file/62a988b3bf2e/Lib/argparse.py [2]: https://code.google.com/p/argparse/source/browse/LICENSE.txt [3]: http://ftp.de.debian.org/debian/pool/main/d/devscripts/devscripts_2.12.6.tar.gz or http://src.chromium.org/viewvc/chrome/trunk/src/third_party/devscripts/licensecheck.pl -- components: Library (Lib) messages: 184929 nosy: David.James priority: normal severity: normal status: open title: Add the license to argparse.py versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17508] logging.config.ConvertingDict issue with MemoryHandler
Vinay Sajip added the comment: Yes, this fails because it tries to construct the MemoryHandler first. Because the constructing is done in order of the keys, you can get it to work by renaming the 'fileGlobal' to 'afileGlobal' - this gets constructed before 'bufferGlobal'. I agree this is a workaround for now - I will implement a fix in due course. -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17508] logging.config.ConvertingDict issue with MemoryHandler
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17472] Patch for Additional Test Coverage in urllib.parse
Roundup Robot added the comment: New changeset 472b72a61b0a by R David Murray in branch 'default': #17472: add tests for a couple of untested methods in urllib.urlparse. http://hg.python.org/cpython/rev/472b72a61b0a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer
New submission from STINNER Victor: I wrote an optimizer rewriting the AST to implement various optimizatoions: https://bitbucket.org/haypo/astoptimizer To be able to use it, or use any other kind of AST transformation, I propose to add a new sys.setasthook() function to set a custom AST hook. Attached patch is a proof-of-concept. The patch should be improved: document the function and add write unit tests. Prototype of the hook: def asthook(ast, filename): # ... return new_ast I don't know if we need to add a compiler option (like _ast.PyCF_ONLY_AST) to skip the hook. -- files: setasthook.patch keywords: patch messages: 184932 nosy: brett.cannon, haypo priority: normal severity: normal status: open title: Add sys.setasthook() to allow to use a custom AST optimizer versions: Python 3.4 Added file: http://bugs.python.org/file29539/setasthook.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17515 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17472] Patch for Additional Test Coverage in urllib.parse
R. David Murray added the comment: Thanks Daniel. I changed the Quoter test to look for the class name, since the purpose of that method is to differentiate itself from the base defaultdict repr. -- nosy: +r.david.murray resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com