[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-04-28 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue13241> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2012-04-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: The proposed patch has been committed as c4dcbe51c2e3 – any reasons why this issues is still open? -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue7

[issue11352] Update cgi module doc

2012-04-29 Thread Hynek Schlawack
Hynek Schlawack added the comment: What is the reason for this one to languish for over a year now? Lack of proper patch? It’s marked “high priority”, so let’s get moving. -- nosy: +hynek, sandro.tosi ___ Python tracker <http://bugs.python.

[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Hynek Schlawack
Hynek Schlawack added the comment: Hi Jakob, parse_constant has been changed as of d95e5add3ca4 to be called only on "-Infinity, Infinity, NaN": ``parse_constant``, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. T

[issue14157] time.strptime without a year fails on Feb 29

2012-04-29 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- keywords: +needs review stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue14157> ___ ___ Py

[issue14082] shutil doesn't copy extended attributes

2012-04-29 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue14082> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-29 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- components: +Library (Lib) -None stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue14662> ___ _

[issue10433] Document unique behavior of 'getgroups' on OSX

2012-04-29 Thread Hynek Schlawack
Hynek Schlawack added the comment: This one LGTM, still applies cleanly against current tip and is languishing for a way to long time. Commit & close? -- nosy: +hynek versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/iss

[issue11352] Update cgi module doc

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: That’s not a patch. :) Posting whole files makes them very hard to review because you can’t spot the changes. The best thing would be to get a fresh clone of the repo: http://docs.python.org/devguide/setup.html#setup , copy your edited file to the

[issue7719] distutils: ignore .nfsXXXX files

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: Jeff, the patch LGTM but Eric indicated he'd like to have a higher level test inside Lib/distutils/tests/test_sdist.py. Possibly as part of a bigger test like test_prune_file_list or test_add_defaults; no need to remove the old test though I guess.

[issue13152] textwrap: support custom tabsize

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: The code LGTM, the documentation lacks `versionchanged` tag though. Would you mind adding it? -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue13

[issue10142] Support for SEEK_HOLE/SEEK_DATA

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: In some cases you change "invalid" to "unsupported" when encountering an invalid/unsupported `whence' and in others you keep them on "invalid". I find it rather hard to really differentiate these two words in that context

[issue11352] Update cgi module doc

2012-04-30 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: -hynek ___ Python tracker <http://bugs.python.org/issue11352> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: As makedirs in 3.x doesn’t handle EPERM and is otherwise the same, I presume the error is there as well. I also presume, that after the failed makedirs(), the directory is mounted? I'd just handle the error just we handle EEXIST in 3.x now. --

[issue14702] os.makedirs breaks under autofs directories

2012-04-30 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue14702> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14082] shutil doesn't copy extended attributes

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: I didn't. :/ I'll look into it tomorrow. -- ___ Python tracker <http://bugs.python.org/issue14082> ___ ___ Python-b

[issue14082] shutil doesn't copy extended attributes

2012-05-01 Thread Hynek Schlawack
Hynek Schlawack added the comment: I have answered to the (two weeks old :-/) review. There are three open questions in there we'll have to figure out before I fix the patch: - should copyxattr() remove xattrs in dst that aren't present in src? Make it an option like `remove_mis

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-01 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- assignee: -> hynek title: shutil.move broken in 2.7.3 on OSX (chflags fails) -> shutil.move doesn't handle ENOTSUP raised by chflags on OS X ___ Python tracker <http://bugs.python.

[issue14082] shutil doesn't copy extended attributes

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I really like the idea of adding extended attributes copy to shutil.cop2(). > However, I'm not convinced that exposing the raw copyxattr() is > necessary (I can't really come up with a use case for this). > > So I'd suggest

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: Fixed for 2.7 -- Added file: http://bugs.python.org/file25434/expand-chflags-catch-2.7-v2.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: Fixed for 3.2. -- Added file: http://bugs.python.org/file25435/expand-chflags-catch-3.2-v2.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: And finally tip. -- Added file: http://bugs.python.org/file25436/expand-chflags-catch-tip-v2.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14702] os.makedirs breaks under autofs directories

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: David: What do you mean? I'd just catch EPERM and look whether the directory "appeared" in the meantime. If it exists, continue. If not: re-raise. Am I missing something? I may have a look at GNU mkdir if

[issue14702] os.makedirs breaks under autofs directories

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: Charles, I don't think you can blame autofs here. The problem at hand is that makedirs() never checks whether the directory exists (that would trigger the mount too I presume). Instead, it tries a mkdir and looks if it gets an EEXIST. If you try

