Eric Snow added the comment:
So this boils down to set_data() not having a mode parameter, right? Alas,
the obvious approach, adding it, breaks backward compatibility. The
alternative is to use source_from_cache() in set_data() to get the source path,
and then get the mode there. Of
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2051
___
___
Nick Coghlan added the comment:
I have a patch that works, and that I think may point the way to a replacement
API for set_data in 3.4. Just running the full test suite before I check it in.
The test you posted definitely saved me a lot of time.
My version bypasses the cache, though. This
Nick Coghlan added the comment:
Also, my patch precisely recreates 3.2 behaviour, so it will mean #6074 may
also affect 3.3. That isn't a regression, hence not a release blocker, but
would still be good to get fixed for rc1.
--
___
Python tracker
Nick Coghlan added the comment:
(oops, transposed the digits in the checkin message)
New changeset 3a831a0a29c4 by Nick Coghlan in branch 'default':
Close #2051: Permission bits are once again correctly copied from the source
file to the cached bytecode file. Test by Eric Snow.
Roundup Robot added the comment:
New changeset cfb11045fc8a by Nick Coghlan in branch 'default':
Close #2051: Oops, transposed the digits in the issue number in the previous
commit
http://hg.python.org/cpython/rev/cfb11045fc8a
--
nosy: +python-dev
resolution: - fixed
stage: needs
Eric Snow added the comment:
My patch was very similar. _cache_bytecode() is a good addition. Good point
about the cache, too.
I'm not convinced that source_path is the right thing to add to the API (even
just for SourceFileLoader). I would have thought mode would have been more
Brett Cannon added the comment:
I agree with Eric: set_data() is meant to be generic so as to allow writing
arbitrary data, not just bytecode files. So while accepting a mode argument
makes sense and I'm fine with in terms of possible API change (in the future),
having a source_path argument
Roundup Robot added the comment:
New changeset 0c661c5632e0 by Brett Cannon in branch 'default':
Issue #2051: Tweak last commit for this issue to pass in mode instead
http://hg.python.org/cpython/rev/0c661c5632e0
--
___
Python tracker
Changes by Nick Coghlan ncogh...@gmail.com:
--
assignee: - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2051
___
___
Python-bugs-list
Eric Snow added the comment:
here's a test. I'll work on a patch when I get a chance (and no one's beaten
me to it :).
--
keywords: +patch
nosy: +eric.snow
Added file: http://bugs.python.org/file26980/issue2051_test.eric.snow.diff
___
Python
Nick Coghlan added the comment:
Since there was no regression test added for this, it appears to me that it is
broken again now that we're using importlib.
It may be rather hard to fix given the limitations of the set_data API :(
--
assignee: facundobatista -
nosy: +brett.cannon,
Brett Cannon added the comment:
On Aug 19, 2012 9:26 PM, Nick Coghlan rep...@bugs.python.org wrote:
Nick Coghlan added the comment:
Since there was no regression test added for this, it appears to me that
it is broken again now that we're using importlib.
It may be rather hard to fix
Changes by Alexander Belopolsky:
Added file: http://bugs.python.org/file9488/issue2051.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
__
___
Python-bugs-list mailing
Changes by Alexander Belopolsky:
--
nosy: +belopolsky
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
__
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Facundo Batista:
--
assignee: - facundobatista
nosy: +facundobatista
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
__
___
Python-bugs-list mailing
stocker81 added the comment:
Christian Heimes [EMAIL PROTECTED] wrote:
I haven't removed it from the listing. Look under priority high a few
pages up.
I'm sorry, my mistake.
Regards,
Marcin
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
Christian Heimes added the comment:
You have a good use case for a change of behavior. We might change it
for Python 2.6 and 3.0.
A proper place would be Python/import.c:load_source_module().
--
components: +Interpreter Core -None
nosy: +tiran
priority: - high
versions: +Python 2.6
stocker81 added the comment:
BTW, I see you've removed this issue from bugs list printed at
http://bugs.python.org/ but everyone (including unlogged visitors) can
access it still via http://bugs.python.org/issue2051 ...
__
Tracker [EMAIL PROTECTED]
New submission from stocker81:
Python's interpreter doesn't keep proper file permissions after
importing library. See the fallowing:
[EMAIL PROTECTED] ~ $ echo key='top secret' key.py
[EMAIL PROTECTED] ~ $ chmod 600 key.py
[EMAIL PROTECTED] ~ $ python
Python 2.4.4 (#1, Jan 8 2008, 21:22:16)
Christian Heimes added the comment:
stocker81 wrote:
BTW, I see you've removed this issue from bugs list printed at
http://bugs.python.org/ but everyone (including unlogged visitors) can
access it still via http://bugs.python.org/issue2051 ...
I haven't removed it from the listing. Look
21 matches
Mail list logo