[issue18364] Remove _not_found hack from importlib

2013-07-06 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18351] Incorrect variable name in importlib._bootstrap._get_sourcefile

2013-07-06 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Madison! Added you to the ACKS file. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18390] Better documenting of ``hg revert -r`` when merging with another branch

2013-07-06 Thread Brett Cannon
New submission from Brett Cannon: While the dev FAQ mentions it under null merges (http://docs.python.org/devguide/faq.html#how-do-i-make-a-null-merge), it probably should mention it under the merging section of http://docs.python.org/devguide/committing.html#merging-between-different

[issue18367] See if a venv setup can be used for devinabox for coverage

2013-07-08 Thread Brett Cannon
Brett Cannon added the comment: So first thing is that you can't relocate a venv. The --upgrade option is only for when you upgrade a Python installation in-place (e.g. go from 3.3 to 3.4 but otherwise all other details stay the same). The --clear option empties out the directories so no

[issue18415] Normalize single/double quote usage in importlib

2013-07-09 Thread Brett Cannon
New submission from Brett Cannon: Importlib has ended up with a mixed use of single and double quotes. Should clean it up to be consistent. -- assignee: brett.cannon components: Library (Lib) keywords: easy messages: 192771 nosy: brett.cannon priority: low severity: normal stage: needs

[issue18416] Move to absolute file paths for module.__file__

2013-07-09 Thread Brett Cannon
New submission from Brett Cannon: $ touch blah.py; ./python -c "import blah; print(blah.__file__)" ./blah.py Should really change that to be an absolute path since the file's location is not accurate if you call os.chdir(). -- components: Interpreter Core messag

[issue18416] Move to absolute file paths for module.__file__

2013-07-09 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue18416> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18415] Normalize single/double quote usage in importlib

2013-07-09 Thread Brett Cannon
Brett Cannon added the comment: String constants in importlib/_bootstrap.py; pylint noticed the discrepancy. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18422] is_package missing so can't use -m

2013-07-10 Thread Brett Cannon
Brett Cannon added the comment: The solution from issue #18058 can't be backported because it would expose a new public API on the NamespaceLoader class. It would also introduce new functionality which would differ between Python 3.3.2 and Python 3.3.3 which can't really be class

[issue18423] Document limitations on -m

2013-07-10 Thread Brett Cannon
Changes by Brett Cannon : -- keywords: +easy stage: -> needs patch versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue18423> ___ ___ Python-

[issue18416] Move to absolute file paths for module.__file__

2013-07-10 Thread Brett Cannon
Brett Cannon added the comment: That's exactly why it currently happens. What I would do is change importlib to just associate '' with os.getcwd() in FileFinder. That locks down where the module was found to an absolute path while still allowing '' to function as th

[issue18415] Normalize single/double quote usage in importlib

2013-07-11 Thread Brett Cannon
Brett Cannon added the comment: I prefer single quotes (easier to type =) and yes, using double quotes instead of escaping is preferred. When I have a chance I will take a look at the patch. -- stage: needs patch -> commit review ___ Python trac

[issue18415] Normalize single/double quote usage in importlib

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: Why the stage change? I set it to commit review on purpose as I already did a cursory check and it was fine. I have only have one more paranoid check before do the commit myself. I purposely didn't set patch review as I didn't want anyone wasting

[issue18433] Clarify venv docs about which methods check for pre-existing paths

2013-07-12 Thread Brett Cannon
New submission from Brett Cannon: E.g. setup_python and create_directories both check that the paths they will create pre-exist, but the docs don't mention this. -- assignee: docs@python components: Documentation messages: 192938 nosy: brett.cannon, carljm, docs@python priority: n

[issue18434] Update venv example to use setuptools

2013-07-12 Thread Brett Cannon
New submission from Brett Cannon: Now that Distribute is just a shell for setuptools 0.8, the example in the venv docs for installing pip and setuptools in a venv should be updated to use setuptools (in case anyone uses that code as a script themselves). -- assignee: docs@python

[issue18362] Make build_cpython.py from dev-in-a-box work outside of a box

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

[issue18362] Make build_cpython.py from dev-in-a-box work outside of a box

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: changeset fe1c35cbc9a0 -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18361] Move dev-in-a-box to os.cpu_count()

2013-07-12 Thread Brett Cannon
New submission from Brett Cannon: changeset 3446dee09265 -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18342] Use the repr of a module name for ImportError in ceval.c

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- title: Use the repr of a module name for ModuleNotFoundError in ceval.c -> Use the repr of a module name for ImportError in ceval.c ___ Python tracker <http://bugs.python.org/issu

