Changes by Eric Snow :
Removed file: http://bugs.python.org/file28972/odict.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
Any objections to what Brett proposed? Any preferences on a name? How about
DualImplementationTests? Here's a patch with tests.
I added a pure_python_only() decorator in addition to accelerated_only(). I
also made both work as decorators for classe
New submission from Eric Snow:
(+nosy list from #17037)
In issue 17037 (related to hiding PEP 399 boilerplate), Ezio and Eli
recommended improving on the API of import_fresh_module(). I agree that it
could be simplified, wrapped, or otherwise improved.
import_fresh_module() is used in the
Eric Snow added the comment:
First of all, I agree that the API for import_fresh_module() isn't ideal and
could stand some improvement. I've created issue 17146 for pursuing that
avenue.
More importantly for this issue, simplifying import_fresh_module() is not
nearly enough of a
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue5308>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
My sentiment also.
--
___
Python tracker
<http://bugs.python.org/issue17146>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Fine with me.
--
___
Python tracker
<http://bugs.python.org/issue17037>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Deprecating pkg/__init__.py and having pkg.py coexist with pkg/ was on the
table in an earlier proposal (PEP 402). In that case pkg/__init__.py would
have been tried first for backward compatbility (until eliminated in Python 4
or whenever). PEP 420 (namespace
Changes by Eric Snow :
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/issue19092>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Soon, my precious, soon...
--
___
Python tracker
<http://bugs.python.org/issue9325>
___
___
Python-bugs-list mailing list
Unsub
Changes by Eric Snow :
--
nosy: +brett.cannon, eric.snow
___
Python tracker
<http://bugs.python.org/issue19081>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I ran into this today. Can't we just change the "Z" to "z#" in the format
string (or "z*")? Other than that, Tim's patch makes sense.
--
nosy: +eric.snow
versions: +Python 3.3, Python 3.4 -Python 3.1
__
New submission from Eric Snow:
Changeset 1db6553f3f8c for issue #15576 changed
importlib._bootstrap._get_supported_file_loaders() to return a list of 2-tuples
instead of 3-tuples. However, the docstring for the function was not updated
to reflect that. More importantly
New submission from Eric Snow:
Any reason why ExtensionFileLoader does not implement get_filename()? I'm
guessing it just slipped through the cracks. It should be there (and be
registered as implementing ExecutionLoader).
--
assignee: eric.snow
components: Interpreter Core
mes
Eric Snow added the comment:
I realized after I committed that this should probably be back-ported to 3.3.
I'll take care of that in a few hours.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
changeset: 85941:152f7235667001fe7cb3c90ad79ab421ef8c03bb
user:Eric Snow
date:Thu Oct 03 12:08:55 2013 -0600
summary: [issue19951] Fix docstring and use of
_get_suppported_file_loaders() to reflect 2-tuples.
(wrong issue # in commit message
Eric Snow added the comment:
As with #19152, I'll need to backport this to 3.3.
--
___
Python tracker
<http://bugs.python.org/issue19151>
___
___
Pytho
Changes by Eric Snow :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eric Snow :
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
Dang it. I was thinking of it as a bug that the method wasn't there, but
you're right regardless. Revert coming.
--
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
Thanks for noticing that, Brett.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19152>
___
___
Python-
Eric Snow added the comment:
Good point.
--
status: closed -> open
___
Python tracker
<http://bugs.python.org/issue19152>
___
___
Python-bugs-list mai
Changes by Eric Snow :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19152>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric Snow added the comment:
Here's an initial patch. Some key things left to do:
* unit tests
* documentation
* implement exec_module() for the various importlib loaders.
Once that's squared away there are further things that will be addressed in new
tickets (or at least separa
Eric Snow added the comment:
Here's a patch.
--
keywords: +patch
stage: test needed -> patch review
Added file:
http://bugs.python.org/file31960/issue18862-importlib-abc-subclasshooks.diff
___
Python tracker
<http://bugs.python.org
Eric Snow added the comment:
They are defined in the Python 3 glossary [1], so I expect it just a matter of
backporting those entries.
[1] http://docs.python.org/3/glossary.html
--
nosy: +eric.snow
versions: -Python 3.3, Python 3.4
___
Python
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue9548>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Though I can't speak regarding the patch, your justification for breaking
backward compatibility seems good enough to me (but I may not be the best judge
:). However, backward compatibility is a funny thing. I've spent not
insignificant time thinkin
Eric Snow added the comment:
Sounds good.
--
___
Python tracker
<http://bugs.python.org/issue18764>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Snow:
There has been some discussion on python-dev about improving interpreter
startup time. Christian Heimes brought up how the os module imports
collections (so _Environ can inherit from it) [1], and mentioned a couple of
solutions [2].
[1]https://mail.python.org
Eric Snow added the comment:
Here is a patch for an alternate approach. It does not require re-implementing
MutableMapping (could get out of sync) and does not require rearranging
collections.abc. Instead it uses a metaclass to resolve the import issue
lazily.
--
keywords: +patch
Eric Snow added the comment:
And when the lazy base class gets resolved, the metaclass gets to say "You
didn't see anything and I was never here." :)
--
___
Python tracker
<http://bugs.pyt
Eric Snow added the comment:
With ModuleSpec (PEP 451), the finder creates the spec object (where it stores
the loader). At that point the finder is free to store any stat object you
like in spec.loader_state. The spec is made available to the loader during
exec (if the loader supports it
Eric Snow added the comment:
For interpreter startup, stats are not involved for builtin and frozen
modules[1]. They are tied to imports that involve traversing sys.path (a.k.a.
PathFinder). Most stats happen in FileFinder.find_loader. The remainder are
for source (.py) files (a.k.a
Eric Snow added the comment:
I realized those two stats are not superfluous in the case that a directory
name has a .py suffix or a file doesn't have any suffix. However, I expect
that's pretty uncommon.
Worst case, these cases cost 2 stats per path entry. In practice they cost
n
Eric Snow added the comment:
I forgot to mention that optimizing the default composition of sys.path (from
site) could help speed things up, though it might already be optimized in that
regard.
I also forgot to mention the idea of zipping up the stdlib.
Sorry for the sidetrack. Now, back to
Eric Snow added the comment:
Not a problem. It is most definitely a hack. :) I put in up as an alternative
to rearranging the collections module, but agree that doing so is preferable.
I image that Raymond will make a decision on that one
Eric Snow added the comment:
Thanks, Christian.
--
___
Python tracker
<http://bugs.python.org/issue19218>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
nice! Thanks for doing this.
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue18891>
___
___
Python-bugs-list m
Eric Snow added the comment:
Would it be feasible to have an explicit (but private?) flag in importlib
indicating stat checking (or even all FS checking) should be disabled,
defaulting to True? runpy could set it to False after initializing importlib
and then back to True when startup is
Eric Snow added the comment:
> I don't really understand the algorithm you're proposing.
In importlib._bootstrap:
We have some global like "_CHECK_STAT=True". FileFinder would use it to decide
on using stat checks or not.
In Python/pythonrun.c:
At the end of import_i
Eric Snow added the comment:
> Because calling them *from* method implementations in concrete subclasses...
We do the same thing from Python all the time (though less so with the
availability of super).
E.G. dict.__init__(self, ...) and dict.__set item__(self, key, value).
Now, if the C-
Eric Snow added the comment:
I had roughly the same idea, Nick, though my approach to address backward
compatibility was more complicated. Definitely worth at least looking into for
3.5.
--
___
Python tracker
<http://bugs.python.org/issue10
New submission from Eric Snow:
In Lib/test/test_importlib/import_/test_caching.py, UseCache.test_using_cache
"uncaches" "module_to_use", which it really ought to be yanking "some_module".
--
assignee: eric.snow
components: Tests
messages: 200997
nosy: br
Changes by Eric Snow :
--
versions: +Python 3.3
___
Python tracker
<http://bugs.python.org/issue19357>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> pending
___
Python tracker
<http://bugs.python.or
Changes by Eric Snow :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue19357>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric Snow added the comment:
Your example worked correctly, since the copy module is indeed not copiable. :)
Did you mean "from copy import copy"?
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
I knew this sounded familiar. Take a look at issue16251.
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> pickle special methods are looked up on the instance rather
t
Eric Snow added the comment:
Here's a patch just for the changes to the import page in the language
reference. It's not perfect, but should represent the target pretty closely.
--
nosy: +ncoghlan
Added file: http://bugs.python.org/file32348/import-system-refe
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32348/import-system-reference.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
Eric Snow added the comment:
Let's try that again with the proper diff. :)
--
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Python-bugs-l
Changes by Eric Snow :
Added file: http://bugs.python.org/file32349/import-system-reference.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Python-bug
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19392>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Here's an update of the language reference patch based on Brett's comments.
--
Added file: http://bugs.python.org/file32381/import-system-reference.diff
___
Python tracker
<http://bugs.python.o
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32349/import-system-reference.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
New submission from Eric Snow:
PJE brought up concerns on python-dev regarding PEP 451 and module reloading.
[1] However, the issue isn't with the PEP changing reload semantics (mostly).
Those actually changed with the switch to importlib (and a pure Python reload
function) in th
Eric Snow added the comment:
Here's an updated patch.
--
Added file: http://bugs.python.org/file32406/reload-semantics.diff
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32385/reload-semantics.diff
___
Python tracker
<http://bugs.python.org/issue19413>
___
___
Python-bug
Eric Snow added the comment:
Here's an updated patch that implements the meat of the current PEP. Docs are
still lacking and I could probably add a few more tests. Other key things left
to do:
* deprecations and removals
* refactor importlib finders and loaders to use the new Finder/L
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32407/modulespec-primary-changes.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
Eric Snow added the comment:
This time against tip. :)
I should also point out that this patch is on top of the path in issue19413.
--
Added file: http://bugs.python.org/file32408/modulespec-primary-changes.diff
___
Python tracker
<h
Eric Snow added the comment:
Brett: any opinions on fixing this? 3.3?
Nick: I'll add another test when I get a chance.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
I'm fine with not fixing this for 3.3. Does this need to wait on PEP 451
acceptance?
--
versions: -Python 3.3
___
Python tracker
<http://bugs.python.org/is
New submission from Eric Snow:
The first thing that importlib.reload() does is to verify that the passed
module is an instance of types.ModuleType (Lib/importlib/__init__.py:107).
This check seems unnecessary to me. We really don't have a functional need for
the check (that I kn
Eric Snow added the comment:
As you can see, Nick, I came up with a test that did just about the same thing
(which you had suggested earlier :-) ). For good measure I also added a test
that replaces a namespace package with a normal one.
--
assignee: -> eric.snow
resolut
Changes by Eric Snow :
--
status: pending -> open
___
Python tracker
<http://bugs.python.org/issue19413>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric Snow added the comment:
Looks like this broke on windows:
==
FAIL: test_reload_namespace_changed
(test.test_importlib.test_api.Source_ReloadTests
New submission from Eric Snow:
In changeset 88c3a1a3c2ff you'll find in test_api.py where I threw together a
__path__ to compare against the one I was getting (which had 2 identical
entries) on my Ubuntu 12.04 workstation. The XP buildbot
(http://buildbot.python.org/all/builders/x86%2
Eric Snow added the comment:
Windows looks happy now. I'll look into the duplicate portions separately in
issue19469.
--
status: open -> pending
___
Python tracker
<http://bugs.python.org
Changes by Eric Snow :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue19413>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Eric Snow:
In recent PEP 451-related discussions, the subject of reloading has come up
multiple times. Most recently, PJE suggested that reload semantics are
under-specified (and under-tested). [1][2]
It may be worth adding a dedicated section on reloading to the
Eric Snow added the comment:
Here's a new patch that is mostly up to date with the PEP. I still need to
work on Docs and add more tests. There are a few failing tests (due to the
recent reload patch) that I need to fix when I get a minute.
This patch also implements find_spec
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32408/modulespec-primary-changes.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
Changes by Eric Snow :
Added file: http://bugs.python.org/file32457/modulespec-primary-changes.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
Changes by Eric Snow :
Removed file: http://bugs.python.org/file32456/modulespec-primary-changes.diff
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Pytho
Eric Snow added the comment:
You could add the following to the bottom of this.py:
import sys
del sys.modules['this']
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
+0 to just doing a reload. At the point you show someone "import this", it may
be premature to be explaining reloading to them. Python is great because you
usually don't have to hand-wave through some concepts in order to explain
others. [1]
Als
Eric Snow added the comment:
The view objects aren't sequences. od.items() and od.keys() implement Set.
od.values() doesn't even do that much, only implementing __len__(), __iter__(),
and __contains__().
The glossary implies that you should use "reversed(list(view))". [1
Eric Snow added the comment:
PEP 432 relates pretty closely here.
--
nosy: +eric.snow, ncoghlan
___
Python tracker
<http://bugs.python.org/issue19518>
___
___
Eric Snow added the comment:
PEP 432 is all about the PyRun_* API and especially relates to refactoring it
with the goal of improving extensibility and maintainability. I'm sure Nick
could expound, but the PEP is a response to the cruft that has accumulated over
the years in P
Eric Snow added the comment:
A lot of thought went into Python 3 changes, including making print a function
(see PEP 3105). While typing efficiency may be appealing, keep in mind that
generally code will be read more than written. There are other programming
languages that highly value
Eric Snow added the comment:
Hurray!
--
___
Python tracker
<http://bugs.python.org/issue16803>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I've created a server-side clone for the implementation:
http://hg.python.org/features/pep-451/
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Okay, I've updated the pep451 branch in the clone to include as much of the
implementation as I've completed, which is the bulk of the functional changes.
It's enough to pass the test suite.
Here's what I'd like to get done before th
Eric Snow added the comment:
"1." was intentionally left blank
--
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Python-bugs-l
Eric Snow added the comment:
Sorry that wasn't more clear. I committed the changes from the
modulespec-primary-changes.diff patch to the pep451 branch in the server-side
clone. Those changes are:
Step 1
--
1. added ModuleSpec class
2. added _SpecMethods wrapper class
3. added Modul
Eric Snow added the comment:
Regarding tests, a bunch of importlib (and other?) tests make direct calls to
find_module(), find_loader(), or load_module(). These are still working, as
expected. However, we should probably either replace them or supplement them
with equivalent tests that make
Eric Snow added the comment:
> Yeah, don't replace any tests, add new ones for the new APIs.
That's what makes the most sense to me too.
> Given the
> needs of 2/3 compatible loader implementations, the deprecations referred
> to in the PEP should also be documentation-o
Eric Snow added the comment:
> (I still like the idea of passing
> a target to importlib.find_spec - I just no longer think we should be
> passing that down to the finders themselves).
Passing the target to the finders isn't just for the sake of any implicit
"check_target
Eric Snow added the comment:
Sounds good. It will be worth adding a note to the load_module() docs
indicating the limited cases where it is still appropriate, and encouraging the
use of exec_module() instead.
--
___
Python tracker
<h
Eric Snow added the comment:
I'm running the pep-451 clone against 2 buildbots for now:
*
http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%20custom
* http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%20custom
The ubuntu one is happy with the fe
Eric Snow added the comment:
The OS X buildbot I used [1] did not exhibit any of the failures that Windows
server 2003 showed.
[1] http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%20custom
--
___
Python tracker
<http://bugs.python.
Eric Snow added the comment:
The Windows 7 buildbot I tried [1] shows the exact same failures that the
server 2003 does.
[1] http://buildbot.python.org/all/builders/x86%20Windows7%20custom
--
___
Python tracker
<http://bugs.python.org/issue18
Eric Snow added the comment:
Naturally the other Windows buildbot I tried did not fail any import-related
tests. So much for consistency. :(
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom
--
___
Python tracker
<h
Eric Snow added the comment:
> The three Windows machines look like they have very different system
> versions of Python (ActiveState, cygwin, vanilla CPython). Any chance we're
> accidentally invoking the system Python instead of the built one somewhere?
Good point. I'll ch
Eric Snow added the comment:
> I think worrying about more API expansions to handle edge case/advanced
> reload scenarios is not worth it (or at least not in Python 3.4).
Agreed.
--
___
Python tracker
<http://bugs.python.org/i
Eric Snow added the comment:
Regarding the to-do list, I'm going to add a TODO file to the root of the
feature clone (in the pep451 branch) so we don't have to keep updating this
ticket. :)
--
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
FYI, as of cc7ebd952777 the bulk of the implementation in features/pep-451 is
working.
There is a failing test on the Windows Server 2003 buildbot (which I'm trying
to track down). I haven't been able to reproduce the failure on other
buildbots, o
Eric Snow added the comment:
Cool. Roundup linked the revision hash to the feature clone. :)
--
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
1901 - 2000 of 2629 matches
Mail list logo