[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Brett Cannon
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

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Brett Cannon
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

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37775] update doc of compileall

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue37775> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37772] zipfile.Path.iterdir() outputs sub directories many times or not at all

2019-08-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +jaraco ___ Python tracker <https://bugs.python.org/issue37772> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37409] relative import without parent succeeds with builtins.__import__

2019-08-02 Thread Brett Cannon
Change by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <https://bugs.python.org/issue37409> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37741] importlib.metadata docs not showing up in the module index

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

[issue37730] NotImplemented is used instead of NotImplementedError in docs

2019-07-31 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue37730> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37735] Current Region as a Method either in openpyxl.worksheet.cell.Cell or .cell_range.CellRange

2019-07-31 Thread Brett Cannon
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

[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-29 Thread Brett Cannon
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

[issue37689] Add Path.is_relative_to()

2019-07-29 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue37689> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-26 Thread Brett Cannon
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

[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Brett Cannon
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

[issue37674] Is imp module deprecated or pending deprecation?

2019-07-25 Thread Brett Cannon
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

[issue37683] Use importlib.resources in venv

2019-07-25 Thread Brett Cannon
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

[issue37663] Making venv activation script prompts consistent

2019-07-24 Thread Brett Cannon
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

[issue37663] Making venv activation script prompts consistent

2019-07-23 Thread Brett Cannon
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

[issue37663] Making venv activation script prompts consistent

2019-07-23 Thread Brett Cannon
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

[issue37663] Making venv activation script prompts consistent

2019-07-23 Thread Brett Cannon
Change by Brett Cannon : -- priority: normal -> low ___ Python tracker <https://bugs.python.org/issue37663> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37662] Document venv.EnvBuilder.upgrade_dependencies()

2019-07-23 Thread Brett Cannon
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

[issue37660] Drop support for Aspen magic directories in venv's activate scripts

2019-07-23 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue37660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined

2019-07-23 Thread Brett Cannon
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

[issue37660] Drop support for Aspen magic directories in venv's activate scripts

2019-07-23 Thread Brett Cannon
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

[issue37660] Drop support for Aspen magic directories in venv's activate script

2019-07-23 Thread Brett Cannon
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

[issue37656] Can't pip install because of bisect_left

2019-07-23 Thread Brett Cannon
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

[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-19 Thread Brett Cannon
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

[issue37617] [3.10 prep] site.py uses `sys.version[:3]`

2019-07-18 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> third party ___ Python tracker <https://bugs.python.org/issue37617> ___ ___ Python-bugs-list mailing list Un

[issue37616] [3.10 prep] zip path incorrect

2019-07-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue37616> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-17 Thread Brett Cannon
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

[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread Brett Cannon
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

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-16 Thread Brett Cannon
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

[issue37519] Three inconsistent module attributes

2019-07-15 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37519> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-15 Thread Brett Cannon
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

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-15 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-15 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +doko ___ Python tracker <https://bugs.python.org/issue37577> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-12 Thread Brett Cannon
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

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-12 Thread Brett Cannon
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

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-12 Thread Brett Cannon
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

[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-12 Thread Brett Cannon
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

[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-10 Thread Brett Cannon
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

[issue26131] Raise ImportWarning when loader.load_module() is used

2019-07-09 Thread Brett Cannon
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

[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon
Change by Brett Cannon : Removed file: https://bugs.python.org/file48461/importsfucked.zip ___ Python tracker <https://bugs.python.org/issue37521> ___ ___ Python-bug

[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon
Change by Brett Cannon : Removed file: https://bugs.python.org/file48460/importsfucked.zip ___ Python tracker <https://bugs.python.org/issue37521> ___ ___ Python-bug

[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon
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

[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +eric.snow, ncoghlan ___ Python tracker <https://bugs.python.org/issue37521> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37519] Three inconsistent module attributes

2019-07-08 Thread Brett Cannon
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

[issue37514] french translation Spelling mistake on datetime python's library documentation online

2019-07-08 Thread Brett Cannon
Change by Brett Cannon : -- assignee: docs@python -> mdk ___ Python tracker <https://bugs.python.org/issue37514> ___ ___ Python-bugs-list mailing list Un

[issue37512] Error in the documentation about string concatenation

2019-07-08 Thread Brett Cannon
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

[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-05 Thread Brett Cannon
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

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Brett Cannon
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

[issue37403] Recommend .venv for virtual environment names

2019-07-02 Thread Brett Cannon
Change by Brett Cannon : -- stage: needs patch -> resolved ___ Python tracker <https://bugs.python.org/issue37403> ___ ___ Python-bugs-list mailing list Un

[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread Brett Cannon
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

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-02 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue37459> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37449] Move ensurepip off of pkgutil and to importlib.resources

2019-06-29 Thread Brett Cannon
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

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-28 Thread Brett Cannon
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

[issue37403] Recommend .venv for virtual environment names

2019-06-28 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> needs patch status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-28 Thread Brett Cannon
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

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-28 Thread Brett Cannon
Change by Brett Cannon : -- title: relative import without parent -> relative import without parent succeeds with builtins.__import__ ___ Python tracker <https://bugs.python.org/issu

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-06-28 Thread Brett Cannon
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

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-06-28 Thread Brett Cannon
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

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-06-28 Thread Brett Cannon
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.

[issue37409] relative import without parent

2019-06-28 Thread Brett Cannon
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

[issue37409] relative import without parent

2019-06-28 Thread Brett Cannon
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

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-06-28 Thread Brett Cannon
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

[issue37409] relative import without parent

2019-06-28 Thread Brett Cannon
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

[issue37403] Recommend .venv for virtual environment names

2019-06-28 Thread Brett Cannon
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

[issue37403] Recommend .venv for virtual environment names

2019-06-28 Thread Brett Cannon
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

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-28 Thread Brett Cannon
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

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-06-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue37416> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37409] relative import without parent

2019-06-27 Thread Brett Cannon
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

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-27 Thread Brett Cannon
Brett Cannon added the comment: Feel free to open a new issue to propose changing it. -- ___ Python tracker <https://bugs.python.org/issue23014> ___ ___ Pytho

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-26 Thread Brett Cannon
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

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-26 Thread Brett Cannon
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

[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-26 Thread Brett Cannon
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

[issue37409] relative import_from without parent

2019-06-26 Thread Brett Cannon
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

[issue37403] Recommend .venv for virtual environment names

2019-06-25 Thread Brett Cannon
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

[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-06-21 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-06-21 Thread Brett Cannon
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

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon
Change by Brett Cannon : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue37354> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon
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

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-21 Thread Brett Cannon
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"

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-20 Thread Brett Cannon
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

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-20 Thread Brett Cannon
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

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-20 Thread Brett Cannon
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.

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-20 Thread Brett Cannon
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

[issue37343] pip: Warn on vulnerable packages

2019-06-19 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37341] str.format and f-string divergence

2019-06-19 Thread Brett Cannon
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

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-17 Thread Brett Cannon
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

[issue37297] function changed when pickle bound method object

2019-06-17 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue37297> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further

2019-06-14 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue37271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-06-13 Thread Brett Cannon
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

[issue37130] pathlib does not handle '..' directory

2019-06-12 Thread Brett Cannon
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

[issue37225] Document BaseException constructor

2019-06-12 Thread Brett Cannon
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

[issue37225] Signatures of Exceptions not documented

2019-06-11 Thread Brett Cannon
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

[issue37130] pathlib does not handle '..' directory

2019-06-10 Thread Brett Cannon
Change by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <https://bugs.python.org/issue37130> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue34850] Emit a syntax warning for "is" with a literal

2019-06-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue34850> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36964] `python3 -m venv NAME`: virtualenv is not portable

2019-06-07 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue36964> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36964] `python3 -m venv NAME`: virtualenv is not portable

2019-06-07 Thread Brett Cannon
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

[issue37162] new importlib dependencies csv, email and zipfile

2019-06-07 Thread Brett Cannon
Brett Cannon added the comment: @serhiy: mind opening a new issue for your zipfile.Path worry? -- ___ Python tracker <https://bugs.python.org/issue37

[issue37162] new importlib dependencies csv, email and zipfile

2019-06-06 Thread Brett Cannon
Change by Brett Cannon : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37162> ___ ___ Python-bugs-list

<    3   4   5   6   7   8   9   10   11   12   >