[issue15316] runpy swallows ImportError information with relative imports

2012-08-24 Thread Brett Cannon
Brett Cannon added the comment: I am running the test suite now using the "secret" attribute on ImportError. I tried to pass a flag, but locking became a bit messy/complicated. And I also realized that if I didn't do this then using different implementation of import_ in imp

[issue15316] runpy swallows ImportError information with relative imports

2012-08-24 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15781] test_threaded_import fails with -j4

2012-08-27 Thread Brett Cannon
Brett Cannon added the comment: Didn't patch it in to evaluate the surrounding code, but otherwise the patch LGTM. -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org

[issue15805] Add stdout redirection tool to contextlib

2012-08-29 Thread Brett Cannon
Brett Cannon added the comment: So Alex's point is valid: the examples in the unittest.mock.patch docs shows how to do this (http://docs.python.org/dev/py3k/library/unittest.mock.html#patch). So this could be simplified to: def redirect_stdout(replacement=None): return unittest.mock.

[issue15828] imp.load_module doesn't support C_EXTENSION type

2012-08-31 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- ___ Python tracker <http://bugs.python.org/issue15828> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15830] make -s no longer silences output from setup.py

2012-08-31 Thread Brett Cannon
New submission from Brett Cannon: Sometime in the last month (probably) I change has been made in either configure(.ac), Makefile.pre.in, or setup.py that is causing the -s option passed to make to not also make its way into setup.py when extensions are built. -- components: Build

[issue15834] 2to3 benchmark not working under Python 3

2012-08-31 Thread Brett Cannon
New submission from Brett Cannon: 2to3 isn't (ironically) translating lib2to3 so that it can run under Python 3: File "/Users/bcannon/Developer/repo/benchmarks_py3k/lib/2to3/lib2to3/fixes/fix_operator.py", line 89, in _check_method method = getattr(self, "_&qu

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-08-31 Thread Brett Cannon
Brett Cannon added the comment: So it might be a change, but I don't know if I would claim it is a regression that needs changing. If you can't write bytecode files for some reason other than permissions or the file already exists then there is something wrong with your setup that

[issue15834] 2to3 benchmark not working under Python 3

2012-08-31 Thread Brett Cannon
Brett Cannon added the comment: On Fri, Aug 31, 2012 at 6:42 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > Might need to let Python 3 use its stdlib copy of lib2to3. Otherwise > > will need to come up with a way to have two copies of a library, one

[issue15844] weird import errors

2012-09-02 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue15844> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs

2012-09-06 Thread Brett Cannon
Brett Cannon added the comment: First off, what you want to do isn't easy to begin with. =) You are right that you want get_code() and that SourceLoader is what you want. The problem is that importlib inherited PEP 302s APIs, and there are so many that the docs don't repeat the

[issue10224] Build 3.x documentation using python3.x

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

[issue15902] imp.load_module won't accept None for the file argument for a C extension

2012-09-10 Thread Brett Cannon
Brett Cannon added the comment: How can you load a C extension without a file path? Are C extensions being inappropriately flagged as built-in modules on Windows? What does imp.find_module() return for the module being checked? I need more debugging info on what imp.find_module() and

[issue15902] imp.load_module won't accept None for the file argument for a C extension

2012-09-10 Thread Brett Cannon
Brett Cannon added the comment: Well, that's extremely annoying as that doesn't work for .py or .pyc files:: >>> import imp >>> stuff = imp.find_module('blah') >>> stuff (<_io.TextIOWrapper name=4 mode='U' encoding='utf-8'&g

[issue15902] imp.load_module won't accept None for the file argument for a C extension

2012-09-10 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue15902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15912] Intermittent import failure

2012-09-11 Thread Brett Cannon
Brett Cannon added the comment: I don't think sys.modules is the right place about a warning regarding importlib.invalidate_caches(); this has nothing to do with sys.modules but instead import itself. Probably something more along those lines would be more fitting. This is also mentione

[issue15911] can't step through _frozen_importlib/importlib._bootstrap using gdb

2012-09-11 Thread Brett Cannon
Brett Cannon added the comment: I'm going to guess this is a shortcoming of pdb when it comes to frozen modules as I can get to the source using inspect (which pdb leans on):: >>> len(inspect.findsource(_frozen_importlib)[0]) 1761 >>> len(inspect.findsource(importl