[issue18363] Change use of acronym tag in devinabox index.html to abbr

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: changeset fae104051a63 -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18415] Normalize single/double quote usage in importlib

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the path, Madison! I also cleaned up the instances using double quotes since it was because I was faking the use of a string's repr instead of explicitly using {!r}. -- resolution: -> fixed stage: commit review -> committed/reje

[issue18388] Link to the contributor agreement from devinabox

2013-07-12 Thread Brett Cannon
New submission from Brett Cannon: changeset 28294583a9c9 -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18342] Use the repr of a module name for ImportError in ceval.c

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: Patch is in (only moved the tests to a different class) and added Tomasz to the ACKS file. Thanks for the patch! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _

[issue17845] Clarify successful build message

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18390] Better documenting of ``hg revert -r`` when merging with another branch

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18435] Move venv from a custom Context class to types.SimpleNamespace

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- components: Library (Lib) nosy: brett.cannon, carljm, eric.snow priority: normal severity: normal stage: needs patch status: open title: Move venv from a custom Context class to types.SimpleNamespace versions: Python 3.4

[issue18435] Move venv from a custom Context class to types.SimpleNamespace

2013-07-12 Thread Brett Cannon
New submission from Brett Cannon: The venv module has a Context class purely to hold attributes of data. This happens to be exactly what types.SimpleNamespace was created for, so it should probably replace Context. Luckily the class is not documented (nor what gets set on it for that matter

[issue18435] Move venv from a custom Context class to types.SimpleNamespace

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue18435> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18434] Update venv example to use setuptools

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue18434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18433] Clarify venv docs about which methods check for pre-existing paths

2013-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue18433> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18433] Clarify venv docs about which methods check for pre-existing paths

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: LGTM On Fri, Jul 12, 2013 at 3:42 PM, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > I noticed that create_directories is now ensure_directories in the code, > but the docs don't reflect this. I've posted changes, do they

[issue18366] Look into using setuptools 0.8 with devinabox

2013-07-12 Thread Brett Cannon
Brett Cannon added the comment: So this actually works out very nicely. The basic steps are: 1. Download ez_setup.py for setuptools 2. Create a venv 3. Install coverage.py (build actually works as expected which was a pleasant surprise) 4. Run coverage.py with PYTHONPATH set to fullcoverage as

[issue9893] Removing the Misc/Vim/ files

2013-07-14 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the info, Févry. -- ___ Python tracker <http://bugs.python.org/issue9893> ___ ___ Python-bugs-list mailing list Unsub

[issue18366] Look into using setuptools 0.8 with devinabox

2013-07-14 Thread Brett Cannon
Brett Cannon added the comment: Setuptools 0.8 will work fine. See issue #18367 for its planned use. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue18367] See if a venv setup can be used for devinabox for coverage

2013-07-14 Thread Brett Cannon
Brett Cannon added the comment: I think getting set up for coverage.py is going to change to: 1. Download the latest setuptools 2. Download the latest coverage -- full_coverage.py build -- 3. Create a venv 4. Extract setuptools and coverage into a src/ directory in the venv 5. Install

[issue18451] Omit test files in devinabox coverage run

2013-07-14 Thread Brett Cannon
New submission from Brett Cannon: Devinabox's full_coverage.py run should omit test files. Probably need to put the path in quotes for proper escaping (same for report). -- assignee: brett.cannon keywords: easy messages: 193056 nosy: brett.cannon priority: normal severity: normal

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Brett Cannon
Brett Cannon added the comment: What version of Python is this and did you assign the lambda to an instance or class (and if this is Python 2, new-style or classic class)? -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue18

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +zach.ware ___ Python tracker <http://bugs.python.org/issue18475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18451] Omit test files in devinabox coverage run

