[issue23756] Tighten definition of bytes-like objects
Serhiy Storchaka added the comment: Totally agree. Current definition is too wide. Actually in different places the term bytes-like object can imply different requirements. * Supports buffer protocol. list isn't. * Contiguous. memoryview()[::2] isn't. * len() returns bytes size. array('I') isn't. * Supported indexing (and slicing) of bytes. array('I') isn't. * Indexing returns integers in the range 0-255. array('b') isn't. * Supports concatenation. memoryview isn't. * Supports common bytes and bytearray methods, such as find() or lower(). * A subclass of (bytes, bytearray). * A subclass of bytes. * A bytes itself. -- nosy: +r.david.murray, serhiy.storchaka versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22623] Port Python to 3DS: micro kernel, homebrew, newlib (Missing guards for some POSIX functions)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22623 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23759] urllib.parse: make coap:// known
New submission from chrysn: The CoAP protocol (RFC 7252) registers the new URI schemes coap and coaps. They adhere to the generic RFC3986 rules, and use netloc and relative URIs. Therefore, please add the 'coap' and 'coaps' schemes to the uses_relative and uses_netloc lists in urllib.parse. I'm not sure about uses_params; the CoAP protocol in itself does not do anything special with the ';' character in URIs, so probably it should not be included there. (But then again, neither does RFC2616 mention ; in the context of addresses, and it is included in uses_params). -- components: Library (Lib) messages: 239106 nosy: chrysn priority: normal severity: normal status: open title: urllib.parse: make coap:// known type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23571] Raise SystemError if a function returns a result with an exception set
Roundup Robot added the comment: New changeset efb2c9ac2f88 by Victor Stinner in branch '3.4': Issue #23571: Enhance Py_FatalError() https://hg.python.org/cpython/rev/efb2c9ac2f88 New changeset 6303795f035a by Victor Stinner in branch 'default': (Merge 3.4) Issue #23571: Enhance Py_FatalError() https://hg.python.org/cpython/rev/6303795f035a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python
Roundup Robot added the comment: New changeset ad5521dd7b80 by Victor Stinner in branch 'default': Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c https://hg.python.org/cpython/rev/ad5521dd7b80 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23753 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: module attributes and docstrings
On Tue, 24 Mar 2015 07:55 pm, Mario Figueiredo wrote: Reading PEP 257 and 258 I got the impression that I could document module attributes and these would be available in the __doc__ attribute of the object. PEP 258 is rejected, so you can't take that as definitive. PEP 257 has this definition very early in the document: A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition. Nothing there about documenting arbitrary attributes. The PEP does go on to say: String literals occurring elsewhere in Python code may also act as documentation. They are not recognized by the Python bytecode compiler and are not accessible as runtime object attributes (i.e. not assigned to __doc__ ), but two types of extra docstrings may be extracted by software tools: ... so if I write this: class K: x = something() Documentation for x then the string *may* be extracted by certain third-party tools, but it will not be recognised as a docstring by the Python interpreter and will not be available as the __doc__ attribute of K.x. So things like the one below are something I got used to do, but that don't work after all, as I learned today: value_factory = lambda _, row: row[0] Row factory. To be used with single-column queries. There are other things I could possibly do, like turning that lambda into a function, or document attributes in the module docstring. They are fair responses. For the record, the lambda is already a function. lambda is just an alternative syntax for creating functions, not a different kind of object. But did I read docstring extraction rules in PEP 258 wrong by assuming that the above example would make into the __doc__ attribute? And if so, short of documenting attributes in the module docstring, is there another way I can document individual attributes? In a word, no. Even if there was support from the compiler to extract the docstring, where would it be stored? Consider: spam = None Spammy goodness. eggs = None Scrambled, not fried. There's only one None object, and even if it could take a docstring (and it can't), which docstring would it get? Presumably the second, which would make help(spam) confusing, but when we say eggs = 23 the docstring would disappear too. Python's data model is not compatible with the idea of associating docstrings with arbitrary attributes or variables. The docstring has to be associated with an object, and only certain objects at that. That applies to documentation which is introspectable at runtime. But of course you can do anything you like by parsing the source code! It may be that the docutils library will parse the source code and extract docstrings, associating them to their variable or attribute. If not, perhaps some other third-party library, or you can write your own. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: fibonacci series what Iam is missing ?
On Tue, Mar 24, 2015 at 5:41 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Python does not automatically print all return statements. If you want it to print the intermediate values produced, you will need to add print before each return: py def fib(n): ... if n == 0: ... result = 0 ... elif n == 1: ... result = 1 ... else: ... result = fib(n-1) + fib(n-2) ... print result, # trailing comma means no newline ... return result ... py fib(3) 1 0 1 1 2 2 py fib(5) 1 0 1 1 2 1 0 1 3 1 0 1 1 2 5 5 If you want to print a list of Fibonnaci values, you need to call the function in a loop. Removing the print result line again, you can do this: py for i in range(6): ... print fib(i), ... 0 1 1 2 3 5 Thanks you Steven and others ( Dave, Chris and Terry ) , for having such good discussion on this topic and benefiting me in more than one way's. Thank you -- https://mail.python.org/mailman/listinfo/python-list
[issue23647] imaplib.py MAXLINE value is too low for gmail
R. David Murray added the comment: Yes, I agree that that is a concern. What should probably happen is that the maximum line length be a settable parameter with a reasonable default. It is too bad that (unlike say the SMTP protocol) the imap protocol does not address this directly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: To Change A Pdf Ebook To Kindle
On Tue, 24 Mar 2015 00:05:46 -0700, jeffreyciross wrote: PDF Converter for Mac is a fantastic and easyto-use instrument for converting PDF documents on Macos. Macintosh PDF Converter can pdf to excel converter to Word, Shine, PowerPoint, EPUB, Text format for Mac. With PDF Converter Mac, the PDF documents, select certain websites of the PDF files etc that are huge can be also previewed by Mac users. https://sourceforge.net/projects/pdftoexcelconverter/ Calibre does a very god job as well. -- Most people want either less corruption or more of a chance to participate in it. -- https://mail.python.org/mailman/listinfo/python-list
[issue23571] Raise SystemError if a function returns a result with an exception set
Roundup Robot added the comment: New changeset 850b9dcd0534 by Victor Stinner in branch 'default': Issue #23571: In debug mode, _Py_CheckFunctionResult() now calls https://hg.python.org/cpython/rev/850b9dcd0534 New changeset da252f12352a by Victor Stinner in branch '3.4': Issue #23571: Py_FatalError() now tries to flush sys.stdout and sys.stderr https://hg.python.org/cpython/rev/da252f12352a New changeset c9bcf669d807 by Victor Stinner in branch 'default': (Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and https://hg.python.org/cpython/rev/c9bcf669d807 New changeset 57550e1f57d9 by Victor Stinner in branch 'default': Issue #23571: Update test_capi https://hg.python.org/cpython/rev/57550e1f57d9 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data
Martin Panter added the comment: I left a few comments on Reitveld, mainly about the documentation and API design. However I understand Rolf specifically wanted chunked encoding to work with the existing urlopen() framework, at least after constructing a separate opener object. I think that should be practical with the existing HTTPConnection implementation. Here is some pseudocode of how I might write a urlopen() handler class, and an encoder class that should be usable for both clients and servers: class ChunkedHandler(...): def http_request(...): # Like AbstractHTTPHandler, but don’t force Content-Length def default_open(...): # Like AbstractHTTPHandler, but instead of calling h.request(): encoder = ChunkedEncoder(h.send) h.putrequest(req.get_method(), req.selector) for item in headers: h.putheader(*item) h.putheader(Transfer-Encoding, encoder.encoding) h.endheaders() shutil.copyfileobj(req.data, writer) encoder.close() class ChunkedEncoder(io.BufferedIOBase): # Hook output() up to either http.client.HTTPConnection.send() # or http.server.BaseHTTPRequestHandler.wfile.write() encoding = chunked def write(self, b): self.output({:X}\r\n.format(len(b)).encode(ascii)) self.output(b) self.output(b\r\n) def close(self): self.output(b0\r\n\r\n) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23760] Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23760 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Monkey patch an entire file in a python package
Le mardi 24 mars 2015 13:11:33 UTC+1, Chris Angelico a écrit : On Tue, Mar 24, 2015 at 10:50 PM, enjoy...@gmail.com wrote: I am trying to use multiprocessing with freeze. It appears there is some bug when using multiprocessing on freezed python code on windows platforms. There is this patch which made its way to python 3.2, and works in 2.7: http://bugs.python.org/file20603/issue10845_mitigation.diff I would like to monkey patch it. Do you have to monkey-patch at run-time? It might be better to simply patch your Python installation once, and then have the change deployed globally. Given that it was applied to 3.2, I doubt it's going to break much, so you can probably afford to just edit the file and have done with it. Alternatively, you may be able to put your own forking.py earlier in PYTHONPATH, and thus shadow the stdlib module. That might require you to shadow all of multiprocessing, though. ChrisA Unfortunately, I would need to do it at runtime. I will look into the PYTHONPATH idea, thanks -- https://mail.python.org/mailman/listinfo/python-list
[issue23703] urljoin() with no directory segments duplicates filename
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23703 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod
R. David Murray added the comment: Oh, I'm afraid it can still be ignored :). What filing it here means is that it won't be *forgotten*, and hopefully there will eventually be someone with the time and interest to address it. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23743 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: fibonacci series what Iam is missing ?
On Tue, Mar 24, 2015 at 12:20 AM, Rustom Mody rustompm...@gmail.com wrote: On Tuesday, March 24, 2015 at 10:51:11 AM UTC+5:30, Ian wrote: Iteration in log space. On my desktop, this calculates fib(1000) in about 9 us, fib(10) in about 5 ms, and fib(1000) in about 7 seconds. def fib(n): assert n = 0 if n == 0: return 0 a = b = x = 1 c = y = 0 n -= 1 while True: n, r = divmod(n, 2) if r == 1: x, y = x*a + y*b, x*b + y*c if n == 0: return x b, c = a*b + b*c, b*b + c*c a = b + c This is rather arcane! What are the identities used above? It's essentially the same matrix recurrence that Gregory Ewing's solution uses, but without using numpy (which doesn't support arbitrary precision AFAIK) and with a couple of optimizations. The Fibonacci recurrence can be expressed using linear algebra as: F_1 = [ 1 0 ] T = [ 1 1 ] [ 1 0 ] F_(n+1) = F_n * T I.e., given that F_n is a vector containing fib(n) and fib(n-1), multiplying by the transition matrix T results in a new vector containing fib(n+1) and fib(n). Therefore: F_n = F_1 * T ** (n-1) The code above evaluates this expression by multiplying F_1 by powers of two of T until n-1 is reached. x and y are the two elements of the result vector, which at the end of the loop are fib(n) and fib(n-1). a, b, and c are the three elements of the (symmetric) transition matrix T ** p, where p is the current power of two. The last two lines of the loop updating a, b, and c could equivalently be written as: a, b, c = a*a + b*b, a*b + b*c, b*b + c*c A little bit of algebra shows that if a = b + c before the assignment, the equality is maintained after the assignment (in fact the elements of T ** n are fib(n+1), fib(n), and fib(n-1)), so the two multiplications needed to update a can be optimized away in favor of a single addition. -- https://mail.python.org/mailman/listinfo/python-list
[issue23747] platform module exposes win32_ver function on posix systems
R. David Murray added the comment: It is a deliberate choice because the functions accept default values to be returned if the actual values cannot be determined, and because it is easier therefore to write cross-platform scripts if the functions do *not* raise an error when called on the wrong platform. There are other functions in the platform module to use to determine which platform you are on. Agreed that the fact that they work is currently documented only by implication for those familiar with our doc style (that is, there are no avaiability tags, implying they are available on all platforms). This should be corrected, probably in an introductory paragraph (which will be overlooked by most people reading the docs :) -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23747 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23747] platform module exposes win32_ver function on posix systems
Changes by R. David Murray rdmur...@bitdance.com: -- Removed message: http://bugs.python.org/msg239124 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23747 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23747] platform module exposes win32_ver function on posix systems
R. David Murray added the comment: It is a deliberate choice because (I'm guessing) the designer thought it would make it easier to write cross platform scripts. In any case, as Haypo said, it is what it is (and it *is* consistent with itself). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23747 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18828] urljoin behaves differently with custom and standard schemas
Berker Peksag added the comment: Yet another option, similar to my “any_scheme=True” flag, might be to change from the “uses_relative” white-list to a “not_relative” black-list of URL schemes, [...] I think this looks like a good solution. -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18828 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: To Change A Pdf Ebook To Kindle
On 03/24/2015 01:05 AM, jeffreyciross wrote: probable spam I'm wondering whether this is appropriate use of sourceforge. Hosting a proprietary program on SF's web site for free, doesn't seem honest to me. Should I report this to SF as inappropriate content? -- https://mail.python.org/mailman/listinfo/python-list
[issue23761] test_socket fails on Mac OSX 10.9.5
New submission from Carol Willing: On Mac OSX 10.9.5, test_socket fails when regression tests are run. Specifically, the following fails: FAIL: test_host_resolution (test.test_socket.GeneralModuleTests) -- Traceback (most recent call last): File /Users/carol/Development/cpython/Lib/test/test_socket.py, line 788, in test_host_resolution self.assertRaises(OSError, socket.gethostbyname, addr) AssertionError: OSError not raised by gethostbyname The output from ./python.exe -m test -v test_socket output-test-socket.txt is attached. -- components: Tests files: output-test-socket.txt messages: 239120 nosy: willingc priority: normal severity: normal status: open title: test_socket fails on Mac OSX 10.9.5 type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file38665/output-test-socket.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23761 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15945] memoryview + bytes fails
Changes by Jean-Paul Calderone jean-p...@clusterhq.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23759] urllib.parse: make coap:// known
Martin Panter added the comment: I would like to see these hard-coded white lists of URL schemes eliminated as much as possible. Here’s some related issues: * Issue 16134: rtmp, rtmpe, rtmps, rtmpt * Issue 18828: redis, also proposing to urljoin() arbitrary schemes * Issue 15009: yelp * Issue 22852: Proposing that urlunsplit() and urlunparse() restore empty netloc, query, and fragment components properly for arbitary schemes * Issue 23636: scgi -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23571] Raise SystemError if a function returns a result with an exception set
Tim Graham added the comment: That last commit fixed compatibility with Django. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)
Bob added the comment: I was looking into http://lists.cs.uiuc.edu/pipermail/llvmbugs/2012-September/025152.html 'Use of libclang python bindings on Windows 7 64 bit fails with memory access violation' It appears to be 90% fixed with this patch, but I believe there is still a problem when structs are passed back though a callback function. Could this be the correct addition to fix it? in ffi_prep_incoming_args_SYSV() _ctypes\libffi_msvc\ffi.c(line 377) /* because we're little endian, this is what it turns into. */ +#if _WIN64 + if ((*p_arg)-type == FFI_TYPE_STRUCT z 8) + { + z = 8; + *p_argv = *(void**)argp; + } + else + { + *p_argv = (void*)argp; + } +#else *p_argv = (void*)argp; +#endif -- nosy: +Bob ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20160 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23512] The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html
Ezio Melotti added the comment: Fixed, thanks for the patch! -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23512 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python
Serhiy Storchaka added the comment: -#if defined(HAVE_STAT) !defined(MS_WINDOWS) This doesn't look correct. An equivalent replacement is -#if defined(HAVE_STAT) !defined(MS_WINDOWS) +#if !defined(MS_WINDOWS) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23753 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python
Roundup Robot added the comment: New changeset a84eae63b4cd by Victor Stinner in branch 'default': Issue #23753: Python doesn't support anymore platforms without stat() or https://hg.python.org/cpython/rev/a84eae63b4cd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23753 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python
STINNER Victor added the comment: Antoine and Charles-François are in favor of removing these #ifdef. Serhiy wrote: See issue22623 for moving in opposite direction. Not exactly, Link Mauve wrote On those two platforms, fstat() is correctly defined and works fine, so it shouldn’t be a problem to drop its #ifdef. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23753 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: module attributes and docstrings
On Tue, Mar 24, 2015 at 7:55 PM, Mario Figueiredo mar...@gmail.com wrote: So things like the one below are something I got used to do, but that don't work after all, as I learned today: value_factory = lambda _, row: row[0] Row factory. To be used with single-column queries. There are other things I could possibly do, like turning that lambda into a function, or document attributes in the module docstring. They are fair responses. They certainly are. Any time you assign a lambda function directly to a simple name, it's probably worth replacing with a def function: def value_factory(_, row): Row factory. To be used with single-column queries. return row[0] (Though I'd be inclined to give the first parameter a proper name here) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue23760] Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit
New submission from Victor Korolkevich: From http://stackoverflow.com/questions/26321333/tkinter-in-python-3-4-on-windows-dont-post-internal-clipboard-data-to-the-windo I use the following code to place result in clipboard. from tkinter import Tk r = Tk() r.withdraw() r.clipboard_clear() r.clipboard_append(Result) It works fine on Python version 3.3.5 and earlier. But in Python 3.4 it was receive empty clipboard. If I prevent the script from the immediate exit, adding input() after clipboard_append(), I see that clipboard contains the correct Result. If I run script, switch to any other window and press Ctrl+V, I receive Result and Result remains in clipboard after script exits. I think in tcl/tk 8.6 clipboard_clear() affect system clipboard, but clipboard_append affect only internal tcl/tk clipboard that transfered to system clipboard only by OS request. Looks like it was done in Linux, that don't have system clipboard. -- components: Tkinter messages: 239107 nosy: Victor Korolkevich priority: normal severity: normal status: open title: Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23760 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23571] Raise SystemError if a function returns a result with an exception set
Roundup Robot added the comment: New changeset 2e14ca478a57 by Victor Stinner in branch 'default': Issue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the https://hg.python.org/cpython/rev/2e14ca478a57 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Monkey patch an entire file in a python package
On Tue, Mar 24, 2015 at 10:50 PM, enjoy...@gmail.com wrote: I am trying to use multiprocessing with freeze. It appears there is some bug when using multiprocessing on freezed python code on windows platforms. There is this patch which made its way to python 3.2, and works in 2.7: http://bugs.python.org/file20603/issue10845_mitigation.diff I would like to monkey patch it. Do you have to monkey-patch at run-time? It might be better to simply patch your Python installation once, and then have the change deployed globally. Given that it was applied to 3.2, I doubt it's going to break much, so you can probably afford to just edit the file and have done with it. Alternatively, you may be able to put your own forking.py earlier in PYTHONPATH, and thus shadow the stdlib module. That might require you to shadow all of multiprocessing, though. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue23758] Improve documenation about num_params in sqlite3 create_function and create_aggregate
New submission from Cédric Krier: num_params must have the value -1 for any number of arguments see https://www.sqlite.org/c3ref/create_function.html -- assignee: docs@python components: Documentation files: sqlite3_doc.patch keywords: patch messages: 239104 nosy: ced, docs@python priority: normal severity: normal status: open title: Improve documenation about num_params in sqlite3 create_function and create_aggregate type: enhancement Added file: http://bugs.python.org/file38664/sqlite3_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Ezio Melotti added the comment: I tweaked the wording a bit, added a link to the section about setUp/tearDown, and applied it on all the 3 branches. Thanks for the patch Florian! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python
STINNER Victor added the comment: -#if defined(HAVE_STAT) !defined(MS_WINDOWS) This doesn't look correct. An equivalent replacement is Oh, I missed the !. Only _Py_wstat() uses this test. Windows has _wstat(), so _Py_wstat() could use it. I added deliberately !defined(MS_WINDOWS) because _Py_wstat() is only used in Modules/getpath.c and this file is not compiled on Windows. Instead of modifying _Py_wstat(), I moved it back to Modules/getpath.c. There is no need to overengineer this function only called 3 times in getpath.c. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23753 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23512] The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html
Roundup Robot added the comment: New changeset 971d299d2cf3 by Ezio Melotti in branch '2.7': #23512: list non-essential built-in functions after the table. Patch by Carlo Beccarini. https://hg.python.org/cpython/rev/971d299d2cf3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23512 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Monkey patch an entire file in a python package
This question is about python 2.7 on Windows 7 I am trying to use multiprocessing with freeze. It appears there is some bug when using multiprocessing on freezed python code on windows platforms. There is this patch which made its way to python 3.2, and works in 2.7: http://bugs.python.org/file20603/issue10845_mitigation.diff I would like to monkey patch it. Problem is, this patch is for forking.py, used by multiprocessing.Pools Multiprocessing is using forking.py to launch processes. I would like to monkey patch this way : import multiprocessing import multiprocessing_fixed multiprocessing_fixed: import multiprocessing.forking as mpf def prepare(data): [include fixed code for this method] mpf.prepare = prepare_pyz It's not working because forking.py is launched like a python module. How to solve this problem ? Thanks -- https://mail.python.org/mailman/listinfo/python-list
[issue21511] Thinko in Lib/quopri.py, decoding b== to b=
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Roundup Robot added the comment: New changeset 4a2a5fddbab3 by Ezio Melotti in branch '2.7': #11468: improve unittest basic example. Initial patch by Florian Preinstorfer. https://hg.python.org/cpython/rev/4a2a5fddbab3 New changeset 010e33b37feb by Ezio Melotti in branch '3.4': #11468: improve unittest basic example. Initial patch by Florian Preinstorfer. https://hg.python.org/cpython/rev/010e33b37feb New changeset d6791e4026f1 by Ezio Melotti in branch 'default': #11468: merge with 3.4. https://hg.python.org/cpython/rev/d6791e4026f1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23760] Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit
Changes by Victor Korolkevich victor.korolkev...@gmail.com: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23760 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Trac 1.1.4 Released
Trac 1.1.4 Released === Trac 1.1.4 continues the 1.1.x development line leading to 1.2 with some new features and a few not-so-disruptive changes. Note that the 1.1.x releases are stable and tested snapshots of the trunk. They can be seen as sub-milestones on the road towards Trac 1.2. As opposed to maintenance releases, *we offer no guarantees on feature and API compatibility from one 1.1.x release to the next*. However, by following 1.1.x you get a chance to use new features earlier, and therefore be able to contribute feedback when things are still in flux. It's also less risky than just getting the latest trunk, as we won't cut a 1.1.x release in the middle of a series of changes (though we had and still intend to have a good record of keeping things always working on trunk). The intended audience are therefore enthusiast Trac users and Trac plugin developers. These packages should *not* be integrated in distributions, for example. Here are a few highlights: - Performance improvements with MySQL/MariaDB (#3676). - Click on //Permissions// Admin page table row toggles all checkboxes in the row (#11417). - Configuration sections are written to trac.ini when enabling a component through TracAdmin or the web administration module (#11437). - Subscription rules can be reordered by drag and drop (#11941). Besides the few issues listed here, the fixes made for 1.0.4 and 1.0.5 are also included. You can find all the detailed release notes at: - http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.1#DevelopmentReleases - http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.0#MaintenanceReleases Download URLs: http://download.edgewall.org/trac/Trac-1.1.4.tar.gz http://download.edgewall.org/trac/Trac-1.1.4.win32.exe http://download.edgewall.org/trac/Trac-1.1.4.win-amd64.exe http://download.edgewall.org/trac/Trac-1.1.4.zip MD5 sums: 89a6fcdad8ad251b43db5c4517b8603b Trac-1.1.4.zip bc35487b49b7e017d6c89ad9b5e23ba9 Trac-1.1.4.tar.gz 7d628ff5b372319ed104987163ff9797 Trac-1.1.4.win32.exe 2b11461fb5c8262122e902eb2fe14872 Trac-1.1.4.win-amd64.exe SHA1 sums: 34d6b72421918ea7f87896c53c6f198d3ccbbd4f Trac-1.1.4.zip c7c2e19767fd22e3b9000f3f27299bd799043012 Trac-1.1.4.tar.gz b53c562edcc328a371e928c4d0d6f8d597657b7b Trac-1.1.4.win32.exe a1884a9b5cff506ddeee535b44139f2a94a385e4 Trac-1.1.4.win-amd64.exe Enjoy! - The Trac Team http://trac.edgewall.org/ -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Trac 1.0.5 Released
Trac 1.0.5 Released === Trac 1.0.5, the fifth maintenance release for the current stable branch, is now available! You will find this release at the usual places: http://trac.edgewall.org/wiki/TracDownload#LatestStableRelease https://pypi.python.org/pypi/Trac/1.0.5 Trac 1.0.5 provides several fixes. The following are some highlights: - Images are not rendered in the timeline (#10751). - Git tags are shown in the browser view (#11964). - Added support for `journal_mode` and `synchronous` pragmas in `sqlite:` database connection string (#11967). You can find the detailed release notes for 1.0.5 on the following pages: http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.0#MaintenanceReleases Now to the packages themselves: URLs: http://download.edgewall.org/trac/Trac-1.0.5.tar.gz http://download.edgewall.org/trac/Trac-1.0.5.win32.exe http://download.edgewall.org/trac/Trac-1.0.5.win-amd64.exe http://download.edgewall.org/trac/Trac-1.0.5.zip MD5 sums: 17449de4359f71f3c40b894b70ea52d0 Trac-1.0.5.zip 1146c849f926f9eeb8448569159b29e0 Trac-1.0.5.tar.gz 987c2c891f5d13ad5eac006cc01290c1 Trac-1.0.5.win32.exe d61f149b4b6733e2776b93421afa6b9d Trac-1.0.5.win-amd64.exe SHA1 sums: 87274c88e901ab809fd9d363175007a6648c7ef9 Trac-1.0.5.zip 83d27bbdd62691a5f8e5ca83c3e28187004c8ebe Trac-1.0.5.tar.gz 9b1fa285e5458927df86cf1d9de18e33b5fdf55e Trac-1.0.5.win32.exe 8dcc716ce756fea878e2716c0275d32477107ee3 Trac-1.0.5.win-amd64.exe Acknowledgements Many thanks to the growing number of people who have, and continue to, support the project. Also our thanks to all people providing feedback and bug reports that helps us make Trac better, easier to use and more effective. Without your invaluable help, Trac would not evolve. Thank you all. Finally, we offer hope that Trac will prove itself useful to like- minded programmers around the world, and that this release will be an improvement over the last version. Please let us know.:-) /The Trac Team http://trac.edgewall.org/ -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[issue23761] test_socket fails on Mac OSX 10.9.5
Carol Willing added the comment: Thanks Ned and R. David. A few questions... 1. I've rerun the tests using: One failure: 70 tests OK. 1 test failed: test_socket 1 test altered the execution environment: test_warnings 21 tests skipped: test_curses test_dbm_gnu test_devpoll test_epoll test_gdb test_lzma test_msilib test_ossaudiodev test_smtpnet test_socketserver test_spwd test_startfile test_timeout test_tk test_ttk_guionly test_urllib2net test_urllibnet test_winreg test_winsound test_xmlrpc_net test_zipfile64 I noticed that many tests are skipped since Network is not enabled. Although test_socket fails and is not skipped, it seems plausible that the failure in test_socket should also be skipped when Network is disabled. Other test files that are skipped have support.requires('network') in the beginning of the file. Should test_socket.py have this as well? 2. I am rerunning the tests with the following command: ./python.exe -m test -uall Tests dependent on 'Network' are now run. Three failures now: 3 tests failed: test_curses test_nntplib test_socket 1 test altered the execution environment: test_warnings 14 tests skipped: test_dbm_gnu test_devpoll test_epoll test_gdb test_lzma test_msilib test_ossaudiodev test_spwd test_startfile test_tk test_ttk_guionly test_winreg test_winsound test_zipfile64 Detail: nntplib.NNTPTemporaryError: 400 Permission denied: Closed service. 3. Is there a doc that outlines how to enable all dependencies needed to have tests execute and not be skipped? Which is the preferred command for running tests for Mac OSX? I'm willing to keep chasing this down but need a little direction. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23761 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- priority: normal - low versions: -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23712 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File
Nikolaus Rath added the comment: As discussed in Rietveld, here's an attempt to reuse more DecompressReader for GzipFile. There is still an unexplained test failure (test_read_truncated). -- Added file: http://bugs.python.org/file38674/LZMAFile-etc.v7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23529 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)
Mark Lawrence added the comment: This https://mail.python.org/pipermail/python-dev/2014-December/137631.html seems relevant. Follow up here https://mail.python.org/pipermail/python-dev/2015-March/138731.html -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20160 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23573] Avoid redundant allocations in str.find and like
Serhiy Storchaka added the comment: Looks as this patch makes buildbots crash. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23573 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23769] valgrind reports leaks for test_zipimport
Changes by Robert Kuska rku...@gmail.com: Added file: http://bugs.python.org/file38673/report ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23769 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23769] valgrind reports leaks for test_zipimport
New submission from Robert Kuska: Leaks happen only when both testDoctestFile and testDoctestSuite are run. Run with Python 3.4.2 and 3.4.1 with same result. I have extracted those two tests into `leak.py` (attached). $ valgrind --suppressions=/../cpython/Misc/valgrind-python.supp python3 leak.py ==17896== Memcheck, a memory error detector ==17896== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==17896== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==17896== Command: python3 leak.py ==17896== ==17896== ==17896== HEAP SUMMARY: ==17896== in use at exit: 1,599,328 bytes in 11,595 blocks ==17896== total heap usage: 283,757 allocs, 272,162 frees, 37,891,147 bytes allocated ==17896== ==17896== LEAK SUMMARY: ==17896==definitely lost: 30 bytes in 1 blocks ==17896==indirectly lost: 0 bytes in 0 blocks ==17896== possibly lost: 597,418 bytes in 2,319 blocks ==17896==still reachable: 1,001,880 bytes in 9,275 blocks ==17896== suppressed: 0 bytes in 0 blocks ==17896== Rerun with --leak-check=full to see details of leaked memory ==17896== ==17896== For counts of detected and suppressed errors, rerun with: -v ==17896== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Note that when I remove support.modules_cleanup(*modules_before) from leak.py valgrind reports no leaks (in original test_zipimport those are run in setUp and tearDown). Output of valgrind --suppressions=/home/rkuska/upstream/cpython/Misc/valgrind-python.supp --leak-check=yes -v python3 leak.py attached as `report`. -- components: Tests files: leak.py messages: 239193 nosy: rkuska priority: normal severity: normal status: open title: valgrind reports leaks for test_zipimport versions: Python 3.4 Added file: http://bugs.python.org/file38672/leak.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23769 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23766] json.dumps: solidus (/) should be escaped
Martin Panter added the comment: According to that RFC section, the forward solidus is allowed to be in an escape sequence, but it is also allowed unescaped: “All Unicode characters may be placed within the quotation marks, except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+ through U+001F).” . . . unescaped = %x20-21 / %x23-5B / %x5D-10 In general, escaping the forward solidus is not needed, and is easier to read. Apparently this escaping is a workaround for embedding JSON inside a HTML script element, where the sequence “/” is not allowed, and HTML itself does not allow escaping: http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2. In that case, JSON like {markup: iitalic\/i} would be escaped, but most cases still do not need escaping, such as {url: http://example.net/}. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: subprocess and stdin.write(), stdout.read()
On Tue, 24 Mar 2015 12:08:24 -0700, Tobiah wrote: But if I want to send a string to stdin, how can I do that without stdin.write()? p.communicate(string) This seems to work: Only because the amounts of data involved are small enough to avoid deadlock. If both sides write more data in one go than will fit into a pipe buffer, you will get deadlock. The parent will be blocked waiting for the child to consume the input, which doesn't happen because the child will be blocked waiting for the parent to consume its output, which doesn't happen because he parent will be blocked waiting for the child to consume the input, ... That's a textbook example of deadlock: each side waiting forever for the other side to make the first move. This is exactly why POSIX' popen() function lets you either write to stdin (mode==w) or read from stdout (mode==r) but not both. Will this always avoid the deadlock problem? No. This also works: Again, only because the amounts of data involved are small enough to avoid deadlock. Is that vulnerable to deadlock? Yes. Is there a better way to write to and read from the same process? Use threads; one for each descriptor (stdin, stdout, stderr). Non-blocking I/O is an alternative (and that's what .communicate() uses on Unix), but threads will work on all common desktop and server platforms. If you need to support platforms which lack threads, either a) have the parent first write to a file (instead of .stdin), then have the child read from the file while the parent reads .stdout and .stderr, or b) have the parent write to .stdin while the child writes its stdout/stderr to files (or a file). Once the child completes, have the parent read the file(s). Using files allows for potentially gigabytes of data to be buffered. With pipes, the amount may be as low as 512 bytes (the minimum value allowed by POSIX) and will rarely be much more (a typical value is 4096 bytes, i.e. one page on x86). -- https://mail.python.org/mailman/listinfo/python-list
[issue23766] json.dumps: solidus (/) should be escaped
R. David Murray added the comment: It sounds like that makes this not-a-bug? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)
Martin Panter added the comment: Left a question about handling of the unquoted empty field exception on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Daylight savings time question
On Wed, Mar 25, 2015 at 9:24 AM, Dan Stromberg drsali...@gmail.com wrote: Is there a way of adding 4 hours and getting a jump of 5 hours on March 8th, 2015 (due to Daylight Savings Time), without hardcoding when to spring forward and when to fall back? I'd love it if there's some library that'll do this for me. Fundamentally, this requires knowledge of timezone data. That means you have to select a political time zone, which basically means you want the Olsen database (tzdata) which primarily works with city names. I'm not sure whether US/Pacific is suitable; I usually use America/Los_Angeles for Pacific US time. But that aside, what Gary said is what I would recommend. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue23550] Add to unicodedata a function to query the Quick_Check property for a character
Hammerite added the comment: I tried to add these responses within the code review section of the site, but I am unable to do so; when I click Send Message, I am taken to a page that consists of the text 500 Server Error and no other content. Therefore I am responding to the code review comments here. Ezio: The form comes before the chr because that is the order unicodedata.normalize() takes its arguments (though it takes a string rather than a single character). To write normalize(form, str) but quick_check(chr, form) would be quite inconsistent, I think, and would invite confusion. Agreed that a brief description of what the property is useful for would be good; I will make another patch that includes this. I will delete the space after the function name. I will also eliminate the column arrangement of the test code, although I think that this will make the code much less readable. Berker: Regarding whatsnew: Since I have your invitation to do so, I will. Regarding putting the normalisation form comparison into helper functions, I will follow your suggestion, and incorporate the improvement for normalize() as well. For the error message, this is the same error message that is given by unicodedata.normalize(). I could change it, but if I do, I think I should change it for normalize() at the same time. For two of your other points I would like to observe that the way I have done things is in mimicry of existing code that relates to the unicodedata module. Elsewhere in unicodedata.c multiline strings are continued using \, so I have done the same; in makeunicodedata.py the other arrays are not static so the new one is not static either. I could make these changes regardless, but the result would be inconsistency in the code. Or I could change these things everywhere in the relevant files, but this would mean I would be changing parts of the files that are not properly related to this issue. For the remaining stylistic points, I will make the changes you asked for. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23550 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers
STINNER Victor added the comment: The patch looks good to me, except of a question added on the review. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23466 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23648] PEP 475 meta issue
STINNER Victor added the comment: Charles-François Natali added the comment: You have to mount the share with the eintr option. Oh, I didn't know this option. Unlikely, it looks like the option was deprecated something like 7 years ago, in Linux kernel 2.6.25. Related commits: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/nfs?id=d33e4dfeab5eb0c3c1359cc1a399f2f8b49e18de https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/nfs?id=c381ad2cf2d5dcd3991bcc8a18fddd9d5c66ccaa The patch on the NFS mailing list: http://comments.gmane.org/gmane.linux.nfs/20011 Getting EINTR on a local FS is probably more challenging. Another option would be to play with FUSE. But I'm not convinced that it's useful if fstat() never fails EINTR on filesystems used in production. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Daylight savings time question
On 03/24/2015 03:24 PM, Dan Stromberg wrote: Is there a way of adding 4 hours and getting a jump of 5 hours on March 8th, 2015 (due to Daylight Savings Time), without hardcoding when to spring forward and when to fall back? I'd love it if there's some library that'll do this for me. #!/usr/bin/python import pytz import datetime def main(): # On 2015-03-08, 2:00 AM to 2:59AM Pacific time does not exist - the clock jumps forward an hour. weird_naive_datetime = datetime.datetime(2015, 3, 8, 1, 0, 0).replace(tzinfo=pytz.timezone('US/Pacific')) weird_tz_aware_datetime = weird_naive_datetime.replace(tzinfo=pytz.timezone('US/Pacific')) print(weird_tz_aware_datetime) four_hours=datetime.timedelta(hours=4) print('Four hours later is:') print(weird_tz_aware_datetime + four_hours) print('...but I want numerically 5 hours later, because of Daylight Savings Time') main() Thanks! The pyzt module (which you've imported) has lots to say about this. Look at its procedures localize' and 'normalize' and all the rest of the pyzt documentation. -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list
[issue23769] valgrind reports leaks for test_zipimport
Robert Kuska added the comment: Summary for valgrind python3 test_zipimport.py ==18608== ==18608== HEAP SUMMARY: ==18608== in use at exit: 1,596,390 bytes in 11,536 blocks ==18608== total heap usage: 343,849 allocs, 332,313 frees, 59,355,776 bytes allocated ==18608== ==18608== LEAK SUMMARY: ==18608==definitely lost: 90 bytes in 3 blocks ==18608==indirectly lost: 0 bytes in 0 blocks ==18608== possibly lost: 594,488 bytes in 2,258 blocks ==18608==still reachable: 1,001,812 bytes in 9,275 blocks ==18608== suppressed: 0 bytes in 0 blocks ==18608== Rerun with --leak-check=full to see details of leaked memory ==18608== ==18608== For counts of detected and suppressed errors, rerun with: -v ==18608== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23769 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23769] valgrind reports leaks for test_zipimport
STINNER Victor added the comment: When calling gc.collect() after each test, I don't see any leak anymore. doTest() has a small leak: it prepends a path to sys.path, but it never removes it. Try attached leak2.py: it displays something like +254 kB. Uncomment the two following lines and the output will be close to +0 kB. #sys.path = old_path #gc.collect() -- nosy: +haypo Added file: http://bugs.python.org/file38675/leak2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23769 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
OpenID + Python 3.4
I was looking on the Internet regarding the use of OpenID in Python apps but I only found Flask/web related stuff. Is there any module that provides OpenID implementation for desktop level? I currently have a Python desktop script that needs to authenticate in a OpenID server, but I don't know how to implement it. -- https://mail.python.org/mailman/listinfo/python-list
Re: Daylight savings time question
This appears to do what I wanted: #!/usr/bin/python from __future__ import print_function import pytz import datetime # Is there a good way of jumping ahead 5 hours instead of 4 on 2015-03-08? def main(): # On 2015-03-08, 2:00 AM to 2:59AM Pacific time does not exist - the clock jumps forward an hour. us_pacific = pytz.timezone('US/Pacific') weird_naive_datetime = datetime.datetime(2015, 3, 8, 1, 0, 0) print('weird_naive_datetime: ', weird_naive_datetime) weird_tz_aware_datetime = us_pacific.localize(weird_naive_datetime) print('weird_tz_aware_datetime', weird_tz_aware_datetime) four_hours=datetime.timedelta(hours=4) print('Four hours later is: ', us_pacific.normalize(weird_tz_aware_datetime + four_hours)) print('...we want numerically 5 hours later (so 6AM), because of Daylight Savings Time') main() On Tue, Mar 24, 2015 at 3:24 PM, Dan Stromberg drsali...@gmail.com wrote: Is there a way of adding 4 hours and getting a jump of 5 hours on March 8th, 2015 (due to Daylight Savings Time), without hardcoding when to spring forward and when to fall back? I'd love it if there's some library that'll do this for me. #!/usr/bin/python import pytz import datetime def main(): # On 2015-03-08, 2:00 AM to 2:59AM Pacific time does not exist - the clock jumps forward an hour. weird_naive_datetime = datetime.datetime(2015, 3, 8, 1, 0, 0).replace(tzinfo=pytz.timezone('US/Pacific')) weird_tz_aware_datetime = weird_naive_datetime.replace(tzinfo=pytz.timezone('US/Pacific')) print(weird_tz_aware_datetime) four_hours=datetime.timedelta(hours=4) print('Four hours later is:') print(weird_tz_aware_datetime + four_hours) print('...but I want numerically 5 hours later, because of Daylight Savings Time') main() Thanks! -- https://mail.python.org/mailman/listinfo/python-list
[issue23671] string.Template doesn't work with the self keyword argument
Terry J. Reedy added the comment: This is a nice catch of a subtle bug and a nice fix. I verified that replacing 'self' with '*args' does not simply shift the problem from 'self' to 'args'. class C: def test(*args, **kwargs): print(args, kwargs ) c = C() c.test(1, args=2, kwargs=3, self=4) (__main__.C object at 0x035FE128, 1) {'args': 2, 'kwargs': 3, 'self': 4} While the * and ** names are, like parameter names, local names given in the signature header, they are not counted as parameter names in the code object .co_argcount or .co_kwonlyargcount attributes that are used along with co_varnames in the name-argument matching process. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23671 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Daylight savings time question
Is there a way of adding 4 hours and getting a jump of 5 hours on March 8th, 2015 (due to Daylight Savings Time), without hardcoding when to spring forward and when to fall back? I'd love it if there's some library that'll do this for me. #!/usr/bin/python import pytz import datetime def main(): # On 2015-03-08, 2:00 AM to 2:59AM Pacific time does not exist - the clock jumps forward an hour. weird_naive_datetime = datetime.datetime(2015, 3, 8, 1, 0, 0).replace(tzinfo=pytz.timezone('US/Pacific')) weird_tz_aware_datetime = weird_naive_datetime.replace(tzinfo=pytz.timezone('US/Pacific')) print(weird_tz_aware_datetime) four_hours=datetime.timedelta(hours=4) print('Four hours later is:') print(weird_tz_aware_datetime + four_hours) print('...but I want numerically 5 hours later, because of Daylight Savings Time') main() Thanks! -- https://mail.python.org/mailman/listinfo/python-list
[issue23622] Deprecate unrecognized backslash+letter escapes in re
Roundup Robot added the comment: New changeset 7384db2fce8a by Serhiy Storchaka in branch 'default': Fixed using deprecated escaping in regular expression in _strptime.py (issue23622). https://hg.python.org/cpython/rev/7384db2fce8a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23622 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23647] imaplib.py MAXLINE value is too low for gmail
Arnt Gulbrandsen added the comment: Length limits has actually been discussed and rejected; noone had a proposal that solved more problems than it introduced. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23762] python.org page on new-style classes should be updated
New submission from Joël Schaerer: This page (found it via a search engine): https://www.python.org/doc/newstyle/ is supposed to give the status of New-style classes. However this information is no longer relevant for Python 3, and my needlessly scare newcomers. I believe it should be either deleted or updated to mention that python3 users don't need to care about this anymore. -- assignee: docs@python components: Documentation messages: 239127 nosy: docs@python, joelthelion priority: normal severity: normal status: open title: python.org page on new-style classes should be updated type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23762 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23763] Chain exceptions in C
New submission from STINNER Victor: In Python 3, it becomes possible to chain two exceptions. It's one of the killer feature of Python 3, it helps debugging. In Python, exceptions are chained by default. Example: try: raise TypeError(old message) except TypeError: raise ValueError(new message) Output: Traceback (most recent call last): File x.py, line 2, in module raise TypeError(old message) TypeError: old message During handling of the above exception, another exception occurred: Traceback (most recent call last): File x.py, line 4, in module raise ValueError(new message) ValueError: new message In C, using the public PyErr_SetNone(), PyErr_Format(), PyErr_SetString(), ... functions, exceptions are *not* chained by default. You have to call explicitly the new private _PyErr_ChainExceptions() function introduced in Python 3.4. It is not trivial to use it: you have to call PyErr_Fetch() and check if an exception was already raised. In Python, the following examples are bad practice because they may hide important exceptions like MemoryError or KeyboardInterrupt: try: except: pass or try: except: raise ValueError(...) In C extensions, it's common to write such code, few functions check which exception was raised. Last months, I enhanced Python to detect exceptions ignored by mistake: I added assert(!PyErr_Occurred()) in many functions which can clear the current exception (ex: call PyErr_Clear()) or raise a new exception (ex: call PyErr_SetString(...)). The last step is the issue #23571 which now implements in release mode. For the next step, I propose to explicitly clear the current exception before raising a new exception. I don't know yet if it would be a good idea to modify PyErr_*() functions to automatically chain exceptions. -- messages: 239130 nosy: haypo priority: normal severity: normal status: open title: Chain exceptions in C ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23763] Chain exceptions in C
STINNER Victor added the comment: For the next step, I propose to explicitly clear the current exception before raising a new exception. Attached pyerr_match_clear.patch implements this. It's only a work-in-progress. I prefer to get feedback on the patch before finishing it. The patch checks also which exception was raised using PyErr_ExceptionMatches() to avoid hiding import exceptions. Since my patch makes assumption on which exception is expected, it can change the behaviour of functions if I forgot a different exception which is also supposed to be replaced. Example: only catch ValueError and replace it with ValueError, whereas OverflowError must also be replaced with ValueError. -- Added file: http://bugs.python.org/file38667/pyerr_match_clear.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23763] Chain exceptions in C
STINNER Victor added the comment: While working on the PEP 475, I modified _Py_fopen_obj() to raise the OSError (instead of raising the exception from the call site). The zipimport uses _Py_fopen_obj() but it didn't raise OSError, only ZipImportError. I modified the zipimport module to raise a chained exception: OSError chained to ZipImportError: see issue #23696. Other functions using _PyErr_ChainExceptions(): - open() (io.open): if open() failed and f.close() raised an exception, chain the two exceptions - io.FileIO.close - io.TextIOWrapper.close - io.BufferedReader.close, io.BufferedWriter.close - _Py_CheckFunctionResult(), new function introduced in the issue #23571 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23761] test_socket fails on Mac OSX 10.9.5
Ned Deily added the comment: I don't recall ever seeing that failure on OS X systems. Can you patch the test to find out which address lookup is not failing as expected and then check your host configuration? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23761 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4727] copyreg doesn't support keyword only arguments in __new__
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4727 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4727] copyreg doesn't support keyword only arguments in __new__
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4727 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20289] Make cgi.FieldStorage a context manager
Roundup Robot added the comment: New changeset 34930a6faf0d by Serhiy Storchaka in branch 'default': Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and https://hg.python.org/cpython/rev/34930a6faf0d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20289 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23763] Chain exceptions in C
STINNER Victor added the comment: See also issue #21715: Chaining exceptions at C level. The changeset 9af21752ea2a added the new _PyErr_ChainExceptions() function. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23759] urllib.parse: make coap:// known
chrysn added the comment: i wholeheartedly agree that a generic solution would be preferable, but as you pointed out, that needs to be well-researched. until there is a concrete plan for that, please don't let the ideal solution get in the way of a practical update of the uri scheme list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: To Change A Pdf Ebook To Kindle
On 24/03/2015 14:23, Michael Torrie wrote: On 03/24/2015 01:05 AM, jeffreyciross wrote: probable spam I'm wondering whether this is appropriate use of sourceforge. Hosting a proprietary program on SF's web site for free, doesn't seem honest to me. Should I report this to SF as inappropriate content? Yes. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
[issue23763] Chain exceptions in C
STINNER Victor added the comment: pyerr_match_assertion.patch: Modify PyErr_ExceptionMatches() to raise an exception if it is called with no exception set. This patch can be used to ensure that pyerr_match_clear.patch doesn't introduce regression. Example: -PyErr_Format(PyExc_TypeError, - expected %s instance instead of %s, - ((PyTypeObject *)type)-tp_name, - Py_TYPE(value)-tp_name); + +if (PyErr_ExceptionMatches(PyExc_AttributeError)) { +PyErr_Clear(); +PyErr_Format(PyExc_TypeError, + expected %s instance instead of %s, + ((PyTypeObject *)type)-tp_name, + Py_TYPE(value)-tp_name); +} This change is wrong is not exception is set, because PyErr_ExceptionMatches() returns 0 if no exception was raised. -- Added file: http://bugs.python.org/file38668/pyerr_match_assertion.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS
Bohuslav Slavek Kabrda added the comment: I'm also hitting an issue with test_sysconfig_module, but for a different reason: While building Python, I used make EXTRA_CFLAGS='some flags' and this makes test_sysconfig_module fail when I run make test or python -m test.regrtest. The problem is that EXTRA_CFLAGS, like profile-opt, is not in the Makefile, so _sysconfigdata has it stored from build - unlike distutils, which can't see the EXTRA_CFLAGS variable in the environment, thus resulting in failure. I'm not sure what's the proper solution here, but I think requiring people to run make test with precisely the same EXTRA_CFLAGS as make is not right (although it solves the issue). This makes me think this is a bug - should I open a new issue? -- nosy: +bkabrda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22904 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23759] urllib.parse: make coap:// known
R. David Murray added the comment: I too would like to see this issue dealt with generically. I believe the last time we discussed it the barrier was backward compatibility and which RFCs we actually support :(. Fixing it generically will require a well thought out and well researched proposal. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23761] test_socket fails on Mac OSX 10.9.5
R. David Murray added the comment: This is almost certain to be an OSX bug. Do you want to investigate? -- components: +Macintosh -Tests nosy: +ned.deily, r.david.murray, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23761 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: To Change A Pdf Ebook To Kindle
On 03/24/2015 08:27 AM, Mark Lawrence wrote: On 24/03/2015 14:23, Michael Torrie wrote: Should I report this to SF as inappropriate content? Yes. Done. And yes I agree with alister, Calibre is an amazing program and it's all 100% python! And a large-scale app at that. GPLv3. Putting a link here for the search engines. Hopefully if anyone finds this thread they'll find this instead of the spammy SF link. http://calibre-ebook.com/ -- https://mail.python.org/mailman/listinfo/python-list
[issue23571] Raise SystemError if a function returns a result with an exception set
Roundup Robot added the comment: New changeset 2a18b958f1e1 by Victor Stinner in branch 'default': Issue #23571: Enhance _Py_CheckFunctionResult() https://hg.python.org/cpython/rev/2a18b958f1e1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23761] test_socket fails on Mac OSX 10.9.5
R. David Murray added the comment: We could/should change that test to use subtests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23761 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
Changes by Dan O'Reilly oreil...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
R. David Murray added the comment: This not dissimilar to the problem we have with file like object or file object. The requirements on them are not consistent. I'm not sure what the solution is in either case, but for file like objects we have decided to ignore the issue, I think. (ie: what exactly a file like object needs to support in order to work with a give API depends on that API, and we just live with that). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING
Serhiy Storchaka added the comment: Updated patch fixes more bugs. Added support of unicode, izip_longest, abstract collections, ChainMap, multiprocessing exceptions, some socket and multiprocessing functions and types, xml.etree.ElementTree (C implementation). Added support of urllib and urllib2 (only public interface). Fixed reverse mapping of OSError subclasses, str, bz2, different dbm implementations, pickle. Added special sanity tests for _compat_pickle mappings (test that mappings are not ambiguous and mainly reversible, that 3.x names exist, etc). -- Added file: http://bugs.python.org/file38669/pickle_fix_import_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18473 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23770] Rework of exceptions are handled in the parser module (in validate_repeating_list())
New submission from STINNER Victor: Attached patch avoids calling validate_numnodes() with an exception set in the parser module. I found this issue while working on the issue #23763 Chain exceptions in C. -- files: validate_repeating_list.patch keywords: patch messages: 239199 nosy: haypo priority: normal severity: normal status: open title: Rework of exceptions are handled in the parser module (in validate_repeating_list()) versions: Python 3.5 Added file: http://bugs.python.org/file38676/validate_repeating_list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23770 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23764] functools.wraps should be able to change function argspec as well
productivememberofsociety666 added the comment: I'm not sure if I understand issue 15731 correctly, but isn't that one just about docstrings and signatures? These are both purely cosmetic and don't have an effect on calling behaviour, do they? This issue wouldn't be a duplicate then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23764 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23573] Avoid redundant allocations in str.find and like
STINNER Victor added the comment: Looks as this patch makes buildbots crash. Yep. It took me some minutes to find that the crash was caused by this issue :-p http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5930/steps/test/logs/stdio ... [117/393/1] test_bigmem Assertion failed: 0, file c:\buildbot.python.org\3.x.kloth-win64\build\objects\stringlib/fastsearch.h, line 76 Fatal Python error: Aborted Current thread 0x10ec (most recent call first): File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_bigmem.py, line 294 in test_rfind File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py, line 1641 in wrapper File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\case.py, line 577 in run File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\case.py, line 625 in __call__ File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\suite.py, line 122 in run File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\suite.py, line 84 in __call__ File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\suite.py, line 122 in run File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\suite.py, line 84 in __call__ File C:\buildbot.python.org\3.x.kloth-win64\build\lib\unittest\runner.py, line 176 in run File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py, line 1773 in _run_suite File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py, line 1807 in run_unittest File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_bigmem.py, line 1252 in test_main ... -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23573 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23571] Raise SystemError if a function returns a result with an exception set
Roundup Robot added the comment: New changeset 004e3870d9e6 by Victor Stinner in branch '3.4': Issue #23571: If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(), https://hg.python.org/cpython/rev/004e3870d9e6 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23571 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: test1
On Wed, Mar 25, 2015 at 1:47 PM, Tiglath Suriol tiglathsur...@gmail.com wrote: title{% block title %}{% endblock %}/title Looks to me like you're playing around with a templating system like Jinja, but may I suggest that you send tests to yourself rather than to an entire mailing list/newsgroup? :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue23771] Timeouts on x86 Ubuntu Shared 3.x buildbot
STINNER Victor added the comment: test_multiprocessing_spawn.test_notify_all() also hangs on AMD64 Debian root 3.x buildbot: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1959/steps/test/logs/stdio --- [330/393] test_multiprocessing_spawn Timeout (1:00:00)! Thread 0x2b303f269700 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/multiprocessing/synchronize.py, line 262 in wait File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py, line 834 in f File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 871 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 923 in _bootstrap_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 891 in _bootstrap Thread 0x2b303d918700 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/multiprocessing/synchronize.py, line 262 in wait File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py, line 834 in f File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 871 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 923 in _bootstrap_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 891 in _bootstrap Thread 0x2b3060947700 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/multiprocessing/synchronize.py, line 262 in wait File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py, line 834 in f File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 871 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 923 in _bootstrap_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 891 in _bootstrap Thread 0x2b303289db20 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/_test_multiprocessing.py, line 933 in test_notify_all File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py, line 577 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py, line 625 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 122 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 84 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 122 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 84 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 122 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 84 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/runner.py, line 176 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py, line 1773 in _run_suite File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py, line 1807 in run_unittest File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 1283 in test_runner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 1284 in runtest_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 967 in runtest File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 763 in main File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 1568 in main_in_temp_cwd File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/__main__.py, line 3 in module File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py, line 85 in _run_code File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py, line 170 in _run_module_as_main --- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23771 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: test2
On Wed, Mar 25, 2015 at 2:11 PM, Tiglath Suriol tiglathsur...@gmail.com wrote: # Make this unique, and don't share it with anybody. SECRET_KEY = '42=kv!a-il*!4jamp;7v+0(@a@vq_3j-+ysatta@l6-h63odj2)75' This right here is a reason to send your test messages someplace other than a huge, high-traffic mailing list! ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue23763] Chain exceptions in C
STINNER Victor added the comment: pyerr_match_clear-2.patch: Updated patch, more complete (I also removed the assertions, I only added to debug). Since my patch makes assumption on which exception is expected, it can change the behaviour of functions if I forgot a different exception which is also supposed to be replaced. To reduce risks, we can just remove the new PyErr_ExceptionMatches() checks from the patch in a first time, and add them later, while being very careful. Calling PyErr_Clear() where exceptions must not be chained should be enough for a first step. -- Added file: http://bugs.python.org/file38677/pyerr_match_clear-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23763 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
test1
head style type=text/css body {color:black;} h1 {text-align:center;color:maroon;font-size:30px;font-style:normal;} td {font-size:12;font-style:monospace;} } /style title{% block title %}{% endblock %}/title script /script /head body h1IPDB Data Input Window/h1 div style=float: left;width: 40%;margin-left:30px p table tr form action=/add/ method=POST table style=border-width:1px; border-color:Black ; border-style :groove ; tr tdAddress:/tdtd{{ form.address }}/td /tr tr tdFilename:/tdtd{{ form.filename }}/td tdinput type=submit value=Add /td /tr /table /form /tr tr form action=/delete/ method=POST table style=border-width:1px; border-color:Black ; border-style :groove ; tr td{{ form.box }}/td tdbutton type=submitDelete Selected/button/td /tr /table /form /tr /table /p /div div style=float: right; width: 50%; p form action=/save/ method=POST table style=border-width:1px; border-color:Black ; border-style :groove ; tr tdDescription:/tdtd{{ form.description }}/td /tr tr tdExpiry date:/tdtd{{ form.expiry }}/td /tr tr tdinput type=submit value=Submit //td /tr /table /form /p /div script type=text/javascript function submitReset() { document.getElementById(frm1).reset(); } function add() { window.location.replace=http://127.0.0.1:8000/add/; } function clearForms() { // variable declaration var x, y, z, type = null; // loop through forms on HTML page for (x = 0; x document.forms.length; x++) { // loop through each element on form for (y = 0; y document.forms[x].elements.length; y++) { // define element type type = document.forms[x].elements[y].type; // alert before erasing form element //alert('form='+x+' element='+y+' type='+type); // switch on element type switch (type) { case 'text': case 'textarea': case 'password': //case hidden: document.forms[x].elements[y].value = ''; break; case 'radio': case 'checkbox': document.forms[x].elements[y].checked = ''; break; case 'select-multiple': for (z = 0; z document.forms[x].elements[y].options.length; z++) { document.forms[x].elements[y].options[z].selected = false; } case 'iframe' } // end switch } // end for y } // end for x //x = window.frames[frame1]; //x.document.body.innerHTML = ; } /script /body /html --- head style type=text/css body { font-size:10px; color:black; backgrounc:CC; } h1 { text-align:center; color:maroon; font-size:30px; font-style:normal; } td { font-size:12; font-style:monospace; } select { background: transparent; width: 500; height: 300; padding: 5px; font-size: 16px; border: 1px solid #ccc; height: 34px; } #righty { float:right ; width:20% ; } #des { float:right ; width:50% ; } #tab { font-size:12;font-style:normal; } #msg { font-size:12;font-style:monospace;background:FFCC66; } #id_box { width:300px;height:150;border:1px solid black;background-color:ivory;padding:8px; } /style h1IPDB Asset Input/h1 script src=//ajax.googleapis.com/ajax/libs/jquery/1.9/jquery.min.js /script script language=JavaScript type=text/javascript !-- window.onload = function pop() { {% if popup %} alert(This is a pop up!!!) ; {% endif %} document.getElementById('id_address').focus() } function append() { var elSel = document.getElementById('id_box'); var addr = document.getElementById('id_address').value ; if (addr.length 0) { var newEntry = document.createElement('option'); newEntry.text = addr ; newEntry.value = addr ; try { elSel.add(newEntry, null); // standards compliant; doesn't work in IE } catch(ex) { elSel.add(newEntry); // IE only } document.getElementById('id_address').value = ; document.getElementById('id_address').focus() } } function removeSelected() { var box = document.getElementById('id_box'); var i; for (i = box.length - 1; i=0; i--) { if (box.options[i].selected) { box.remove(i); } } } function submitForm() { var box = document.getElementById('id_box'); var cache = document.getElementById('id_cache');
[issue23772] pymonotonic() gone backward on AMD64 Debian root 3.x buildbot
New submission from STINNER Victor: I would be interested to know the Linux version of this buildbot slave. Maybe the slave is running in a VM and it's a virtualization issue? If it's the case, should Python fix the bug? Or should we just remove the assertion? http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1943/steps/test/logs/stdio --- python: Python/pytime.c:221: pymonotonic: Assertion `last.tv_usec == -1 || tp-tv_sec last.tv_sec || (tp-tv_sec == last.tv_sec tp-tv_usec = last.tv_usec)' failed. Fatal Python error: Aborted Thread 0x2b9135bc4700 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 364 in sleeper_gen File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 390 in make_nested File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 395 in run_thread File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 871 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 923 in _bootstrap_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 891 in _bootstrap Current thread 0x2b91355c1700 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 364 in sleeper_gen File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 390 in make_nested File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 395 in run_thread File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 871 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 923 in _bootstrap_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/threading.py, line 891 in _bootstrap Thread 0x2b9127825b20 (most recent call first): File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 407 in test_trashcan_threads File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py, line 577 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/case.py, line 625 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 122 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 84 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 122 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/suite.py, line 84 in __call__ File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/unittest/runner.py, line 176 in run File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py, line 1772 in _run_suite File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py, line 1806 in run_unittest File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gc.py, line 1000 in test_main File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 1284 in runtest_inner File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 967 in runtest File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 763 in main File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/regrtest.py, line 1568 in main_in_temp_cwd File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/__main__.py, line 3 in module File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py, line 85 in _run_code File /root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py, line 170 in _run_module_as_main --- -- messages: 239216 nosy: haypo priority: normal severity: normal status: open title: pymonotonic() gone backward on AMD64 Debian root 3.x buildbot versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23772 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23773] importlib does not properly remove frames when invoking external import hooks
New submission from Shiz: When adding a custom module loader to sys.meta_path, importlib does not properly remove its frames before invoking it. This results in a weird traceback with importlib._bootstrap frames in if an error occurs during load_module(), like such: Traceback (most recent call last): File /Users/mark/Development/Projects/rave/rave/bootstrap/__init__.py, line 102, in bootstrap_game __import__(MODULE_PACKAGE + '.' + mod.replace('.py', '')) File frozen importlib._bootstrap, line 2237, in _find_and_load File frozen importlib._bootstrap, line 2226, in _find_and_load_unlocked File frozen importlib._bootstrap, line 1200, in _load_unlocked File frozen importlib._bootstrap, line 1129, in _exec File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/__init__.py, line 1, in module from . import common, core3 File frozen importlib._bootstrap, line 2237, in _find_and_load File frozen importlib._bootstrap, line 2226, in _find_and_load_unlocked File frozen importlib._bootstrap, line 1200, in _load_unlocked File frozen importlib._bootstrap, line 1129, in _exec File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/core3/__init__.py, line 11, in module from .texture import Texture, Image File frozen importlib._bootstrap, line 2237, in _find_and_load File frozen importlib._bootstrap, line 2226, in _find_and_load_unlocked File frozen importlib._bootstrap, line 1200, in _load_unlocked File frozen importlib._bootstrap, line 1129, in _exec File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/core3/texture.py, line 8, in module raise ValueError Attached is a patch against the current hg head that makes sure module loaders are invoked through _call_with_frames_removed, so that the output becomes a lot more readable: Traceback (most recent call last): File /Users/mark/Development/Projects/rave/rave/bootstrap/__init__.py, line 102, in bootstrap_game __import__(MODULE_PACKAGE + '.' + mod.replace('.py', '')) File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/__init__.py, line 1, in module from . import common, core3 File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/core3/__init__.py, line 11, in module from .texture import Texture, Image File /Users/mark/Development/Projects/rave/rave/modularity.py, line 23, in exec_module super().exec_module(module) File /.modules/opengl/core3/texture.py, line 8, in module raise ValueError ValueError Ideally it would remove the calls /within/ the module loader itself too, but I do not see an easy way to do this without changing the entire _call_with_frames_removed semantics. This fixes most of the issues, though. -- components: Library (Lib) files: cpython-3ac58de829ef-fix-external-module-loader-call-traceback.patch keywords: patch messages: 239219 nosy: shiz priority: normal severity: normal status: open title: importlib does not properly remove frames when invoking external import hooks type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38681/cpython-3ac58de829ef-fix-external-module-loader-call-traceback.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23773 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com