8000 GH-83417: Allow `venv` to add a `.gitignore` file to environments via a new `scm_ignore_file` parameter by brettcannon · Pull Request #108125 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-83417: Allow venv to add a .gitignore file to environments via a new scm_ignore_file parameter #108125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
  • Loading branch information
brettcannon and AA-Turner authored Aug 21, 2023
commit 31d0558748a1a4f55d6705e07be7ca21007d18d8
4 changes: 2 additions & 2 deletions Doc/library/venv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ creation according to their needs, the :class:`EnvBuilder` class.

.. class:: EnvBuilder(system_site_packages=False, clear=False, \
symlinks=False, upgrade=False, with_pip=False, \
prompt=None, upgrade_deps=False, \*, gitignore=False)
prompt=None, upgrade_deps=False, *, gitignore=False)

The :class:`EnvBuilder` class accepts the following keyword arguments on
instantiation:
Expand Down Expand Up @@ -350,7 +350,7 @@ There is also a module-level convenience function:

.. function:: create(env_dir, system_site_packages=False, clear=False, \
symlinks=False, with_pip=False, prompt=None, \
upgrade_deps=False, \*, gitignore=False)
upgrade_deps=False, *, gitignore=False)

Create an :class:`EnvBuilder` with the given keyword arguments, and call its
:meth:`~EnvBuilder.create` method with the *env_dir* argument.
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_config_file_command_key(self):
b = venv.EnvBuilder()
else:
b = venv.EnvBuilder(
**{attr: False if attr in negated_attrs else True})
**{attr: attr not in negated_attrs})
b.upgrade_dependencies = Mock() # avoid pip command to upgrade deps
b._setup_pip = Mock() # avoid pip setup
self.run_with_capture(b.create, self.env_dir)
Expand Down
0