[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-28 Thread Brett Cannon
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

[issue10848] Move test.regrtest from getopt to argparse

2012-12-28 Thread Brett Cannon
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

[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2012-12-31 Thread Brett Cannon
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

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-31 Thread Brett Cannon
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

[issue16659] Pure Python implementation of random

2012-12-31 Thread Brett Cannon
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

[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2012-12-31 Thread Brett Cannon
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

[issue16835] Update PEP 399 to allow for test discovery

2013-01-01 Thread Brett Cannon
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

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2013-01-01 Thread Brett Cannon
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

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2013-01-02 Thread Brett Cannon
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

[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Brett Cannon
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

[issue16737] Different behaviours in script run directly and via runpy.run_module

2013-01-02 Thread Brett Cannon
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

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2013-01-02 Thread Brett Cannon
Brett Cannon added the comment: The patch LGTM -- ___ Python tracker <http://bugs.python.org/issue16748> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16748] Make CPython test package discoverable

2013-01-03 Thread Brett Cannon
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

[issue16748] Make CPython test package discoverable

2013-01-03 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Fix test discovery for test_genericpath.py ___ Python tracker <http://bugs.python.org/issue16748> ___ ___ Python-bug

[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-01-04 Thread Brett Cannon
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

[issue16835] Update PEP 399 to allow for test discovery

2013-01-04 Thread Brett Cannon
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

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org/issue16880> ___ ___ Python-bugs-list mai

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
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

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
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

[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16868> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2013-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16537> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-07 Thread Brett Cannon
Brett Cannon added the comment: Wording LGTM -- stage: -> commit review ___ Python tracker <http://bugs.python.org/issue16868> ___ ___ Python-bugs-list mai

[issue16748] Make CPython test package discoverable

2013-01-08 Thread Brett Cannon
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

[issue16894] Function attribute access doesn't invoke methods in dict subclasses

2013-01-08 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16894> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10572] Move test sub-packages to Lib/test

2013-01-10 Thread Brett Cannon
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

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Brett Cannon
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

[issue3170] test_pydoc has no way to regenerate pristine data

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue3170> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue10544> ___ ___ Python-bugs-list mailin

[issue9716] The inittab modules cannot be packages

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue9716> ___ ___ Python-bugs-list mailing list Unsub

[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue10544> ___ ___ Python-bugs-list mailing list Unsub

[issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue3583> ___ ___ Python-bugs-list

[issue8915] Use locale.nl_langinfo in _strptime

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue8915> ___ ___ Python-bug

[issue2267] datetime.datetime operator methods are not subclass-friendly

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue2267> ___ ___ Python-bug

[issue10895] Private stdlib API: getopt, getpass, glob, gzip, genericpath, gettext

2013-01-11 Thread Brett Cannon
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&#

[issue10894] Making stdlib APIs private

2013-01-11 Thread Brett Cannon
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

[issue969718] BASECFLAGS are not passed to module build line

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon versions: +Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue969718> ___ ___ Python-bug

[issue10541] regrtest.py -T broken

2013-01-11 Thread Brett Cannon
Brett Cannon added the comment: Alexander's patch LGTM -- assignee: -> belopolsky ___ Python tracker <http://bugs.python.org/issue10541> ___ ___ Py

[issue10991] trace fails when test imported a temporary file

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue10991> ___ ___ Python-bug

[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue10708> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11441] compile() raises SystemError if called from except clause

2013-01-11 Thread Brett Cannon
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

[issue10401] Globals / builtins cache

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue10401> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10399] AST Optimization: inlining of function calls

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue11276> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11844] Update json to upstream simplejson latest release

2013-01-11 Thread Brett Cannon
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

[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2013-01-11 Thread Brett Cannon
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

[issue10965] dev task of documenting undocumented APIs

2013-01-11 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker <http://bugs.python.org/issue10965> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11844] Update json to upstream simplejson latest release

2013-01-11 Thread Brett Cannon
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

[issue15031] Split .pyc parsing from module loading

2013-01-11 Thread Brett Cannon
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

[issue15031] Split .pyc parsing from module loading

2013-01-12 Thread Brett Cannon
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

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-12 Thread Brett Cannon
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'

[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-14 Thread Brett Cannon
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

[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-14 Thread Brett Cannon
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

[issue16981] ImportError hides real error when there too many open files during an import

2013-01-16 Thread Brett Cannon
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

[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2013-01-16 Thread Brett Cannon
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

[issue4347] Circular dependency causes SystemError when adding new syntax

2013-01-16 Thread Brett Cannon
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

[issue10535] Enable warnings by default in unittest

2013-01-16 Thread Brett Cannon
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

[issue10535] Enable warnings by default in unittest

2013-01-16 Thread Brett Cannon
Changes by Brett Cannon : -- status: pending -> open versions: +Python 3.4 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10535> ___ ___ Python-

[issue11983] Inconsistent hash and comparison for code objects

2013-01-16 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue11983> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11729] libffi assembler relocation check is not robust, fails with clang

2013-01-16 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue11729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10535] Enable warnings by default in unittest

2013-01-16 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue10535> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11983] Inconsistent hash and comparison for code objects

2013-01-16 Thread Brett Cannon
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

[issue11983] Inconsistent hash and comparison for code objects

2013-01-17 Thread Brett Cannon
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

[issue16985] Docs reference a concrete UTC tzinfo, but none exists

2013-01-18 Thread Brett Cannon
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

[issue16972] Useless function call in site.py

2013-01-18 Thread Brett Cannon
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

[issue16997] subtests

2013-01-19 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10535] Enable warnings by default in unittest

2013-01-19 Thread Brett Cannon
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

[issue17004] Expand zipimport to include other compression methods

2013-01-21 Thread Brett Cannon
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

[issue15031] Split .pyc parsing from module loading

2013-01-25 Thread Brett Cannon
Brett Cannon added the comment: Nick's suggestions done in changeset 792810303239 . -- status: open -> closed ___ Python tracker <http://bugs.python.org

[issue16972] Useless function call in site.py

2013-01-25 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the bug report, Kirill! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue3099] On windows, "import nul" always succeed

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue3099> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4180] warnings.simplefilter("always") does not make warnings always show up

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue4180> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue762963] timemodule.c: Python loses current timezone

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue762963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12583] More detailed ImportError messages

2013-01-25 Thread Brett Cannon
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

[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue1284670> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12652] Keep test.support docs out of the global docs index

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue12652> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12648] Wrong import module search order on Windows

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue12648> ___ ___ Python-bugs-list

