Brett Cannon added the comment:
If you look at
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py and
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py
you will notice a bunch of comments near all the calls to load_module(). Those
Brett Cannon added the comment:
If there's no porting benefit then let's move it to a single module instead of
a package.
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Brett Cannon :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue37775>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: +jaraco
___
Python tracker
<https://bugs.python.org/issue37772>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
assignee: -> brett.cannon
___
Python tracker
<https://bugs.python.org/issue37409>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Brett Cannon :
If you look at https://docs.python.org/3.9/py-modindex.html#cap-i you will see
that importlib.metadata isn't listed (same goes for the 3.8 docs).
Or are you leaving it out due to it being provisional?
--
assignee: docs@python
components
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37730>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
This is the issue tracker for Python itself, not openpyxl, so this isn't the
right place to report this. I would go to openpyxl's website and see where they
specify to report bugs.
--
nosy: +brett.cannon
resolution: -> third party
stage: -> re
Brett Cannon added the comment:
Changing the semantics of os.path.isdir() for something like this isn't worth
breaking code; basically it's now a quirk of the function.
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37689>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Anyone up for doing a PR that makes Path('.').name == '.'? It would be good to
see if that would break the stdlib as a proxy as to how many people might be
relying on these semantics. My hope is nothing breaks in which case we can make
the change in 3.9
Brett Cannon added the comment:
I think you're reading "equivalence" too strictly here to mean "exactly the
same semantics". In this instance it means "for similar functionality, the
equivalent method is ..." (admittedly this might be a quirk of the use of t
Brett Cannon added the comment:
It's deprecated: https://github.com/python/cpython/blob/master/Lib/imp.py#L31.
The wording is from back when the module was soft-deprecated via documentation
before it was hard-deprecated via code. Feel free to tweak it to say "The imp
module is depre
New submission from Brett Cannon :
Right now the venv module directly reads the file system to find the activation
scripts and then copies them over. Moving over to importlib.resources would be
a more portable solution.
Unfortunately the venv API is specifically tied to the file system via
Change by Brett Cannon :
--
keywords: +patch
pull_requests: +14713
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14941
___
Python tracker
<https://bugs.python.org/issu
Change by Brett Cannon :
--
dependencies: +Drop support for Aspen magic directories in venv's activate
scripts, venv activation scripts erroneously check if __VENV_PROMPT__ is defined
___
Python tracker
<https://bugs.python.org/issue37
New submission from Brett Cannon :
There are five activation scripts and they are all do things differently when
it comes to prompt manipulation. Standardizing on one set of semantics would
probably be good for consistency and so people know what to expect regardless
of their shell
Change by Brett Cannon :
--
priority: normal -> low
___
Python tracker
<https://bugs.python.org/issue37663>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Brett Cannon :
The upgrade_deps parameter to EnvBuilder exists and venv.EnvBuilder.create()
calls self.upgrade_dependencies(), but that method isn't documented anywhere.
--
messages: 348352
nosy: brett.cannon, vinay.sajip
priority: normal
severity: normal
status
Change by Brett Cannon :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue37660>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Brett Cannon :
If you look at
https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L112-L113
you will see that the prompt context for a virtual environment is always set.
Then if you look at the string substitutions for the activation scripts you
will also
Brett Cannon added the comment:
And this code and comment exists outside of just the bash activation script:
https://github.com/python/cpython/blob/master/Lib/venv/scripts/posix/activate.fish#L62
--
title: Drop support for Aspen magic directories in venv's activate script ->
D
New submission from Brett Cannon :
Or at least update the comment as the URL at
https://github.com/python/cpython/blob/master/Lib/venv/scripts/common/activate#L62
is a 404 and the domain seems to be a news site in Asia now
(http://www.zetadev.com/).
--
components: Library (Lib
Brett Cannon added the comment:
I'm going to close this as this is more likely an Anaconda or path problem than
a CPython problem. But as Raymond said, chances are you have some other file
named bisect on your sys.path.
--
nosy: +brett.cannon
resolution: -> third party
st
Brett Cannon added the comment:
Why would was want to swallow an exception? I think it would be better to let
the exception propagate.
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue35
Change by Brett Cannon :
--
resolution: -> third party
___
Python tracker
<https://bugs.python.org/issue37617>
___
___
Python-bugs-list mailing list
Un
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37616>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
If you're using your example code for 'testext' that you uploaded then that's
expected because the import in your package causes a normal import which means
the import machinery is adding things to sys.modules. Try it with a plain
module that's empty so you
Brett Cannon added the comment:
The documentation is correct by not documenting the methods as they are not
meant to be used.
A warning could be added, but it requires new code to wrap the C function with
a DeprecationWarning since that code is currently shared between
Brett Cannon added the comment:
Nope, loader.exec_module() doesn't either:
https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.exec_module,
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L776.
So unfortunately I'm still not sure what
Change by Brett Cannon :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue37519>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
I'm not sure why you think importlib.util.module_from_spec() adds a module to
sys.modules?
https://docs.python.org/3/library/importlib.html#importlib.util.module_from_spec
doesn't say that nor does
https://github.com/python/cpython/blob/master/Lib/importlib
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Brett Cannon :
--
nosy: +doko
___
Python tracker
<https://bugs.python.org/issue37577>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Thanks for the report, Benjamin!
--
resolution: -> fixed
stage: patch review -> needs patch
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Brett Cannon :
--
keywords: +patch
pull_requests: +14519
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14723
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
I will have a PR up shortly to fix the docs.
--
___
Python tracker
<https://bugs.python.org/issue37521>
___
___
Python-bug
Brett Cannon added the comment:
So the issue is the lines assigning to sys.modules and loader.exec_module() are
reversed. Had you not done an import in your testext.__init__ you never would
have noticed, but since you are then the normal import system is noticing
there's nothing
Brett Cannon added the comment:
Thanks! I'll try to have a look when I can.
--
assignee: -> brett.cannon
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
@joannah no clue if this ever happened. Could you check the code if
DeprecationWarning is being raised yet?
--
___
Python tracker
<https://bugs.python.org/issue26
Change by Brett Cannon :
Removed file: https://bugs.python.org/file48461/importsfucked.zip
___
Python tracker
<https://bugs.python.org/issue37521>
___
___
Python-bug
Change by Brett Cannon :
Removed file: https://bugs.python.org/file48460/importsfucked.zip
___
Python tracker
<https://bugs.python.org/issue37521>
___
___
Python-bug
Brett Cannon added the comment:
Mind re-uploading the examples files with a more appropriate file name? (Saying
"import is f-'ed" is not motivating to those of us who wrote it to try and fix
this.)
--
___
Python tracker
<https://bu
Change by Brett Cannon :
--
nosy: +eric.snow, ncoghlan
___
Python tracker
<https://bugs.python.org/issue37521>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
PEPs actually become historical documents once they are implemented, so could
you please check what the official docs say in regards to this to see if there
is an inconsistency in the semantics?
--
nosy: +brett.cannon
Change by Brett Cannon :
--
assignee: docs@python -> mdk
___
Python tracker
<https://bugs.python.org/issue37514>
___
___
Python-bugs-list mailing list
Un
Brett Cannon added the comment:
I'm going to close this as we try to avoid documenting CPython-specific details
unless absolutely necessary. And in the case of documenting the str type we
should avoid that.
So thanks for the suggestion, Dmitriy, but we will just leave this as a
pleasant
Brett Cannon added the comment:
Thinking about this a bit, I my gut says having Path('.').name == '.' makes
more sense than returning ''. My reasoning is that in any case where there's a
single value -- e.g. Path('spam') -- you end up with the part returned in
`name`. That suggests to me
Brett Cannon added the comment:
Bit surprised by the test_importlib failure. What has crept into there that
requires docstrings?
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37
Change by Brett Cannon :
--
stage: needs patch -> resolved
___
Python tracker
<https://bugs.python.org/issue37403>
___
___
Python-bugs-list mailing list
Un
Brett Cannon added the comment:
Would it be worth to set 'parent' to None in this instance? Might break code
but would also be potentially less surprising.
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37459>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Brett Cannon :
ensurepip is using pkgutil.get_data() which isn't as clean as
importlib.resources for reading data from within a package.
--
components: Library (Lib)
messages: 346907
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status
Brett Cannon added the comment:
Thanks for the PR, aeros167! BTW, if you want to open a new issue and modernize
the tests to use importlib directly that would be great!
--
___
Python tracker
<https://bugs.python.org/issue19
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> needs patch
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
If you run with `-Xdev`/warnings turned on you get an idea of what's happening:
>>> builtins.__import__('', globals(), locals(), ('foo',), 1)
:1: ImportWarning: can't resolve package from __spec__ or __package__,
falling back on __name__ and
Change by Brett Cannon :
--
title: relative import without parent -> relative import without parent
succeeds with builtins.__import__
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
import.c code raising the exception:
https://github.com/python/cpython/blob/f9f8e3ce709ceb15c8db8c8dde940daf1febf13d/Python/import.c#L1675-L1677
--
___
Python tracker
<https://bugs.python.org/issue37
Brett Cannon added the comment:
I think this should be an ImportError and so that means builtins.__import__()
is wrong. Anyone want to argue for the other side?
--
___
Python tracker
<https://bugs.python.org/issue37
Brett Cannon added the comment:
Importllib code raising the exception is
https://github.com/python/cpython/blob/f9f8e3ce709ceb15c8db8c8dde940daf1febf13d/Lib/importlib/_bootstrap.py#L874-L876
.
--
___
Python tracker
<https://bugs.python.
Brett Cannon added the comment:
The code doing the sanity check for importlib can be found at
https://github.com/python/cpython/blob/f9f8e3ce709ceb15c8db8c8dde940daf1febf13d/Lib/importlib/_bootstrap.py#L943-L948
.
--
___
Python tracker
<ht
Brett Cannon added the comment:
I opened bpo-37444 for the relative import beyond top-level package issue.
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from Brett Cannon :
builtins.__import__() raises ValueError (as it did in Python 2.7) while
importlib.__import__() raises ImportError (which makes more sense to me).
Found by Ben Lewis.
--
components: Interpreter Core, Library (Lib)
messages: 346855
nosy: Ben Lewis2
Change by Brett Cannon :
--
versions: +Python 3.8, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue37409>
___
___
Python-bugs-list mailin
Brett Cannon added the comment:
New changeset f9f8e3ce709ceb15c8db8c8dde940daf1febf13d by Brett Cannon in
branch 'master':
bpo-37403: Touch up venv docs (GH-14458)
https://github.com/python/cpython/commit/f9f8e3ce709ceb15c8db8c8dde940daf1febf13d
Change by Brett Cannon :
--
keywords: +patch
pull_requests: +14275
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14458
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
Do realize the person who created and closed this issue is the one suggesting
you open a new issue. ;) We can re-evaluate decisions and this one is 5 years
old. Now I'm not making any promises that we will definitely change anything,
but I'm not going
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue37416>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Please open a separate issue for the relative import issue.
--
stage: resolved -> test needed
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
Feel free to open a new issue to propose changing it.
--
___
Python tracker
<https://bugs.python.org/issue23014>
___
___
Pytho
Brett Cannon added the comment:
> Mostly looking for something that says how `create_module` should / shouldn't
> be implemented
Basically you only need to provide the method if you want to use a custom
object for the module itself. So as long as the object can quack like a module
Brett Cannon added the comment:
The import machinery docs are split between the language reference and
importlib itself. It really depends on what you're looking for.
--
___
Python tracker
<https://bugs.python.org/issue23
Brett Cannon added the comment:
PEPs are not living documents unless they are marked as Active (which PEP 451
is not).
--
___
Python tracker
<https://bugs.python.org/issue23
Brett Cannon added the comment:
I can't reproduce:
>>> from importlib import abc
>>> from . import util
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'util' from '__main__' (unknown location)
>>> import imp
New submission from Brett Cannon :
I've been asked enough times about what directory name to use for virtual
environments I'm going to update
https://docs.python.org/3/library/venv.html#module-venv to suggest `.venv` if
you don't have a specific name (`.env` clashes with environment variable
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
New changeset a0d73a143af404deecb9c4fcdbd3ddbafd96b41b by Brett Cannon (Joannah
Nanjekye) in branch 'master':
bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)
https://github.com/python/cpython/commit
Change by Brett Cannon :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue37354>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
> How will this interact with EnvBuilder.install_scripts() (which explicitly
> states that it performs textual substitution)?
It won't, so that would have to change as well. As you mentioned, Paul, I don't
know who even uses the functionality t
Brett Cannon added the comment:
> Would it be appropriate to change the "choose" method to "choice"?
Yep, just make sure the tests still pass before and after the change. :)
> should the name of "test_pkgimport" instead be "test_pkg_import"
Brett Cannon added the comment:
> How would you plan to replace the functionality where the venv's bin path is
> substituted into the script? Purely through introspecting its own path?
It's stored in pyvenv.cfg.
> I presume the security requirements you refer to are purely
Brett Cannon added the comment:
> I am curious how you plan to achieve this without reducing the functionality
> of venv?
PowerShell has a full programming language and all details can be found in
pyvenv.cfg now as of Python 3.8. So Activate.ps1 can read that file to get what
it
Brett Cannon added the comment:
I mentioned on python-ideas and opened https://bugs.python.org/issue37354 to
actually make the Activate.ps1 file static for security purposes.
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.
New submission from Brett Cannon :
If Activate.ps1 was made to not have substitutions upon generation and be an
entirely static file, then the file could be signed and thus not require people
to lower their security requirements in PowerShell in order to activate their
virtual environments
Change by Brett Cannon :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
I also agree with Eric's assessment.
Thanks for the idea, Tim, but I'm closing this as rejected.
--
nosy: +brett.cannon
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracke
Brett Cannon added the comment:
Anything zipimport-related should stay separate as zipimport is not a part of
importlib. The other three will have to be looked at to see what exactly they
are testing to know whether they relate to importlib and the implementation of
import or not (my guess
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue37297>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue37271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
@Antoine: Basically Path.with_name() fails under '.' but works with '..'
although with a somewhat odd result. And then after that is the fact that
Path('.').name is the empty string but for Path('..').name it's '..' (which is
what causes Path('.').with_name
Brett Cannon added the comment:
@Antoine: was there a design reason behind setting 'name' to '' when a Path
objects was initialized with '.'? Is it to implicitly represent the current
directory?
@N.P.: we will have to think through the implications of this as I don't know
if normalizing
Brett Cannon added the comment:
Fair enough. I've changed the title to point out only BaseException needs its
constructor documented as every other extension inherits from it and so its
cascades down.
--
resolution: not a bug ->
status: closed -> open
title: Sign
Brett Cannon added the comment:
OSError does have its constructor documented at
https://docs.python.org/3/library/exceptions.html#OSError (farther down the
page I think you're reading; you didn't provide the URL you're referring to so
I'm somewhat guessing). It is specifically vague because
Change by Brett Cannon :
--
assignee: -> brett.cannon
___
Python tracker
<https://bugs.python.org/issue37130>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue34850>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue36964>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Please do not add me back to the nosy list as I stand by my thinking that this
feature isn't worth pursuing. I understand you feel they are reasonable, Marco,
but I don't like the idea of changing what VIRTUAL_ENV gets set to when I
believe you should
Brett Cannon added the comment:
@serhiy: mind opening a new issue for your zipfile.Path worry?
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Brett Cannon :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37162>
___
___
Python-bugs-list
701 - 800 of 5790 matches
Mail list logo