[issue14702] os.makedirs breaks under autofs directories

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: >> Charles, I don't think you can blame autofs here. The problem at hand is >> that makedirs() never checks whether the directory exists (that would >> trigger the mount too I presume). > > Yes, it does. Have a look at line

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: So here's an updated patch. I've stripped everything away we don't need for copy2 integration. It catches EPERM, ENOTSUP and ENODATA (for race conditions). Happy reviewing. :) -- Added file: http://bugs.python.org/file25462/c

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: > The copyxattr() function should be private (_copyxattr()). Ok. I presumed that not adding it to __all__ is "private enough". > For some reason the tests are failing here: > >

[issue14731] Enhance Policy framework in preparation for adding email6 policies as provisional

2012-05-05 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue14731> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: Ok, I've extracted the xattr checker from test_os.py and transformed it into a caching decorator like skip_unless_symlinks. _copyxattr rename is also done. -- Added file: http://bugs.python.org/file25477/copy2-xattr-with-better-protection

[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2012-05-09 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue14758> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14082] shutil doesn't copy extended attributes

2012-05-10 Thread Hynek Schlawack
Hynek Schlawack added the comment: I did. The only error I got was ERROR: test_idna (test.test_socket.GeneralModuleTests) -- Traceback (most recent call last): File "/home/vagrant/p2/Lib/test/test_socket.py", lin

[issue14773] fwalk breaks on dangling symlinks

2012-05-10 Thread Hynek Schlawack
New submission from Hynek Schlawack : I'm implementing a safe rmtree using fwalk. Everything works perfectly except for one thing: if the directory contains dangling symlinks, fwalk goes belly-up: $ ls -l test/ total 0 lrwxrwxrwx 1 vagrant vagrant 4 May 10 16:36 doesntwork -> this $

[issue14772] Return destination values in some shutil functions

2012-05-10 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue14772> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2012-05-10 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- assignee: tarek -> dependencies: +fwalk breaks on dangling symlinks keywords: -patch stage: patch review -> needs patch ___ Python tracker <http://bugs.python.org/

[issue14772] Return destination values in some shutil functions

2012-05-10 Thread Hynek Schlawack
Hynek Schlawack added the comment: Code LGTM, a deeper discussion happened on IRC. :) I'd still suggest for the sake of consistency to return the destination from copytree() too, but that can be done separately. -- stage: patch review -> commi

[issue4841] io's close() not handling errors correctly

2012-05-10 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue4841> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14781] strptime fails for year 0

2012-05-11 Thread Hynek Schlawack
Hynek Schlawack added the comment: Hello Matthias, %Y for strptime is defined as: "Year with century as a decimal number [0001,] (strptime), […]" so it works as specified. And actually that's correct as there was no year zero (http://en.wikipedia.org/wiki/0_(year)). :)

[issue14781] Default to year 1 in strptime if year 0 has been specified

