[issue22004] io documentation refers to newline as newlines
New submission from Andrew Barnert: In at least one place in the io module documentation (io.IOBase.readline), and in the corresponding docstring, the newline parameter to open (and io.open, and io.Foo.__init__) is referred to as newlines: The line terminator is always b'\n' for binary files; for text files, the newlines argument to open() can be used to select the line terminator(s) recognized. (The newline parameter is closely related to the newlines attribute of the TextIOWrapper that gets created by the open call, but they're not the same thing, and I think were named differently intentionally.) -- assignee: docs@python components: Documentation messages: 223398 nosy: abarnert, docs@python priority: normal severity: normal status: open title: io documentation refers to newline as newlines type: behavior versions: 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/issue22004 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22004] io documentation refers to newline as newlines
Andrew Barnert added the comment: Searching the source and the help page, it looks like the one example I gave is the only place it's wrong in each of the two, not one of multiple places. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22004 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install
Alejandro added the comment: Here you have make_install.log Thanks -- Added file: http://bugs.python.org/file35989/make_install.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22003] BytesIO copy-on-write
David Wilson added the comment: Good catch :( There doesn't seem to be way a to ask for an immutable buffer, so perhaps it could just be a little more selective. I think the majority of use cases would still be covered if the sharing behaviour was restricted only to BytesType. In that case Py_buffer initialdata could become a PyObject*, saving a small amount of memory, and allowing reuse of the struct member if BytesIO was also modified to directly write into a private BytesObject -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22003 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22003] BytesIO copy-on-write
Stefan Behnel added the comment: Even if there is no way to explicitly request a RO buffer, the Py_buffer struct that you get back actually tells you if it's read-only or not. Shouldn't that be enough to enable this optimisation? Whether or not implementors of the buffer protocol set this flag correctly is another question, but if not then they need fixing on their side anyway. (And in the vast majority of cases, the implementor will be either CPython or NumPy.) Also, generally speaking, I think such an optimisation would be nice, even if it only catches some common cases (and doesn't break the others :). It could still copy data if necessary, but try to avoid it if possible. -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22003 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21999] shlex: bug in posix more handling of empty strings
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21999 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
Drekin added the comment: I have made some updates in the streams code. Better error handling (getting errno by GetLastError() and raising exception when zero bytes are written on non-zero input). This prevents the infinite loop in BufferedIOWriter.flush() when there is odd number of bytes (WriteConsoleW accepts UTF-16-LE so only even number of bytes is written). It also prevents the same infinite loop when the buffer is too big to write at once (see http://bugs.python.org/issue11395 ). The limit of 32767 bytes was added to raw write. -- Added file: http://bugs.python.org/file35990/win_unicode_console.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print or input Unicode
STINNER Victor added the comment: @Drekin: Please don't send ZIP files to the bug tracker. It would be much better to have a project on github, Mercurial or something else, to have the history of the source code. You may try tp list all people who contributed to this code. You may also create a project on pypi.python.org to share your code. This bug tracker is not the best place for that. When the code will be consider mature (well tested, widely used), we can try to integrate it into Python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature
Michael Foord added the comment: It was a functionality change, not just a name change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7063] Memory errors in array.array
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7063 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15994] memoryview to freed memory can cause segfault
Stefan Krah added the comment: We deal with it when we have time. IMO there is little value in bumping up issues this way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15994 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22002] Make full use of test discovery in test subpackages
Brett Cannon added the comment: I can confirm everything you said is accurate, Zachary. And I very much look forward to the results of the patch. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22005] datetime.__setstate__ fails decoding python2 pickle
New submission from Edward Oubrayrie: pickle.loads raises a TypeError when calling the datetime constructor, (then a UnicodeEncodeError in the load_reduce function). A short test program the log, including dis output of both PY2 and PY3 pickles, are available in this gist; and extract on stackoverflow: https://gist.github.com/eddy-geek/191f15871c1b9f801b76 http://stackoverflow.com/questions/24805105/ I am using pickle.dumps(reply, protocol=2) in PY2 then pickle._loads(pickled, fix_imports=True, encoding='latin1') in PY3 (tried None and utf-8 without success) Native cPickle loads decoding fails too, I am only using pure python's _loads for debugging. Sorry if this is misguided (first time here) Regards, Edward -- components: Library (Lib) messages: 223408 nosy: eddygeek priority: normal severity: normal status: open title: datetime.__setstate__ fails decoding python2 pickle type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22005] datetime.__setstate__ fails decoding python2 pickle
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +belopolsky, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22005] datetime.__setstate__ fails decoding python2 pickle
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22004] io documentation refers to newline as newlines
Roundup Robot added the comment: New changeset 4c98086194d5 by Zachary Ware in branch '2.7': Issue #22004: Correct an argument name. http://hg.python.org/cpython/rev/4c98086194d5 New changeset 252cd056d1cf by Zachary Ware in branch '3.4': Issue #22004: Correct an argument name. http://hg.python.org/cpython/rev/252cd056d1cf New changeset f83adc06f486 by Zachary Ware in branch 'default': Closes #22004: Merge with 3.4 http://hg.python.org/cpython/rev/f83adc06f486 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22004 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22004] io documentation refers to newline as newlines
Zachary Ware added the comment: Fixed! Thanks for the report. -- nosy: +zach.ware versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22004 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] linebreak sequences should be better documented
David Halter added the comment: I would vote for the inclusion of that patch. I just stumbled over this. -- nosy: +davidhalter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16859] tarfile.TarInfo.fromtarfile does not check read() return value
Lars Gustäbel added the comment: The size of the buffer returned by TarInfo.fromtarfile() is checked by TarInfo.frombuf() which raises either an EmptyHeaderError or TruncatedHeaderError respectively. -- assignee: - lars.gustaebel resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16859 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8843] urllib2 Digest Authorization uri must match request URI
Demian Brecht added the comment: FWIW, here's my take on this: RFC 2617 (3.2.2.5) states: This may be *, an absoluteURL or an abs_path as specified in section 5.1.2 of [2], but it MUST agree with the Request-URI. Note: It must AGREE. RFC 3986 (6.2.3) states: In general, a URI that uses the generic syntax for authority with an empty path should be normalized to a path of /. In my mind, this normalization should actually happen server-side, not client as the patch is suggesting. Additionally, should the logic in the supplied patch be applied, it would be inconsistent with any other than an empty path: http://example.com - / http://example.com/foo - /foo I would close this as won't fix. Side note: get_selector was deprecated in 3.3 and removed in 3.4 in favour of the Request.selector attribute. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8843 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17620] Python interactive console doesn't use sys.stdin for input
Drekin added the comment: There is still the serious inconsistency that the `sys.stdin` is not used for input by interactive loop but its encoding is. So if I replace `sys.stdin` with a custom object with its own `encoding` attribute, the standard interactive loop tries to use this encoding which may result in an exception on any input. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17620 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +dbrecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14414 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install
R. David Murray added the comment: The install log shows the file being copied into place: copying build/lib.linux-x86_64-3.4/_sqlite3.cpython-34m.so - /soft/pyt341/lib/python3.4/lib-dynload This does not line up with the fact that you said the file did not exist after the install. Something would have to be deleting the file after it got copied into place. After you run make install, is there anything at all in lib-dynload? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install
R. David Murray added the comment: configure with a prefix followed by make/make install works fine for me, by the way (on a Gentoo system). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1598] unexpected response in imaplib
Roy Hyunjin Han added the comment: Hi Lita, I no longer have access to a Domino server. I'm not sure whether there are enough users trying to access Domino with imaplib for this to warrant investigation. RHH -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21935] Implement AUTH command in smtpd.
Milan Oberkirch added the comment: After trying to implement SMTPS with asyncore and wrap_socket I agree with David that it is at least hard: somehow the handshake fails (ssl.SSLWantReadError) and I did not really figure out why. Looking at the debugging output of openssl indicates that the connection drops immediately after setting up the session on the client side. Anyway: I think we should apply a better version of my patch (will submit one soon) to be able to test smtplib (and also fix issue 8503). I'm going to make it clear that the AUTH functionality should only be used for testing or in combination with an encrypted tunnel. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21935 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1598] unexpected response in imaplib
Lita Cho added the comment: Hi Roy, Oh I see. Should we close this out as Won't Fix due to the fact that we aren't sure how many users are using this with Domino servers? Lita On Fri, Jul 18, 2014 at 8:52 AM, Roy Hyunjin Han rep...@bugs.python.org wrote: Roy Hyunjin Han added the comment: Hi Lita, I no longer have access to a Domino server. I'm not sure whether there are enough users trying to access Domino with imaplib for this to warrant investigation. RHH -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length
Joachim Bauch added the comment: I could look into providing a patch if that helps... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14414 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1598] unexpected response in imaplib
Roy Hyunjin Han added the comment: Yes, I think closing this issue is reasonable. If the error reappears, we can just reopen it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21970 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22003] BytesIO copy-on-write
Changes by Mikhail Korobov kmik...@gmail.com: -- nosy: +kmike ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22003 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20516] Concurrent.futures base concurrency improvement (with patch)
Changes by Glenn Langford glenn.langf...@gmail.com: -- nosy: -glangford ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20516 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13299] namedtuple row factory for sqlite3
Changes by Glenn Langford glenn.langf...@gmail.com: -- nosy: -glangford ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13299 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures
Changes by Glenn Langford glenn.langf...@gmail.com: -- nosy: -glangford ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20369 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures
Changes by Glenn Langford glenn.langf...@gmail.com: -- nosy: -glangford ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20297 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length
Demian Brecht added the comment: Of /course/ a patch always helps :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14414 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21645] asyncio: Race condition in signal handling on FreeBSD
STINNER Victor added the comment: The test suite passed on FreeBSD 9 buildbot (3.4, 3.5 and my custom builds). I consider that the bug is now fixed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21645 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20064] PyObject_Malloc is not documented
Carol Willing added the comment: I've reviewed this patch. It's my first patch review for this project so I'm not sure that I submitted the review correctly in Rietveld. -- nosy: +willingc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20064 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18392] Doc: PyObject_Malloc() is not documented
Changes by Zachary Ware zachary.w...@gmail.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - PyObject_Malloc is not documented ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container
Brett Cannon added the comment: I think I want to keep bytecode files as optimizations as much as possible, so exposing anything that explicitly writes them is just going to lead to headaches. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22005] datetime.__setstate__ fails decoding python2 pickle
Tim Peters added the comment: I have no idea what was done to pickle for Python3, but this line works for me to unpickle a Python2 protocol 2 datetime pickle under Python3, where P2 is the Python2 pickle string: pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes') For example, P2 '\x80\x02cdatetime\ndatetime\nq\x00U\n\x07Þ\x07\x12\r%%\x06á¸q\x01\x85q\x02Rq\x03.' pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes') datetime.datetime(2014, 7, 18, 13, 37, 37, 451000) I don't understand the Python3 loads() docs with respect to the encoding and errors arguments, and can't guess whether this is the intended way. It seems at best highly obscure. But hard to argue with something that works ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22005 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18993] There is an overshadowed and invalid test in testmock.py
Mark Lawrence added the comment: Can we have a formal review on the latest patch please. -- nosy: +BreamoreBoy type: enhancement - behavior versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18993 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22006] thread module documentation erroneously(?) states not all built-in functions release the GIL
New submission from Dan O'Reilly: Currently, the caveats section of the thread/_thread module has this statement in it: Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (time.sleep(), file.read(), select.select()) work as expected.) As far as I know, this isn't the case; all built-in functions that do blocking I/O release the GIL, and therefore do indeed allow other threads to run. I asked a question about this on stackoverflow recently (http://stackoverflow.com/q/24831458/2073595), and Mark Dickinson helpfully pointed out that this statement was added by Guido way back in 1994, which suggests it's probably just obsolete. If that's the case, the statement should be removed to avoid confusion. -- assignee: docs@python components: Documentation messages: 223428 nosy: dan.oreilly, docs@python priority: normal severity: normal status: open title: thread module documentation erroneously(?) states not all built-in functions release the GIL versions: 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/issue22006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22006] thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL
Changes by Dan O'Reilly oreil...@gmail.com: -- title: thread module documentation erroneously(?) states not all built-in functions release the GIL - thread module documentation erroneously(?) states not all built-in functions that do blocking I/O release the GIL ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17401] io.FileIO closefd parameter is not documented nor shown in repr
Mark Lawrence added the comment: From the 3.5 docs. io.open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) This is an alias for the builtin open() function. There is a description for closefd at the open() function link. So how about adding to the sentence above where all the above parameters are described ? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17401 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18395] Make _Py_char2wchar() and _Py_wchar2char() public
STINNER Victor added the comment: You seem to need wchar_t to call Py_Main and Py_SetProgramName. Yes, exactly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21998] asyncio: a new self-pipe should be created in the child process after fork
STINNER Victor added the comment: Oh, I wanted to use the atfork module for that, but then I saw that it does not exist :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21998 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars
R. David Murray added the comment: There is indeed special logic that triggers if the name is longer than 100 characters. Presumably it has a bug. Marking this as easy since it shouldn't be too hard, given the failure example, to figure out what is wrong and fix it (and turn the example into a unit test). It doesn't look like the relevant code has changed in python3, so the bug probably exists there as well. -- keywords: +easy nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21988] Decrease iterating overhead in timeit
R. David Murray added the comment: Guido: I've added developer privs to your Guido.van.Rossum account. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21989] Missing (optional) argument `start` and `end` in documentation for list.index
R. David Murray added the comment: It's a tutorial, not API documentation. You will note that the 'key' and 'reverse' arguments to sort are not mentioned either. -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21989 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
New submission from Jonathan Stewmon: Writing to sys.stdout on OS X can fail with IOError: [Errno 4] Interrupted system call. I have observed this while trying to write to sys.stdout when SIGCHLD is received. The script below consistently reproduces the problem with python 2.7.2 on OS X 10.9.3. import sys import os import signal import subprocess import time children = {} def claim_child(): pid, status = os.wait() p = children.pop(pid) def trap(sig, frame): claim_child() signal.signal(signal.SIGCHLD, trap) running = 0 max_procs = 70 program = [sys.executable, '-c', 'import sys, time; print sys.version; time.sleep(3)'] f = sys.stdout # crashes with: IOError: [Errno 4] Interrupted system call # f = file('/tmp/eintr.log', 'w') # works just fine while True: while len(children) max_procs: f.write('starting program: {}\n'.format(program)) p = subprocess.Popen(program) children[p.pid] = p time.sleep(0.05) -- components: IO messages: 223435 nosy: jstewmon priority: normal severity: normal status: open title: sys.stdout.write on OS X is not EINTR safe versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17131] subprocess.Popen.terminate can raise exception on Posix
Gregory P. Smith added the comment: issue14252 appears to have been a fix for the windows side only. On Posix the best that could be done here is to catch OSError within Popen.terminate() and Popen.kill() and ignore the problem if there was an error. We do not have a way to know if the child process exists any longer or even to know if the process with the PID this call is sending the signal to is this Popen instances' child process or if the PID has already been recycled by the OS and used by another unfortunate process. the bigger question is... should we. this seems like an API change rather than a bugfix so I'm more inclined to do this in 2.5 only in case someone was relying on the exception to tell them that the process had already died. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17131 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17528] Implement dumps/loads for lru_cache
Mark Lawrence added the comment: https://pypi.python.org/pypi/fastcache/0.4.0 also seems relevant. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17528 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Mark Lawrence added the comment: https://pypi.python.org/pypi/fastcache/0.4.0 also seems relevant. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib
STINNER Victor added the comment: The telnetlib now uses the new selectors introduced in Python 3.4: see the issue #19170. The selectors module handles InterruptedError (EINTR): it returns an empty list of events in this case. The changeset f713d9b6393c of the issue #19170 fixed this issue. Sorry for the delay, 10 years to fix this bug... It's probably because the telnetlib module is not widely used... -- nosy: +haypo, neologix resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1049450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue818201] distutils: clean does not use build_base option from build
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- components: -Distutils2 nosy: +dstufft versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue818201 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue644744] bdist_rpm fails when installing man pages
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue644744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
Ned Deily added the comment: There have been a number of EINTR-releated issues reported in the past, some unique to BSD-based systems and/or OS X; see for example, Issue9867 and Issue12268. I don't know that any of them specifically addressed problems with writes to Python 2 file objects. FWIW, with your test case, I'm not able to reproduce a failure on 10.9.3 using python.org 2.7.8 or 2.7.3 or with the system 2.7.5. And, with a modified print(), I didn't see a failure with python.org 3.4.1, either. Can you say more about the origins of your Python 2.7.2? Have you tried with a current 2.7.8? How quickly does the test fail, e.g. after how many iterations? -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
STINNER Victor added the comment: This issue is just an example of issue addressed by the issue #18885. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib
STINNER Victor added the comment: By the way, the bug was only fixed in Python 3.4 and later. I'm not interested to fix it in older Python versions. -- versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1049450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21935] Implement AUTH command in smtpd.
Changes by Milan Oberkirch milan...@oberkirch.org: Added file: http://bugs.python.org/file35991/smtpd_AUTH_full2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21935 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
Ned Deily added the comment: Yes, an issue not likely to be addressed in Python 2.7. I'm still curious as to why I'm not able to reproduce the problem, though. I suppose it could just come down to differences in the system it is running on, like workload, amount of memory, and/or number of processors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
Jonathan Stewmon added the comment: Sorry, I had a typo in the original report - I am actually using Python 2.7.7 installed with homebrew. The script crashes for me on the first iteration every time using iTerm as my terminal. I just tried it in Terminal, and it doesn't crash. Maybe it's actually an issue with iTerm? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on OS X is not EINTR safe
STINNER Victor added the comment: I can reproduce the issue on Linux: Traceback (most recent call last): File x.py, line 26, in module f.write('starting program: {}\n'.format(program)) IOError: [Errno 4] Interrupted system call -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22008] Symtable's syntax warning should contain the word because
New submission from A Kaptur: The symbol table's syntax error about unqualified exec is missing the word because. def foo(): ... exec a = 1 ... def bar(): ... print a ... File stdin, line 2 SyntaxError: unqualified exec is not allowed in function 'foo' it contains a nested function with free variables -- assignee: docs@python components: Documentation files: issue.patch keywords: patch messages: 223447 nosy: akaptur, docs@python priority: normal severity: normal stage: needs patch status: open title: Symtable's syntax warning should contain the word because type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file35992/issue.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1047397] cgitb failures
Mark Lawrence added the comment: The output now is c:\Users\Mark\PythonIssuescgitbbug.py getattr1 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] Traceback (most recent call last): File C:\Users\Mark\PythonIssues\cgitbbug.py, line 34, in module d.h('aaa') File C:\Users\Mark\PythonIssues\cgitbbug.py, line 23, in _f raiseError() File C:\Users\Mark\PythonIssues\cgitbbug.py, line 3, in raiseError raise ValueError('original error') ValueError: original error During handling of the above exception, another exception occurred: Traceback (most recent call last): File C:\Users\Mark\PythonIssues\cgitbbug.py, line 36, in module print(cgitb.html(sys.exc_info(),context=3)) File c:\python34\lib\cgitb.py, line 136, in html vars = scanvars(reader, frame, locals) File c:\python34\lib\cgitb.py, line 88, in scanvars value = getattr(parent, token, __UNDEF__) File C:\Users\Mark\PythonIssues\cgitbbug.py, line 16, in __getattr__ if self._mad=='getattr1': raise ValueError('getattr1 madness') ValueError: getattr1 madness Thus the madness has been fixed and this can be closed as out of date. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1047397 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11001] Various obvious errors in cookies documentation
Mark Lawrence added the comment: Given the comments in msg126979 do we formally review this, close as won't fix or what? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21247] test_asyncio: test_subprocess_send_signal hangs on Fedora builders
Orion Poplawski added the comment: I'm really sorry, I thought I had done the test build properly, but a second attempt has resulted in the same hang: http://koji.fedoraproject.org/koji/taskinfo?taskID=7165208 So I don't think it does the trick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21247 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22008] Symtable's syntax warning should contain the word because
Changes by Berker Peksag berker.pek...@gmail.com: -- assignee: docs@python - components: +Library (Lib) -Documentation nosy: -docs@python stage: needs patch - patch review type: enhancement - behavior versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22008] Symtable's syntax warning should contain the word because
Changes by Benjamin Peterson benja...@python.org: -- versions: -Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22008] Symtable's syntax warning should contain the word because
Roundup Robot added the comment: New changeset ef009b76bca3 by Benjamin Peterson in branch '2.7': add missing 'because' (closes #22008) http://hg.python.org/cpython/rev/ef009b76bca3 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7676] IDLE shell shouldn't use TABs
Terry J. Reedy added the comment: Raymond, I cannot program 'fix it'. I need an exact spec. I suspect that any change will upset someone. Which of the four alternative proposals would you consider to be an improvement? One of the problems is that what might look good on screen with colors, including shaded background, might not work as well when cut. We may have to try to separate the two. -- assignee: kbk - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5876] __repr__ returning unicode doesn't work when called implicitly
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: fixed - wont fix stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22009] pdb.set_trace() crashes when binary data is input via stdin
New submission from Silverback Networks: sample.py: import sys, pdb infile = sys.stdin.buffer pdb.set_trace() command line: python -m pdb sample.py binary.exe output: c:\users\me\dropbox\sample.py(1)module() - import sys, pdb (Pdb) Traceback (most recent call last): File C:\dev\Python\x86\lib\pdb.py, line 1661, in main pdb._runscript(mainpyfile) File C:\dev\Python\x86\lib\pdb.py, line 1542, in _runscript self.run(statement) File C:\dev\Python\x86\lib\bdb.py, line 431, in run exec(cmd, globals, locals) File string, line 1, in module File c:\users\me\dropbox\test.py, line 1, in module import sys, pdb File c:\users\me\dropbox\test.py, line 1, in module import sys, pdb File C:\dev\Python\x86\lib\bdb.py, line 48, in trace_dispatch return self.dispatch_line(frame) File C:\dev\Python\x86\lib\bdb.py, line 66, in dispatch_line self.user_line(frame) File C:\dev\Python\x86\lib\pdb.py, line 259, in user_line self.interaction(frame, None) File C:\dev\Python\x86\lib\pdb.py, line 346, in interaction self._cmdloop() File C:\dev\Python\x86\lib\pdb.py, line 319, in _cmdloop self.cmdloop() File C:\dev\Python\x86\lib\cmd.py, line 126, in cmdloop line = input(self.prompt) File C:\dev\Python\x86\lib\encodings\cp1252.py, line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 72: character maps to undefined Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program c:\dev\python\x86\lib\encodings\cp1252.py(23)decode() - return codecs.charmap_decode(input,self.errors,decoding_table)[0] (Pdb) Traceback (most recent call last): File C:\dev\Python\x86\lib\pdb.py, line 1661, in main pdb._runscript(mainpyfile) File C:\dev\Python\x86\lib\pdb.py, line 1542, in _runscript self.run(statement) File C:\dev\Python\x86\lib\bdb.py, line 431, in run exec(cmd, globals, locals) File string, line 1, in module File c:\users\me\dropbox\test.py, line 1, in module import sys, pdb File c:\users\me\dropbox\test.py, line 1, in module import sys, pdb File C:\dev\Python\x86\lib\bdb.py, line 48, in trace_dispatch return self.dispatch_line(frame) File C:\dev\Python\x86\lib\bdb.py, line 66, in dispatch_line self.user_line(frame) File C:\dev\Python\x86\lib\pdb.py, line 259, in user_line self.interaction(frame, None) File C:\dev\Python\x86\lib\pdb.py, line 346, in interaction self._cmdloop() File C:\dev\Python\x86\lib\pdb.py, line 319, in _cmdloop self.cmdloop() File C:\dev\Python\x86\lib\cmd.py, line 126, in cmdloop line = input(self.prompt) File C:\dev\Python\x86\lib\encodings\cp1252.py, line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 72: character maps to undefined During handling of the above exception, another exception occurred: Traceback (most recent call last): File C:\dev\Python\x86\lib\runpy.py, line 171, in _run_module_as_main __main__, mod_spec) File C:\dev\Python\x86\lib\runpy.py, line 86, in _run_code exec(code, run_globals) File C:\dev\Python\x86\lib\pdb.py, line 1685, in module pdb.main() File C:\dev\Python\x86\lib\pdb.py, line 1677, in main pdb.interaction(None, t) File C:\dev\Python\x86\lib\pdb.py, line 346, in interaction self._cmdloop() File C:\dev\Python\x86\lib\pdb.py, line 319, in _cmdloop self.cmdloop() File C:\dev\Python\x86\lib\cmd.py, line 126, in cmdloop line = input(self.prompt) File C:\dev\Python\x86\lib\encodings\cp1252.py, line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 57: character maps to undefined python version: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. -- components: Windows messages: 223453 nosy: silverbacknet priority: normal severity: normal status: open title: pdb.set_trace() crashes when binary data is input via stdin type: crash versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22009 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22010] Idle: better management of Shell window output
New submission from Terry J. Reedy: Some of these ideas are in other issues, but possibly as side-thoughts. Any issues that directly address one of them can be added as dependency. The appropriate place for menu entries would be the Shell menu, which currently has only 2, 1 of which I have never used. I don't necessarily think everything needs a key shortcut. There are already too many for me to remember. 1. Clear/restart shell. The same as restart, but also clear after. If the shell is burdened with unwanted lines of text, let someone start over without quitting and restarting. 2. Move last output to output window. Long help output, as for classes, would be a prime example use. I am sure this idea has been mentioned, at least as a side note. 3. Delete last output. In the editor and while editing a statement, Undo undoes the effect of one or more of the last keypresses. I propose that in the shell, after enter submits a statement for processing, prints the output, and a new prompt, that Undo ^Z erase the new prompt, erase the output, and put the cursor at the end of the previously entered statement so it can be edited. (Idea prompted by Rick Johnson.) One use case for this is to correct syntax and logic errors, especially when one is using Idle to prepare examples to copy and paste elsewhere. I do this constantly and manually filtering out bad input and output is a major nuisance. Another use case to simply delete unwanted output, especially if long. In the latter case, one would not want the new prompt deleted, but ^Z can only act one way, and I don't think we need two new commands. 4. We need one or more custom cut methods, as proposed in #11838 make interactive code savable as a runnable script. Such issues will depend on how we replace tabs in #7676. -- assignee: terry.reedy messages: 223454 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: Idle: better management of Shell window output type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22010 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22009] pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin
Silverback Networks added the comment: Just verified the problem on 3.4.1 as well. -- title: pdb.set_trace() crashes when binary data is input via stdin - pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22009 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22001] containers same does not always mean __eq__.
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17528] Implement dumps/loads for lru_cache
Raymond Hettinger added the comment: Have you seen something like this done for other implementations of LRU caches? To me, the idea seems to be at odds with the idea of retaining only the last n calls in memory -- suggesting that a refreshing an outdated entry is cheaper than retiring it to disk and retrieving it later (as you might do with a shelf or database). -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17528 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20585] urllib2 unrelease KQUEUE on Mac OSX 10.9+
Bob Carroll added the comment: I'm not forking, but this is possibly related my issue. I have a twisted application that periodically crashes when attempting to make an HTTP request. Based on the stack trace showing _scproxy, I tried the work around and it seems to have helped. The crash log is attached. -- nosy: +rcarz Added file: http://bugs.python.org/file35993/python_2014-07-18-171109.crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20585 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11001] Various obvious errors in cookies documentation
R. David Murray added the comment: My suggestion was that the help text from the doc strings be used to update the ReST documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6931] dreadful performance in difflib: ndiff and HtmlDiff
Tim Peters added the comment: I'm sympathetic, but I don't see a good solution here without using incompatible code. ndiff was built to generate the highest quality diff possible, for text written and edited by humans, where quality is measured by human judgment (not an abstract mathematical measure). That was its goal, and I think it does well at that. It wasn't intended to unwind mechanical changes made to machine-generated gibberish (to human eyes) text. Not that such a thing has no value, but it was never ndiff's _intent_ to handle such stuff. So the best solution here would be to use a different differencing engine. As already noted, unified_diff skips any attempt to find merely similar lines, and that's the great source of expense here: ndiff takes time essentially cubic in the number of lines, given inputs with a great many similar (but no identical) lines. It was noted that kdiff3 does fine on these inputs very quickly, but, from the kdiff3 FAQ: If similar lines appear next to each other, this actually is coincidence but this fortunately is often the case. It just so happens that in the inputs attached to this report, the first lines in each file pair are similar, and the second lines likewise, etc etc. This allows kdiff3 to do a wonderful job without any time at all spent _trying_ to find similar lines. But there's nothing coincidental here in what ndiff does: it finds _the_ most similar pair, and that's a quadratic-time operation (which turns into cubic time when repeated over over). I didn't write any of the HTML-generating functions, nor have I ever used them, so I'm not in a good position to judge what they should do. If similar lines aren't interesting in this context, then switching to unified_diff would save gobs of time. If similar lines are interesting, then new code would be required to get at _some_ notion of that less expensively than ndiff does it (e.g., the similarity scores for all pairs could be computed once and saved away, reducing worst-case cubic time to worst-case quadratic time, but at the cost of needing additional memory quadratic in the number of lines). I'm -1 on 11740.patch: there is no reason, in general, to give up looking for the most similar pair - and give up on intraline differencing - simply because the total number of lines in the two blocks exceeds 99. It would reduce diff quality for all uses of the Differ class, not just for the specific uses of Differ made indirectly (via ndiff) by the make_table function - and it would be backward-incompatible anyway. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22009] pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin
Silverback Networks added the comment: OK, now that I've screwed my thinking cap back on, it's obvious that pdb in the example is pulling from stdin. However, that isn't be the case in my original problem, so modify the example to: sample.py: import sys, pdb infile = sys.stdin.buffer.read() pdb.set_trace() Same error despite nothing being left in stdin's buffer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22009 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com