Eric Snow added the comment:
The this module was actually the subject of a similar proposal recently:
issue19499. The same arguments there for leaving the module alone apply here.
(Amon other things, it's a neat little artifact:
http://www.wefearchange.org/2010/06/import-this-and-z
Eric Snow added the comment:
I left a review relative to the use of the _path attribute (which shouldn't be
used).
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Sorry for any confusion, Claudiu. the_module.__path__ only indicates that the
module is a package. So until you can take advantage of PEP 451, you're stuck
with the _path check (or several other unappealing hack) on line 224 of
unittest-17457-3.patch.
Ho
Eric Snow added the comment:
Brett: looks like something frozen-related broke due to 6d1656ab2c85a527c.
test_frozen in test_frozen.py is failing now because frozen modules no longer
have a __cached__ attribute (which was previously set to None). Previously it
was set in
Changes by Eric Snow :
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue19655>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
As far as I'm aware, the performance of __repr__() for any object is not much
of a concern. Repr is mostly for debugging and interactive use, so it's
already fast/efficient enough for the target consumers: us. :) Making
__repr__() easier to write or m
Eric Snow added the comment:
Larry: thoughts?
--
nosy: +larry
___
Python tracker
<http://bugs.python.org/issue3158>
___
___
Python-bugs-list mailing list
Unsub
Eric Snow added the comment:
> they make the decorator harder to read.
I agree.
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issu
Eric Snow added the comment:
I've updated the TODO a little as well as cleaning up the XXX markers. The
relevant ones are mostly just open questions on implementation tweaks, so
nothing major. Otherwise my goal is to finish as much as possible of the
non-critical items before the
Eric Snow added the comment:
FYI, the C OrderedDict implementation in #16991 implements its own
doubly-linked list, built around the needs of OrderedDict. I looked into BSD's
queue.h [1], but it ended up simpler to roll my own.
[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.
Eric Snow added the comment:
As an alternative, how about turning _source into a property?
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19
New submission from Eric Snow:
This is closely related to issue #19697.
--
___
Python tracker
<http://bugs.python.org/issue19700>
___
___
Python-bugs-list mailin
New submission from Eric Snow:
Isn't this basically the same thing as issue #19697?
--
___
Python tracker
<http://bugs.python.org/issue19709>
___
___
Pytho
Eric Snow added the comment:
See http://www.python.org/dev/peps/pep-0451/#deprecations.
--
___
Python tracker
<http://bugs.python.org/issue19713>
___
___
Pytho
Eric Snow added the comment:
Failing buildbot:
http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/9630/steps/test/logs/stdio
test.test_module.ModuleTests.test_module_repr_source
test.test_pkgutil.ExtendPathTests.test_iter_importers (passed when retried
New submission from Eric Snow:
Some exceptions in importlib are raised from within except blocks, resulting in
chained tracebacks. [1] For at least some of these we should consider
suppressing the exception context.
For example (for [1]):
try:
path = parent_module
Changes by Eric Snow :
--
resolution: -> duplicate
status: pending -> closed
superseder: -> refactor pythonrun.c to make use of specs (__main__.__spec__)
___
Python tracker
<http://bugs.python.or
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19701>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
+1
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19696>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
I was thinking the same thing as Antoine. 18 fits in more closely to what I
understand is the purpose of asyncio (the focus on IO).
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19
Eric Snow added the comment:
+1
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue19721>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
FWIW, I agree with Antoine about making those PyCompile_ functions private
(leading "_").
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.o
New submission from Eric Snow:
http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/5448/steps/test/logs/stdio
==
ERROR: test_iter_importers (test.test_pkgutil.ExtendPathTests
Eric Snow added the comment:
This appears to be order-related, like the last failure was. To reproduce:
$ ./python -m test test_importlib test_pkgutil
--
___
Python tracker
<http://bugs.python.org/issue19
Changes by Eric Snow :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19724>
___
___
Python-bugs-list
Eric Snow added the comment:
A while back, because of those python-ideas discussions, Raymond added a link
at the bottom of the namedtuple section of the docs at
http://docs.python.org/3.4/library/collections.html#namedtuple-factory-function-for-tuples-with-named-fields.
The link points to a
Eric Snow added the comment:
It's definitely worth it to be more explicit. (Brett had referenced
msg202663.) When I get some time I'll update this ticket with a list of the
specific deprecation items.
--
___
Python trac
Eric Snow added the comment:
I've already started on this somewhat. However, I'm going to close out more of
the other PEP 451 issues before going any further.
Nick: when do you think things will settle down that you could field a question
or two and some reviews relative to th
Eric Snow added the comment:
The concern, as far as I understand it, is that any change might introduce
regressions or even new bugs in the next beta. Something like swapping out the
parser generator implementation isn't a bug fix, but it isn't a new language
(incl. stdlib) feat
Changes by Eric Snow :
--
keywords: +easy
___
Python tracker
<http://bugs.python.org/issue19820>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Snow:
The docs for the inspect module and the types module do not list all the
import-related module attributes. I'm guessing they've been out of sync a
while.
The docstring for for inspect.ismodule() is likewise missing information.
--
assignee: d
New submission from Eric Snow:
The inspect module doesn't need any changes.
--
resolution: -> works for me
stage: -> committed/rejected
type: -> enhancement
___
Python tracker
<http://bugs.pyth
New submission from Eric Snow:
I don't recall the specifics of how we'd talked about making use of module
specs in pickle. I vaguely remember (or misremember ) something related
to saving __main__.__spec__.name in the pickle rather than __main__.__name__.
Anyone have anything mor
New submission from Eric Snow:
pydoc.ispackage() is a best-effort guess at whether or not a path is the
location of a package. However, it uses hard-coded suffixes when matching file
names, which can miss files (e.g. extension modules and sourceless packages on
Windows). It should probably
New submission from Eric Snow:
Here are the functions that should (?) be updated:
synopsis()
importfile()
safeimport()?
HTMLDoc.docmodule()
HTMLDoc.index()
TextDoc.docmodule()
ModuleScanner.run()?
--
___
Python tracker
<http://bugs.python.
Eric Snow added the comment:
In Lib/multiprocessing/spawn.py the following need changing:
get_preparation_data()
import_main_path()
--
dependencies: +refactor pythonrun.c to make use of specs (__main__.__spec__)
___
Python tracker
<h
Changes by Eric Snow :
--
title: Upate pydoc to PEP 451 -> Update pydoc to PEP 451
___
Python tracker
<http://bugs.python.org/issue19703>
___
___
Python-
Changes by Eric Snow :
--
dependencies: +Update runpy for PEP 451
___
Python tracker
<http://bugs.python.org/issue19697>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
Is the problem here that builtins (and extension modules) don't necessarily
obey the rules to the letter? load_module() is supposed to use whatever is in
sys.modules. [1] (BuiltinImporter.load_module() is essentially a synonym for
_imp.init_builtin(),
Eric Snow added the comment:
_run_module_as_main() is particularly related to #19697.
--
___
Python tracker
<http://bugs.python.org/issue19700>
___
___
Python-bug
Eric Snow added the comment:
This is actually a problem with importlib.reload() (which imp.reload() simply
wraps). The attached patch provides a test that reproduces the error. I'll
work on a fix ASAP.
Interestingly, the kind of failure depends on frozen vs. source impo
Eric Snow added the comment:
Actually, they're both getting the same error:
AttributeError: 'NoneType' object has no attribute 'name'
I forgot to clear the submodule from sys.modules first.
--
___
Python tracker
<http:
New submission from Eric Snow:
ModuleSpec.__eq__() does a comparision of its various attributes, one of them
being the loader. However, the __eq__() of the path-based loaders is just the
stock one that compares object identity. So most
--
messages: 205515
nosy: brett.cannon
Eric Snow added the comment:
(my browser farted the half finished report into existence :P )
The __eq__() implementation of the path-based loaders in importlib is just the
stock one that compares object identity. So two that are effectively the same
compare unequal. This has a material
Changes by Eric Snow :
--
Removed message: http://bugs.python.org/msg205515
___
Python tracker
<http://bugs.python.org/issue19927>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
The problem was that importlib.reload() was not passing the parent's __path__
to importlib._bootstrap._find_spec(). This was a consequence of us restoring
the pre-3.3 reload semantics.
Patch attached. (Note to self: add Misc/NEWS entry)
--
stage:
Changes by Eric Snow :
Removed file: http://bugs.python.org/file33033/issue19851-test.diff
___
Python tracker
<http://bugs.python.org/issue19851>
___
___
Python-bug
Eric Snow added the comment:
Here's a patch.
--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file33038/issue19927-loader-eq.diff
___
Python tracker
<http://bugs.python.org
Eric Snow added the comment:
Good catch. My preference would be for (c) simply add a setter for the
property that sets the underlying private variable to True or False.
--
___
Python tracker
<http://bugs.python.org/issue18
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
Good point, Nick. Here's a patch that follows your recommendation on both
points.
--
Added file: http://bugs.python.org/file33072/issue19927-loader-eq.diff
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file33038/issue19927-loader-eq.diff
___
Python tracker
<http://bugs.python.org/issue19927>
___
___
Python-bug
Eric Snow added the comment:
Here's a patch for adding a setter for ModuleSpec.has_location.
--
Added file: http://bugs.python.org/file33073/issue18864-has-location-setter.diff
___
Python tracker
<http://bugs.python.org/is
New submission from Eric Snow:
In the last Python releases, particularly 3.3 and 3.4, we've made improvements
to the import machinery that render (at least) portions of pkgutil obsolete.
Here's a breakdown of the public API of pkgutil:
get_importer() - duplicate of
Eric Snow added the comment:
patch LGTM
--
___
Python tracker
<http://bugs.python.org/issue19700>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
As a testament to counter-intuitive API, I did not even realize this about
either find_loader() or find_spec() until the bug the other day with reloading
submodules. So I'm on board!
As to the best approach, I'll argue for keeping just 1 function. I
Eric Snow added the comment:
This came up in issue19946.
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue19701>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
There is definitely room for improvement relative to module specs and __main__
(that's the topic of issue #19701). That issue is waiting for __main__ to get
a proper spec (see issues #19700 and #19697).
--
___
P
Eric Snow added the comment:
Here's a patch for the deprecations (and API additions) in the importlib docs.
--
keywords: +patch
Added file: http://bugs.python.org/file33088/issue19713-importlib-docs.diff
___
Python tracker
<http://bugs.py
Eric Snow added the comment:
I've attached a patch to issue19713 (file33088) that adds documentation for the
new APIs. Also, there were some good reviews in issue18864 (especially for
file32381) that never got fully addressed.
--
___
P
Changes by Eric Snow :
--
dependencies: -Implement _imp.exec_builtin and exec_dynamic
___
Python tracker
<http://bugs.python.org/issue18864>
___
___
Python-bug
Changes by Eric Snow :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue19714>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
It looks like there are two concepts at play though:
1. side-effect-free vs. may-have-side-effects
2. just-find-the-spec-dangit vs.
find-the-spec-relative-to-submodule-search-locations-I-already-know
In the case of #1, providing the path is just a means to an end
Changes by Eric Snow :
--
nosy: +lemburg
___
Python tracker
<http://bugs.python.org/issue19968>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Nick: that sounds good to me. I like the idea of find_spec() being the same as
import_module(), minus actually loading the module.
In that spirit, here's a rough patch that accomplishes that. It refactors
things a bit to get there. Considering where we a
Eric Snow added the comment:
Here's a version that I'd feel more comfortable with for 3.4 (with the intent
of refactoring in 3.5).
--
Added file:
http://bugs.python.org/file33112/issue19944-find-spec-mirror-import-module-simple.diff
Eric Snow added the comment:
New changeset 2c27c0e5bc50 by Eric Snow in branch 'default':
Issue #19713: Update importlib docs for module spec changes, including
deprecations.
http://hg.python.org/cpython/rev/2c27c0e5bc50
New changeset b78de8029606 by Eric Snow in branch 'default
Changes by Eric Snow :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> pending
type: -> enhancement
___
Python tracker
<http://bugs.python
Eric Snow added the comment:
The doc deprecations should now be complete.
--
___
Python tracker
<http://bugs.python.org/issue19713>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
P.S. changeset b78de8029606 should have referred to #19710.
--
___
Python tracker
<http://bugs.python.org/issue19713>
___
___
Pytho
Eric Snow added the comment:
I'm leaving this as pending for the moment in case we notice anything I missed.
--
status: pending -> open
___
Python tracker
<http://bugs.python.org
Changes by Eric Snow :
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue19710>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric Snow added the comment:
Here's a patch that simply adds all the deprecation warnings. It does not
include any effort to silence the zillion warnings that happen when the test
suite is run with -Wall. I plan on addressing all those when I have some time.
That will be a matt
Eric Snow added the comment:
I'd meant to do that. I'll update the patch when I have a chance.
--
___
Python tracker
<http://bugs.python.org/issue19713>
___
__
New submission from Eric Snow:
The modulefinder module (Lib/modulefinder.py) provides a ModuleFinder class
(plus 2 helpers) you can use to see what modules a script imports (directly or
indirectly). The module's implementation is centered on the old
imp.find_/load_module() API (whic
New submission from Eric Snow:
Python/makeopcodetargets.py uses deprecated imp APIs. It should be refactored
to use newer import-related APIs.
--
components: Library (Lib)
messages: 206577
nosy: eric.snow
priority: low
severity: normal
status: open
title: "mode
New submission from Eric Snow:
Mac/Tools/bundlebuilder.py uses deprecated imp APIs. It should be refactored
to use the current import-related APIs.
--
messages: 206578
nosy: eric.snow
priority: low
severity: normal
status: open
title: "modernize" the Mac bundlebuilder.py s
Eric Snow added the comment:
Thanks for working this out, Nick!
--
___
Python tracker
<http://bugs.python.org/issue19700>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
If anyone notices any issues with the doc changes, please open a new issue.
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issu
Changes by Eric Snow :
Removed file:
http://bugs.python.org/file33172/issue19713-deprecation-warnings.diff
___
Python tracker
<http://bugs.python.org/issue19713>
___
___
Eric Snow added the comment:
Here's an updated patch that does most of the deprecations and
adjustments/silencings to accommodate the deprecations. The main things left
to adjust are many importlib tests and pkgutil/test_pkgutil.
I'm still on the fence about deprecation wa
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue18576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
find_loader() is now deprecated and we're going to support auto-importing
parent modules in find_spec() (see #19944)
--
nosy: +eric.snow
resolution: -> duplicate
stage: test needed -> committed/rejected
status: open -> closed
supers
Eric Snow added the comment:
I've closed #16492 in favor of this ticket.
--
___
Python tracker
<http://bugs.python.org/issue19944>
___
___
Python-bugs-list m
Eric Snow added the comment:
I'm glad you spoke up, Nick. Holding off on the DeprecationWarnings is fine
with me. It's not like we are going to drop support for the APIs before Python
4! That said, DeprecationWarnings are disabled by default. So how big a deal
do you think it i
Eric Snow added the comment:
Sounds good. Thanks for the explanation. It sounds like you're effectively
concerned just with finder.find_module() and loader.load_module() (which is
fine with me). Everything else (including some of the ABCs) is 3.3-only. For
the sake of simplicity I
Eric Snow added the comment:
Unless there are objections, I'll commit this in the next day or two.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
My bad, Larry. I guess I was reading between the lines too much. :)
--
___
Python tracker
<http://bugs.python.org/issue19
Eric Snow added the comment:
Yeah, it was while writing tests that I ran into this.
--
___
Python tracker
<http://bugs.python.org/issue19927>
___
___
Python-bug
Eric Snow added the comment:
Right now say you have 2 module specs that are the same. The only difference
is that the 2 loaders are not the same instance (they were created separately
with the same arguments, ergo equal). The two specs will not compare as equal
even though they are equal
Eric Snow added the comment:
I'm fine with this. Thanks, Larry, for your attentiveness and diligence.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Any thoughts on the latest patch?
--
___
Python tracker
<http://bugs.python.org/issue19944>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
Here's a patch with tests that cover find_module() and find_spec() for
WindowsRegistryFinder (the missing case) and fixes the bug.
--
keywords: +patch
nosy: +eric.snow
stage: test needed -> patch review
Added file: http://bugs.python.org/f
Eric Snow added the comment:
The patch passes on my linux box and on my windows 7 laptop (using Visual
Studio 2010 Express).
--
___
Python tracker
<http://bugs.python.org/issue20
Changes by Eric Snow :
Removed file: http://bugs.python.org/file33294/issue20097-tests.diff
___
Python tracker
<http://bugs.python.org/issue20097>
___
___
Python-bug
Eric Snow added the comment:
Here's an updated patch that fixes as copy-and-paste mistake.
--
Added file: http://bugs.python.org/file33295/issue20097-tests.diff
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Thanks for the review, Victor. As to that note, it is the subject of issue
#19714.
--
assignee: brett.cannon -> eric.snow
dependencies: -Add tests for importlib.machinery.WindowsRegistryFinder
resolution: -> fixed
stage: patch review ->
Eric Snow added the comment:
I added 2 rudimentary tests for issue #20097 which gives at least coverage in
the test suite, but we need the following tests still:
* registry entry exists and module is found (spec returned)
* registry entry exists and module is not found (None returned
Eric Snow added the comment:
Good points, Nick. I was trying to limit touches on _bootstrap.py for 3.4, but
that "simple" patch is mostly just a hacky band-aid. Here's a patch that
hopefully stands on its own and still limits touches. (The patch is the
bare-bones changes on
Eric Snow added the comment:
find_spec() is at package level because find_module() is and for no other good
reason I'm aware of. I'd be just fine with moving it to util. I don't expect
it to be used enough to warrant that top-level placement.
Regarding builtins.__import__(),
2001 - 2100 of 2629 matches
Mail list logo