[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: Just in my defense: Larry suggested in msg164245 to me to check for listdir in supports_dir_fd so I just assumed it's broken as it didn't work. I'm totally fine with the current behavior, the discussion about dir_fd support in listdir isn't what I intended w

[issue15218] Check for all necessary dir_fd and follow_symlinks functions

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 992be49127e1 by Hynek Schlawack in branch 'default': Check for all used fd-based functions in shutil.rmdir, closes #15218 http://hg.python.org/cpython/rev/992be49127e1 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: Storchaka: please take it up with Antoine, he's the defender of the realm for POSIX-functions-are-atomic iirc. I'd be happy with dir_fd for os.listdir, though it may be too late for 3.3 anyway. -- nosy: +pitrou __

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I proposed making os.listdir accept dir_fd, and internally use open and > listdir to emulate the behavior. Hmm, I understood the issue as the request for adding dir_fd argument to os.listdir. openat+fdopendir+readdir+closedir+close or, in Python, def list

[issue15222] mailbox.mbox writes without end-of-line at the file end.

2012-06-28 Thread lilydjwg
New submission from lilydjwg : I find that when mbox writes mails back, it loses the last end-of-line, making appending new mails to the mbox becomes incorrect. I'm using Linux. In _singlefileMailbox.flush(), when writing the mbox, it loses the last byte ('\n') at the end of each message (beca

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread lilydjwg
Changes by lilydjwg : -- nosy: +lilydjwg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue15221] os.path.is*() may return False if path can't be accessed

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: The os.path.exists() docs already cover all the gory details of when it may be false due to limited permissions. The is* docs refer to this by their use of the word "existing", but that's probably too subtle. I suggest adding an extra sentence to the docs of al

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Frank, this bug tracker is not for posting general programming questions. Please see http://mail.python.org/mailman/listinfo/python-list instead. -- ___ Python tracker ___

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Frank Ling
Frank Ling added the comment: how to create socket and have block timeout mode? self.socket.setblocking(1) self.socket.settimeout(1) this program is error? -- ___ Python tracker __

[issue15221] os.path.is*() may return False if path can't be accessed

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: -1 on a "strict" parameter. This is a pointless obfuscation of the API. -- nosy: +pitrou ___ Python tracker ___ ___

[issue15221] os.path.is*() may return False if path can't be accessed

2012-06-28 Thread Cameron Simpson
Changes by Cameron Simpson : -- nosy: +cameron ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9216] FIPS support for hashlib

2012-06-28 Thread Luke Carrier
Luke Carrier added the comment: I've not done enough digging on the issue I'm presently experiencing to draw any conclusions make any suggestions, but this change seems to break the present distribute module (version 0.6.27). It appears it will likely break a great deal of other code too. I'

[issue15221] os.path.is*() may return False if path can't be accessed

2012-06-28 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : It seems a doc fix is the best way to go, in which case I leave this one to a native English speaker: http://mail.python.org/pipermail/python-dev/2012-June/120788.html Alternatively a new 'strict' parameter has been proposed as a workaround: http://mail.p

[issue15220] Reduce parsing overhead in email.feedparser.BufferedSubFile

2012-06-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: This is a performance enhancement. Out of question for 3.2. Python 3.3 is in beta now, and this would be considered a new feature, but I think it is pretty safe to apply. I am +1 to applying it. Personally I would apply it to 2.7 too, but current official po

