Hynek Schlawack added the comment:
Sidney, would you mind adding a regression test for both cases?
Ned, Ronald what's your take on this?
--
___
Python tracker
<http://bugs.python.org/is
Hynek Schlawack added the comment:
One last wish: could we curb the copyright header a bit? I don't know the exact
policy on that but as other modules don't have that I presume we could do
without/with a shorter one. If we have one, I'd rather add something like
"b
Hynek Schlawack added the comment:
So are we going to add something to the docs or just close as rejected?
--
___
Python tracker
<http://bugs.python.org/issue14
Hynek Schlawack added the comment:
I'd just add some general catch-all phrase at the top that all paths are
expected to be encoded strings.
--
___
Python tracker
<http://bugs.python.org/is
Hynek Schlawack added the comment:
Hello Thomas,
I presume your gcc is Apple's llvm-gcc (gcc --version output starts with
"i686-apple-darwin11-llvm-gcc-4.2"), which is unfortunately a known to
miscompile Python 3.3.
If you want to compile the latest Python 3.3 on OS X, use c
Hynek Schlawack added the comment:
Have a look at issue13241 which is dedicated to this problem, especially at
msg160081.
--
___
Python tracker
<http://bugs.python.org/issue14
Hynek Schlawack added the comment:
The patch LGTM, but Pam seemed to have problems to find your account
(http://mail.python.org/pipermail/python-committers/2012-May/002037.html) – did
you get the reply and followed up on that?
--
___
Python
Hynek Schlawack added the comment:
Thank you for your contribution!
But please help Pam to work out your contribution form.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python track
Hynek Schlawack added the comment:
I think this issue is still valid. However, I’d favor the attached (simpler)
patch that keeps track whether self->fd is our own (i.e. a result of an open()
operation) or from outside.
A couple of notes:
- I'm not sure why your test skippe
Hynek Schlawack added the comment:
It's funny how raising the test coverage _always_ uncovers lurking bugs in
obscure branches. :) Patch attached, let me know if I got it wrong – would
commit otherwise.
A few quick side-note: does the __version__ variable make sense in s
Hynek Schlawack added the comment:
While I can see your point, I think that "index" is way too generic. I also
think that the pypi term is overloaded with both meanings.
--
nosy: +hynek
___
Python tracker
<http://bugs.python.o
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue14972>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Dupe of #13241. Apple's llvm-gcc is broken, please use clang instead (CC=clang
./configure).
--
nosy: +hynek
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> llvm-gcc-4.2 miscompiles Pyt
Hynek Schlawack added the comment:
Ned, any progress/problems?
I've closed two dupes already in the last few days and we're still in the
alphas. We really should get this fixed before beta1 or the tracker will be
flooded.
Let me know if you need
Hynek Schlawack added the comment:
'\u030a' can’t be latin1 as 0x030a = 778 which is waaay beyond 255. :) That's
gonna be utf-8 and indeed that maps to " ̊".
My best guess is that your LC_CTYPE is set to Mac Roman. You can check it using
"import os;os.environ.
Hynek Schlawack added the comment:
I think your problem is a different one: os.listdir() doesn't return full paths
and os.path.isfile()/isdir() return False if the supplied path doesn't exist.
For example if you have this directory structure:
foo/
foo/bar/
foo/bar/baz
Calling
Hynek Schlawack added the comment:
As discussed on IRC, please:
- add a link to the tutorial
- add some typical use cases to the header of the api
- change the name of the tutorial from "Howto" to "HOWTO" or a more descriptive
title that doesn't conta
Hynek Schlawack added the comment:
Glad we could help. I suspected it was running under "special circumstances".
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15001>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Dear friends of ip addresses, I made something:
refactor dup code, minor janitoring, bump coverage
- remove duplicate netmask/hostmask code (it was identical in ipv4address &
interface)
- make two ifs more pythonic
- Refactor and fix packed property
Hynek Schlawack added the comment:
So one more issue from me: as indicated, the constructor using packed of
IPv6Networks is broken (wrong indent).
The question is whether we want to be able to construct using packed at all.
Also the strict check doesn't make any sense because the net ma
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15034>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Anyone?
--
___
Python tracker
<http://bugs.python.org/issue10053>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Martin, are you still committed to this? I still think code duplication is bad
(especially for security related code) but I’d be willing to write a fwalk-less
version so it doesn’t look like I’m just defending my code here
Hynek Schlawack added the comment:
Fair enough, I'm not going to question your obviously superior judgement here.
:)
However, your patch currently breaks the test suite on any platform that uses
the fallback rmtree: You forgot the ignore_errors=False in the _rmtree_unsafe
signature
Hynek Schlawack added the comment:
We should. Adding secure functions that aren't really secure is something we
should rather avoid. :)
Christian, are you willing to do that?
--
components: +Library (Lib) -IO
nosy: +hynek
stage: patch review -> needs patch
type: behavior -&g
Hynek Schlawack added the comment:
I don’t want to be the killjoy but I find it highly questionable to add a
function that is advertised as "secure" while we can't fully grok the
complexities at play. If we can't produce a provable secure one, we should
scrub the func
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue14955>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue14532>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
> "Secure" vs "not secure" is not a binary state - it's about making attacks
> progressively more difficult. Something that is secure against a casual
> script kiddie scatter gunning attacks on various sites with an autom
Hynek Schlawack added the comment:
>> Why not write a C function which can be more secure than Python code?
> For Unicode strings, it's impossible to write a time-independent
> comparison function even in C
Really? Some comments sounded different. That's too bad but als
Hynek Schlawack added the comment:
>> and any other place that compares passwords, tokens, …
>
> No no no. Any sensible place to compare passwords would use some
> sort of one-way function (password hash) before the comparison,
> so that someone breaking into the machine
Hynek Schlawack added the comment:
+1.
Raymond, is there a reason you put that for 3.4? I'd try to get it in before
beta1 next week, it's trivial enough.
Regarding the name: os.makedirs() uses exist_ok, we shouldn't invent new ones.
--
assignee: ->
Changes by Hynek Schlawack :
--
title: Add option to os.makefile to not raise an exception for existing
directories -> Add option to os.mkdir to not raise an exception for existing
directories
___
Python tracker
<http://bugs.python.org/issu
Hynek Schlawack added the comment:
I looked into the code. Assuming it should be added, we're facing the fact that
os.mkdir() is C code ATM and the handling of the error would require to
implement it for NT and Unix separately.
Therefore it would make sense to add a Python os.mkdir()
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue13498>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Martin, what exactly is the intended proceeding now? Are you going to fix your
patch and tests as soon as you have time or was that just a PoC and expect
me/us to bring it into shape? (<- troll-free question, I have no idea what to
do next here and wo
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15100>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
I’m no native speaker but I fail to see anything abusive here.
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15
Hynek Schlawack added the comment:
It's not that simple as we currently use public functions for copying the files
and the metadata. copyfile is explicitly _not_ supposed to copy any metadata so
we can't patch it up to do so. Also that won't help for other stat & xattr data
Hynek Schlawack added the comment:
I thought this is settled as of f36af3766a20 (option 2)?
--
___
Python tracker
<http://bugs.python.org/issue15061>
___
___
Hynek Schlawack added the comment:
I'll try to get it in before beta1 then.
--
___
Python tracker
<http://bugs.python.org/issue4489>
___
___
Python-bugs-l
Hynek Schlawack added the comment:
Should be fixed now.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Hynek Schlawack added the comment:
Hmmm, I thought Lib/_pyio.py actually uses Lib/_io/_fileio.c? At least I can't
find the logic inside. There's no error handling at all.
It just uses the FileIO object in Lib/_pyio.py:189 which it seems to get from
Lib/_pyio.py:585 which I presume
Hynek Schlawack added the comment:
Here is my revised patch with Martin's code integrated.
Differences:
- fixed docs
- added some tests, test_on_errors could still use some refactorings though
- renamed _rmtree_safe to _rmtree_safe_fd so we can implement more of them
- _rmtree_sa
Hynek Schlawack added the comment:
> For 3.4, I hope to see a discussion open up regarding the idea of something
> like a "securitytools" module that aims to provide some basic primitives for
> operations where Python's standard assumptions (such as flexibility
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15154>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
I thought about that too but couldn't find a precedent (I didn't look very long
though :)) where we've done that before so I went for an attribute. I'd change
it immediately if others agree.
--
__
Hynek Schlawack added the comment:
Excellent Nick! I discussed the very same thing with David yesterday but
somehow we didn't come up with a good name. So we kept it on "safe" (which
predates the secure discussion).
--
___
Python
Hynek Schlawack added the comment:
Okay everyone, let's call it day – after 3,5 years. :) Further enhancement
requests please in separate tickets. Thanks to everybody who took part!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: ope
Changes by Hynek Schlawack :
--
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue15100>
___
___
Python-bugs-list mailin
Changes by Hynek Schlawack :
--
nosy: -hynek
___
Python tracker
<http://bugs.python.org/issue13520>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Hynek Schlawack :
--
nosy: -hynek
___
Python tracker
<http://bugs.python.org/issue7719>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Hynek Schlawack :
--
nosy: -hynek
___
Python tracker
<http://bugs.python.org/issue14974>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Hynek Schlawack :
--
nosy: -hynek
___
Python tracker
<http://bugs.python.org/issue10142>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
It also passes OS X.
There are no patch specific tests though. And alas, I don't have any platform
at hand that would benefit from these additions. :(
The idea sounds good to me and the code LGTM though. However I can't really say
much as
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15118>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Catch TypeError, check whether bytes & str are being mixed, re-raise if not,
say something user-friendly if yes?
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/iss
Hynek Schlawack added the comment:
Currently, we get the following warnings:
[ 26/369] test_ipaddress
/home/vagrant/default/Lib/ipaddress.py:1401: BytesWarning: str() on a bytes
instance
addr = str(address).split('/')
/home/vagrant/default/Lib/ipaddress.py:2004: BytesWarning:
Hynek Schlawack added the comment:
Here's a fix. It would be nice if it could make for 3.3 final I guess. Tests
pass for Linux and OS X.
--
keywords: +needs review, patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file26156/nicer-error-on-str-bytes-
Hynek Schlawack added the comment:
Ok I looked into it. It uses str() to convert objects into text representation
which it then parses.
--
___
Python tracker
<http://bugs.python.org/issue14
Hynek Schlawack added the comment:
And the origin of the bytes seems to be:
# Compatibility function to cast str to bytes objects
_cb = lambda bytestr: bytes(bytestr, 'charmap')
--
___
Python tracker
<http://bugs.python.o
Hynek Schlawack added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue15187>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
Yeah, would be nice if that was consistent.
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15202>
___
___
Hynek Schlawack added the comment:
Try running the test like:
./python[.exe] -bb -Wd -m test test_ipaddress
--
___
Python tracker
<http://bugs.python.org/issue14
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
<h
Changes by Hynek Schlawack :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Changes by Hynek Schlawack :
--
nosy: +hynek
versions: +Python 3.4 -Python 3.1
___
Python tracker
<http://bugs.python.org/issue10571>
___
___
Python-bugs-list m
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
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 blocke
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-t
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
Changes by Hynek Schlawack :
--
dependencies: +os.listdir is missing in os.supports_dir_fd
___
Python tracker
<http://bugs.python.org/issue15218>
___
___
Pytho
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
<http://bugs.python.o
Hynek Schlawack added the comment:
Ah sorry, that wasn't in the mail (stupid >>>).
--
___
Python tracker
<http://bugs.python.org/issue15217>
___
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
Hynek Schlawack added the comment:
Cool, I'll finish it up in the sprints on Saturday.
--
___
Python tracker
<http://bugs.python.org/issue15180>
___
___
Hynek Schlawack added the comment:
The patch looks good enough. Not sure if we should write Linux though. I
sincerely hope we’ll support xattrs on other OSes soonish.
Did you catch Georg somewhere whether this can still go in? Would be nice as
xattrs are new to 3.3. Changing this in 3.4
Hynek Schlawack added the comment:
I didn’t, because I pulled an Antoine and enjoyed weather, people and Florence.
:)
I understand it’s okay to apply this towards 3.2 & 3.3 (with the proposed
fixes)?
2.7 is not necessary because this problem doesn’t exist there:
> os.path.joi
Hynek Schlawack added the comment:
> Hynek: You must forgive me, I'm a recovering Windows programmer. I thought
> extended attributes were a Linux-only thing. Can you tell me what other
> platforms they are available on? And/or suggest some alternate language?
http://en.wiki
Hynek Schlawack added the comment:
Fixed for 3.2 & default.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pytho
Hynek Schlawack added the comment:
You can’t just compare the xattr because some (like security.*) can be
only copied as root. IIRC they come from SELinux.
--
___
Python tracker
<http://bugs.python.org/issue15
Hynek Schlawack added the comment:
If nobody else, I’ll review it tomorrow at the latest.
On a first glance I realized our shutil Exceptions are all derived from
EnvironmentError which is just a compatibility alias for OSError since 3.3.
Quick poll before I open a dedicated ticket, change
Hynek Schlawack added the comment:
Well, then fix is for shutil.move() too please, otherwise we can’t close
this ticket which is a pity after over 6 years. :)
--
___
Python tracker
<http://bugs.python.org/issue1492
Hynek Schlawack added the comment:
Sorry, I didn’t look at zooko’s patch which was also just about copyfile. I
presume it’s all about the copy fallback that happens when os.rename didn’t
work out.
Will look at your code more closely later.
--
title: distinct error type from
Hynek Schlawack added the comment:
I removed the check for good as we check for the existence of the xattr in the
next line. However we check the destination now whether the xattrs have been
copied. ;) Fedora is green again.
--
___
Python tracker
Hynek Schlawack added the comment:
> - SameFileError is now derived from EnvironmentError.
Why?
--
___
Python tracker
<http://bugs.python.org/issue1
Hynek Schlawack added the comment:
No, sorry if my ramblings confused you. I'm pondering about deriving Error from
OSError in 3.4. That has nothing to do with this ticket. I just saw it while
glancing over your patch.
--
___
Python tracker
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15377>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
I propose the following patch (against 3.2) that does the right thing.
--
keywords: +patch
nosy: +ncoghlan, pitrou
stage: -> patch review
Added file: http://bugs.python.org/file26414/nicer-error-for-none.d
Changes by Hynek Schlawack :
--
assignee: -> hynek
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue15377>
___
___
Python-bugs-list mai
Hynek Schlawack added the comment:
Yeah, we talked about that exact think with Antoine on IRC. New proposal.
--
Added file: http://bugs.python.org/file26415/nicer-error-for-none-v2.diff
___
Python tracker
<http://bugs.python.org/issue15
Hynek Schlawack added the comment:
Fine! :)
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Hynek Schlawack added the comment:
Are we going to fix this before 3.3? Any objections to Victor's patch?
--
___
Python tracker
<http://bugs.python.org/is
Hynek Schlawack added the comment:
As beta2 has been postponed I have already committed it with some slight
modifications.
Re: deriving from Error: It doesn't make any sense to do so but this way we're
mostly backward compatible. Changing it to EnvironmentError uncovered the
Hynek Schlawack added the comment:
Oh my understanding was that it was pushed to 3.4 only because of the then
imminent beta2. Georg, is it okay to keep it?
--
___
Python tracker
<http://bugs.python.org/issue1492
Hynek Schlawack added the comment:
Ok sorry, backing out.
--
resolution: fixed ->
stage: committed/rejected ->
status: closed -> open
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/
Changes by Hynek Schlawack :
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/issue15406>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hynek Schlawack added the comment:
For the sake of completeness: what you're looking for is os.lstat.
--
nosy: +hynek
___
Python tracker
<http://bugs.python.org/is
Hynek Schlawack added the comment:
There is no patch.
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue15487>
___
___
Python-bugs-lis
201 - 300 of 376 matches
Mail list logo