[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks! I'm looking into applying these tonight (including 3.2) with a couple minor edits. -- ___ Python tracker <http://bugs.python.org/is

[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: To remove the double close fd-reuse-window race condition you describe in 3.2.3 and later I don't think you even need to add that code snippet. Just get rid of the for loop calling os.close on those three fd's all together. self.stdin, self.

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-11-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue16140> ___ __

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-11-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- stage: test needed -> committed/rejected ___ Python tracker <http://bugs.python.org/issue16140> ___ ___ Python-bugs-list mai

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: That test is gross... it creates a nasty cycle of an instance back to itself via a stubbed out nested function's enclosing scope. I'm sanitizing it now to simplify the code and not have any cycles. --

[issue8865] select.poll is not thread safe

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'm looking at getting this in. -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue8865> ___

[issue8865] select.poll is not thread safe

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: Christian Schubert (apexo) - Would you please submit a PSF contributor agreement form? http://www.python.org/psf/contrib/ http://www.python.org/psf/contrib/contrib-form-python/ thanks! -- ___ Python tracker

[issue8865] select.poll is not thread safe

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: here's an updated patch. it strikes me that this should not be a very common problem. how many applications are going to share the same poll object _across_ multiple threads? if they do and the file descriptor they'll be spending a lot of time

[issue8865] select.poll is not thread safe

2012-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: our patches are similar. i updated it to use long long and Py_ssize_t and Py_CLEAR and Py_RETURN_NONE in a few places and added comments. getting rid of the CLEAR_UFDS macro as you did is a good idea

[issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE

2012-11-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Sorry I can't help on the windows side of things. I don't have access to any windows systems. -- ___ Python tracker <http://bugs.python.o

[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2012-11-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm running into this on 2.7.3 with code that worked fine on 2.6.5. The problem appears to be caused by a 'Host' http header that has a unicode type for the hostname:port value. Encoding header values makes sense though I haven't yet e

[issue16475] Support object instancing and recursion in marshal

2012-11-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16500] Add an 'afterfork' module

2012-11-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: I would not allow exceptions to propagate. No caller is expecting them. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16500] Add an 'afterfork' module

2012-11-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: pthread_atfork() cannot be used to implement this. Another non-python thread started by a C extension module or the C application that is embedding Python within it is always free to call fork() on its own with zero knowledge that Python even exists at all

[issue16500] Add an 'afterfork' module

2012-11-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think you are solving a non-problem if you want to expose exceptions from such hooks. Nobody needs it. -- ___ Python tracker <http://bugs.python.org/issue16

[issue2454] sha and md5 fixer

2012-11-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: Any code conversion is useful. This will help with old libraries and is even good for just updating old 2.4 code to 2.7 best practices. -- ___ Python tracker <http://bugs.python.org/issue2

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-12-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Yes. See my comment from June. The write paths need to be taken care of. -- ___ Python tracker <http://bugs.python.org/issue12

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-12-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue8713> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: it's a potential bug. your patch looks good. as for _handle_exitstatus referring to SubprocessError, that is fine. In that situation it is trying to raise the exception and the only time that would ever be a problem is when called by the gc dur

[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-10 Thread Gregory P. Smith
New submission from Gregory P. Smith: test_posix.test_getgrouplist is failing for me on my Linux (ubuntu precise) based desktop at work. It looks like posix.getgrouplist() is returning all of the larger GIDs. The lowest one it is reporting for my user is 499 but the more distro specific

[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: would the values returned by getgrouplist always be a non empty subset of getgroups? (regardless, I expect the id -G process output parsing can be removed) -- title: test_posix.test_getgrouplist fails on some systems - incorrectly comparing

[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Given where the crash is occurring and that faulthandler traceback it makes me wonder if it was compiled with a set of openssl headers that don't make the library it is using at runtime. If you recompile the interpreter in debug mode (--with-pydebug on

[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Given this is more of a code coverage test than any need to test the functionality of the OS library call, just asserting that it returns a non-empty list is a decent test. :) -- ___ Python tracker <h

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: doesn't the size of code setting up ParseTupleWithKeywords and checking the values afterwards bother you? that's the same thing only much less consistent. -- ___ Python tracker <http://bugs.python.o

[issue16660] Segmentation fault when importing hashlib

2012-12-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: given the behavior you are seeing, I'm not inclined to trust your computer or however it is configured. I do not believe this is a Python issue. 3.3 works fine on RHEL 6 so it should work fine on CentOS 6. http://buildbot.python.org/all/builder

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: There's a bit of an impasse here on the PEP front. Guido said it wasn't needed. Antoine brings up the point that CPython developers will have to live with the result of this work so maybe something more easy to read and see in one place like a

[issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk

2012-12-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: PEPs are perceived as a hurdle. Regardless, clinic.txt would turn into one pretty easily so just doing it may be easiest. :) On Fri, Dec 14, 2012 at 12:11 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > I have no current

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2012-12-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith priority: normal -> critical ___ Python tracker <http://bugs.python.org/issue16742> ___ ___ Python-

[issue16772] int() accepts float number base

2012-12-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: If someone thinks this should go into 3.2 and 3.3 they're welcome to do it; no objections from me. (The behavior was unintentional and thus a bug, but it is still a minor behavior change) -- nosy: +gregory.p.

[issue16761] Fix int(base=X)

2012-12-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Having just looked added something to test_int as part of issue16772... There appears to be an explicit test _for_ this strange behavior in there: http://hg.python.org/cpython/file/60f7197f991f/Lib/test/test_int.py#l233 test_base_arg_with_no_x_arg I have

[issue16772] int() accepts float number base

2012-12-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the pointer to round(). PyNumber_AsSsize_t was just what the doctor ordered. PS Grump acknowledged and accepted. Its trunk and we're nowhere near a freeze so I figured it'd be fine to iterate on it in trunk

[issue16772] int() accepts float number base

2012-12-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: I used it because Mark suggested it could have the same behavior as round() and that is the more abstract API that round uses. Regardless, at this point I've added tests and tested for the TypeError when a float is passed as well as testing that the

[issue16772] int() accepts float number base

2012-12-27 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue16772> ___ ___ Python-bugs-list mailing list Un

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think the forkserver approach is a good idea. It is what a lot of users will choose. forkserver won't work everywhere though so the fork+exec option is still desirable to have available. Threads can be started by non-python code (extension module

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: ah, i missed that update. cool! +1 -- ___ Python tracker <http://bugs.python.org/issue8713> ___ ___ Python-bugs-list mailin

[issue16946] subprocess: _close_open_fd_range_safe() does not set close-on-exec flag on Linux < 2.6.23 if O_CLOEXEC is defined

2013-01-12 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith -gps ___ Python tracker <http://bugs.python.org/issue16946> ___ ___ Py

[issue3718] environment variable MACHDEP and python build system

2013-01-26 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue3718> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-01-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: the patch looks good, thanks! one minor comment in a test but i'll take care of that as i submit. -- ___ Python tracker <http://bugs.python.org/i

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue6972> ___ ___ Python-bugs-list

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2013-02-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: it was easier to just take care of auditing the write calls as part of this given the code change was directly related to it. On Python 2.7 most of the write calls in the builtin file object (Objects/fileobject.c) rather than the new io module use the libc

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2013-02-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12268> ___ ___ Python-bugs-

[issue17102] tarfile extract can write files outside the destination path

2013-02-01 Thread Gregory P. Smith
New submission from Gregory P. Smith: Create a malicious .tar file with entries containing absolute or relative paths and the tarfile module happily uses them as is without sanity checking. filed in response to http://bugs.python.org/issue6972 which fixed the zipfile module for this. I&#

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: yes, tarfile appears to have the same problem. http://bugs.python.org/issue17102 filed. -- ___ Python tracker <http://bugs.python.org/issue6

[issue17097] multiprocessing BaseManager serve_client() does not check EINTR on recv

2013-02-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- title: baseManager serve_client() not check EINTR when recv request -> multiprocessing BaseManager serve_client() does not check EINTR on recv ___ Python tracker <http://bugs.python.org/issu

[issue17102] tarfile extract can write files outside the destination path

2013-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: given issue 1044, this is not high priority. i still think it'd be useful. -- priority: high -> normal ___ Python tracker <http://bugs.python.org

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: I believe this is all done after Serhiy's fixes. -- assignee: gregory.p.smith -> serhiy.storchaka status: open -> closed ___ Python tracker <http://bugs.python

[issue14340] Update embedded copy of expat - fix security & crash issues

2013-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: done. btw, it looks like benjamin.peterson did it for 2.7 yesterday morning but when 'hg graft' is used to apply a change from another branch the roundup notification mentions the original commit's author, not the person who did the pu

[issue7358] cStringIO not 64-bit safe

2013-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Suggested workaround: use io.BytesIO instead of cStringIO. comments on the patch... in short: your patch is changing an ABI and isn't suitable for a maintenance release. I'm not sure how much we can usefully do to cStringIO in a maintenance rele

[issue7358] cStringIO not 64-bit safe

2013-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Include/cStringIO.h is public and the name of the structure "PycStringIO" lacks an _ which implies that it is public. There appear to be a few references to it in external projects doing some searching. A (very old) version of twisted/protocols/_

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2013-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Serhiy's patch looks good to me. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue6083> ___ ___

[issue17121] SSH upload for distutils

2013-02-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue17121> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: reopening as documentation mixups remain to be fixed. -- nosy: +benjamin.peterson, larry priority: high -> release blocker resolution: fixed -> stage: patch review -> needs patch ___ Python track

[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue6972> ___ ___ Python-bugs-list

[issue14678] Update zipimport to support importlib.invalidate_caches()

2013-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: Brett wrote a pure python zipimporter in http://bugs.python.org/issue17630 :) FWIW, the zipimport.c implementation (in 2.7) causes us serious pain when we've got the stdlib in a .zip file and need to update that while there are running python proc

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-23 Thread Gregory P. Smith
New submission from Gregory P. Smith: If you are 1) using zipimport 2) zipimport.c has cached the zip file's central index during an import. 3) the .zip file is modified or replaced while the process is running 4) you try to import something new from that .zip file. you're gonna

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's a fix (the test is now in the patch). -- keywords: +needs review stage: -> patch review Added file: http://bugs.python.org/file31860/issue19081-gps01.diff ___ Python tracker <http://bugs

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : Added file: http://bugs.python.org/file31869/issue19081-gps02.patch ___ Python tracker <http://bugs.python.org/issue19081> ___ ___ Python-bug

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : Added file: http://bugs.python.org/file31871/issue19081-gps03.patch ___ Python tracker <http://bugs.python.org/issue19081> ___ ___ Python-bug

[issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str()

2013-10-03 Thread Gregory P. Smith
New submission from Gregory P. Smith: >From a conversion through 2to3: < default_value=unicode("", "utf-8"), --- > default_value=str("", "utf-8"), The Python 2 unicode constructor takes an optional second parameter which is the co

[issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str()

2013-10-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Correct, my characterization above was wrong (I shouldn't write these up without the interpreter right in front of me). What is wrong with the conversion is: unicode("", "utf-8") in python 2.x should become either str(b""

[issue19236] Add Tornado HTTP benchmark

2013-10-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: makes sense to me. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue19236> ___ ___ Python-bugs-list m

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-10-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: I haven't had a chance to look at this since May. It'd still be a great addition. -- ___ Python tracker <http://bugs.python.o

[issue17276] HMAC: deprecate default hash

2013-10-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: yes just remove the DeprecationWarning. Document it as deprecated with a release now+0.2 as the earliest it will be removed. (if you want a warning at all, use PendingDeprecationWarning as that one is filtered out by default so it won't bother use

[issue18742] Abstract base class for hashlib

2013-10-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: > > Have you had a chance to read http://www.python.org/dev/peps/pep-0452/ , too? Overall pep 452 looks good but one thing popped out at me: >>> import hashlib >>> from Crypto.Hash import MD5 >>> m = M

[issue10197] subprocess.getoutput fails on win32

2013-11-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: The documentation needs updating to state that these are available on Windows (currently it says UNIX) with a versionchanged annotation. http://docs.python.org/3.3/library/subprocess.html#legacy-shell-invocation-functions -- nosy: +gregory.p.smith

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2013-11-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: If anybody using them in Python 3.3 is already depending upon them returning strings, changing it to return bytes will break their code... so that ship as unfortunately sailed. Changing that only in 3.4 would just cause churn and make code using this more

[issue19499] "import this" is cached in sys.modules

2013-11-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd take their question as an educational opportunity. reload(this) -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/is

[issue19499] "import this" is cached in sys.modules

2013-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue19499> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer
New submission from Leslie P. Polzer: http://hg.python.org/cpython/file/3.3/Lib/smtpd.py#l289 as of now decodes incoming bytes as UTF-8. An SMTP server must not attempt to interpret characters beyond ASCII, however. Originally mail servers were not 8-bit clean, meaning they would only

[issue12816] smtpd uses library outside of the standard libraries

2013-11-20 Thread Leslie P. Polzer
Changes by Leslie P. Polzer : -- nosy: +lpolzer ___ Python tracker <http://bugs.python.org/issue12816> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16462] smtpd should return greeting

2013-11-20 Thread Leslie P. Polzer
Changes by Leslie P. Polzer : -- nosy: +lpolzer ___ Python tracker <http://bugs.python.org/issue16462> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8503] smtpd SMTPServer does not allow domain filtering

2013-11-20 Thread Leslie P. Polzer
Changes by Leslie P. Polzer : -- nosy: +lpolzer ___ Python tracker <http://bugs.python.org/issue8503> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3802] smtpd.py __getaddr insufficient handling

2013-11-20 Thread Leslie P. Polzer
Changes by Leslie P. Polzer : -- nosy: +lpolzer ___ Python tracker <http://bugs.python.org/issue3802> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: Patch attached. This also adds some more charset clarification to the docs and corrects a minor spelling issue. It is also conceivable that we add a charset attribute to the class. This should have the safe default of latin1, and some notes in the docs that

[issue19662] smtpd.py should not decode utf-8

2013-11-20 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: Since this is my first contribution I'm not entirely sure about the fine details of backwards compatibility in Python, so please forgive me if I'm totally missing the mark here. There are facilities in smtpd's parent class asynchat t

[issue19678] smtpd.py: channel should be passed to process_message

2013-11-21 Thread Leslie P. Polzer
New submission from Leslie P. Polzer: process_message needs to have access to the channel state since it needs to make decisions based on the authentication or transport associated with the channel. It should be either the first or the last arg. I can provide a patch for this. Should

[issue19679] smtpd.py: implement ESMTP status messages

2013-11-21 Thread Leslie P. Polzer
New submission from Leslie P. Polzer: ESMTP status messages (of the form "xab x.y.z test") can be added easily to the current status message strings emitted by the SMTP server and channel classes. They are not harmful if the user's server only intends to support plain HE

[issue19679] smtpd.py (SMTPChannel): get rid of "conn" attribute

2013-11-21 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: The contents of "conn" are already stored by asyncore's "socket" attribute, so there doesn't seem to be a need to keep it around. We should deprecate its usage and refer the user to the "socket" attribute. Furthermor

[issue13788] os.closerange optimization

2013-11-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.org/issue13788> ___ ___ Python-bugs-list mailing list Un

[issue16134] Add support for RTMP schemes to urlparse

2013-11-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'd like to see a proposed change against the 3.4 standard library for this with tests. -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.org

[issue1195571] simple callback system for Py_FatalError

2013-11-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: i obviously didn't add this to 3.3, unassigning to reflect the attention it (isn't) currently getting. sorry! -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-11-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: For reference the current state of things for this is the proposal in: https://mail.python.org/pipermail/python-dev/2013-May/126196.html With a prototype using a ctypes based implementation as proof of concept in https://github.com/benhoyt/scandir. A

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-11-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- title: distutils.utils.get_platform() for 32-bit Python on a 64-bit machine -> distutils.utils.get_platform() for 32-bit Python on a 64-bit machine ___ Python tracker <http://bugs.python.org/issu

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-11-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: adding {0,1,2} to fds_to_keep (populated from pass_fds) is indeed an alternate approach. A variant of an alternate patch doing that attached. This actually simplifies code. Is there anything this would hurt that i'm not seeing? I suppose it adds

[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes

2013-11-25 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: Sorry for the confusion, the second comment (#msg203622) should actually have been a separate ticket. Since you'd like to preserve "conn" I will just change the title of this ticket. -- title: smtpd.py (SMTPChannel): get rid of &

[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes

2013-11-25 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: I am indeed referring to the enhanced status codes proposed in RFC 3463. This would just entail adding information to the status codes, converting them from the format " " to " ". In this it doesn't seem necessary to differentiate

[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes

2013-11-26 Thread Leslie P. Polzer
Leslie P. Polzer added the comment: Sounds reasonable, I will propose a patch soon. Thanks! -- ___ Python tracker <http://bugs.python.org/issue19679> ___ ___ Pytho

[issue18885] handle EINTR in the stdlib

2013-11-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: > I've always had an implicit understanding that calls with timeouts may, for > whatever reason, return sooner than requested (or later!), and the most > careful approach is to re-check the clock again. exactly. at the system call le

[issue18885] handle EINTR in the stdlib

2013-11-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: Guido's point was that it is already a bug in code to not check the elapsed time after a select call returns rather than assuming the full timeout time has elapsed. Correct code today already needs to deal with both situations (OSError(EINTR) and s

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-11-30 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.2 ___ Python tracker <http://bugs.python.or

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open ___ Python tracker <http://bugs.python.or

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: I do not consider this a feature; that EINTR is exposed as an exception from the API is a bug. But Larry is the only one who can actually make that decision as the 3.4 release manager (+nosy'd). > by returning an empty list you force the user t

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: It sounds like doing this is fine (as Glyph suggests in the email thread) but it isn't magically going to solve all EINTR problems, just reduce the number of calls that could encounter them. http://man7.org/linux/man-pages/man7/signal.7.html se

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: i went with the less invasive in terms of behavior change approach of making sure that the errpipe_write fd is always >= 3. In Python 3.4 the code change was different and much simpler and on the Python only side as all fd's are opened O_CLOEXEC by

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: > > I believe that the libc and the kernel knows better than Python how to > restart a syscalls, than Python. I expect more reliable timeout, or > the kernel may avoid context switches (don't wake up the process). > See the man page i l

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-12-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: I like Antoine's tutjson.patch. commit it. Thanks for noticing this Donald! -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/is

[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I fixed this in 3.3 and 3.4 several weeks ago. http://hg.python.org/cpython/rev/9791c5d55f52 http://hg.python.org/cpython/rev/00766fa3366b -- assignee: -> gregory.p.smith nosy: +gregory.p.smith resolution: -> fixed stage: -> committed

[issue19843] Wait for multiple sub-processes to terminate

2013-12-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I do not think this is ready to live in the standard library. I've left some comments on your patch review. Consider those for incorporation into the psutils project. wait_procs() implementation should live in the psutils module on PyPI with

<    23   24   25   26   27   28   29   30   31   32   >