[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15071] TLS get keys and randoms

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13968] Support recursive globs

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15145] Faster *_find_max_char

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed now. Thanks Serhiy for the patch! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9854520c8200 by Antoine Pitrou in branch '3.2': Issue #5067: improve some json error messages. http://hg.python.org/cpython/rev/9854520c8200 New changeset 7523ab4e6e06 by Antoine Pitrou in branch 'default': Issue #5067: improve some json error mess

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Fixed in 2.7, and ported test to 3.3. Thanks for the report and the fix! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c974c99acdf5 by Amaury Forgeot d'Arc in branch 'default': Port tests from Issue #15219, and verify we don't have a reference leak. http://hg.python.org/cpython/rev/c974c99acdf5 -- ___ Python tracker

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm closing this. os.listdir should not be listed in supports_dir_fd, because it has no dir_fd parameter. For reference, we discussed all this previously in issue #15176. -- resolution: -> invalid stage: needs patch -> committed/rejected status: ope

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49dee01d72f9 by Amaury Forgeot d'Arc in branch '2.7': Issue #15219: Fix a reference leak when hashlib.new() is called with http://hg.python.org/cpython/rev/49dee01d72f9 -- nosy: +python-dev ___ Python tr

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- assignee: -> amaury.forgeotdarc nosy: +pitrou stage: -> commit review ___ Python tracker ___ ___

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed. Thank you Jakub! -- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef16a3db4628 by Antoine Pitrou in branch '3.2': Issue #10571: Fix the "--sign" option of distutils' upload command. http://hg.python.org/cpython/rev/ef16a3db4628 New changeset b45f105dbdfb by Antoine Pitrou in branch 'default': Issue #10571: Fix th

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review versions: +Python 2.7 -Python 3.4 ___ Python tracker ___ ___ Python-

[issue15204] Deprecate the 'U' open mode

2012-06-28 Thread Nadeem Vawda
Nadeem Vawda added the comment: +1 for the general idea of deprecating and eventually removing the "U" modes. But I agree with David, that it doesn't make sense to have separate steps for 3.5 and 3.6/4.0. If you make the code raise an exception when "U" is used, how is that different from what

[issue15220] Reduce parsing overhead in email.feedparser.BufferedSubFile

2012-06-28 Thread R. David Murray
New submission from R. David Murray : The idea for the attached patch comes from the QNX development team. In their measurements, replacing the re.split-plus-line-reassembly code in BufferedSubFile with str.splitlines provided a 30% reduction in email parsing time. The code is also a lot mor

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: Ah sorry, that wasn't in the mail (stupid >>>). -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue14133] improved PEP 409 implementation

2012-06-28 Thread Patrick Westerhoff
Patrick Westerhoff added the comment: Alright, thought so but wanted a confirmation anyway – thanks a lot :D -- ___ Python tracker ___ __

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: Like I said: use os.supports_fd. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: I don't really care about the name but I'd really like some way to check whether listdir supports fds. -- ___ Python tracker ___

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I want to mark this as wontfix. >>> os.listdir in os.supports_fd True The concept we're struggling with here: is the "fd" you pass in to os.listdir a "dir_fd"? I claim that it isn't. I'm trying to enforce the concept, in both the documentation and the code

[issue5765] stack overflow evaluating eval("()" * 30000)

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think that eval is used in security context. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue5765] stack overflow evaluating eval("()" * 30000)

2012-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: In 3.3.3a4 and b1, with original 3, I no longer get TypeError, but box "python(w).exe has stopped working". So either Win7, 64 bit, on machine with much more memory makes a diffence, or something in code reverted. Is this really a security issue? (If so,

[issue15218] Check for all necessary dir_fd and follow_symlinks functions

2012-06-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15216] Support setting the encoding on a text stream after creation

2012-06-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The following code prevents another prompt from appearing: And this a more serious issue concerns 3.3. -- versions: +Python 3.3 ___ Python tracker ___