[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-12 Thread Brett Cannon
Brett Cannon added the comment: It's translating properly for me now as well (but on a different machine). I will give it another try when I get home to see if I can reproduce success on the machine that was failing for me previously. -- status: pending -&

[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-12 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: benjamin.peterson -> brett.cannon ___ Python tracker <http://bugs.python.org/issue13990> ___ ___ Python-bugs-list mai

[issue12680] cPickle.loads is not thread safe due to non-thread-safe imports

2012-09-12 Thread Brett Cannon
Brett Cannon added the comment: I just checked and this is no longer an issue in Python 3.3. The sys.modules "bug" isn't a bug as that's how it is supposed to work to prevent partially initialized modules. As for how pickle is doing stuff, that could change if it woul

[issue15932] files in the csv documentation's examples are not closed

2012-09-12 Thread Brett Cannon
Brett Cannon added the comment: Quick glance at the patch LGTM. I don't have commit access handy so I can't do it myself ATM. -- nosy: +brett.cannon stage: -> commit review ___ Python tracker <http://bugs.pytho

[issue15933] flaky test in test_datetime

2012-09-12 Thread Brett Cannon
Brett Cannon added the comment: First off, that assertEquals should have a custom error message stating what values the date objects had to better tell how off things were. Second, this can probably be solved by upping the timedelta to something like a minute or something for when it's r

[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-12 Thread Brett Cannon
Brett Cannon added the comment: I can't reproduce the problem anymore. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.

[issue10224] Build 3.x documentation using python3.x

2012-09-12 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue10224> ___ ___ Python-bugs-list mailing list Unsub

[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Brett Cannon
Brett Cannon added the comment: Can you copy-and-paste the exact commands you are using to build and run the benchmarks (along with version info for the interpreter used to do the building) as I'm on the same revision and can't reproduce anymore? $ mkdir benchmarks_py3k $ cd bench

[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Brett Cannon
Brett Cannon added the comment: So the tests failed but the benchmarks finished without issue? I'm not too worried about the tests since they are almost all str/bytes interaction issues (although I don't get the .decode() failure). If the benchmarks run without errors then I'm

[issue15629] Add to regrtest the ability to run Lib and Doc doctests

2012-09-17 Thread Brett Cannon
Brett Cannon added the comment: I should mention that http://bugs.python.org/issue10967 exists as a meta issue about trying to gut regrtest in favour of using other things in unittest (and doctest in this case) when possible. -- ___ Python tracker

[issue15415] Add temp_dir() and change_cwd() to test.support

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

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Brett Cannon
New submission from Brett Cannon: It would be nice to have something like sphinx's build output where the output is all kept on a single line except for failures. The color would help when scrolling through current output looking for failures. Currently I just look until the failure

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Brett Cannon
Brett Cannon added the comment: I totally agree, I just wanted this in the tracker as a long-term goal to have. I have made this a dependency on issue #10967 which is tracking moving regrtest over unittest as much as possible. -- dependencies: +move regrtest over to using more

[issue15987] Provide a way to compare AST nodes for equality recursively

2012-09-21 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue15987> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue16027> ___ ___ Python-bugs-list mailin

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-09-30 Thread Brett Cannon
Changes by Brett Cannon : -- title: Tuple extraction in lambda isn't supported with more than one argument -> Tuple extraction in a lambda isn't supported by 2to3 ___ Python tracker <http://bugs.pytho

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

2012-09-30 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue13028> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16101] Verify all imported modules at startup are needed

2012-10-01 Thread Brett Cannon
New submission from Brett Cannon: It's probably time to examine what modules are imported at startup and whether they are necessary or if some can be trimmed off so as to avoid the overhead. -- messages: 171733 nosy: brett.cannon priority: normal severity: normal status: open

[issue16104] Use multiprocessing in compileall script

2012-10-01 Thread Brett Cannon
Brett Cannon added the comment: This should probably use concurrent.futures instead of multiprocessing directly, but yes it would be useful. Then again, the whole module should probably be rewritten to use importlib as well. -- components: +Library (Lib) nosy: +brett.cannon priority

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2012-10-01 Thread Brett Cannon
Brett Cannon added the comment: I can't, so setting to pending so that if no one speaks up the issue will close. -- status: open -> pending ___ Python tracker <http://bugs.python.org

[issue16101] Verify all imported modules at startup are needed

2012-10-02 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Speedup sysconfig startup, locale can be imported at startup but relies on too many library modules ___ Python tracker <http://bugs.python.org/issue16

[issue16106] antigravity tests

2012-10-02 Thread Brett Cannon
Brett Cannon added the comment: It's actually a nice example of using unittest.mock. =) -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/is

[issue16118] Implement SHA-3

2012-10-03 Thread Brett Cannon
Changes by Brett Cannon : -- superseder: -> Add SHA-3 (Keccak) support ___ Python tracker <http://bugs.python.org/issue16118> ___ ___ Python-bugs-list mai

[issue16118] Implement SHA-3

2012-10-03 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue16118> ___ ___ Python-bugs-

[issue16120] Use |yield from| in stdlib

2012-10-04 Thread Brett Cannon
Brett Cannon added the comment: How are people finding these uses? Grepping around for yield and seeing if it is in a 'for' loop? Or are people doing something more detailed like an AST walk of every module in the stdlib looking for some pattern? -- nosy: +br

[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon
Changes by Brett Cannon : -- keywords: +3.2regression resolution: fixed -> status: closed -> open versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/i

[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon
Brett Cannon added the comment: http://hg.python.org/cpython/rev/dc18a2a66d16 did add a test, just not the right one. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15111] Wrong ImportError message with importlib

2012-10-05 Thread Brett Cannon
Brett Cannon added the comment: Actually, I take it back, it removed a test without adding a new one. Obviously that's my bad. -- ___ Python tracker <http://bugs.python.org/is

[issue15641] Clean up importlib for Python 3.4

2012-10-09 Thread Brett Cannon
Brett Cannon added the comment: Finder is only documented as deprecated; actually making it work with a reasonable warning is too much of a pain for such little gain. So it can just stay in as there is no maintenance burden. -- ___ Python tracker

[issue15111] Wrong ImportError message with importlib

2012-10-09 Thread Brett Cannon
Brett Cannon added the comment: This can get fixed in 3.3.1, which is why I left Python 3.3 as an affected version. Hopefully I can get to a fix this week. I need to write a test showing that a module that doesn't exist as specified in a fromlist is silently ignored, but if a module

[issue15111] Wrong ImportError message with importlib

2012-10-10 Thread Brett Cannon
Brett Cannon added the comment: Here are two possible tests. 1) __import__('distutils', fromlist=['_i_do_not_exist']) should return distutils 2) Use a fake loader which executes some code which does nothing more than tries to import a non-existent module. The trick with t

[issue15111] Wrong ImportError message with importlib

2012-10-10 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15111> ___ ___ Python-bugs-list

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: Did this actually work in a previous version of Python, and if so what version? -- nosy: +brett.cannon status: open -> pending ___ Python tracker <http://bugs.python.org/issu

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: It's actually a documentation bug. -- assignee: -> docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs@python ___ Python tracker <http://bugs.python.org

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: Before this gets out of control I want to clarify that it is not "quite absurd" to label this a documentation bug and that is the proper classification for this bug. The documentation was not clear enough for you to understand what the behavior would

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: The new functional equivalent is importlib.machinery.ExtensionFileLoader (http://docs.python.org/dev/py3k/library/importlib.html#importlib.machinery.ExtensionFileLoader), but underneath the hood it uses the same code as imp.load_dynamic() did

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
New submission from Brett Cannon: IOW make _w_long, _r_long, and __fix_co_filename public so as to not be some special ability that only importlib has. -- components: Library (Lib) messages: 172751 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: Well, it means importlib becomes a special library and that no one could ever replicate it as a third-party library. Now if we can expose the various APIs around this such that they are abstracted away then it isn't a big deal. That can be done for the _r

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: http://bugs.python.org/issue15031 would deal with not needing to expose _r_long and _w_long, but that still means people are screwed for _fix_co_filename. You could argue that is a margin use-case, though. -- dependencies: +Split .pyc parsing from

[issue2350] 'exceptions' import fixer

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: I don't remember. -- resolution: fixed -> stage: -> patch review status: closed -> open ___ Python tracker <http://bugs.pyt

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: _w_long and _r_long originally came from marshal; forgot I re-implemented them in pure Python in the end. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16214] 2to3 does not remove exceptions import

2012-10-15 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> duplicate status: open -> closed superseder: -> 'exceptions' import fixer ___ Python tracker <http://bugs

[issue16261] Fix bare excepts in various places in std lib

2012-10-17 Thread Brett Cannon
Brett Cannon added the comment: One thing to be aware of, Ramchandra, is that there might be a slight backwards-compatibility problem from tightening up what exceptions propagate. Now with proper documentation and only applying things to 3.4 this probably won't be a problem. --

[issue5128] compileall: consider ctime

2012-10-21 Thread Brett Cannon
Brett Cannon added the comment: There is no patch, Djoume, but honestly that's fine since if you want to submit a change to something it should go in a new issue. But honestly compileall needs to be rewritten in Python 3.4 to use importlib and have it control when source code shou

[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-27 Thread Brett Cannon
New submission from Brett Cannon: Discovered on OS X 10.8 with clang 3.1, I'm having build failures for _json, _md5, _sha1, _sha256, _sha3, and _sha512 because _PyUnicode_CheckConsistency() is only defined when defined(Py_DEBUG) && !defined(Py_LIMITED_API) even though it is

[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon
Brett Cannon added the comment: Just to double-check I didn't screw up, I ran ``make distclean; ./configure; make -j8`` and the problem persists. It is *only* files compiled through setup.py and not by the Makefile. I do not have OPT set, but I do have CFLAGS defined. But even if I expli

[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon
Brett Cannon added the comment: I managed to fix it, but I did such a large swath of fixes that I need a little time to narrow down what did it. Report back later. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon
Brett Cannon added the comment: Well that was extremely frustrating to find out. Turns out a copy of Lib/_sysconfigdata.py was lingering in my checkout and .hgignore was hiding that fact from me. Fixed .hgignore, deleted the wayward file, and everything is now fine. -- resolution

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-10-30 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue10966> ___ ___ Python-bugs-list mailing list Unsubscri

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-10-30 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue10966> ___ ___ Python-bugs-list mailing list Unsub

[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

2014-03-13 Thread Brett Cannon
Brett Cannon added the comment: I assume you mean for 3. to fix PyImport_ImportFrozenModuleObject() and not stop resetting __file__ for _frozen_importlib in importlib.__init__ like we are currently doing. I think you're right that it could wait until 3.5 as it will only be apparent to p

[issue19257] Sub-optimal error message when importing a non-package

2014-03-13 Thread Brett Cannon
Brett Cannon added the comment: Is it confusing though? If you only had the latter exception all you would know is Python doesn't consider datetime a package but you wouldn't know why that is unless you knew the exact definition (the __path__ attribute exists). Having the former

[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

2014-03-14 Thread Brett Cannon
Brett Cannon added the comment: Step 1 was just checked in. Step 2: Jurko can you see if the uploaded patch fixes things for you? -- assignee: -> brett.cannon keywords: +patch Added file: http://bugs.python.org/file34416/frozen_file.diff ___ Pyt

[issue20935] Cherry pick CFLAGS, add to flags for $(BUILDPYTHON) Makefile rule

2014-03-15 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue20935> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20627] Add context manager support to xmlrpc.client.ServerProxy

2014-03-17 Thread Brett Cannon
Brett Cannon added the comment: Yes it can. I do my Python work typically on Fridays so I will get to it then. -- ___ Python tracker <http://bugs.python.org/issue20

[issue20967] hashlib memory leak

2014-03-19 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue20967> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20991] Issues about relative& absolute import way for Portingfrom python2.4 to python2.7

2014-03-20 Thread Brett Cannon
Brett Cannon added the comment: This isn't a bug so closing as invalid. As suggested on python-dev, ask on python-list or python-help for assistance. -- nosy: +brett.cannon resolution: -> invalid status: open -> closed ___ Python tra

[issue20986] test_startup_imports fails in test_site when executed inside venv

2014-03-20 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue20986> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-03-20 Thread Brett Cannon
Brett Cannon added the comment: So the `hg commit -l` bit is going to run afoul of the same group of people who didn't like my commit message reuse idea unless you explicitly try to make it very clear that e.g. the first line is for Misc/NEWS and the latter is for the commit. Otherwi

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-03-21 Thread Brett Cannon
Brett Cannon added the comment: You lose chronology in the directory, but not necessarily in the output; if you sort based on first commit time then you retain the chronological ordering in the merge. -- ___ Python tracker <http://bugs.python.

[issue21008] Update devinabox for Python 3.4

2014-03-21 Thread Brett Cannon
New submission from Brett Cannon: E.g. with pip included it makes setting up coverage.py easier. -- assignee: brett.cannon messages: 214371 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Update devinabox for Python 3.4

[issue19165] Change formatter warning to DeprecationWarning in 3.5

2014-03-21 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue19165> ___ ___ Python-bugs-list

[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

2014-03-21 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue20884> ___ ___ Python-bugs-list

[issue20627] Add context manager support to xmlrpc.client.ServerProxy

2014-03-21 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue21008] Update devinabox for Python 3.4

2014-03-21 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue21008> ___ ___ Python-bugs-list

[issue21012] Figure out how to best leverage pip in devinabox

2014-03-21 Thread Brett Cannon
New submission from Brett Cannon: Probably the most complicated bit now for using devinabox is building the various bits of docs in a way that doesn't require mucking with the system python: * Having Python built * Creating a venv * Installing sphinx * Running the requisite Makefile wit

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-03-21 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch to change PyImport_ImportFrozenModuleObject() to not set __file__. Had to refactor some things as PyImport_ExecCodeModuleObject() was setting __file__ no matter what, so to avoid it even being used during import I had to change some things

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

2014-03-21 Thread Brett Cannon
Brett Cannon added the comment: Did you want to update your patch for Python 3.4 and 3.5, Meador? -- versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue16

[issue17621] Create a lazy import loader mixin

2014-03-21 Thread Brett Cannon
Brett Cannon added the comment: New patch that includes docs and integrates the tests. If someone who understands import can look it over and give me an LGTM that would be appreciated. -- Added file: http://bugs.python.org/file34556/lazy_loader.diff

[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Brett Cannon
Brett Cannon added the comment: Here is a new patch that addresses Eric's comments and also fills in some holes that I realized I had while fixing things up. PTAL. -- Added file: http://bugs.python.org/file34575/lazy_loader.diff ___ Python tr

[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file34575/lazy_loader.diff ___ Python tracker <http://bugs.python.org/issue17621> ___ ___ Python-bugs-list m

[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Brett Cannon
Changes by Brett Cannon : Added file: http://bugs.python.org/file34576/lazy_loader.diff ___ Python tracker <http://bugs.python.org/issue17621> ___ ___ Python-bugs-list m

[issue17621] Create a lazy import loader mixin

2014-03-23 Thread Brett Cannon
Brett Cannon added the comment: Another update to trigger loading on attribute deletions as well as detecting when an import swapped the module in sys.modules, raising ValueError if detected since it won't have the affect that's expected (could be convinced to make that ImportErr

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: This might be a shutdown issue. If you print out what module is being imported at the time of the warning its 'io' and it's only coming up after the script has exited (you will notice the warnings come up after the traceback is printed). M

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: For those that don't read German, the exception says "The specified module could not be found". Anyway, what looks suspicious to me is this line that gets imported by pywintypes: # extension module loaded from 'C:\\Python34\\lib\\

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: So the import warnings were added for sys.meta_path and sys.path_hooks because prior to Python 3.3 you could empty out those values and import would continue to work, but with importlib that stopped being the case. My thinking was that it would be easier to

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
New submission from Brett Cannon: Issue #21049 managed to trigger a huge output of "ImportWarning: sys.meta_path is empty" because it managed to trigger an import during interpreter shutdown. The ImportWarning for sys.path_hooks and sys.meta_path were originally added because before

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: I should also say that dropping warnings leaves only a single case of ImportWarning related to empty directory names (in relation to Finder.find_module()). Once that can go away that will eliminate all uses of warnings in importlib and thus won't necess

[issue21049] Flood of “ImportWarning: sys.meta_path is empty” after exception with socket subclass

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: Sure, I'm fine with closing this as "Won't Fix" based on the cause being an edge case and rely on issue #21052 to discuss the value of the ImportWarning. Thanks for the report, Martin. -- resolution: -> wont fix

[issue21052] Consider dropping ImportWarning for empty sys.path_hooks and sys.meta_path

2014-03-24 Thread Brett Cannon
Brett Cannon added the comment: It's a simple `if not sys.meta_path` check so it doesn't differentiate. But that's actually a good point about it being None in this case due to the shutdown; if the check changed to `if sys.meta_path is not None and len(sys.meta_path) == 0` t

[issue21062] Evalute all import-related modules for best practices

2014-03-25 Thread Brett Cannon
New submission from Brett Cannon: I'm thinking of: * pkgutil * py_compile * compileall * modulefinder * freeze Should make sure they are (a) doing the right/best thing in the face of importlib/PEP 302/PEP 420/PEP 451, and (b) if they should be integrated into importlib somehow in

[issue21063] Touch up one-line descriptions of modules for module index

2014-03-25 Thread Brett Cannon
New submission from Brett Cannon: E.g. linecache says "This module provides random access to individual lines from text files." That's a big awkward and could just drop "This module" to read more easily. -- assignee: docs@python components: Documentatio

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

2014-03-25 Thread Brett Cannon
Brett Cannon added the comment: OK, so trying to import around the package was definitely why the first instance didn't work so that's all expected. As for the failure when importing psycopg2, my guess is that the freezing of psycopg2.__init__ is not setting __path__ to anything rea

<    31   32   33   34   35   36   37   38   39   40   >