[issue1230540] sys.excepthook doesn't work in threads

2011-09-11 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: +Nikratio ___ Python tracker <http://bugs.python.org/issue1230540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12960] threading.Condition is not a class

2011-09-13 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 09/13/2011 07:41 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> According to >> http://docs.python.org/library/threading.html#condition-objects, >> threading.Condition is a class. > > Nope, it

[issue12960] threading.Condition is not a class

2011-09-14 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 09/14/2011 04:29 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> Yes, but further down it still says: >> >> """ >> class threading.Condition([lock]) >> >> If the lock ar

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
New submission from Nikolaus Rath : I'd like to propose addding the CleanupManager class described in http://article.gmane.org/gmane.comp.python.ideas/12447 to the contextlib module. The idea is to add a general-purpose context manager to manage (python or non-python) resources that

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Here's the first part of the patch with the implementation. I'll add tests and documentation as soon as someone confirms that the idea & API is okay. -- keywords: +patch Added file: http://bugs.python.org/file23923/CleanupManager

[issue12704] Language References does not specify exception raised by final yield()

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Hmm. Does the total lack responses mean agreement, disagreement or lack of interest? I'm attaching a patch against Python 3.3 in the hope of moving this forward. -- keywords: +patch Added file: http://bugs.python.org/file23924/patch_v1

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2011-12-11 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: Language References does not specify exception raised by final yield() -> Language Reference: Clarify behaviour of yield when generator is not resumed ___ Python tracker <http://bugs.python.org/issu

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Not sure what you mean with "posted as a recipe" -- are you thinking of a specific website/mailing list? Example: which one do you mean? The one in the issue or the one in the patch? With statement: what advantages do you have in mind? Try/finall

[issue13585] Add contextlib.CleanupManager

2011-12-12 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 12/11/2011 10:17 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > ''' > Example code: > > with CleanupManager() als mngr: > tmpdir = tempfile.mkdtemp() > mngr.register(shutil.rmt

[issue13585] Add contextlib.CleanupManager

2011-12-12 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file23933/CleanupManager_patch_v2.diff ___ Python tracker <http://bugs.python.org/issue13585> ___ ___ Pytho

[issue13585] Add contextlib.CleanupManager

2011-12-12 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 12/12/2011 03:31 PM, Sven Marnach wrote: > Adding this as a cookbook recipe first seems like a good idea. This is the second time that this is mentioned, so I would be very grateful if someone could elucidate what "adding as a cookbook recipe"

[issue13585] Add contextlib.CleanupManager

2011-12-21 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 12/21/2011 11:46 AM, Éric Araujo wrote: > > Éric Araujo added the comment: > >> The idea is to add a general-purpose context manager to manage (python >> or non-python) resources that don't come with their own context manager. &g

[issue13585] Add contextlib.CleanupManager

2011-12-21 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 12/21/2011 12:03 PM, Éric Araujo wrote: > > Éric Araujo added the comment: > >>> In the passage I quoted, I don’t understand what is meant by “non-Python >>> resources”. >> Think about e.g. mounting a file system. >

[issue5689] Support xz compression in tarfile module

2011-12-28 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: -Nikratio ___ Python tracker <http://bugs.python.org/issue5689> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12704] Language References does not specify exception raised by final yield()

2011-08-06 Thread Nikolaus Rath
New submission from Nikolaus Rath : >From http://docs.python.org/reference/simple_stmts.html#the-yield-statement: "As of Python version 2.5, the yield statement is now allowed in the try clause of a try ... finally construct. If the generator is not resumed before it is finalized (by

[issue12704] Language References does not specify exception raised by final yield()

2011-08-06 Thread Nikolaus Rath
Nikolaus Rath added the comment: >From http://www.python.org/dev/peps/pep-0342/ I believe that the last yield >will raise GeneratorExit. So my suggestion is to replace the above mentioned >paragraph with: """ As of Python version 2.5, yield is an expression rat