[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Does anyone know a good way to make the exception render as: "must be str, > not int" instead of "must be str, not " ? raise TypeError('must be str, not %s' % type(s).__name__) -- nosy: +storchaka ___ Python tr

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there any guidelines on when GIL should be released? The GIL should be released: - for CPU-heavy external functions (e.g. compression, cryptography) - for external functions which wait for I/O > Re PyTuple_SET_ITEM...yes that's also a possibility but it

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is a test, which fails when I run regrtest with leak detection: ./python -m test.regrtest -R:: test_hashlib -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file26203/hashlib-leak.patch ___

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2012-06-28 Thread Pankaj D
Pankaj D added the comment: Wondering the same thing myself, and yes sqlite3_column_type() by itself doesn't seem expensive. I assumed in general it was to allow more responsiveness for apps with huge number of columns (i.e. large tuple size). But we have about 20-25 columns and so I was g

[issue15077] Regexp match goes into infinite loop

2012-06-28 Thread Matthew Barnett
Matthew Barnett added the comment: It's not a bug, it's a pathological regex (i.e. it causes catastrophic backtracking). It also works correctly in the "regex" module. -- ___ Python tracker _

[issue15077] Regexp match goes into infinite loop

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it's *not* a bug. The issue can be closed. -- ___ Python tracker ___ ___ Python-bugs-list

[issue15077] Regexp match goes into infinite loop

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it's a bug. The issue can be closed. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue5765] stack overflow evaluating eval("()" * 30000)

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Terry, try a large constant. I can reproduce it on all versions from 2.6 to 3.3 with eval("()" * 30). -- nosy: +storchaka versions: +Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracke

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Tim Golden
Tim Golden added the comment: And here's a patch for the default branch, using the new sigint event as Kristan suggested. -- Added file: http://bugs.python.org/file26202/issue1677-python3x.patch ___ Python tracker

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Could you possibly provide a testcase?. -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Michael Fötsch
Michael Fötsch added the comment: The change is against the 2.7 branch. The 3.2 branch is not affected. -- ___ Python tracker ___ ___

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Tim Golden
Tim Golden added the comment: Nope. Ctrl-C also sets EOF -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Michael Fötsch
New submission from Michael Fötsch : If the "name" argument to "_hashlib.new()" is not a string, the reference count for the "string" argument is not decremented. In the file "Modules/_hashopenssl.c", function "EVP_new()", a call to "PyBuffer_Release()" is missing: if (!PyArg_Parse(name_obj

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wonder why _pysqlite_fetch_one_row() releases the GIL around sqlite3_column_type(). By its name, it doesn't sound like an expensive function. Another workaround would be to call PyTuple_SET_ITEM instead of PyTuple_SetItem. -- components: +Extension

[issue15209] Re-raising exceptions from an expression

2012-06-28 Thread Ethan Furman
Ethan Furman added the comment: Removed sample code from doc patch as it was not robust, nor recommended practice. New patch is effectively: Note: Because using :keyword:`from` can throw away valuable debugging information, its use with a bare :keyword:`raise` is not supported. -

[issue15209] Re-raising exceptions from an expression

2012-06-28 Thread Ethan Furman
Ethan Furman added the comment: Tyler Crompton wrote: > I'm in a little over my head as I can't conceptualize __cause__, so I may be > looking over things. > > First, you, Ethan, said the following: > >> It's also not difficult to work around if you really want to toss the extra >> info: >>

[issue1251] ssl module doesn't support non-blocking handshakes

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: [...] > > Should this Issue be reopened or should I file a new Issue? I would prefer a new issue to be filed (assuming the error happens again). -- ___ Python tracker ___

[issue15209] Re-raising exceptions from an expression

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Correction, your try block is overbroad and will suppress errors in the getch implementation. This is better: try: _getch = windows_module.getch except NameError: _ getch = fallback_module.getch _getch() So I'm sticking with my persp

[issue15209] Re-raising exceptions from an expression

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: If you don't want the exception context set *at all*, just use a pass statement to get out of the exception before trying the fallback. try: return windows_module.getch() except NameError: pass # No exception chaining fallback_module.

[issue1251] ssl module doesn't support non-blocking handshakes

2012-06-28 Thread Michael Gundlach
Michael Gundlach added the comment: I recently started getting what appears to be this bug in 2.6.6 and 2.7.3 when connecting to Google. My script does this: while True: get an IMAP connection to Google, if our old one timed out fetch unread messages. if any: make an SMTP con

[issue14133] improved PEP 409 implementation

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Yep - note that PEP 409 was updated to say that the the implementation discussion has been superceded by PEP 415. It may be worth making that note more prominent, though... -- ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-28 Thread Marc Abramowitz
Marc Abramowitz added the comment: I don't know if I'll have time soon to do the tweaks to Ronan's test (and maybe he wants to do them himself anyway?), but here's the correction of the size calculation in the header (from size of bytecode to size of source -- thanks, Brett!) -- Adde

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hm, I wonder if the test for the SIGINT event is required at all. Could it be sufficient to simply check for the EOF state? EOF would indicate ctrl z and distinguish it thus from ctrl-c. -- ___ Python track

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Thanks for the analysis! This is quite similar to issue793822: gc.get_referrers() can access unfinished tuples. The difference here is that what breaks is not the monitoring tool, but the "main" program! Here is a simple script inspired from the origin

[issue15218] Check for all necessary dir_fd and follow_symlinks functions

2012-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue12142] Reference cycle when importing ctypes

2012-06-28 Thread Meador Inge
Meador Inge added the comment: > Meador, can we close this issue? I wanted to keep it open until the 'long double' problem is fixed as well. -- ___ Python tracker ___ _

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Tim Golden
Tim Golden added the comment: This patch is for 2.7 and does enough to solve the issue without a major rework. The signal module onthe default branch has had a lot of love recently and I'll definitely make use of that for a 3.x patch. -- ___ Python t

[issue15209] Re-raising exceptions from an expression

2012-06-28 Thread Tyler Crompton
Tyler Crompton added the comment: I'm in a little over my head as I can't conceptualize __cause__, so I may be looking over things. First, you, Ethan, said the following: >It's also not difficult to work around if you really want to toss the extra >info: > >except NameError: >

[issue15218] Check for all necessary dir_fd and follow_symlinks functions

2012-06-28 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- dependencies: +os.listdir is missing in os.supports_dir_fd ___ Python tracker ___ ___ Python-bugs-list

[issue15218] Check for all necessary dir_fd and follow_symlinks functions

2012-06-28 Thread Hynek Schlawack
New submission from Hynek Schlawack : Currently not all functions are checked. As soon as #15217 is fixed, we have to add the rest. -- assignee: hynek components: Library (Lib) files: fd-protection.diff keywords: patch messages: 164259 nosy: hynek priority: release blocker severity: nor

[issue12142] Reference cycle when importing ctypes

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Meador, can we close this issue? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ Pyth

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2012-06-28 Thread Pankaj D
Pankaj D added the comment: I believe I have found the root-cause for this issue. It is occurring due to the use of the garbage collector in another “memMonitor” thread (we run it periodically to get stats on objects, track mem leaks, etc). Since _pysqlite_fetch_one_row() releases the GI

[issue15216] Support setting the encoding on a text stream after creation

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The proposal [1] is that TextIOWrapper support a set_encoding() method that > is only supported between creation of the stream and the first read or write > operation. IMHO "encoding", "errors", "buffering", "line_buffering" and "newline" should be writa

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9134bb4d0578 by Hynek Schlawack in branch 'default': #4489: Use dir_fd in rmdir in _rmtree_safe_fd() http://hg.python.org/cpython/rev/9134bb4d0578 -- ___ Python tracker

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: The _pre_mailbox_hook may be called twice, like this: babyl = mailbox.Babyl('new_file') babyl.add('foo\n') babyl.remove(0) babyl.add('bar\n') This only affects Babyl, that writes the mailbox header in _pre_mailbox_hook. The mailbox is corrupted on disk until

[issue13886] readline-related test_builtin failure

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: I had exactly the same error on 3.3b1 when running the test suite with randomized order. -- nosy: +petri.lehtinen ___ Python tracker ___ _

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Tim Golden
Tim Golden added the comment: To be clear: ERROR_OPERATION_ABORTED is set when Ctrl-Z is hit as the only thing on a line. If it's just an extra character then it operates like any other keypress. -- ___ Python tracker

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I'm pretty busy right now, please open a ticket for listdir. done > _rmtree_safe_fd could remove the directory just after the recursive step > using the parent's dirfd. Of course you'd also have to add a rmdir for the > very-tippy-top after the original

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Tim Golden
Tim Golden added the comment: Yep. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Hynek Schlawack
New submission from Hynek Schlawack : >>> n = os.open('/tmp', os.O_RDONLY) >>> l = os.listdir(n) >>> os.listdir in os.supports_dir_fd False -- assignee: larry components: Library (Lib) messages: 164249 nosy: hynek, larry priority: release blocker severity: normal stage: needs patch statu

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm pretty busy right now, please open a ticket for listdir. _rmtree_safe_fd could remove the directory just after the recursive step using the parent's dirfd. Of course you'd also have to add a rmdir for the very-tippy-top after the original call in shutil.

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I'm not a security guy, but: shouldn't the os.unlink call when it isn't a > directory specify follow_symlinks=False? os.unlink has no follow_symlinks argument. Imagine what would happen if you‘d do a os.unlink() on a link and it would just remove the link

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Is the ERROR_OPERATION_ABORTED set when Ctrl-Z is hit? -- ___ Python tracker ___ ___ Python-bu

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm not a security guy, but: shouldn't the os.unlink call when it isn't a directory specify follow_symlinks=False? And wouldn't it be safer if the os.rmdir() call also used dir_fd=? Additionally, I think you missed some stuff for shutil._use_fd_functions.

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: In fact, there is _PyOS_SigintEvent at the end of signalmodule.c -- ___ Python tracker ___ _

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Shouldn't we be using a proper synchronization primitive? What about waiting for an event? -- nosy: +kristjan.jonsson ___ Python tracker _

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2012-06-28 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek versions: +Python 3.4 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: See #15122 for always modifying single-file mailboxes in-place. -- ___ Python tracker ___ ___ Python

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed. I removed the extra newlines. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c37cb11b546f by Petri Lehtinen in branch '2.7': #9559: Append data to single-file mailbox files if messages are only added http://hg.python.org/cpython/rev/c37cb11b546f New changeset 5f447a005d67 by Petri Lehtinen in branch '3.2': #9559: Append dat

[issue15216] Support setting the encoding on a text stream after creation

2012-06-28 Thread Nick Coghlan
New submission from Nick Coghlan : As discussed on python-ideas, swapping out the sys.std* streams can be fraught with peril. This can make writing code that wants to support an "--encoding" option for pipeline processing difficult. The proposal [1] is that TextIOWrapper support a set_encoding

[issue14469] Python 3 documentation links

2012-06-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Right now, I do not see the problem mentioned in this report. http://www.python.org/doc/ point to a page which has reference docs to both 2.7 and 3.0. The left hand side, Other Resources Link are generic too. docs.python.org pointing to py2.7 is a python-de

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Setting as a release blocker for 3.4 - this is important. -- priority: normal -> release blocker stage: commit review -> ___ Python tracker ___ _

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, this is normal. Timeout sockets use a non-blocking fd internally: http://docs.python.org/dev/library/socket.html#notes-on-socket-timeouts This won't be visible to you if you only use the socket object, but it will if you call fileno() and use the file des

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9f798f1421e by Hynek Schlawack in branch 'default': #4489: Don't follow ever symlinks in rmtree http://hg.python.org/cpython/rev/f9f798f1421e -- ___ Python tracker __

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thanks you for catching that! It seems we did something really stupid: followed symlinks. I’ve fixed that and added regression tests. This one is a facepalm gentlepeople. -- ___ Python tracker

  1   2   >