Brett Cannon added the comment:
I was thinking somewhere in http://docs.python.org/3/c-api/import.html since
this only comes up when you try to execute an import during extension module
initialization that involves a circular import.
--
___
Python
Brett Cannon added the comment:
It's fine to cheat in tests, although test_imp predates importlib which is why
it uses an undocumented API.
--
___
Python tracker
<http://bugs.python.org/is
Brett Cannon added the comment:
This is a feature request so it won't change in Python 2.7.
As for progress, the answer is no as the hope is to eventually replace
zipimport with something in pure Python thanks to importlib.
--
versions: +Python 3.4 -Python 2.7, Pytho
Brett Cannon added the comment:
The fully qualified name requirement is definitely a design flaw where init
functions should just be given the module object with everything already set,
just like what @importlib.util.module_for_loader does. Hopefully we can come up
with a solution through
Brett Cannon added the comment:
Committed in dac396a730e4
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Brett Cannon added the comment:
Here is a new patch which removes the expected skips stuff and adds a
required_on argument to test.support.import_module() for those cases where
missing a module is an error (in the patch it's _winreg on Windows).
If people are fine with this cleanup the
Brett Cannon added the comment:
Fixed in various commits.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Brett Cannon added the comment:
Here is my current plan::
parse_bytecode_file(data, source_stats, source_path) -> code
This will take in the bytes from the bytecode file and a stats dict from
SourceLoader.path_stats(). The method will parse the bytecode file, verify the
magic num
Brett Cannon added the comment:
Might name this compile_source() instead.
--
___
Python tracker
<http://bugs.python.org/issue15627>
___
___
Python-bugs-list mailin
Brett Cannon added the comment:
Might name it compile_bytecode_file() instead.
--
___
Python tracker
<http://bugs.python.org/issue15031>
___
___
Python-bugs-list m
Brett Cannon added the comment:
Should it be ModuleNotFoundError or ModuleNotFound? It's not necessarily an
error if a module doesn't exist, so failing to find it isn't quite that
negative. It also acts somewhat like StopIteration/GeneratorExit which also
don't have the c
Changes by Brett Cannon :
--
stage: needs patch -> test needed
___
Python tracker
<http://bugs.python.org/issue15767>
___
___
Python-bugs-list mailing list
Un
Brett Cannon added the comment:
Files removed in 7e37a6c76e36.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Brett Cannon added the comment:
7e37a6c76e36 removed the Misc/Vim files since we just were not staying on top
of them. Thanks for the patch regardless, July. If the syntax file in Vim
itself is off I would submit those as I have found the Vim maintainers very
willing to accept fixes
Brett Cannon added the comment:
7e37a6c76e36 removes the files in Misc/Vim. Thanks for the patch regardless,
Daniel. If the syntax file in Vim is out of date then I would suggest trying to
submit a patch. I have found the Vim maintainer quite willing to take fixes.
--
resolution
Brett Cannon added the comment:
I decided against it. If Emacs doesn't already have one I figured Vim shouldn't
either.
--
___
Python tracker
<http://bugs.python.
Brett Cannon added the comment:
You can't use "data" as there are connotations for that word thanks to
get_data(). Same goes for "load" since this is something that get_code() would
use more directly than load_module().
--
Brett Cannon added the comment:
The chances of this being a problem is REALLY small and the single function
that calls this is a public void function so there is no way for an exception
to propagate short of a fatal error which seems a bit much.
I did change to using NOWAIT_LOCK, though
Brett Cannon added the comment:
I'm at PyCon Argentina Friday and Saturday, so I have a rare opportunity to get
stuff done. If anyone has issues or comments, please get them in over the next
day or so, else I'm going to check thi
Brett Cannon added the comment:
Everything is working as expected; you left out the path argument::
importlib.find_loader('package.foo', ['package'])
This works the way it does because otherwise we would have to stat every single
time from the top level on down and that
Brett Cannon added the comment:
In order to have exceptions that have messages like "bad magic number in
module" there would need to be a technically unneeded fullname parameter.
People cool with that? I personally dislike having info passed in just for
error reporting, but in
Brett Cannon added the comment:
That won't work as frozen and builtin modules don't care about the path.
--
___
Python tracker
<http://bugs.python.o
Brett Cannon added the comment:
Feel free to submit a patch, but I'm personally not motivated enough to try to
change this on my own.
--
___
Python tracker
<http://bugs.python.org/is
Brett Cannon added the comment:
Attached is a patch that introduces _LoaderBasics.parse_bytecode_file(). It
takes in basically what _bytes_from_bytecode() did plus a keyword-only boolean
flag for exception suppression as that's needed to ignore stale bytecode when
source is availabl
New submission from Brett Cannon:
To make using importlib.find_loader() easier, there should be a flag that says
to automatically import all parent packages for the desired submodule so as to
not force the user to do it::
def find_loader(name, path=None, *, load_parents=False): ...
That
Brett Cannon added the comment:
I clarified the wording in 3.3 and default. I also opened issue #16492 to add a
keyword-only argument to find_loader() to have it import parent packages for
you if you so desire.
--
resolution: invalid -> fixed
stage: -> committed/re
Brett Cannon added the comment:
So at this point you should use inspect.signature(), not getfullargspec().
With that you could do this if you either allowed setting the __signature__
attribute and then provided code that would set it, made __signature__ a
property that returned the Signature
Brett Cannon added the comment:
I think we are as close as we are going to get with PEP 3018 being implemented.
if profile/cProfile ever get merged that is great (issue #16492), but I'm not
holding my breath and thus I am closing this issue.
--
dependencies: -Merge profile/cPr
Brett Cannon added the comment:
Another name for the method I thought of last night was
parse_bytecode_container().
People like that more? That would lead to new terminology to distinguish
bytecode ala dis module compared to bytecode file format ala importlib that
makes it clear that what is
New submission from Brett Cannon:
Looks like Georg added the flag in 2010 after Python 2.7 was already out, so
this doesn't need to be backported.
The possible values are:
-1 : optimization level the interpreter is already executing with
0 : no optimization
1 : -O
2 : -OO
--
ass
Brett Cannon added the comment:
We might want an keyword-only 'optimize' argument that maps to the compile()
function's 'optimize' argument.
--
dependencies: +Document the 'optimize' argument to compile()
___
Pyth
New submission from Brett Cannon:
With issue #15031 providing a way to take a bytecode file and get a code object
out of it, there should probably be a comparable method that takes a code
object and a path stats dict and returns the bytes to write out to a file.
This could also be a slight
Changes by Brett Cannon :
--
title: Method on importlib.SourceLoader for creating bytecode file
format/container -> Add a ethod on importlib.SourceLoader for creating bytecode
file format/container
___
Python tracker
<http://bugs.pyth
Changes by Brett Cannon :
--
title: Add a ethod on importlib.SourceLoader for creating bytecode file
format/container -> Add a method on importlib.SourceLoader for creating
bytecode file format/container
___
Python tracker
<http://bugs.pyth
Brett Cannon added the comment:
I've decided against this as issues #15031 and #16494 will alleviate the need
to expose these functions.
--
dependencies: -Split .pyc parsing from module loading
resolution: -> rejected
status: open -
Brett Cannon added the comment:
The story of impports from the C level is much more sane than back in the 2.6
days thanks to PyImport_Import, PyImport_ImportModuleLevelObject, and
PyImport_ImportModuleLevel.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
Brett Cannon added the comment:
What exactly is blocking this? From looking on PyPI it seems Jinja2, Pygments,
and Sphinx have all been ported to Python 3 at this point. Is it a matter of
porting any custom code in Doc/ to Python 3 and then updating the Makefile to
grab Python 3 versions of
Brett Cannon added the comment:
Closing as "works for me" due to lack of reply from OP.
--
resolution: -> works for me
status: pending -> closed
___
Python tracker
<http://bugs.py
Changes by Brett Cannon :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue15623>
___
___
Python-bugs-list mailing list
Unsubscri
Brett Cannon added the comment:
Should we just close this, Barry?
--
status: pending -> open
___
Python tracker
<http://bugs.python.org/issue13572>
___
___
Py
Brett Cannon added the comment:
This still an issue?
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue4347>
___
___
Python-bugs-lis
Changes by Brett Cannon :
--
resolution: -> wont fix
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue4182>
___
___
Python-bugs-list
Brett Cannon added the comment:
At some point this was fixed in importlib.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Brett Cannon added the comment:
A quick search through typeobject.c in 2.7 didn't show any PyErr_WarnPy3k calls
that didn't have their return value checked or propagated.
--
resolution: -> out of date
status: open -> closed
__
Changes by Brett Cannon :
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue2744>
___
___
Python-bugs-
Brett Cannon added the comment:
Been longer than a weekend. =)
--
___
Python tracker
<http://bugs.python.org/issue8585>
___
___
Python-bugs-list mailing list
Unsub
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue850482>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Never heard back from OP.
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue1539925>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
versions: -Python 2.7, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/issue8585>
___
___
Python-bugs-list mailin
Brett Cannon added the comment:
I can't find it, Mark, after searching through every XXX marker in a 2.7
checkout of Objects/typeobject.c .
--
___
Python tracker
<http://bugs.python.org/i
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue8787>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue1545463>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue2953>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Go ahead and reopen. I just couldn't find the lines anymore when I closed
it.
On Nov 17, 2012 3:07 PM, "Mark Dickinson" wrote:
>
> Mark Dickinson added the comment:
>
> To clarify, here's the bug: the following code should r
Brett Cannon added the comment:
It actually does work, you just have to embed the subdirectory in the path you
pass to zipimport.zipimporter():
>>> importer = zipimport.zipimporter('zipimport_example.zip/package/')
>>> importer.find_module('package.eggs'
Brett Cannon added the comment:
I can go with parse_cache_contents() as that aligns with
imp.cache_from_source().
Does the API look reasonable (other than the parameter names since those would
have to be renamed to be more in line with "cache")? Only thing I'm
Changes by Brett Cannon :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10966>
___
___
Python-bugs-list
Changes by Brett Cannon :
--
stage: patch review -> committed/rejected
___
Python tracker
<http://bugs.python.org/issue10966>
___
___
Python-bugs-list mai
Brett Cannon added the comment:
The rationale is that was the way it already was prior to importlib.
As for the approach you are suggesting, I am understand it, it will just
not give the public method the same functionality which might not be that
important.
On Nov 18, 2012 5:18 AM, "
Brett Cannon added the comment:
It's a method so that it can be overridden. Otherwise I can't develop my
own format and have that be the only differing option from SourceLoader.
On Nov 18, 2012 7:50 AM, "Nick Coghlan" wrote:
>
> Nick Coghlan added the comment:
>
&g
Brett Cannon added the comment:
Or to put it another way, without making it a method other interpreters like
IronPython and Jython will never be able to reuse SourceLoader effectively if
they want their own cached file format.
--
___
Python tracker
Brett Cannon added the comment:
FYI I'm talking with Dino for IronPython and I just emailed some Jython folks
to try to get an opinion on whether they would prefer to have a method to
override, something in _imp that they can implement, or simply implement
marshal.loads() and dumps()
Changes by Brett Cannon :
--
nosy: +dino.viehland
___
Python tracker
<http://bugs.python.org/issue15031>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
dependencies: -Document the 'optimize' argument to compile()
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.py
Brett Cannon added the comment:
No one else is working on it.
--
___
Python tracker
<http://bugs.python.org/issue16493>
___
___
Python-bugs-list mailing list
Unsub
Brett Cannon added the comment:
I don't think we need to worry about overlapping with gcc; -B, -b, -c, -d, etc.
are all used by gcc for some reason or another.
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/is
Brett Cannon added the comment:
It certainly wouldn't hurt. I think all of the path-related things for that
module are under-documented in terms of subdirectories, relative directories,
etc.
--
___
Python tracker
<http://bugs.python.org/is
Brett Cannon added the comment:
The link does nothing because what is directly below the TOC link is the table
of contents. There was originally a TOC but it was removed when it pushed too
much of the quick start section off of the screen at initial load. You also
don't want a large T
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16527>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Brett Cannon:
The grammar guarantees that 'yield from' statements have an expression to
evaluate, plus a 'yield from' without an expression makes no sense.
--
components: Library (Lib)
messages: 176261
nosy: brett.cannon
priority: normal
severity
New submission from Brett Cannon:
When there are no keyword-only arguments, the value of kw_defaults for
FunctionDef is []. But when keyword-only arguments are present with no default
values, it becomes [None]. That's bad as every other value in FunctionDef has a
default of [] when the
Brett Cannon added the comment:
Where is the doc issue? And it's a bit more than just a doc issue anyway as
Python.asdl has the same issue and that is what is used to generate the code
that represents the nodes.
--
___
Python tracker
Brett Cannon added the comment:
Ah, I see it now. I didn't realize that we allowed people to define
keyword-only arguments in any order they wanted in terms of default values,
allowing interleaving of default and non-default values. So this is correct,
just different from everything
Brett Cannon added the comment:
It might not be compulsory, but how else are you going to get a code object?
Then again, get_code() kind of codifies the use of the word "code" for methods
that return a code object.
So if you want to do the work to change the name the
Brett Cannon added the comment:
This test example is nonsensical. You are directly executing a package which
leads to pkg/tests being put in sys.path first. That means you end up with http
in pkg/tests masking the one in the stdlib, which causes your ``from
http.clients import HTTPConnection
Brett Cannon added the comment:
When you execute a module on the command line, sys.path[0] is set to that
containing directory (e.g. pkg/tests in your example; just have
pkg/tests/__init__.py print out sys.path to see what I mean). ``import http``
is going to look on sys.path no matter what
Brett Cannon added the comment:
Glad it makes sense now. =) I was writing my reply while you sent yours.
Anyway, your PYTHONPATH setting goes on to sys.path *after* the directory
containing the script being executed. This is so that when you execute Python
code somewhere it will get the local
Brett Cannon added the comment:
Once PEPs reach their final status, I view them basically done if there is more
official docs. For instance, I updated PEP 302 because the import and importlib
docs were not as thorough as they are now thanks to Barry. But now that we have
proper docs I don
Brett Cannon added the comment:
Are you still planning on committing this, Andrew?
--
___
Python tracker
<http://bugs.python.org/issue16421>
___
___
Python-bug
Brett Cannon added the comment:
The doc patch LGTM.
--
___
Python tracker
<http://bugs.python.org/issue16194>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
So we have IronPython who has their own format, Jython who has their own format
*and* .pyc files (which would screw with __cached__ so I assume they won't try
to use both at the same time), PyPy which use .pyc files, and CPython which
uses .pyc file
New submission from Brett Cannon:
I'm wondering which modules in the stdlib lack pure Python implementations (and
could legitimately have one, e.g. sqlite can't really have a pure Python
implementation). Once we know how big/small the list is a decision could be
made as to whether
Brett Cannon added the comment:
So expat doesn't count as that literally wraps the expat library. Random also
requires accessing the system randomization libraries to work properly so I
don't think that is a candidate either. As for the compression libraries, those
could be re-i
Brett Cannon added the comment:
No, sqlite does not belong on this list as it wraps a C library. Plus there is
an explicit block for ctypes-based modules in the stdlib which would prevent
moving over the PyPy implementation.
And I'm sure pure Python versions of all the crypto librarie
Brett Cannon added the comment:
Sure, a general XML parsing library could be written in Python, but they
wouldn't be named expat. =) The expat module wraps a specific XML parser
(expat) so I still do not consider it applicable for this list.
As for random, you are right that it doesn&
Brett Cannon added the comment:
To see how to write tests that exercise both the C and Python versions look at
test_heapq and test_warnings as examples. It will require some refactoring, but
it's easy to do.
--
___
Python tracker
Brett Cannon added the comment:
Alex: yes, the builtins could almost all be re-implemented in pure Python, but
there is a performance consideration vs. benefit (e.g. if we re-implemented
map() in Python which VMs would use it vs. implement it in some native way for
performance?).
But one
Brett Cannon added the comment:
Eric, I know you didn't just mean to suggest Python != efficient. =)
Yes, it should be in the list because other VMs might not want to re-implement
that code in some native language to the VM. And I assume all code in the
stdlib tries to be efficient, so
Brett Cannon added the comment:
Clang's test runner output is really nice; green-coloured progress bar on one
line, next line listing what is executing. Eventual output listing details of
the run (e.g. counts of what was run, expected failures
Brett Cannon added the comment:
As Mark pointed out, this is on purpose and is not going to change since Python
lacks block-level scoping of variables and thus causes the last case related to
the variable to take precedence. It might be a little unexpected, but it's not
that unreasonable
Brett Cannon added the comment:
If Antoine can't think of any then I think there aren't any more. This does
need a test, though.
--
___
Python tracker
<http://bugs.python.o
Changes by Brett Cannon :
--
stage: -> test needed
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue16730>
___
___
Python-bugs-list
Changes by Brett Cannon :
--
assignee: -> brett.cannon
nosy: +brett.cannon
priority: normal -> low
stage: -> patch review
___
Python tracker
<http://bugs.python.or
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16748>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
I would totally support tossing relative file paths in Python 3.4 as it has
been nothing but backwards-compatibility headaches and is essentially wrong as
the module's file is not relative to the current directory necess
Brett Cannon added the comment:
This was committed in default through rev d22e9e3a3326 but there was some error
in the connection from hg.python.org and so it didn't get tacked on.
Thanks to Thomas for the report and Berker for the patch!
--
nosy: +brett.cannon
resolution: -&g
New submission from Brett Cannon:
Need to do some work on the importlib tests such that they get run using both
_frozen_importlib and importlib._bootstrap to prevent any drift between
importlib/_bootstrap.py and import.c (and to make it easier to develop).
--
components: Tests
Changes by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue16795>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<http://bugs.python.org/issue7325>
___
___
Python-bugs-list mailing list
Unsubscribe:
3701 - 3800 of 5934 matches
Mail list logo