2012-05-11 Thread Hynek Schlawack
Hynek Schlawack added the comment: Well, that's what C's strptime does. But that would be a feature request (if it works as documented, it's no bug). :) I've transformed this issue accordingly. But as a feature request, it won't go into 2.7 unless I'm missi

[issue14781] Default to year 1 in strptime if year 0 has been specified

2012-05-11 Thread Hynek Schlawack
Hynek Schlawack added the comment: I have to correct myself: It's _not_ what C's strptime does. C's strptime returns via "struct tm" which saves only "years since 1900" in the "tm_year" field. -- __

[issue14773] fwalk breaks on dangling symlinks

2012-05-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: But if it is a dangling symlink, you want to add it to nondirs while missing files could be skipped, no? You can't skip dangling symlinks if you want to implement rmtree. The normal walk() doesn&

[issue14773] fwalk breaks on dangling symlinks

2012-05-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: So I've changed the patch to ignore everything missing except for dangling links (which throw unfortunately the same exception). Just to stress it once more: a fwalk that _ignores_ dangling symlinks is worthless for rmtree. And wasn't rmtree t

[issue14794] slice.indices raises OverflowError

2012-05-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: This seems to have been fixed as of 3.2.3 (as shipped with Ubuntu Precise): Python 3.2.3 (default, Apr 12 2012, 19:08:59) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >

[issue14794] slice.indices raises OverflowError

2012-05-13 Thread Hynek Schlawack
Hynek Schlawack added the comment: I did a little compiling party with official releases and all permutations of Linux, OS X x 3.2.2, 3.2.3 worked. Both ran on 64bit (Linux in a VirtualBox). Python 3.2.2 (default, May 13 2012, 21:24:38) [GCC 4.6.3] on linux2 Type "help",

[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack
New submission from Hynek Schlawack : After having been called out on wrong default arg notation in one of my patches (eg. function:: copyfile(src, dst[, symlinks=False])), I've done a "grep -RPi "\[\w+=" Doc/library" and fixed the cases I've found – many of th

[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: I had to expand the patch a bit by default args that weren't caught before. So here is still against default. It applies also against 3.2, only missing stuff fails AFAICT. (and yes, I checked the mknod device arg). 2.7 is in the works. --

[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: Here's against 2.7 which proved to be a can of worms. I tried to be as unobstructive as possible. Please have a look at it, I'm sure I forgot some parenthesis somewhere. -- Added file: http://bugs.python.org/file25576/doc-default-args-v

[issue14157] time.strptime without a year fails on Feb 29

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: On it. I wonder whether it causes trouble that we return an invalid time_struct down the road? -- ___ Python tracker <http://bugs.python.org/issue14

[issue14157] time.strptime without a year fails on Feb 29

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: I have added a restoration including a short explanation + a regression test. -- Added file: http://bugs.python.org/file25580/strptime-restore-1900.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14157] time.strptime without a year fails on Feb 29

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: Small adjustments to the test as discussed in IRC. -- assignee: -> hynek resolution: fixed -> stage: committed/rejected -> patch review type: enhancement -> behavior Added file: http://bugs.python.org/file25581/strptime-restore-

[issue14809] Add HTTP status codes introduced by RFC 6585

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: I've cross-checked the patch against the RFC and it LGTM. Tests still pass as expected. -- nosy: +hynek stage: -> patch review ___ Python tracker <http://bugs.python.org

[issue14811] compile fails - UTF-8 character decoding

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack added the comment: Would you mind adding more information like the full traceback? By saying "compilation error", I presume you mean the compilation of the t33a.py file into byte code (and not compilation of Python itself)? I can't reproduce it neither with th

[issue14811] compile fails - UTF-8 character decoding

2012-05-15 Thread Hynek Schlawack
Hynek Schlawack added the comment: You are right, file system encoding was platform dependent, not file encoding. This space-after-parentheses trigger is odd; I'm adding the Windows guys to the ticket. Please tell us also your exact version of Windows. -- components: -Interp

[issue14809] Add HTTP status codes introduced by RFC 6585

2012-05-15 Thread Hynek Schlawack
Hynek Schlawack added the comment: EungYun, After further research I've found two issue which you should fix before it can be checked in: - The multi-line strings are missing spaces at their line break (429 and 431). - The error codes are documented at http://hg.python.org/cpython

[issue14773] fwalk breaks on dangling symlinks

2012-05-15 Thread Hynek Schlawack
Hynek Schlawack added the comment: I just realized it doesn't really make sense because if a file disappears for real, we'll get another FileNotFoundException when checking whether it's a symlink and the continue is never reached. So behold v3. :) This time, I have tested it

[issue14773] fwalk breaks on dangling symlinks

2012-05-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/issue14773> ___ __

[issue14809] Add HTTP status codes introduced by RFC 6585

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thank you for your contribution to Python, EungJun! Just two small remarks: - Please sign and submit the contributor form from http://www.python.org/psf/contrib/ . You'll get a nice star next to your name in return. :) - I have fixed the flow of o

[issue14773] fwalk breaks on dangling symlinks

2012-05-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- resolution: -> fixed ___ Python tracker <http://bugs.python.org/issue14773> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14692] json.loads parse_constant callback not working anymore

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: I'm afraid I have to close this one as rejected. It works as documented and it's unlikely we'll decide to change it back. I'm sorry. -- resolution: -> rejected stage: needs patch -> committed/rejec

[issue13849] Add tests for NUL checking in certain strs

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Why is this one still open? I'm afraid the questions raised aren't fit to be discussed in a ticket (weren't the outsourcing of of stdlib an item at the language summit?). I tend to close it as rejected (although I rather disagree) unl

[issue14682] Backport missing errnos to 2.7

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: This one has been fixed together with #14662 in e12efebc3ba6. Thank you everyone for your input! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python track

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Andrew, are you still with us? -- ___ Python tracker <http://bugs.python.org/issue14702> ___ ___ Python-bugs-list mailin

[issue14772] Return destination values in some shutil functions

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Brian, are you going to update that patch so we can close this? :) -- ___ Python tracker <http://bugs.python.org/issue14

[issue7719] distutils: ignore .nfsXXXX files

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Jeff, are you still interested in updating your patch or would you prefer if someone else tackled it? -- ___ Python tracker <http://bugs.python.org/issue7

[issue14692] json.loads parse_constant callback not working anymore

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: You're right, I was referring to the doc string. -- resolution: rejected -> stage: committed/rejected -> patch review status: closed -> open ___ Python tracker <http://bugs.pyth

[issue14692] json.loads parse_constant callback not working anymore

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thanks Serhiy! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: I guess this is the magic in mkdir -p: mkdir("expert", 0755) = -1 EACCES (Permission denied) chdir("expert") = 0 mkdir("tmp", 0755) = -1 EEXIST (File exists) I'

[issue14835] plistlib: output empty elements correctly

2012-05-17 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek stage: -> patch review versions: -Python 3.1, Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue14835] plistlib: output empty elements correctly

2012-05-17 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +ned.deily ___ Python tracker <http://bugs.python.org/issue14835> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: I agree, closing. Thank you for your valuable assistance Andrew! -- resolution: -> wont fix stage: needs patch -> status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13849] Add tests for NUL checking in certain strs

2012-05-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: > It appears that os.stat did not check for embedded nulls but just passed the > string to Windows. JFTR, we have fixed it for open() because it's a potential security problem. I have implemented a helper function for checking fo

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: If I read it correctly, we _do_ a stat: stat("/net/prodigy", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 mkdir("/net/prodigy/tmp", 0777) = -1 EACCES (Permission denied) ISTM that this is a different problem altogether, or am

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: My suspicion re the race condition is that a chdir waits for autofs to mount but mkdir doesn't. You could check that yourself if a chdir/sleep would help. -- ___ Python tracker <http://bugs.python.org/is

[issue14702] os.makedirs breaks under autofs directories

2012-05-17 Thread Hynek Schlawack
Hynek Schlawack added the comment: I sense a very easy fix: just do a stat() on the final path before we do anything (and quickly return if present). Moving current makedirs into a private _makedirs that gets called if the stat fails. I'm still feeling uneasy about that though. It _

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

2012-05-18 Thread Hynek Schlawack
Hynek Schlawack added the comment: I've implemented a _safe_rmtree which gets used if os.fwalk() and os.unlinkat() are available. Test suite still passes in regression mode both on Mac (= no effect) and Linux. Let me know if I missed something. -- assignee: -> hynek

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

2012-05-18 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thanks Petri. I've added the missing s in my repo and attach a proposed separate doc patch, I'd like reviewed by someone whose English is better than mine. :) -- nosy: +ezio.melotti, georg.brandl Added file: http://bugs.python.org/file25

[issue13152] textwrap: support custom tabsize

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack added the comment: I've added it myself and committed your code – thank you for your contribution John! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack added the comment: > """ > stat("/net/prodigy", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > mkdir("/net/prodigy/tmp", 0777) = -1 EACCES (Permission denied) > """ > > As you can see, a stat() is

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack added the comment: >>> """ >>> stat("/net/prodigy", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 >>> mkdir("/net/prodigy/tmp", 0777) = -1 EACCES (Permission denied) >>> """ &g

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

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack added the comment: I'm taking Charles-François' review comments here. > 1. since fwalk() uses O(depth directory tree) file descriptors, we might run > out > of FD on really deep directory hierarchies. It shouldn't be a problem in > practise Shou

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

2012-05-20 Thread Hynek Schlawack
Hynek Schlawack added the comment: I’ve incorporated all the feedback (I hope). I had to refactor the tests slightly, but we have 100% code coverage for both versions of rmtree. Speaking of: I’ve renamed the default version of rmtree to _default_rmtree and _safe_rmtree to _safe_fwalk_rmtree

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

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: A small docs update: I don't list the possible functions for onerror at all anymore, as that list is likely to grow and is a PITA to maintain. People shouldn’t rely on a certain set of functions here. Martin proposed <http://mail.python.org/p

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Now we’re all on the same page – any opinions on the patches themselves? :) -- ___ Python tracker <http://bugs.python.org/issue14

[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue14869> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14870] os.utimensat's method description uses wrong notation

2012-05-21 Thread Hynek Schlawack
New submission from Hynek Schlawack : It says: > os.utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, > mtime_nsec), flags=0]) > Updates the timestamps of a file with nanosecond precision. The atime and > mtime tuples default to None, which sets those v

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: I agree. I’ve committed the uncontroversial and mostly unrelated 3.x patch and will look at the special cases of 2.7 now. -- ___ Python tracker <http://bugs.python.org/issue14

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-05-22 Thread Hynek Schlawack
New submission from Hynek Schlawack : It says > csv.reader(csvfile[, dialect='excel'][, fmtparam]) > csv.writer(csvfile[, dialect='excel'][, fmtparam]) in 2.7. I presume it should be like in 3.x: > csv.reader(csvfile, dialect='excel', **fmtparam

[issue14804] Wrong defaults args notation in docs

2012-05-22 Thread Hynek Schlawack
Hynek Schlawack added the comment: The problematic cases have been outsourced to Issue14880 & Issue14870. Closing this one. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python t

[issue4841] io's close() not handling errors correctly

2012-05-22 Thread Hynek Schlawack
Hynek Schlawack added the comment: The reasoning is reasonable, the patch trivial & LGTM, the test suite passes. Anything I’m missing, why this is still open? -- stage: patch review -> commit review ___ Python tracker <http://bugs.

[issue14885] shutil tests, test_copy2_xattr and test_copyxattr, fail

2012-05-22 Thread Hynek Schlawack
Hynek Schlawack added the comment: Could you give me your precise platform information please? Including full kernel version and "mount" output? Also, could you check whether test_os fails too? Thanks! -- assignee: -> hynek ___ P

[issue14885] shutil tests, test_copy2_xattr and test_copyxattr, fail

2012-05-22 Thread Hynek Schlawack
Hynek Schlawack added the comment: I think the problem is that the xattr decorator checks only the file system with TESTFN for xattrs and the shutil functions use real temp files that live e.g. under /tmp. Please try whether this patch helps. -- keywords: +patch Added file: http

[issue14885] shutil tests, test_copy2_xattr and test_copyxattr, fail

2012-05-23 Thread Hynek Schlawack
Hynek Schlawack added the comment: Awesome, thank you for your cooperation! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14889] PyBytes_FromObject(bytes_object) fails

