[issue7484] smtplib: verify breaks with Postfix servers
Felipe Cruz added the comment: Can anyone take a loot at those patches? Do they need more tests? -- ___ Python tracker <http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7484] smtplib: verify breaks with Postfix servers
Felipe Cruz added the comment: You're very kind David. Hope I can contribute with something more relevant next time :) best regards, Felipe 2011/7/18 R. David Murray > > R. David Murray added the comment: > > Thank you both for your work on this. The patch I committed is a > combination of my _addr_only, Filipe's tests, and Catalin's modifications to > those tests. quoteaddr, although in the __all__, is not documented and is > really an implementation detail, as is the new _addr_only. So I am only > testing them indirectly through the documented parts of the API (I added a > test for <> address, and one for an IDNA encoded address). > > Catalin, I think you are correct about the try/except/None stuff. As far > as I can tell it is left over from the old days before the email package and > its philosophy of never throwing parsing errors. Nowadays if parseaddr > throws an error, it is a bug. That's a refactoring not a bug fix, though, > so I didn't backport it. > > -- > resolution: -> fixed > stage: test needed -> committed/rejected > status: open -> closed > > ___ > Python tracker > <http://bugs.python.org/issue7484> > ___ > -- Added file: http://bugs.python.org/file22693/unnamed ___ Python tracker <http://bugs.python.org/issue7484> ___You're very kind David.Hope I can contribute with something more relevant next time :)best regards,Felipe2011/7/18 R. David Murray <mailto:rep...@bugs.python.org";>rep...@bugs.python.org> R. David Murray <mailto:rdmur...@bitdance.com";>rdmur...@bitdance.com> added the comment: Thank you both for your work on this. Â The patch I committed is a combination of my _addr_only, Filipe's tests, and Catalin's modifications to those tests. Â quoteaddr, although in the __all__, is not documented and is really an implementation detail, as is the new _addr_only. Â So I am only testing them indirectly through the documented parts of the API (I added a test for <> address, and one for an IDNA encoded address). Catalin, I think you are correct about the try/except/None stuff. Â As far as I can tell it is left over from the old days before the email package and its philosophy of never throwing parsing errors. Â Nowadays if parseaddr throws an error, it is a bug. Â That's a refactoring not a bug fix, though, so I didn't backport it. -- resolution: Â -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <mailto:rep...@bugs.python.org";>rep...@bugs.python.org> <http://bugs.python.org/issue7484"; target="_blank">http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7484] smtplib: verify breaks with Postfix servers
Felipe Cruz added the comment: I've rewrote those patches to 'default' and 2.7 -- nosy: +felipecruz Added file: http://bugs.python.org/file21641/issue7484-py3k.diff ___ Python tracker <http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7484] smtplib: verify breaks with Postfix servers
Changes by Felipe Cruz : Added file: http://bugs.python.org/file21642/issue7484-27.diff ___ Python tracker <http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7484] smtplib: verify breaks with Postfix servers
Felipe Cruz added the comment: David.. I extracted quoteaddr code to _addrformat and now quoteaddr and _addronly call _addrformat passing a format (<%s> or %s). I've also created quoteaddr and _addronly test functions as well modified VRFY and EXPN tests to make sure they call _addronly and pointed brackets aren't added. Let me know if those patches still need improvements. -- Added file: http://bugs.python.org/file21651/issue7484-py3k_2.diff ___ Python tracker <http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7484] smtplib: verify breaks with Postfix servers
Changes by Felipe Cruz : Added file: http://bugs.python.org/file21652/issue7484-27_2.diff ___ Python tracker <http://bugs.python.org/issue7484> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: Looks like PyErr_WriteUnraisable can be a better choice. Exceptions at random execution points looks a little bit dirty at least for this case. -- ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: Looks good. -- ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: Hello! This is one of my first patches. Tests still OK! Let me know what you think! Thanks! -- keywords: +patch nosy: +felipecruz Added file: http://bugs.python.org/file27191/issue15897_v1.patch ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: Patch updated - fseek errors messges will be "can't read Zip file' and not "can't Open Zip file" -- Added file: http://bugs.python.org/file27192/issue15897_v1.patch ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: I've updated the patch changing fseek_error goto block error return from PyErr_SetFromErrno to PyErr_Format(ZipImportError, "can't read Zip file: %R", archive); (returning NULL after). -- Added file: http://bugs.python.org/file27194/issue15897_v1.patch ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: v4 - inline fseek return code check - as Christian suggested -- Added file: http://bugs.python.org/file27195/issue15897_v4.patch ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15948] Unchecked return value of I/O functions
Felipe Cruz added the comment: I can submit patches.. Is there any problem to send 1 patch per module? -- nosy: +felipecruz ___ Python tracker <http://bugs.python.org/issue15948> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines
Felipe Cruz added the comment: Add tests for {RawIO,BufferedIO,TextIO}.writelines() -- keywords: +patch nosy: +felipecruz Added file: http://bugs.python.org/file27200/issue15744_v1.patch ___ Python tracker <http://bugs.python.org/issue15744> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines
Felipe Cruz added the comment: Updated based on Pitrou comments -- Added file: http://bugs.python.org/file27220/issue15744_v2.patch ___ Python tracker <http://bugs.python.org/issue15744> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: Hello! Just sent the Contributor Agreement Form. -- ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
New submission from Felipe Cruz: It's possible to set a read only FD to signal.set_wakeup_fd(fd) Since write call[1] inside 'trip_signal' return code is ignored, no error will be raised. An untested solution is to call fcntl in this FD to check presence of write flags. 1 - http://hg.python.org/cpython/file/fb90e2ff95b7/Modules/signalmodule.c#l187 -- components: Library (Lib) messages: 171745 nosy: felipecruz priority: normal severity: normal status: open title: Pass read only FD to signal.set_wakeup_fd type: behavior versions: Python 2.6, Python 2.7, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: I would not say that is a bug, but there is a write(wakeup_fd) call with ignored return code and maybe this can be improved to an output to stderr, or maybe a better solution. -- ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15897] zipimport.c doesn't check return value of fseek()
Felipe Cruz added the comment: Should I send patches for 3.2 and 2.7? -- ___ Python tracker <http://bugs.python.org/issue15897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: Hello, since Antonie mentioned Py_AddPendingCall I came up with a patch describing what he proposed. Let me know if this patch can be improved or discarded(if the problem requires a more sophisticated solution). In case of improvement I can also submit another patch with a test case. -- keywords: +patch Added file: http://bugs.python.org/file27394/issue16105_v1.patch ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: > Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors. > The only error you may not want to report is EAGAIN. Charles, You're right! If all errno cases get covered in the patch, will It looks reasonable? -- ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: > Raising an error in case the signal can't be written to the FD > (because the other end didn't drain the pipe/socket) seems reasonable. > You should just retry on EINTR (although any sane implementation > shouldn't return EINTR on non-blocking write, I don't think it's > strictly prohibited by POSIX). You mean retry one time or until success? -- Added file: http://bugs.python.org/file27406/issue16105_v2.patch ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: This patch retries write() until success if errno == EINTR. There is also a test. -- Added file: http://bugs.python.org/file27428/issue16105_v3.patch ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Felipe Cruz added the comment: I've followed latest suggestions. Test and code updated. -- Added file: http://bugs.python.org/file27598/issue16105_v4.patch ___ Python tracker <http://bugs.python.org/issue16105> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16565] Increase Py_AddPendingCall array size
New submission from Felipe Cruz: Current pending calls limit is too small and it can be easily reached in very intensive async file io applications. There is a little hack in pyaio[1] which sleeps if Py_AddPendingCall returns < 0 but It's not totally clear to me why the size of pendind calls array is only 32. [1] https://github.com/felipecruz/pyaio -- components: IO messages: 176491 nosy: felipecruz priority: normal severity: normal status: open title: Increase Py_AddPendingCall array size versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue16565> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16565] Increase Py_AddPendingCall array size
Felipe Cruz added the comment: Just confirmed that signals is not a viable option. Is too slow, as Antonie already pointed. It's almost 5 times slower than with SIGEV_THREAD. The problem now is: If I use Py_AddPendingCall, the tests can hang sometimes. I can still follow Amaury suggestion tough. If I try to acquire the GIL PyGILState_Ensure() call PyObject_CallObject and release the GIL in the aio_completion_handler function a SEGFAULT occurs in 2.7.3 but not in 3.3 and newer.. This branch works only on 3.3 and newer: https://github.com/felipecruz/pyaio/tree/feature/check_no_pending_call This other branch will segfault 2.7.3 with just acquire and release GIL on the completion handler: https://github.com/felipecruz/pyaio/tree/feature/py27_gil_error Since this looks very strange, can someone confirm this behavior? Tested on a Ubuntu12 64. -- ___ Python tracker <http://bugs.python.org/issue16565> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16565] Increase Py_AddPendingCall array size
Felipe Cruz added the comment: Running test_aio_read [New Thread 0x77ff7700 (LWP 20681)] [New Thread 0x761ff700 (LWP 20682)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x761ff700 (LWP 20682)] sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 34 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S: No such file or directory. (gdb) backtrace #0 sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 #1 0x0051b053 in PyThread_release_lock (lock=0x0) at Python/thread_pthread.h:346 #2 0x004c868f in PyEval_ReleaseLock () at Python/ceval.c:265 #3 0x00501974 in PyThreadState_DeleteCurrent () at Python/pystate.c:321 #4 0x00502116 in PyGILState_Release (oldstate=PyGILState_UNLOCKED) at Python/pystate.c:652 #5 0x7660ed44 in aio_completion_handler (sigval=...) at pyaio/core.c:26 #6 0x76409cdc in notify_func_wrapper (arg=0x78c0) at ../sysdeps/pthread/aio_notify.c:45 #7 0x77bc4e9a in start_thread (arg=0x761ff700) at pthread_create.c:308 #8 0x771f14bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #9 0x in ?? () -- ___ Python tracker <http://bugs.python.org/issue16565> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16565] Increase Py_AddPendingCall array size
Felipe Cruz added the comment: Yes! 2.7.3 build with pydebug. -- ___ Python tracker <http://bugs.python.org/issue16565> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16565] Increase Py_AddPendingCall array size
Felipe Cruz added the comment: Without debug backtrace #0 sem_post () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S:34 #1 0x004d456e in PyGILState_Release () #2 0x759b9cdc in notify_func_wrapper (arg=0x78c0) at ../sysdeps/pthread/aio_notify.c:45 #3 0x77bc4e9a in start_thread (arg=0x759b5700) at pthread_create.c:308 #4 0x769b64bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #5 0x in ?? () -- ___ Python tracker <http://bugs.python.org/issue16565> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Felipe Cruz added the comment: I think you have a point. Did you know about the tulip project? http://code.google.com/p/tulip/source/browse/tulip/unix_events.py#76 It has a PollsterBase class and a SelectPollster(PollsterBase) so the idea is to have a Poller(and you call poll()) but select can be used underneath. Since tulip will be merged to stdlib, maybe you can work on tulip itself. Current tulip Pollers don't return (fd, event) but I have a fork that does for Poll, EPoll, KQueue and WindowsPollster: https://bitbucket.org/felipecruz/tulip/ The selector class doesn't have this change (return fd, mask tuple) right now. -- nosy: +felipecruz ___ Python tracker <http://bugs.python.org/issue16853> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Felipe Cruz added the comment: Hi Antonie, What you said also makes sense to me. There is one problem(?) that _map_events() is called for every event(for Poll and EPoll) and this can make things slower (I didn't tested it). Also, does it needs to be thread-safe? -- ___ Python tracker <http://bugs.python.org/issue16853> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Felipe Cruz added the comment: Hi.. 2 comments related to Kqueue/OSX(16.8) 1 - In tulip/selectors.py L311 and L314 - is key.fd not fd 2 - In EventLoopTestsMixin::test_writer_callback if the writer socket isn't non-blocking, the test hangs forever.. 3 - Errors: ERROR: testCreateSslTransport (tulip.events_test.PollEventLoopTests) File "/Users/felipecruz/Projects/tulip3/tulip/selectors.py", line 180, in _key_from_fd raise RuntimeError("No key found for fd {}".format(fd)) RuntimeError: No key found for fd -2 ERROR: test_sock_client_ops (tulip.events_test.KqueueEventLoopTests) File "/Users/felipecruz/Projects/tulip3/tulip/selectors.py", line 180, in _key_from_fd raise RuntimeError("No key found for fd {}".format(fd)) RuntimeError: No key found for fd 77 -- ___ Python tracker <http://bugs.python.org/issue16853> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25785] TimedRotatingFileHandler missing rotations
New submission from Felipe Cruz: I'm using TimedRotatingFileHandler to rotate a log file *every* minute. If I stop my program, in the middle of a minute, and start again, the next rotation will happen at (currentTime + 60). The result of this behavior is that I'll end up with files "log_01" and "log_03", instead of "log_01", "log_02" and "log_03". I'm using this class with a little modification which sets the next rollover time to (currentTime + (self.interval - currentSecond)). In this case, even If I stop and start my program in the middle a minute, the next rollover time will be the end of the current minute, not 60 seconds later and the result will be one file for each minute. To sum up, what happen is that the same program with the very same configuration, produces a different result if stopped for even just one second. If the interval was "rotate every 60 seconds" I would be ok, but If I'm configuring to rotate every minute I expect one file for each minute if the program was running the time the minutes changed. -- messages: 255757 nosy: felipecruz priority: normal severity: normal status: open title: TimedRotatingFileHandler missing rotations type: behavior versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue25785> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com