Brett Cannon added the comment:
Making tests discoverable allows for the future possibility of dropping our
custom test runner code and using more of unittest code by having regrtest use
unittest's discovery code to find all tests.
--
___
P
Brett Cannon added the comment:
Since http://bugs.python.org/issue10967 is the meta issue for updating regrtest
this can be closed.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Brett Cannon :
--
title: Make time_importlib run tests under both _frozen_importlib and
importlib._bootstrap -> Make test_importlib run tests under both
_frozen_importlib and importlib._bootstrap
___
Python tracker
&l
Brett Cannon added the comment:
One thing I should say about this list of modules is please don't go nuts
porting every single module blindly. There is always a possibility that another
VM has already ported the code and has simply not contributed it back and so
there is no need to wri
Brett Cannon added the comment:
In response to Raymond:
First, Serhiy is a core developer now, so if he wants to commit this code and
maintain it I have no objections as it doesn't detract from anything and the
maintenance burden is his if he wants it. Whether any of us view it as the
New submission from Brett Cannon:
Importlib, when checking for PYTHONCASEOK, does not respect -E as it did in
Python 3.2 and earlier
(http://hg.python.org/cpython/file/0786dfc3b2b4/Python/import.c#l1933).
--
components: Interpreter Core
keywords: 3.2regression
messages: 178679
nosy
New submission from Brett Cannon:
Don't have the base tests inherit from TestCase else they will be discovered by
unittest and run even though they are not fully defined.
See http://bugs.python.org/issue16748 as the trigger for this issue.
--
messages: 178748
nosy: brett.c
Brett Cannon added the comment:
I created http://bugs.python.org/issue16835 to remind me to update PEP 399.
--
___
Python tracker
<http://bugs.python.org/issue16
Brett Cannon added the comment:
Why remove the refleak tests? I'm sure Raymond put those in for a reason as I
know he tries to reuse various objects a lot and this helped make sure he
didn't mess anything up.
I don't think the tests need t
Brett Cannon added the comment:
I agree that it makes no sense to define __file__ for frozen modules.
Originally they did because that was the only way to tell if a module was a
builtin module or not, but with the imp module's API on top of
sys.builtin_module_names, there is no ne
Brett Cannon added the comment:
Just to have this written down somewhere, site.py already goes through and
changes __file__ to absolute for modules already imported before it is run, so
there is some precedent to not caring about relative file paths
Brett Cannon added the comment:
The patch LGTM
--
___
Python tracker
<http://bugs.python.org/issue16748>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
You can go ahead and start a new issue so it isn't forgotten about as this
becomes a meta issue.
And you can always add me to the nosy, just can't guarantee how fast I will do
the reviews. =)
--
___
Pyth
Changes by Brett Cannon :
--
dependencies: +Fix test discovery for test_genericpath.py
___
Python tracker
<http://bugs.python.org/issue16748>
___
___
Python-bug
Brett Cannon added the comment:
With some tricky use of import_fresh_module() because importlib.__init__ does
some masking trickery, it should ... I think. =)
--
___
Python tracker
<http://bugs.python.org/issue16
Brett Cannon added the comment:
LGTM as well. Feel free to commit it, Ezio, or assign to me and I will commit
it later (probably this weekend).
--
assignee: -> eric.araujo
nosy: +eric.araujo
stage: patch review -> commit review
___
Python t
Brett Cannon added the comment:
LGTM
--
stage: needs patch -> commit review
___
Python tracker
<http://bugs.python.org/issue16880>
___
___
Python-bugs-list mai
Brett Cannon added the comment:
I should say LGTM in terms of looking at the patch, not actually trying it out.
=)
--
___
Python tracker
<http://bugs.python.org/issue16
Brett Cannon added the comment:
I did just realize, though, there is no test for temporarily setting
load_dynamic() to None in imp.py to make sure the expected exception is raised.
--
___
Python tracker
<http://bugs.python.org/issue16
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16868>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16537>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Wording LGTM
--
stage: -> commit review
___
Python tracker
<http://bugs.python.org/issue16868>
___
___
Python-bugs-list mai
Brett Cannon added the comment:
It's totally doable to set up stubs in Lib/test to use test discovery on those
tests which exist outside of that directory. test_importlib actually has some
code for that left over from when it lived in Lib/importlib/test:
http://hg.python.org/cpython
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16894>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Two reasons for collecting all of the tests in a single location:
1) Facilitates test discovery
2) It makes packaging of CPython easier for Linux distros that prefer to leave
the tests out of the core package
New submission from Brett Cannon:
For test discovery to work where a dependent module is optional, you end up
needing to do something like what is done in
http://hg.python.org/cpython/rev/15ddd683c321:
-crypt = support.import_module('crypt')
+def setUpModule():
+# this import
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue3170>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
versions: +Python 3.3
___
Python tracker
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailin
Changes by Brett Cannon :
--
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue9716>
___
___
Python-bugs-list mailing list
Unsub
Changes by Brett Cannon :
--
versions: +Python 3.4 -Python 3.1
___
Python tracker
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsub
Changes by Brett Cannon :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue3583>
___
___
Python-bugs-list
Changes by Brett Cannon :
--
nosy: -brett.cannon
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue8915>
___
___
Python-bug
Changes by Brett Cannon :
--
nosy: -brett.cannon
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue2267>
___
___
Python-bug
Brett Cannon added the comment:
While I appreciate the effort, SilentGhost, I'm going to make a call and say
Raymond is right; this isn't worth the code breakage. While all new code should
make sure to use the underscore prefix, proactively adding it to pre-existing
code just isn
Brett Cannon added the comment:
So I just closed the dependency on this issue as I figured the potential code
breakage wasn't worth this (plus the referenced TODO item from the devguide is
gone and was never turned into a proper task).
Now the question becomes do the guidelines Silent
Changes by Brett Cannon :
--
nosy: -brett.cannon
versions: +Python 3.3, Python 3.4
___
Python tracker
<http://bugs.python.org/issue969718>
___
___
Python-bug
Brett Cannon added the comment:
Alexander's patch LGTM
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue10541>
___
___
Py
Changes by Brett Cannon :
--
nosy: -brett.cannon
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue10991>
___
___
Python-bug
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue10708>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
This no longer seems to be a problem in Python 3.2, 3.3, or 3.4.
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue10401>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue10399>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue11276>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
What is the status of this, Sandro? Are we still out of sync? If so and it's a
licensing issue I can get legal clarification for whatever we need.
--
status: open -> pending
___
Python tracker
<http://bugs
Brett Cannon added the comment:
Tests added for both the file and unreadable cases and the appropriate
exceptions now caught. Thanks to everyone for helping with this!
--
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -> closed
versions: +P
Changes by Brett Cannon :
--
assignee: brett.cannon ->
___
Python tracker
<http://bugs.python.org/issue10965>
___
___
Python-bugs-list mailing list
Unsubscri
Brett Cannon added the comment:
Short of doing an actual merge I don't think so, Bob. Thanks for the changes!
Sandro, feel free to do any merge you were planning to do.
--
___
Python tracker
<http://bugs.python.org/is
Brett Cannon added the comment:
OK, so I took Nick's suggestion of doing header verification separately from
the actual compilation, but I ended up just writing the patch from scratch to
see how a possible API might play out. ATM the API is as functions and private,
but if I find the
Brett Cannon added the comment:
Nick had some good suggestions on improvements:
http://mail.python.org/pipermail/python-dev/2013-January/123602.html
Re-opening to remind me to do them.
--
status: closed -> open
___
Python tracker
&l
Brett Cannon added the comment:
load_dynamic should probably be documented since it does something you can't do
on your own and importlib itself uses it.
As for the exception test, it should be to make sure ImportError is raised
(i.e. the 'else'
Brett Cannon added the comment:
The way I would replace test_main() would be:
if __name__ == '__main__':
try:
test.support.reap_threads(unittest.main)()
finally:
test.support_reap_children()
--
___
Python tracker
<http://bu
Brett Cannon added the comment:
Yes as even the current solution doesn't work with ``-m unittest discover``
anyway, right? And if you are running the tests independently then it is a
separate process and thus you don't need to worry about dangling threads or
Brett Cannon added the comment:
A quick trace through importlib._bootstrap through hg.python.org would suggest
that the OSError would propagate when accessing source (OSError is swallowed
when you try and write bytecode, but that's legitimate sema
Brett Cannon added the comment:
Since this has been pending for over two months I'm claiming it's outdated.
--
resolution: -> out of date
status: pending -> closed
___
Python tracker
<http://bugs.py
Brett Cannon added the comment:
Since this has been sitting here for two months as pending I'm closing as won't
fix since mucking with the grammar is such a rarity and getting the build rules
right is so complicated it isn't worth changing.
--
resolution: -> wont f
Brett Cannon added the comment:
Ezio, do you want to create separate issues for any of the TODOs you wanted in
http://bugs.python.org/issue10535#msg122779 so we can close this bug?
--
status: open -> pending
___
Python tracker
&l
Changes by Brett Cannon :
--
status: pending -> open
versions: +Python 3.4 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue10535>
___
___
Python-
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue11983>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue11729>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue10535>
___
___
Python-bugs-list mailing list
Unsubscri
Brett Cannon added the comment:
Making as pending for someone to prove my fix is bad for the problem (since it
passes an explicit test), else I will close it in the near-ish future.
--
nosy: +brett.cannon
status: open -> pending
___
Python trac
Brett Cannon added the comment:
I have no issue with the current behaviour, so it sounds like the source
comment just needs updating. Care to suggest some wording, Eugene?
--
___
Python tracker
<http://bugs.python.org/issue11
Brett Cannon added the comment:
Nope, no reason. I bet it was a bad merge somewhere in the docs from Python 3
to 2.7 at some point.
--
___
Python tracker
<http://bugs.python.org/issue16
Brett Cannon added the comment:
I suspect Kirill is right, although the function that calls addpackage() in
site.py always passes in a value, so it won't change anything for Python
itself, only third-party code. And addpackage() has been that way since 2004.
But, in looking at the fun
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16997>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
I wouldn't backport; not worth it.
Anyway, since I consider this bug closed I'm taking myself off the nosy list.
--
___
Python tracker
<http://bugs.python.o
Brett Cannon added the comment:
So this seems like a confluence of both supporting compressed files for loading
source code as well as supporting new archive formats (e.g. xz vs. tar); zip
just happens to do both implicitly. And there is also the question of if you
explicitly plan to do this
Brett Cannon added the comment:
Nick's suggestions done in changeset 792810303239 .
--
status: open -> closed
___
Python tracker
<http://bugs.python.org
Brett Cannon added the comment:
Thanks for the bug report, Kirill!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue3099>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue4180>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue762963>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Closing as circular imports are not as much of a problem in Python 3.3,
ImportError now has informational attributes, and namespace packages took care
of the usefulness of ImportWarning.
--
assignee: -> brett.cannon
resolution: -> out of date
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue1284670>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue12652>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12648>
___
___
Python-bugs-list
Brett Cannon added the comment:
Can this be closed, David?
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue11049>
___
___
Python-
Changes by Brett Cannon :
--
nosy: -brett.cannon
status: pending -> open
___
Python tracker
<http://bugs.python.org/issue11049>
___
___
Python-bugs-list mai
Brett Cannon added the comment:
Is this still a problem in clang 3.2?
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue12701>
___
_
Changes by Brett Cannon :
--
nosy: -brett.cannon
status: pending -> open
___
Python tracker
<http://bugs.python.org/issue12701>
___
___
Python-bugs-list mai
Changes by Brett Cannon :
--
resolution: -> works for me
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12693>
___
___
Python-bugs-
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue3329>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
imp.find_module() is now documented as deprecated, so changing the mode that
files are opened in would change backwards-compatibility but wouldn't be worth
it.
--
resolution: -> out of date
status: open -
Brett Cannon added the comment:
imp.find_module() is now deprecated, so not worrying about adding more details
to the docs for the function.
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Brett Cannon :
--
resolution: -> wont fix
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13048>
___
___
Python-bugs-list
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue13047>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
OK, let's take a step back here and look at what exactly we are trying to
simplify (which is now the updated example in PEP 399)::
from test.support import import_fresh_module
import unittest
c_heapq = import_fresh_module('heapq',
Brett Cannon added the comment:
On Sun, Jan 27, 2013 at 3:13 PM, Ezio Melotti wrote:
>
> Ezio Melotti added the comment:
>
> Note that while this works for the simple case, it doesn't work whenever
> you need additional tests or attributes that are specific for one of the
Brett Cannon added the comment:
To prevent speculation, the files that mention import_fresh_module are:
# Without changes to test classes
Lib/test/test_bisect.py: would work if you made the attribute configurable
(e.g. self.module instead of self.bisect
Lib/test/test_heapq.py: would work
Lib
Brett Cannon added the comment:
I took a closer look at test_datetime and it probably should be using this
approach, but because the tests seemed to have been copied from Zope the tests
were left as-is and instead the testing approach we have been using was
actually forced upon the test
Brett Cannon added the comment:
True, the current idiom needs to still be used in those cases, although we
could introduce another method to help with this situation as well:
# Could also be named use_accelerator to be less hostile-sounding.
def requires_accelerator(self, cls):
if
New submission from Brett Cannon:
ABCs, even though they are almost always at the bottom of an inheritance
hierarchy, should still do the right thing in the face of being in the middle
of an MRO. That means that they should call super() as appropriate. So for
methods that return a value
Changes by Brett Cannon :
--
assignee: -> brett.cannon
___
Python tracker
<http://bugs.python.org/issue17093>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Brett Cannon:
E.g. _frozen_importlib, builtins, signal.
--
components: Interpreter Core
messages: 181078
nosy: brett.cannon, theller
priority: normal
severity: normal
stage: test needed
status: open
title: Set __loader__ on modules imported by the C level
type
New submission from Brett Cannon:
If __loader__ is None then ValueError is raised, but if it is not defined then
AttributeError is raised instead. Probably should harmonize around ValueError
even in the missing attribute case since __loader__ = None is equivalent to the
attribute not existing
Brett Cannon added the comment:
Should probably check the state of sys.modules in importlib._bootstrap._setup()
and see if the missing modules are there and then just retroactively set
__loader__ to BuiltinImporter (as is already done in that function for sys and
_imp):
http://hg.python.org
Brett Cannon added the comment:
Should mention that this is probably no harder than changing a key getattr()
call to None (as pointed out by Nick).
--
___
Python tracker
<http://bugs.python.org/issue17
Changes by Brett Cannon :
--
keywords: +easy
___
Python tracker
<http://bugs.python.org/issue17099>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Blog post I wrote explaining what I plan to do:
http://sayspy.blogspot.ca/2013/02/remember-to-use-super-in-your-abcs.html
--
___
Python tracker
<http://bugs.python.org/issue17
Brett Cannon added the comment:
All cases but signal can be fixed by importlib._bootstrap._setup() by simply
iterating over sys.modules and setting __loader__. Nice and simple. Thanks,
abstraction!
The problem is signal who gives the finger to abstraction. That module gets
imported directly
3801 - 3900 of 5934 matches
Mail list logo