2012-05-23 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker <http://bugs.python.org/issue14889> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14885] shutil tests, test_copy2_xattr and test_copyxattr, fail

2012-05-23 Thread Hynek Schlawack
Hynek Schlawack added the comment: It _does_ seem to me like cruft. Ditching it won’t be easy though: $ grep -PR TESTFN Lib/test | wc -l 1390 But it’s good to know to actively avoid using TESTFN whenever possible. I usually adapted myself to module style till now

[issue14890] typo in difflib

2012-05-23 Thread Hynek Schlawack
Hynek Schlawack added the comment: Hmmm, iff could be also meant as a abbreviation for “if and only if": http://en.wikipedia.org/wiki/Iff IIRC is the usage of such abbreviations rather frowned upon though. -- nosy: +hynek ___ Python tracker

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-23 Thread Hynek Schlawack
Hynek Schlawack added the comment: A small bikeshed as it’s a new module: - there’s only one free line before _collapse_addresses_recursive, _get_prefix_length and _count_righthand_zero_bits. - class IPv6Address docstring has a \n too much - ip_interface, v4_int_to_packed, v6_int_to_packed

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: Here is a patch with some more pep8-wankery + some dead code removal. Feel free to add only what you like, no hard feelings. :) -- Added file: http://bugs.python.org/file25694/ipaddress-pep8-and-dead-code.diff

[issue4841] io's close() not handling errors correctly

2012-05-25 Thread Hynek Schlawack
Hynek Schlawack added the comment: I’ve committed due to haypo's wish on IRC. ;) -- resolution: -> fixed ___ Python tracker <http://bugs.python.or

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-25 Thread Hynek Schlawack
Hynek Schlawack added the comment: Cool, you actually did reviews. :) I’ve updated the patch, anything else? (to my excuse, I originally didn’t want to tamper with code, but now the patch is actually useful and not just pretty ;)) -- Added file: http://bugs.python.org/file25702

[issue14907] SSL module cannot handle unicode filenames

2012-05-25 Thread Hynek Schlawack
Hynek Schlawack added the comment: Seems to work fine in Python 3.2+. Two possibilities: 1. document ca_certs is str only 2. encode with sys.getfilesystemencoding() if unicode Would have to be fixed in ssl.get_server_certificate too and maybe even more, I did just a quick glance

[issue4841] io's close() not handling errors correctly

2012-05-25 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/issue4841> ___ __

<    1   2   3   4   >