2013-07-18 Thread Brett Cannon
Brett Cannon added the comment: The key problem with keeping them is that beginners might mistake that a test didn't run simply because some resource wasn't available when the tests were run (e.g. I forget to run the coverage report so I do it on an airport to the conference a

[issue18451] Omit test files in devinabox coverage run

2013-07-18 Thread Brett Cannon
Brett Cannon added the comment: The problem is confusing new contributors. "Why wasn't this test run?" "Because you're not on OS X." "Why wasn't this run?" "I didn't have internet at the time." It's noise that's unneces

[issue15805] Add stdout redirection tool to contextlib

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

[issue18556] ctypes' U_set() doesn't check return value of PyUnicode_AsWideChar()

2013-07-25 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the check, Matthew, but if you look at the other *_set() methods they do not necessarily DECREF their 'value' argument. Plus if PyUnicode_AsWideChar() fails it means memory is full or a fatal error has triggered, so there are bigg

[issue18586] Allow running benchmarks for Python 3 from same directory

2013-07-29 Thread Brett Cannon
New submission from Brett Cannon: As of right now, to run the benchmark suite you need to use make_perf3.sh to generate a Python 3 compatible version of the benchmarks. That was fine when the benchmark suite didn't have much support for Python 3 and thus was just used for Python 3 very

[issue17449] dev guide appears not to cover the benchmarking suite

2013-07-29 Thread Brett Cannon
Brett Cannon added the comment: I agree with Antoine that the time has come to drop make_perf3.sh and make it so that Python 3 doesn't require a separate build of the benchmark directory. Created http://bugs.python.org/issue18586 to track this

[issue18481] lcov report

2013-07-29 Thread Brett Cannon
Brett Cannon added the comment: How much slower is the execution of Python under the coverage? And can you run it with regrtest's -j (I assume not, but I thought I would ask)? I'm asking because this would be interesting to try and tie into devinabox, but having to run two multi-ho

[issue18481] lcov report

2013-07-29 Thread Brett Cannon
Brett Cannon added the comment: And I should part of the reason I would love a daily report is it currently takes a couple of hours to run a full coverage report and that's without branch coverage. -- ___ Python tracker <http://bugs.py

[issue18481] lcov report

2013-07-29 Thread Brett Cannon
Brett Cannon added the comment: My long term hope is something exactly like that. I'm about to rewrite the instructions for handling coverage.py to use a venv for devinabox, but it's definitely something that can be entirely automated for a da

[issue18481] lcov report

2013-07-29 Thread Brett Cannon
Brett Cannon added the comment: It's actually slower even with tracer.c. You actually can't use the full coverage script without using the tracer extension module. -- ___ Python tracker <http://bugs.python.o

[issue18598] Importlib, more verbosity please

2013-07-30 Thread Brett Cannon
Brett Cannon added the comment: It could be changed to something like "the 'package' argument is required to perform a relative import for {!r}".format(name) . Would that have made it more clear? -- assignee: -> brett.cannon nosy: +brett.cannon priori

[issue18598] Importlib, more verbosity please

2013-07-30 Thread Brett Cannon
Brett Cannon added the comment: Sorry, I can't backport this change as it's not a bugfix but an enhancement and it could break someone's code who relies on the specific format of the exception message. -- ___ Python tracker <http

[issue18613] wrong float plus/minus op result

2013-08-01 Thread Brett Cannon
Brett Cannon added the comment: This is actually expected because that is just how floating point works in programming (see http://en.wikipedia.org/wiki/Floating_point for all the gnarly details). If you want exact decimal arithmetic, use the decimal module (which got significantly faster in

[issue18416] Move to absolute file paths for module.__file__

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: I actually meant FileFinder but PathFinder is a good point. In FileFinder you need to change ``self.path = path or '.'`` to use the cwd. -- ___ Python tracker <http://bugs.python.o

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: Won't that change to PyState_FindModule() break code? And is it part of the stable ABI? -- ___ Python tracker <http://bugs.python.org/is

[issue18674] Store weak references in modules_by_index

2013-08-06 Thread Brett Cannon
Brett Cannon added the comment: Sounds like it needs to be changed with a notice in What's New. -- ___ Python tracker <http://bugs.python.org/issue18674> ___ ___

[issue18416] Move to absolute file paths for module.__file__

2013-08-08 Thread Brett Cannon
Brett Cannon added the comment: So this is bringing up a sticky situation that I ran across when initially implementing all of this: what should sys.path_importer_cache use as a key? '' would be what happens with Madison's option 3, and with option 1 it would be os.getcw

[issue18698] importlib.reload() does not return the module in sys.modules

2013-08-10 Thread Brett Cannon
Brett Cannon added the comment: I'm sure it's an oversight. -- ___ Python tracker <http://bugs.python.org/issue18698> ___ ___ Python-bugs-list mailing

[issue18416] Move to absolute file paths for module.__file__

2013-08-10 Thread Brett Cannon
Brett Cannon added the comment: I'm currently leaning towards having sys.path_importer_cache store the actual directory name. -- ___ Python tracker <http://bugs.python.org/is

[issue18416] Move to absolute file paths for module.__file__

2013-08-11 Thread Brett Cannon
Brett Cannon added the comment: To answer Eric's question: yes. Since no one seems to be screaming that sys.path be the only place to have the concept of a relative path, then let's use only absolute paths except in sys.path for ''. -- __

[issue18367] See if a venv setup can be used for devinabox for coverage

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

[issue18451] Omit test files in devinabox coverage run

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

[issue18598] Importlib, more verbosity please

2013-08-12 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2013-08-12 Thread Brett Cannon
Brett Cannon added the comment: This is still a warning and so I'm still looking for a solution. -- ___ Python tracker <http://bugs.python.org/issue12837> ___ ___

[issue18716] Deprecate the formatter module

2013-08-12 Thread Brett Cannon
New submission from Brett Cannon: Turns out the formatter module isn't really used by anyone. Pydoc uses it, but it could easily use textwrap. Searching on Github shows a usage by someone who simply re-exposes it as part of their own public API but has no actual usage themselves (

[issue18716] Deprecate the formatter module

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

[issue18698] importlib.reload() does not return the module in sys.modules

2013-08-14 Thread Brett Cannon
Brett Cannon added the comment: I think you mean in 3.3 and yes. =) Patch LGTM so I say fix in 3.3 and merge into default. -- assignee: -> eric.snow ___ Python tracker <http://bugs.python.org/issu

[issue18740] str is number methods don't recognize '.'

2013-08-14 Thread Brett Cannon
Brett Cannon added the comment: Ned is right, everything is working as documented and intended: as a way to avoid using a regex to test a simple case instead of trying to do anything fancy like identify a number. -- nosy: +brett.cannon resolution: -> rejected status: open ->

[issue18740] str is number methods don't recognize '.'

2013-08-14 Thread Brett Cannon
Brett Cannon added the comment: Feel free to submit an issue suggesting better docstrings as that sounds like it could stand to get some TLC. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18755] imp read functions do not try to re-open files that have been closed from previous reads

