Skip to content

Commit 131633f

Browse files
authored
Mark 'venv sync' as deprecated (#14)
2 parents cf247bc + 11b450c commit 131633f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
## [Unreleased](https://github.com/SallingGroup-AI-and-ML/venv-cli/tree/develop)
44

55
### Minor changes
6+
* `venv sync` command marked as deprecated with removal planned for `v2.0`. Use `venv install <requirements>.lock` instead. [#14](https://github.com/SallingGroup-AI-and-ML/venv-cli/pull/14)
67
* `venv install` now runs `venv clear` before installation. This ensures that the enrivonment doesn't end up with orphaned packages after making changes to `requirements.txt`. [#9](https://github.com/SallingGroup-AI-and-ML/venv-cli/issues/9)
78

89
## [v1.3.0](https://github.com/SallingGroup-AI-and-ML/venv-cli/releases/tag/v1.3.0) (2023-10-30)
910

10-
## Major changes
11+
### Major changes
1112
* `venv lock` no longer tries to fill in credentials for packages installed via VCS. This behavior was undocumented and difficult to maintain and ultimately tried to alleviate a shortcoming of the way `pip` handles these credentials. [#11](https://github.com/SallingGroup-AI-and-ML/venv-cli/pull/11)
1213
For users who have credentials as part of URLs in their `requirements.txt` files, there are other ways to handle credentials, e.g. filling them in `requirements.lock` manually, using a `.netrc` file to store the credetials or using a keyring. See https://pip.pypa.io/en/stable/topics/authentication/ for more info.
1314

src/venv-cli/venv.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ venv::clear() {
305305
venv::sync() {
306306
if venv::_check_if_help_requested "$1"; then
307307
echo "venv sync [<lock file>]"
308-
echo
308+
echo ""
309+
echo "DEPRECATED: This command is deprecated and will be removed in version 2.0."
310+
echo "Use 'venv install <requirements.lock>' instead."
311+
echo ""
309312
echo "Remove all installed packages from the environment (venv clear)"
310313
echo "and install all packages specified in <lock file>."
311314
echo "The <lock file> must be in the form '*requirements.lock'."
@@ -322,6 +325,8 @@ venv::sync() {
322325
return "${_success}"
323326
fi
324327

328+
venv::color_echo "${_yellow}" "DEPRECATED: This command is deprecated and will be removed in version 2.0. Use 'venv install <requirements.lock>' instead."
329+
325330
local lock_file
326331
if [ -z "$1" ]; then
327332
# If no argument passed

0 commit comments

Comments
 (0)