Eric Snow added the comment:
+1 to where Brett's taking this. I really like having the PEP399Tests class
encapsulating the various boilerplate parts, with some of them as methods,
rather than trying to pack them all into one all-powerful decorator.
It would be worth raising an excepti
Eric Snow added the comment:
FWIW, here's a little more explanation on my original thoughts, none of which
I'm married to.
Most of the magic in my patch came messing with the globals (swap out the
module and module attrs; add in the two new classes; ditch the original class).
Eric Snow added the comment:
+1 on requires_accelerator(). It could also be used for individual test
methods. Similar decorators-as-methods could be added later, where
appropriate, for other special cases, like handling the pickle situation
described in #16817
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17093>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17099>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17098>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17100>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Are you thinking of issue 15833?
--
___
Python tracker
<http://bugs.python.org/issue13192>
___
___
Python-bugs-list mailing list
Unsub
Eric Snow added the comment:
Yeah, at some point I will. :) I've been pretty focused on implementing a
C-OrderedDict, which I'm (hopefully) wrapping up pretty soon. Once that
happens I'm going to revisit a bunch of the open tickets I have. If you want
to push this sooner
Eric Snow added the comment:
Other than the language reference (with its updated info on imports--thanks
Barry!), what other documentation would benefit from a note on this? Somwhere
in http://docs.python.org/dev/tutorial/modules.html?
--
nosy: +eric.snow
Eric Snow added the comment:
> By the way,...
Yeah, PEP 420 (implemented in 3.3) introduced namespace packages. The new
behavior you're thinking of is where a package doesn't need a __init__.py. So
path-based lookup for modules, the order goes like this (for "import
spa
Eric Snow added the comment:
My vote is for making this a ValueError in both cases (and amending the doc
appropriately as well). The error amounts to the same thing: the module did
not have loader (implicitly or explicitly). If someone wants to distinguish
between the two they can
Eric Snow added the comment:
+1
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17117>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
> In all honesty I would like to tweak imp.new_module()/PyModule_Create()...
+1
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issu
Eric Snow added the comment:
> [document that] the language reference and importlib docs now supersede the
> PEP
Agreed. PEP 302 is even crustier now than it was a year ago and Barry's new
import page in the language reference obviates the need for 302 as the de
Eric Snow added the comment:
Here's an updated patch. I still have some ref-counting issues, but the patch
is much closer to what I expect will be the final version. At this point it
passes all the main unit tests (segfaults in some of the supplemental Mapping
tests).
One key thing is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file28762/odict.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
Looks like I didn't get the patch lined up to tip so the review link isn't
showing up. I'll have to fix that tomorrow.
--
___
Python tracker
<http://bugs.pyt
Eric Snow added the comment:
Agreed. It should also link to the new import section in the language
reference rather than to the import statement.
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17
Changes by Eric Snow :
Added file: http://bugs.python.org/file28971/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file28972/odict.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
Changes by Eric Snow :
Removed file: http://bugs.python.org/file28971/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Pytho
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
Changes by Eric Hanchrow :
--
components: Library (Lib)
nosy: Eric.Hanchrow
priority: normal
severity: normal
status: open
title: LoggerAdapter class lacks documented "setLevel" method
type: behavior
versions: Python 2.7
___
Python trac
Eric Hanchrow added the comment:
Put the following into a file named "repro.py", then type "python repro.py" at
your shell. You'll see ``AttributeError: 'CustomAdapter' object has no
attribute 'setLevel'``
import logging logging.basicConfig
Eric Hanchrow added the comment:
Gaah, please ignore that last message; I accidentally pasted it into the wrong
page :-(
--
___
Python tracker
<http://bugs.python.org/issue19
New submission from Eric Hanchrow:
Put the following into a file named "repro.py", then type "python repro.py" at
your shell. You'll see ``AttributeError: 'CustomAdapter' object has no
attribute 'setLevel'``
import logging logging.basicConfig
Eric Hanchrow added the comment:
I should have been clearer: the problem is that the docs
(http://docs.python.org/2/library/logging.html#logging.LoggerAdapter) say
In addition to the above, LoggerAdapter supports the following methods of
Logger, i.e. debug(), info(), warning(), error
Eric Hanchrow added the comment:
Thanks!
On Wed, Oct 30, 2013 at 5:36 PM, Vinay Sajip wrote:
>
> Vinay Sajip added the comment:
>
> Okay, I see. I can't add the methods to the code (as feature additions aren't
> allowed in micro releases, and 2.7 is the last 2.x
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
Changes by Eric Hanchrow :
--
nosy: -Eric.Hanchrow
___
Python tracker
<http://bugs.python.org/issue19063>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
2601 - 2700 of 6573 matches
Mail list logo