2013-08-16 Thread Brett Cannon
New submission from Brett Cannon: imp._HackedGetData doesn't check if the file it cached from its constructor is still open or not. Since the path had previously been stored it would make sense to try re-opening the file if the file object has already been closed. -- ass

[issue18754] Run Python child processes in isolated mode in the test suite?

2013-08-16 Thread Brett Cannon
Brett Cannon added the comment: Haven't looked at the patch but the motivation behind it sounds good to me. -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/is

[issue18770] Python insert operation on list

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

[issue18809] Expose mtime check in importlib.machinery.FileFinder

2013-08-22 Thread Brett Cannon
New submission from Brett Cannon: If you have enough control over your environment you really don't need to waste a stat call checking if the directory has been modified. That makes the idea of having the check of whether the directory has changed be exposed publicly a useful idea

[issue18809] Expose mtime check in importlib.machinery.FileFinder

2013-08-22 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> test needed type: -> enhancement ___ Python tracker <http://bugs.python.org/issue18809> ___ ___ Python-bugs-list

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-22 Thread Brett Cannon
New submission from Brett Cannon: If the check was done based on simply the format what was being searched for (e.g. just assume it's a file if "module.py" exists in the directory) then a couple of stat calls per search could be saved. If that is deemed to dangerous d

[issue18812] PyImport_Import redundant calls to find module

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: Because that is how it has always been: http://hg.python.org/cpython/file/b9b521efeba3/Python/import.c#l3164 . It could be changed but someone out there is relying on those semantics and it's a minor thing to leave in so I don't want to me

[issue18812] PyImport_Import redundant calls to find module

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: If I were to change this code in any way it would be to stop passing in a dummy value for fromlist, not stop pulling from sys.modules. The official idiom for directly calling __import__() is:: __import__(module_name) return sys.modules[module_name] It just

[issue18755] imp read functions do not try to re-open files that have been closed from previous reads

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

[issue18586] Allow running benchmarks for Python 3 from same directory

2013-08-23 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I managed to write a similar patch to Vajrasky independently, so at least I know the approach is reasonable. =) I'm not backporting since it really isn't that critical; I fixed it just to turn off the ResourceWarning while running the

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I don't think it's related to the test_imp bug, but since it was never fully diagnosed I couldn't tell you. -- ___ Python tracker <http://bugs.pyt

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I did a quick check and at least stripping out the two stat calls for a directory or module file (left in package __init__.py) didn't make a significant difference. -- ___ Python tracker <http://bugs.py

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-25 Thread Brett Cannon
New submission from Brett Cannon: Not sure if anyone really cares about this (I don't, but I figured I should at least let it be known), but I realized that importlib.import_module() bypasses builtins.__import__ by calling directly into the innards of importlib (specifically _gcd_i

[issue18834] Add Clang to distutils to build C/C++ extensions

2013-08-26 Thread Brett Cannon
Brett Cannon added the comment: Please upload the patches as files to the issue, that way our review tool can be used. -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue18

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

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

[issue18858] dummy_threading lacks threading.get_ident() equivalent

2013-08-28 Thread Brett Cannon
Brett Cannon added the comment: There should actually be a test to catch the inconsistencies. -- nosy: +brett.cannon stage: -> test needed ___ Python tracker <http://bugs.python.org/issu

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-29 Thread Brett Cannon
Brett Cannon added the comment: I also just tried using os.listdir() for a package before searching for __init__ and it didn't speed anything up either (actually timeit suggests that os.listdir() is worse than an isdir + 3 * isfile checks). Nor did caching directory stuff at the class

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Brett Cannon
Brett Cannon added the comment: Not sure what doc discrepancy you are talking about, Terry. The docs for importlib are totally accurate which means no one has been accidentally mislead by them. This bug is about whether importlib.import_module() bypassing builtins.__import__ is a big enough

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Brett Cannon
Brett Cannon added the comment: builtins.__import__ and importlib.__import__ are different objects. This isn't about whether this is whole situation is a bug per-se, but whether users expect that overriding builtins.__import__ will affect all import-related code in the stdlib and if t

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-31 Thread Brett Cannon
Brett Cannon added the comment: help(__import__) doesn't mention anything about overriding the function. I already touched up the stdlib docs for builtins.__import__ to strongly advise you don't override the function. As for overriding importlib.__import__, it won't do anythin

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Move to absolute file paths for module.__file__ ___ Python tracker <http://bugs.python.org/issue12317> ___ ___ Pytho

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon
Brett Cannon added the comment: It technically doesn't need to be a dependency, but if __file__ goes absolute then the point of the function becomes moot and thus shouldn't get documented as it is then pointless (and honestly I don't trust any code that tries to guess at what t

[issue12599] Use 'is not None' where appropriate in importlib

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

[issue14609] can't modify sys.modules during import with importlib

2012-04-18 Thread Brett Cannon
Brett Cannon added the comment: I honestly don't care enough to argue over this one (I was trying to save a dict lookup but unfortunately too many people have codified the behaviour already). Just revert http://hg.python.org/cpython/rev/005fd1fe31ab to get back the original beha

[issue13959] Re-implement parts of imp in pure Python

2012-04-18 Thread Brett Cannon
Brett Cannon added the comment: You could change Lib/imp.py to have ``import _frozen_importlib as _bootstrap`` if you want the same modules coming from imp, but I would argue against changing importlib itself being changed as that complicates development since if you screw up importlib

[issue14615] pull some import state out of the interpreter state

2012-04-18 Thread Brett Cannon
Brett Cannon added the comment: So PyState_FindModule() is an (undocumented) part of the public API, which means that it has to somehow be supported to keep ABI compatibility (unless I am reading PEP 384 incorrectly). -- ___ Python tracker <h

[issue14615] pull some import state out of the interpreter state

2012-04-18 Thread Brett Cannon
Brett Cannon added the comment: Right, so the question is why wasn't that done in the first place? Who decided this modules_by_index concept was even worth it? -- ___ Python tracker <http://bugs.python.org/is

[issue14615] pull some import state out of the interpreter state

2012-04-18 Thread Brett Cannon
Brett Cannon added the comment: Eric put this in the bug tracker because I asked him to; I'm getting more emails about stuff about importlib that it's a little hard to keep track of everything. But originally this was about exposing what is left of the C-level APIs so it no

[issue14614] PyTuple_SET_ITEM could check bounds in debug mode

2012-04-19 Thread Brett Cannon
Brett Cannon added the comment: Should we limit ourselves to bound errors? Couldn't we make the macros aliases for their full-fledged function equivalents (e.g. PyTuple_SetItem()) which trigger Py_FatalError() on error so we also get argument type checking? -- nosy: +brett.c

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

2012-04-19 Thread Brett Cannon
Brett Cannon added the comment: OK, so what's your point? =) I mean you stopped the interpreter while in the middle of starting up. Do you want to trigger a fatal error if the exception raised was KeyboardInterrupt? -- ___ Python tracker

[issue14628] Clarify import statement documentation regarding what gets bound

2012-04-20 Thread Brett Cannon
Brett Cannon added the comment: So I think the sentence is saying exactly what is going on, but you want clarification that the module object is originating from sys.modules specifically. So you could change the sentence to "The first form of import statement binds the module name i

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

2012-04-20 Thread Brett Cannon
Brett Cannon added the comment: Welcome to Python code running during startup. =) As I said, the only thing I can think of is raising the exception instead of catching it and immediately triggering the fatal exception, but that specific fatal error was not introduced by me so this is just a

<    27   28   29   30   31   32   33   34   35   36   >