Hynek Schlawack h...@ox.cx 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 make copyxattr() private
Hynek Schlawack h...@ox.cx added the comment:
Fixed for 2.7
--
Added file: http://bugs.python.org/file25434/expand-chflags-catch-2.7-v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx added the comment:
Fixed for 3.2.
--
Added file: http://bugs.python.org/file25435/expand-chflags-catch-3.2-v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx added the comment:
And finally tip.
--
Added file: http://bugs.python.org/file25436/expand-chflags-catch-tip-v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx 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
Changes by Hynek Schlawack h...@ox.cx:
--
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 rep...@bugs.python.org
http://bugs.python.org
Hynek Schlawack h...@ox.cx 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
Hynek Schlawack h...@ox.cx 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
Hynek Schlawack h...@ox.cx added the comment:
The code LGTM, the documentation lacks `versionchanged` tag though. Would you
mind adding it?
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13152
Hynek Schlawack h...@ox.cx added the comment:
bikeshedIn 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;
care to shed a light
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: -hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11352
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx 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
Changes by Hynek Schlawack h...@ox.cx:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14702
___
___
Python-bugs-list mailing
Hynek Schlawack h...@ox.cx added the comment:
I didn't. :/ I'll look into it tomorrow.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14082
Hynek Schlawack h...@ox.cx 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 rep
Hynek Schlawack h...@ox.cx 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
Changes by Hynek Schlawack h...@ox.cx:
--
keywords: +needs review
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
Changes by Hynek Schlawack h...@ox.cx:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14082
___
___
Python-bugs-list
Changes by Hynek Schlawack h...@ox.cx:
--
components: +Library (Lib) -None
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx 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 rep...@bugs.python.org
http
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13241
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
The proposed patch has been committed as c4dcbe51c2e3 – any reasons why this
issues is still open?
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7707
New submission from Hynek Schlawack h...@ox.cx:
In order to fix issue14662, we need to back port at least ENOTSUP to 2.7
(presuming we don’t want to check for magic numbers).
The question is, whether we should back port all/most of them when we’re at it?
There doesn’t seem to be much harm
Hynek Schlawack h...@ox.cx added the comment:
Anybody working on this one? I’d give it a shot otherwise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4489
Hynek Schlawack h...@ox.cx added the comment:
So what does that mean for issue14662? Backport only ENOTSUP, check against
“45” or “won't fix”?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14682
Hynek Schlawack h...@ox.cx added the comment:
This is a fix for 2.7.
As Benjamin said in http://bugs.python.org/issue14682#msg159477 it’s okay to
back port ENOTSUP, I did it as part of the patch here. I wasn’t sure whether we
should document it?
I’m porting the patch to tip right now
Hynek Schlawack h...@ox.cx added the comment:
This one is against tip.
--
Added file: http://bugs.python.org/file25383/expand-chflags-catch-tip.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx added the comment:
And finally against 3.2
--
Added file: http://bugs.python.org/file25384/expand-chflags-catch-3.2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx added the comment:
I had this text ready before ned chimed in, I’ll post it anyway because it was
a lot of work ;):
You're right, 2.7’s errnos are incomplete compared to 3.2. Antoine added
ENOTSUP in c370866f30a7 and it runs as “Solaris-specific”.
So it’s currently
Hynek Schlawack h...@ox.cx added the comment:
I guess a “best effort” approach would be best here.
I presume Python 3.2+ have the same behavior?
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14662
Hynek Schlawack h...@ox.cx added the comment:
Now that’s odd. I just looked into the code at
http://hg.python.org/cpython/file/2.7/Lib/shutil.py#l103 and there is a guard
against EOPNOTSUPP:
try:
os.chflags(dst, st.st_flags)
except OSError, why:
if (not hasattr(errno, 'EOPNOTSUPP
Hynek Schlawack h...@ox.cx added the comment:
I gave it a shot, doesn’t look like a hack to me, what do you think?
--
keywords: +patch
Added file: http://bugs.python.org/file25301/strptime-on-leap-years.diff
___
Python tracker rep...@bugs.python.org
Hynek Schlawack h...@ox.cx added the comment:
The point isn’t that time.strptime validates dates but that it uses datetime
internally:
julian = datetime_date(year, month, day).toordinal() - \
datetime_date(year, 1, 1).toordinal() + 1
Is it worth to reimplement
Hynek Schlawack h...@ox.cx added the comment:
Ok, so I’ve added a function `copyxattr()` and `copy2()` tries to copy all
possible namespaces.
Tests pass on Linux and Mac OS X.
--
keywords: +patch
Added file: http://bugs.python.org/file25194/xattr.diff
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12978
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
This ticket has a small catch:
There are several namespaces. According to
http://en.wikipedia.org/wiki/Xattr#Linux :
- user: can be set by anyone
- trusted: root only
- security: root only
- system: even root can’t do that, at least not in my vm
Hynek Schlawack h...@ox.cx added the comment:
I'd tend to always copy xattrs – it seems that's what the user would expect to
happen. A new parameter to _forbid_ it might make sense. However, I feel that
there are already enough parameters in place
Hynek Schlawack h...@ox.cx added the comment:
If nobody objects, I'd cook up a patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14082
Hynek Schlawack h...@ox.cx added the comment:
I have also added a test for NTTP.head(), enjoy.
--
keywords: +patch
Added file: http://bugs.python.org/file24524/nntp-file-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Hynek Schlawack h...@ox.cx added the comment:
Looking into the source code of nntplib, I'd claim this bug isn't valid anymore?
At least the file is opened in binary mode now – see Lib/nntplib.py:462
In any case, we have a test suite now.
--
nosy: +hynek
versions: +Python 3.3 -Python
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8739
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
Sure, I wanted to add tests as soon as I know that the flow is correct (which
it isn't :)).
So essentially we want always
CAPABILITIES
LOGIN
CAPABILITIES
?
That's rather simple to achieve. The tests are going to be the harder part. ;)
Re
Hynek Schlawack h...@ox.cx added the comment:
I've added general tests of AUTH USER/PASS as there weren't any present yet.
As I haven't alas heard back from Easynews, I can only presume they allow
CAPABILITIES after a login – I've added a test case that models this behavior.
Otherwise I did
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24499/0cf0b06e1d31.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24500/e986dd8bb47d.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
Hynek Schlawack h...@ox.cx added the comment:
Thanks! I think I've addressed everything in the latest patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
Hynek Schlawack h...@ox.cx added the comment:
There's one more issue Julien has raised: nntplib attempts to authenticate when
AUTHINFO is sent w/o USER. (haven't tested it but I presume it's still valid)
It's trivial to catch that but I'd say that it's fine to let the server handle
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24502/b33bcf179df4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
Hynek Schlawack h...@ox.cx added the comment:
So my take on the whole issue and Antoine tends to agree. ;)
1. If the user tells us (s)he _wants_ us to authenticate or send MODE READER,
we do it even if capabilities don't advertise it. There's a lot of
rfc-non-conformant servers out
Hynek Schlawack h...@ox.cx added the comment:
I think I've fixed it to do as described. Alas, I have no Easynews account to
test it (I mailed their support about that so maybe that'll change).
Would someone with an account mind to test, if it works? Nathan?
--
Added file: http
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
___
___
Python-bugs-list mailing list
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10284
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
I have fixed the refleak, added a _PyUnicode_HasNULChars and integrated it into
the Win32-unicode-if-branch. Couldn't test it due to lack of win32 – the
function itself is tested though.
--
Added file: http://bugs.python.org/file24355/open
Hynek Schlawack h...@ox.cx added the comment:
With Georg's kind help I added some improvements:
- I've been reluctant to waste heap for caching the nul string but he
convinced me that I was being ridiculous ;)
- For some reason there was a stray character inside, that should be fixed too
Hynek Schlawack h...@ox.cx added the comment:
I took a deep dive into parts of CPython that were unknown to me :) and dug up
the following:
Methods like os.stat or even os.open convert the file name using et in
PyArg_ParseTuple[AndKeywords].
OTOH, open() and io.open() just hand through
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13849
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
JFTR, file()'s C equivalent is fileio_init and not io_open, I lost track of all
the opens. ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13848
Hynek Schlawack h...@ox.cx added the comment:
So I have good news and bad news. The good is: I fixed it for non-Win platforms
and the patch is truly beautiful:
Lib/test/test_builtin.py | 6 ++
Modules/_io/fileio.c | 25 -
2 files changed, 10 insertions
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13520
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
What's the current state here? Anyone working on a solution or are we waiting
how http://hg.python.org/features/pathlib/ will work out?
If the consensus is to add a generic walker method, wouldn't be appropriate to
open a new bug and add
Hynek Schlawack h...@ox.cx added the comment:
What's the current state here? Anyone working on a solution or are we
waiting how http://hg.python.org/features/pathlib/ will work out?
Well, I am not working on that one, so waiting for it to work out might
be optimistic :)
I don't know
New submission from Hynek Schlawack h...@ox.cx:
This is an offspring of #4489 (which is a security bug). The method is AFAIU
intended to be private.
As shown in the discussion of the mentioned #4489, there is a whole family of
attacks that exploit the time window between gathering path names
Hynek Schlawack h...@ox.cx added the comment:
Oh sorry, I didn't look into the doc patch.
I unified both into one patch and added the versionchanged tag and also updated
the docstring of shutil.move.
--
Added file: http://bugs.python.org/file24149/shutil_move_symlinks.patch
Hynek Schlawack h...@ox.cx added the comment:
I took the liberty to fix the tests.
Basically I've adapted them to the new mock based cross file system approach
(that doesn't depend on luck anymore :)).
I also had to add one more `os.path.realpath` because on some OS (like OS X)
the tmp
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24102/8330f2045f4d.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
Added new patch with protection for the remaining UF_NODUMPs in the test case.
All raised issues should be fixed now. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24099/23e6204efe20.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
Added another patch fixing the issues pointed out by Antoine and
Charles-François.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24067/c92c4d936255.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
I have updated the patch to latest default/tip and would appreciate a review.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24069/4832bf7aa028.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
Thanks to Antoine Charles-François for their reviews! I think I've
incorporated all desired changes.
Please let me know if I have missed something, meanwhile I'll tackle the docs.
--
___
Python tracker
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24070/d9212bb67f64.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
The patch contains also the necessary changes for the docs now.
Please let me know, if I can do anything else.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
Thanks for the feedback Antoine!
I updated the patch to latest default tip and added the requested tags to the
docs.
--
hgrepos: +97
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24062/8a9e14cda106.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12708
Changes by Hynek Schlawack h...@ox.cx:
Removed file: http://bugs.python.org/file22860/mp-starmap-w-docs.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12708
Hynek Schlawack h...@ox.cx added the comment:
You're right. I've updated the docs accordingly, thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12708
Changes by Hynek Schlawack h...@ox.cx:
Added file: http://bugs.python.org/file24063/c02fbcda56f3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12708
Changes by Hynek Schlawack h...@ox.cx:
Removed file: http://bugs.python.org/file24062/8a9e14cda106.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12708
Hynek Schlawack h...@ox.cx added the comment:
ok. it would have saved some LOC for me, but it's nothing essential of course.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12824
Hynek Schlawack h...@ox.cx added the comment:
What started as a 2 lines fix, grew to a patch of ~400 lines. :)
It's mostly tests though:
Lib/shutil.py | 102 +--
Lib/test/test_shutil.py | 220
Changes by Hynek Schlawack h...@ox.cx:
--
keywords: +patch
Added file: http://bugs.python.org/file23028/e126ceae5ba9.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
New submission from Hynek Schlawack h...@ox.cx:
test_shutil contains a handy helper function called write_file(filename.
contents). If *filename* is a tuple, os.path.join() is used to concatenate it
to a path.
To be really useful, the resulting file name should be returned, so the user
can
Hynek Schlawack h...@ox.cx added the comment:
Done in Issue12824.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12721
___
___
Python-bugs-list
Hynek Schlawack h...@ox.cx added the comment:
This is a sub-issue of #12715.
ATM the consent is to add just one symlinks parameter and use the l* functions
iff src _and_ dst are symlinks.
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
Hynek Schlawack h...@ox.cx added the comment:
I work on the superficially related #12715 (symlinks for shutil). As we try to
mimic the POSIX tools and `mv` indeed doesn't follow links, I agree with the
approach of this patch.
--
nosy: +hynek
Hynek Schlawack h...@ox.cx added the comment:
We have an edge case when the caller calls copymode with symlinks=True on an OS
that doesn't have lchmod (ie any other than FreeBSD).
Should it be a nop (as in copystat), use chmod or raise an Exception?
I Personally (and some people on #python
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4489
___
___
Python-bugs-list mailing list
Hynek Schlawack h...@ox.cx added the comment:
While writing my tests I realized, it would be really useful to make
write_file() return the path it wrote to. I need the concatenated filenames
most of the time, so I'm getting blocks of:
fn = os.path.join(x,y)
write_file(fn, 'contents')
I'd
Hynek Schlawack h...@ox.cx added the comment:
No, that's just a helper function like the `mapstar` directly above. args[1] is
the iterable with tuples that get unpacked as arguments.
--
___
Python tracker rep...@bugs.python.org
http
Hynek Schlawack h...@ox.cx added the comment:
Eric, just to be clear: Are you making this list-tuple change or should I fix
the patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12721
Hynek Schlawack h...@ox.cx added the comment:
I tend to agree on public APIs, however in this case of a helper function the
use case with a join is really really common so this extra function comes in
very handy. I also kept it using lists, so it's more obvious than tuples.
JFTR it wasn't my
New submission from Hynek Schlawack h...@ox.cx:
While working on #12715 I noticed that the tests of shutil aren't exactly
consistent concerning reading and writing files.
There were no less than two function to read files (one of them not being used
at all) and two methods to write them
Hynek Schlawack h...@ox.cx added the comment:
JFTR, my implementation is ready, but I can't/don't want to start writing
tests, as long as #12721 is open.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
Hynek Schlawack h...@ox.cx added the comment:
Additionally copyfile() might be fixed to understand symlinks=True too.
Currently working on a patch for all 5 of them.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12715
New submission from Hynek Schlawack h...@ox.cx:
After I've seen a co-worker to unpack tuples while using
multiprocessing.Pool.map(), I realized that the module is missing a starmap()
method like itertools has.
I took it as a opportunity to contribute some code and implemented both
starmap
New submission from Hynek Schlawack h...@ox.cx:
While working on #12708 , I noticed that the error_callback argument of
multiprocessing.Pool.map_async() isn't documented (callback is).
--
assignee: docs@python
components: Documentation
messages: 141763
nosy: docs@python, hynek
priority
Hynek Schlawack h...@ox.cx added the comment:
In all my excitement, I somehow presumed that the docstring automagically lands
in the docs. Added doc entries to patch (I hope they aren't too crude, I'm not
a native speaker).
Same as first patch otherwise.
--
Added file: http
Hynek Schlawack h...@ox.cx added the comment:
Yeah, if my 3G hadn't failed on me, it would have been already here. :)
As a matter of fact, the argument is discussed in the body of the doc, it just
has been omitted in the method definition, so the patch is trivial.
--
keywords: +patch
301 - 400 of 401 matches
Mail list logo