[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon
Brett Cannon added the comment: Can this be closed, David? -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue11049> ___ ___ Python-

[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon status: pending -> open ___ Python tracker <http://bugs.python.org/issue11049> ___ ___ Python-bugs-list mai

[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon
Brett Cannon added the comment: Is this still a problem in clang 3.2? -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue12701> ___ _

[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon status: pending -> open ___ Python tracker <http://bugs.python.org/issue12701> ___ ___ Python-bugs-list mai

[issue12693] test.support.transient_internet prints to stderr when verbose is false

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> works for me status: open -> closed ___ Python tracker <http://bugs.python.org/issue12693> ___ ___ Python-bugs-

[issue3329] API for setting the memory allocator used by Python

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue3329> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10588] imp.find_module raises unexpected SyntaxError

2013-01-25 Thread Brett Cannon
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 -

[issue11676] Improve imp.load_module and submodules doc

2013-01-25 Thread Brett Cannon
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

[issue13048] Handling of paths in first argument of imp.find_module()

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.org/issue13048> ___ ___ Python-bugs-list

[issue13047] imp.find_module("") and imp.find_module(".")

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue13047> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon
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',

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon
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

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon
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

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon
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

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-28 Thread Brett Cannon
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

[issue17093] Make importlib.abc more inheritance-friendly

2013-01-31 Thread Brett Cannon
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

[issue17093] Make importlib.abc more inheritance-friendly

2013-01-31 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue17093> ___ ___ Python-bugs-list mailing list Unsubscri

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Brett Cannon
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

[issue17099] Raise ValueError when __loader__ not defined for importlib.find_loader()

2013-02-01 Thread Brett Cannon
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

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Brett Cannon
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

[issue17099] Raise ValueError when __loader__ not defined for importlib.find_loader()

2013-02-01 Thread Brett Cannon
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

[issue17099] Raise ValueError when __loader__ not defined for importlib.find_loader()

2013-02-01 Thread Brett Cannon
Changes by Brett Cannon : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue17099> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17093] Make importlib.abc more inheritance-friendly

2013-02-01 Thread Brett Cannon
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

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Brett Cannon
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

<    34   35   36   37   38   39   40   41   42   43   >