[issue1346874] httplib simply ignores CONTINUE

2011-08-06 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: +Nikratio ___ Python tracker <http://bugs.python.org/issue1346874> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12960] threading.Condition is not a class

2011-09-11 Thread Nikolaus Rath
New submission from Nikolaus Rath : According to http://docs.python.org/library/threading.html#condition-objects, threading.Condition is a class. However, in fact it turns out to be function that constructs a _Condition instance. I don't know the reason for that, but it seems to me

[issue12704] Language References does not specify exception raised by final yield()

2011-09-11 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- versions: +Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue12704> ___ ___ Python-bug

[issue9606] logging filter is ignored when added to root handler

2010-08-14 Thread Nikolaus Rath
New submission from Nikolaus Rath : I believe the following should print only one log message, not two: import logging class Filter(object): def filter(self, record): return record.name == 'foo' logger = logging.getLogger() formatter = logging.Formatter('%(messa

[issue9606] logging filter is not applied to messages from descendant loggers

2010-08-14 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: logging filter is ignored when added to root handler -> logging filter is not applied to messages from descendant loggers ___ Python tracker <http://bugs.python.org/iss

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: @Swapnil: the rules you quote are correct for the C extension, but do not apply when using ctypes, because ctypes is doing the required initializations automatically. However, if Amaury is correct, ctypes performs the initializations in a way that break the

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- resolution: invalid -> ___ Python tracker <http://bugs.python.org/issue6627> ___ ___ Python-bugs-list mailing list Unsubscri

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: No, I am not saying that the behaviour of ctypes is wrong. It just happens to have some effects on threading.local that I think should be documented. That's why I reassigned this as a documentation bug. Please reconsider closing this bug. I'm als

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: To be a bit more constructive, why not add something like this in paragraph to http://docs.python.org/library/ctypes.html#callback-functions: "Note that if the callback function is called in a new thread that has been created outside of Python's co

[issue6627] threading.local() does not work with C-created threads

2010-09-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: One point of ctypes is to save the user the trouble of having to create a full blown C extension, so I don't think it's reasonable to expect a ctypes user to have read the full C API documentation as well. Only a very small subset of the page that y

[issue10058] Unclear PyString_AsStringAndSize return value

2010-10-09 Thread Nikolaus Rath
New submission from Nikolaus Rath : http://docs.python.org/c-api/string.html says about the return value of AsStringAndSize: "If length is NULL, the resulting buffer may not contain NUL characters; if it does, the function returns -1 and a TypeError is raised." "If string

[issue10058] C-API Intro should be more explicit about error return codes

2010-10-15 Thread Nikolaus Rath
Nikolaus Rath added the comment: Georg, this is an important piece of information, but I think it is not yet clearly stated in the documentation. Here is what http://docs.python.org/c-api/intro.html says about return codes: "In general, when a function encounters an error, it se

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
New submission from Nikolaus Rath : The following is a very subtle bug and it took me a couple of days to reduce it to a manageable test case. So please bear with me even if it's tedious. The problem is that in some cases the use of ctypes for a callback function freezes the entire pr

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15943/call_hello.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15944/hello_ll.c ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15945/libfuse26.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15946/libfuse28.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15947/call_hello.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Removed file: http://bugs.python.org/file15943/call_hello.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list m

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Nikolaus Rath added the comment: Reproduced with Python 3.1 -- versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bug

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Removed file: http://bugs.python.org/file15947/call_hello.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list m

[issue7736] ctypes freezes/deadlocks process

2010-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file15948/call_hello.py ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailin

[issue7736] ctypes freezes/deadlocks process

2010-01-19 Thread Nikolaus Rath
Nikolaus Rath added the comment: Wow, great! Thanks for looking into this. How did you manage to get the backtrace? As I said, on my system gdb -p just hangs with when attaching. I'm changing the component, since it seems that it's the os module that's at fault

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-19 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: ctypes freezes/deadlocks process -> os.listdir hangs since opendir() and closedir() do not release GIL ___ Python tracker <http://bugs.python.org/iss

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Nikolaus Rath
Nikolaus Rath added the comment: In this simple example, FUSE does not fork and does not start any threads. Note that PyGILState_Ensure() cannot do anything here. What happens is this: - call_hello.py calls FUSE in a new thread, releasing the GIL. - FUSE mounts the file system and waits for

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Nikolaus Rath
Nikolaus Rath added the comment: I have used both of them in the past, but in the end I wrote my own bindings (currently only available as part of the http://code.google.com/p/s3ql source code, but I intend to factor it out at some point), since neither fuse.py (http://code.google.com/p

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 01/20/2010 07:19 AM, Antoine Pitrou wrote: > Ah, thanks for the explanation. Yes indeed the patch looks ok for the > job. You should just be aware that similar problems may appear with > other system calls. I don't think we have ever considered

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-22 Thread Nikolaus Rath
Nikolaus Rath added the comment: The patch works fine for me too. Also, I did not discover any other such problems for other syscalls (but I did not systematically try all os.* functions). -- ___ Python tracker <http://bugs.python.org/issue7

[issue7760] use_errno=True does not work

2010-01-22 Thread Nikolaus Rath
New submission from Nikolaus Rath : On my system (Ubuntu Karmic, Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15), Kernel 2.6.31-17-generic, libc6 2.10.1-0ubuntu16) the attached test script produces the following output: Traceback (most recent call last): File "test1.py", l

[issue7760] use_errno=True does not work

2010-01-23 Thread Nikolaus Rath
Nikolaus Rath added the comment: I can confirm that without the path it works for me too. But I have to admit that I don't really understand your explanation. Should I generally not use full paths with CDLL? Or just in the case of libc? In either case, I think the ctypes dokumentation

[issue7931] Python hangs after last thread has exited

2010-02-15 Thread Nikolaus Rath
Nikolaus Rath added the comment: Here is a short testcase that reproduces the problem. If you run the script it daemonizes correctly, but then the daemon does not terminate but hangs forever. The crucial part seems to be to daemonize the program while there is more than one thread running

[issue7931] Interpreter does not terminate if daemonized while running multithreaded

2010-02-15 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: Python hangs after last thread has exited -> Interpreter does not terminate if daemonized while running multithreaded ___ Python tracker <http://bugs.python.org/iss

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-02-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Does this patch still need review? Both Martin and Antoine already commented that the patch is ok, so it'd be great if someone could actually apply it... -- ___ Python tracker <http://bugs.python.org/i

[issue6715] xz compressor support

2010-04-09 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: +Nikratio ___ Python tracker <http://bugs.python.org/issue6715> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8487] os.mknod() fails on NFS mounted directories

2010-04-21 Thread Nikolaus Rath
New submission from Nikolaus Rath : $ cat test.py #!/usr/bin/env python import os import stat dbfile = './testfile.test' with open(dbfile, 'w') as fh: print('Opened file for writing') os.unlink(dbfile) os.mknod(dbfile, stat.S_IRUSR | stat.S_IWUSR | stat.S_IFREG

[issue17681] Work with an extra field of gzip and zip files

2021-05-06 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: -nikratio ___ Python tracker <https://bugs.python.org/issue17681> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-15 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: -nikratio ___ Python tracker <https://bugs.python.org/issue34624> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2020-11-14 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: -nikratio ___ Python tracker <https://bugs.python.org/issue17852> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2019-07-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: Is there a good reason to not explicitly initialize them nevertheless? Valgrind is a common tool, and this false positive will affect everyone attempting to run it on a Python extension module. -- ___ Python

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2017-08-04 Thread Nikolaus Rath
New submission from Nikolaus Rath: With a particularly atrocious network connection, I often get the following exception: File "/usr/lib/python3/dist-packages/dugong/__init__.py", line 503, in connect self._sock = self.ssl_context.wrap_socket(self._sock, server_hostname=serve

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2017-08-05 Thread Nikolaus Rath
Nikolaus Rath added the comment: Regarding "atrocious connection": I wish I knew, but I have no control of the connection. All I can tell is that there are frequent disconnects, occasional latency spikes, my remote ip address seems to change frequently (while the apparent local on

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2018-12-22 Thread Nikolaus Rath
New submission from Nikolaus Rath : With current git master, configured --with-valgrind --with-pydebug, I get: ==31074== Command: /home/nikratio/clones/cpython/python /home/nikratio/in-progress/pyfuse3/test/../examples/hello.py /tmp/pytest-of-nikratio/pytest-11/test_hello_hello_py_0 ==31074

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2018-12-22 Thread Nikolaus Rath
Nikolaus Rath added the comment: Same error with 3.7.1 and 3.6.7 (though line numbers differ slightly). -- ___ Python tracker <https://bugs.python.org/issue35

[issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s)

2018-12-22 Thread Nikolaus Rath
Nikolaus Rath added the comment: $ ./configure CFLAGS="-O0 -g" --with-valgrind && make -j8 still gives ==13281== Memcheck, a memory error detector ==13281== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==13281== Using Valgrind-3.12.0.SVN and Li

[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2019-02-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: Sorry, no. I have long lost context and interest in this. -- ___ Python tracker <https://bugs.python.org/issue20177> ___ ___

[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-15 Thread Nikolaus Rath
Nikolaus Rath added the comment: Given the apparent difficulties getting this right, how about not attempting to implicitly flush buffers in the finalizer at all? This means scripts relying on this will break, but in contrast to the current behavior they will break consistently so it's

[issue1230540] sys.excepthook doesn't work in threads

2018-08-02 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: -nikratio ___ Python tracker <https://bugs.python.org/issue1230540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34920] PYTHONWARNINGS entries are escaped

2018-10-07 Thread Nikolaus Rath
New submission from Nikolaus Rath : According to https://docs.python.org/3/library/warnings.html#describing-warning-filters: "The meaning of each of these fields [of PYTHONWARNINGS] is as described in ." The description of the "The Warnings filter" says "module

[issue34920] PYTHONWARNINGS entries are escaped

2018-10-07 Thread Nikolaus Rath
Nikolaus Rath added the comment: yes, this is a duplicate. -- ___ Python tracker <https://bugs.python.org/issue34920> ___ ___ Python-bugs-list mailing list Unsub

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2018-10-07 Thread Nikolaus Rath
Change by Nikolaus Rath : -- nosy: +nikratio title: -W option does not accept module regexes -> -W option and PYTHONWARNINGS env variable does not accept module regexes ___ Python tracker <https://bugs.python.org/issu

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
New submission from Nikolaus Rath: [0] nikratio@vostro:~/tmp$ cat bugme.py #!python import getpass import warnings warnings.simplefilter('default') getpass.getpass("What's up?") [0] nikratio@vostro:~/tmp$ python3 --version Python 3.3.2 [0] nikratio@vostro:~/tmp$ p

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
Nikolaus Rath added the comment: No, it doesn't. -- ___ Python tracker <http://bugs.python.org/issue18116> ___ ___ Python-bugs-list mailing list Unsubsc

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
Nikolaus Rath added the comment: Yes, I'm pretty sure: [0] nikratio@vostro:~/tmp$ cp /usr/lib/python3.3/getpass.py . [0] nikratio@vostro:~/tmp$ patch -p2 < issue18116.diff patching file getpass.py Hunk #1 succeeded at 57 (offset -1 lines). [0] nikratio@vostro:~/tmp$ python3 bugme.

[issue17814] Popen.stdin/stdout/stderr documentation should mention object type

2013-06-30 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- keywords: +patch Added file: http://bugs.python.org/file30736/subprocess_rst.diff ___ Python tracker <http://bugs.python.org/issue17

[issue17814] Popen.stdin/stdout/stderr documentation should mention object type

2013-06-30 Thread Nikolaus Rath
Nikolaus Rath added the comment: patch attached. -- ___ Python tracker <http://bugs.python.org/issue17814> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

2013-06-30 Thread Nikolaus Rath
New submission from Nikolaus Rath: When using the three parameter form of type to create a new class, and any of the base classes has a metaclass with a __prepare__ function, the __prepare__ function is not executed: >>> class CustomMetaclass(type): ... @cl

[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

2013-06-30 Thread Nikolaus Rath
Nikolaus Rath added the comment: In that cases, maybe type(name, cls, clsdict) should actually raise an error if there's a metaclass with __prepare__ involved? Presumably that would break only code that was already broken, but it would convert previously hidden behavioral bugs in

[issue18524] BufferedReader.read1() documentation/implementation difference

2013-07-21 Thread Nikolaus Rath
New submission from Nikolaus Rath: The read1() docstring says: "Reads up to n bytes, with at most one read() system call." However, in the implementation read1() calls peek() to refill the buffer if necessary, and then returns whatever is available in the buffer. This means that re

[issue15805] Add stdout redirection tool to contextlib

2013-07-21 Thread Nikolaus Rath
Nikolaus Rath added the comment: I think stdout redirection is very useful, and I'm actually have a very similar context manager in my own code. However, I'd like to raise the question if using a context manager for this purpose should really be "officially blessed" in t

[issue18524] BufferedReader.read1() documentation/implementation difference

2013-07-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 07/24/2013 07:35 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> This means that read1() will only return up to n bytes if n is smaller >> than the buffer size, otherwise it will return at most >> bytes. &g

[issue18524] BufferedReader.read1() documentation/implementation difference

2013-07-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 07/24/2013 02:28 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le mercredi 24 juillet 2013 à 18:24 +0000, Nikolaus Rath a écrit : >> There should be no problem reading 20 bytes with a single call to >> BytesIO.

[issue18524] BufferedReader.read1() documentation/implementation difference

2013-07-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 07/24/2013 02:51 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le mercredi 24 juillet 2013 à 21:45 +0000, Nikolaus Rath a écrit : >> The documentation is correct that read1(n) never returns more than n bytes. >>

[issue18524] BufferedReader.read1() documentation/implementation difference

2013-07-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 07/24/2013 03:04 PM, Antoine Pitrou wrote: > However, 3.2 didn't get that improvement, sorry. See changeset 27bf3d0b8e5f > and issue #13393. > > -- > resolution: -> duplicate > status: open -> closed Duh. So much bac

[issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response

2013-07-27 Thread Nikolaus Rath
New submission from Nikolaus Rath: The handle_expect_100() implementation in BaseHTTPRequestHandler currently calls send_response_only(100) followed by flush_headers(). However, even a 1xx response is always followed by a (potentially empty) set of response headers (cf. http://tools.ietf.org

[issue18574] BaseHTTPRequestHandler.handle_expect_100() sends invalid response

2013-07-27 Thread Nikolaus Rath
Nikolaus Rath added the comment: The correct link is http://tools.ietf.org/html/rfc2616#section-10.1: 10.1 Informational 1xx This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line

[issue18861] Problems with recursive automatic exception chaining

2013-08-27 Thread Nikolaus Rath
New submission from Nikolaus Rath: Consider this: $ python3 test_exc.py Traceback (most recent call last): File "test_exc.py", line 14, in fail1() File "test_exc.py", line 11, in fail1 fail2() File "test_exc.py", line 5, in fail2 raise R

[issue18861] Problems with recursive automatic exception chaining

2013-08-27 Thread Nikolaus Rath
Nikolaus Rath added the comment: The second paragraph should of course read "...consequence of the 'First' exception *and* should thus be chained..." -- ___ Python tracker <http://bug

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2013-09-03 Thread Nikolaus Rath
Nikolaus Rath added the comment: *ping* -- ___ Python tracker <http://bugs.python.org/issue12704> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2013-09-04 Thread Nikolaus Rath
Nikolaus Rath added the comment: On 09/04/2013 06:03 AM, Eli Bendersky wrote: > Why guess... did you try it in the code? I don't follow... why guess what? And try what in code? > it would be nice to have a short code sample here demonstrating what's > happening. The parag

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2013-09-08 Thread Nikolaus Rath
Nikolaus Rath added the comment: I've attached an updated patch. I agree with Tim that the docs on the yield expression are already very good, so instead of extending the yield statement documentation I have shortened it to instead reduce the overlap that already exists. In the

[issue15633] httplib.response is not closed after all data has been read

2012-08-12 Thread Nikolaus Rath
New submission from Nikolaus Rath: Occasionally, the isclosed() method of HTTPResponse instances returns False, even though a preceding read() call returned '' (or something else that evalues to False). This is a problem, because then the corresponding HTTPConnection can still b

[issue15633] httplib.response is not closed after all data has been read

2012-08-13 Thread Nikolaus Rath
Nikolaus Rath added the comment: The problem seems to occur regularly, just with large intervals in between. Is there any specific information that might help here? I am not quite sure what to save when the problem happens the next time. Can the response object be pickled

[issue15633] httplib.response is not closed after all data has been read

2012-08-14 Thread Nikolaus Rath
Nikolaus Rath added the comment: The call should be read(size), with size a number. I will make sure to check size, "fp", "length", "chunked" and "chunk_left" when it happens the next time. -- ___ Python tra

[issue15633] httplib.response is not closed after all data has been read

2012-10-22 Thread Nikolaus Rath
Nikolaus Rath added the comment: This is just a heads-up that I'm still trying to debug this. So far, the problem doesn't seem to have shown up again (for reference, the original report for this is http://code.google.com/p/s3ql/issues/det

[issue1738] filecmp.dircmp does exact match only

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: I don't think that we can just introduce path normalization in phase0. Even though I agree that this would be the proper way to do it when reimplementing from scratch, it breaks backward compatibility. There also is a small mistake in that the *

[issue1738] Add match parameter to filecmp.dircmp to ignore name patterns

2014-03-16 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: filecmp.dircmp does exact match only -> Add match parameter to filecmp.dircmp to ignore name patterns versions: +Python 3.5 -Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue1738] Add match parameter to filecmp.dircmp to ignore using patterns

2014-03-16 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: Add match parameter to filecmp.dircmp to ignore name patterns -> Add match parameter to filecmp.dircmp to ignore using patterns ___ Python tracker <http://bugs.python.org/iss

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
New submission from Nikolaus Rath: When using non-blocking operation, the SSLSocket.send method returns 0 if no data can be sent at this point. This is counterintuitive, because in the same situation (write to non-blocking socket that isn't ready for IO): * A regular (non-SSL) socket r

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: This is actually seems to be not just an inconvience, but a real bug: since SSLSocket.sendall() uses SSLSocket.send() internally, the former method will busy-loop when called on a non-blocking socket. Note also that the .sendto and .write methods already

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Antoine, do you know that there are frameworks out there using this, or is that a guess? asyncio, for example, seems to expect an SSLWantWrite exception as well. (it also works with a zero return, but it's not clear from the code if that's by desi

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Twisted does not seem to rely on it either (there's no mention of SSLWant* in the source at all, and without that, you can't possibly have support for non-blocking ssl sockets). -- ___ Python trac

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: gevent is calling _sslobject.write() directly, so it would not be affected by any change. -- ___ Python tracker <http://bugs.python.org/issue20

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Tornado uses SSLSocket.send(), and it looks as if a SSLWantWrite exception is not caught but would propagate, so this would probably break. -- ___ Python tracker <http://bugs.python.org/issue20

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: More info on twisted: it uses PyOpenSSL rather than the stdlib ssl module, so it's not affected at all. -- ___ Python tracker <http://bugs.python.org/is

  1   2   3   4   >