Use packaging for version parsing. looseversion when needed only.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2022-12-27 14:37:04 +00:00 committed by Megan Wilhite
parent 03dd1d41ea
commit 4ecfd3d3d5
144 changed files with 812 additions and 579 deletions

View file

@ -8,18 +8,18 @@ repos:
hooks: hooks:
# ----- Packaging Requirements ------------------------------------------------------------------------------------> # ----- Packaging Requirements ------------------------------------------------------------------------------------>
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-pkg-linux-3.6-zmq-requirements alias: compile-pkg-linux-3.6-zmq-requirements
## name: Linux Packaging Py3.6 ZeroMQ Requirements name: Linux Packaging Py3.6 ZeroMQ Requirements
## files: ^requirements/((base|zeromq|crypto)\.txt|static/pkg/(linux\.in|py3\.6/linux\.txt))$ files: ^requirements/((base|zeromq|crypto)\.txt|static/pkg/(linux\.in|py3\.6/linux\.txt))$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --include=requirements/base.txt - --include=requirements/base.txt
## - --include=requirements/zeromq.txt - --include=requirements/zeromq.txt
## - requirements/static/pkg/linux.in - requirements/static/pkg/linux.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-pkg-linux-3.7-zmq-requirements alias: compile-pkg-linux-3.7-zmq-requirements
@ -200,22 +200,22 @@ repos:
# <---- Packaging Requirements ------------------------------------------------------------------------------------- # <---- Packaging Requirements -------------------------------------------------------------------------------------
# ----- CI Requirements -------------------------------------------------------------------------------------------> # ----- CI Requirements ------------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-linux-3.6-zmq-requirements alias: compile-ci-linux-3.6-zmq-requirements
## name: Linux CI Py3.6 ZeroMQ Requirements name: Linux CI Py3.6 ZeroMQ Requirements
## files: ^requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(linux\.in|common\.in)|pkg/py3\.6/linux\.txt))$ files: ^requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(linux\.in|common\.in)|pkg/py3\.6/linux\.txt))$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --include=requirements/base.txt - --include=requirements/base.txt
## - --include=requirements/zeromq.txt - --include=requirements/zeromq.txt
## - --include=requirements/pytest.txt - --include=requirements/pytest.txt
## - --include=requirements/static/pkg/linux.in - --include=requirements/static/pkg/linux.in
## - --include=requirements/static/ci/common.in - --include=requirements/static/ci/common.in
## - --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt
## - requirements/static/ci/linux.in - requirements/static/ci/linux.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-linux-3.7-zmq-requirements alias: compile-ci-linux-3.7-zmq-requirements
@ -285,18 +285,18 @@ repos:
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt
- requirements/static/ci/linux.in - requirements/static/ci/linux.in
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-linux-crypto-3.6-requirements alias: compile-ci-linux-crypto-3.6-requirements
## name: Linux CI Py3.6 Crypto Requirements name: Linux CI Py3.6 Crypto Requirements
## files: ^requirements/(crypto\.txt|static/ci/(crypto\.in|py3\.6/linux-crypto\.txt))$ files: ^requirements/(crypto\.txt|static/ci/(crypto\.in|py3\.6/linux-crypto\.txt))$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --out-prefix=linux - --out-prefix=linux
## - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt
## - requirements/static/ci/crypto.in - requirements/static/ci/crypto.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-linux-crypto-3.7-requirements alias: compile-ci-linux-crypto-3.7-requirements
@ -651,21 +651,21 @@ repos:
# ----- Cloud CI Requirements -------------------------------------------------------------------------------------> # ----- Cloud CI Requirements ------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-cloud-3.6-requirements alias: compile-ci-cloud-3.6-requirements
## name: Cloud CI Py3.6 Requirements name: Cloud CI Py3.6 Requirements
## files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((cloud|common)\.in|py3\.6/cloud\.txt)))$ files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((cloud|common)\.in|py3\.6/cloud\.txt)))$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --include=requirements/base.txt - --include=requirements/base.txt
## - --include=requirements/zeromq.txt - --include=requirements/zeromq.txt
## - --include=requirements/pytest.txt - --include=requirements/pytest.txt
## - --include=requirements/static/pkg/linux.in - --include=requirements/static/pkg/linux.in
## - --include=requirements/static/ci/common.in - --include=requirements/static/ci/common.in
## - --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/pkg/py{py_version}/linux.txt
## - requirements/static/ci/cloud.in - requirements/static/ci/cloud.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-cloud-3.7-requirements alias: compile-ci-cloud-3.7-requirements
@ -733,22 +733,22 @@ repos:
# <---- Cloud CI Requirements -------------------------------------------------------------------------------------- # <---- Cloud CI Requirements --------------------------------------------------------------------------------------
# ----- Doc CI Requirements ---------------------------------------------------------------------------------------> # ----- Doc CI Requirements --------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-doc-requirements alias: compile-doc-requirements
## name: Docs CI Py3.6 Requirements name: Docs CI Py3.6 Requirements
## files: ^requirements/((base|zeromq|pytest)\.txt|static/ci/(docs|common|linux)\.in|static/pkg/linux\.in|static/pkg/.*/linux\.txt)$ files: ^requirements/((base|zeromq|pytest)\.txt|static/ci/(docs|common|linux)\.in|static/pkg/linux\.in|static/pkg/.*/linux\.txt)$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --include=requirements/base.txt - --include=requirements/base.txt
## - --include=requirements/zeromq.txt - --include=requirements/zeromq.txt
## - --include=requirements/static/pkg/linux.in - --include=requirements/static/pkg/linux.in
## - --include=requirements/static/ci/linux.in - --include=requirements/static/ci/linux.in
## - --include=requirements/static/ci/common.in - --include=requirements/static/ci/common.in
## - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt
## - requirements/static/ci/docs.in - requirements/static/ci/docs.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-doc-requirements alias: compile-doc-requirements
@ -821,22 +821,22 @@ repos:
# <---- Doc CI Requirements ---------------------------------------------------------------------------------------- # <---- Doc CI Requirements ----------------------------------------------------------------------------------------
# ----- Lint CI Requirements --------------------------------------------------------------------------------------> # ----- Lint CI Requirements -------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-lint-3.6-requirements alias: compile-ci-lint-3.6-requirements
## name: Lint CI Py3.6 Requirements name: Lint CI Py3.6 Requirements
## files: ^requirements/((base|zeromq)\.txt|static/(pkg/linux\.in|ci/(linux\.in|common\.in|lint\.in|py3\.6/linux\.txt)))$ files: ^requirements/((base|zeromq)\.txt|static/(pkg/linux\.in|ci/(linux\.in|common\.in|lint\.in|py3\.6/linux\.txt)))$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --include=requirements/base.txt - --include=requirements/base.txt
## - --include=requirements/zeromq.txt - --include=requirements/zeromq.txt
## - --include=requirements/static/pkg/linux.in - --include=requirements/static/pkg/linux.in
## - --include=requirements/static/ci/linux.in - --include=requirements/static/ci/linux.in
## - --include=requirements/static/ci/common.in - --include=requirements/static/ci/common.in
## - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt
## - requirements/static/ci/lint.in - requirements/static/ci/lint.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-lint-3.7-requirements alias: compile-ci-lint-3.7-requirements
@ -909,17 +909,17 @@ repos:
# <---- Lint CI Requirements --------------------------------------------------------------------------------------- # <---- Lint CI Requirements ---------------------------------------------------------------------------------------
# ----- Changelog -------------------------------------------------------------------------------------------------> # ----- Changelog ------------------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-changelog-3.6-requirements alias: compile-ci-changelog-3.6-requirements
## name: Changelog CI Py3.6 Requirements name: Changelog CI Py3.6 Requirements
## files: ^requirements/static/ci/(changelog\.in|py3\.6/(changelog|linux)\.txt)$ files: ^requirements/static/ci/(changelog\.in|py3\.6/(changelog|linux)\.txt)$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --platform=linux - --platform=linux
## - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt
## - requirements/static/ci/changelog.in - requirements/static/ci/changelog.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-changelog-3.7-requirements alias: compile-ci-changelog-3.7-requirements
@ -971,16 +971,16 @@ repos:
# <---- Changelog -------------------------------------------------------------------------------------------------- # <---- Changelog --------------------------------------------------------------------------------------------------
# ----- Invoke ----------------------------------------------------------------------------------------------------> # ----- Invoke ---------------------------------------------------------------------------------------------------->
## - id: pip-tools-compile - id: pip-tools-compile
## alias: compile-ci-invoke-3.6-requirements alias: compile-ci-invoke-3.6-requirements
## name: Linux CI Py3.6 Invoke Requirements name: Linux CI Py3.6 Invoke Requirements
## files: ^requirements/static/ci/(invoke\.in|py3.6/(invoke|linux)\.txt)$ files: ^requirements/static/ci/(invoke\.in|py3.6/(invoke|linux)\.txt)$
## pass_filenames: false pass_filenames: false
## args: args:
## - -v - -v
## - --py-version=3.6 - --py-version=3.6
## - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt - --pip-args=--constraint=requirements/static/ci/py{py_version}/linux.txt
## - requirements/static/ci/invoke.in - requirements/static/ci/invoke.in
- id: pip-tools-compile - id: pip-tools-compile
alias: compile-ci-invoke-3.7-requirements alias: compile-ci-invoke-3.7-requirements
@ -1186,6 +1186,8 @@ repos:
- distro==1.7.0 - distro==1.7.0
- jinja2==3.0.3 - jinja2==3.0.3
- msgpack==1.0.3 - msgpack==1.0.3
- packaging
- looseversion
- repo: https://github.com/saltstack/invoke-pre-commit - repo: https://github.com/saltstack/invoke-pre-commit
rev: v1.9.0 rev: v1.9.0
@ -1203,6 +1205,8 @@ repos:
- distro==1.7.0 - distro==1.7.0
- jinja2==3.0.3 - jinja2==3.0.3
- msgpack==1.0.3 - msgpack==1.0.3
- packaging
- looseversion
- repo: https://github.com/saltstack/invoke-pre-commit - repo: https://github.com/saltstack/invoke-pre-commit
rev: v1.9.0 rev: v1.9.0
@ -1224,6 +1228,8 @@ repos:
- distro==1.7.0 - distro==1.7.0
- jinja2==3.0.3 - jinja2==3.0.3
- msgpack==1.0.3 - msgpack==1.0.3
- packaging
- looseversion
- repo: https://github.com/saltstack/invoke-pre-commit - repo: https://github.com/saltstack/invoke-pre-commit
rev: v1.9.0 rev: v1.9.0
@ -1245,6 +1251,8 @@ repos:
- distro==1.7.0 - distro==1.7.0
- jinja2==3.0.3 - jinja2==3.0.3
- msgpack==1.0.3 - msgpack==1.0.3
- packaging
- looseversion
- repo: https://github.com/saltstack/invoke-pre-commit - repo: https://github.com/saltstack/invoke-pre-commit
rev: v1.9.0 rev: v1.9.0
@ -1268,6 +1276,8 @@ repos:
- distro==1.7.0 - distro==1.7.0
- jinja2==3.0.3 - jinja2==3.0.3
- msgpack==1.0.3 - msgpack==1.0.3
- packaging
- looseversion
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971 rev: v0.971

View file

@ -696,7 +696,8 @@ allowed-3rd-party-modules=msgpack,
tempfile, tempfile,
fnmatch, fnmatch,
ptscripts, ptscripts,
packaging packaging,
looseversion
[EXCEPTIONS] [EXCEPTIONS]

View file

@ -6,6 +6,7 @@ MarkupSafe
requests>=1.0.0 requests>=1.0.0
distro>=1.0.1 distro>=1.0.1
psutil>=5.0.0 psutil>=5.0.0
packaging>=21.3
looseversion
# We need contextvars for salt-ssh # We need contextvars for salt-ssh
contextvars contextvars

View file

@ -485,6 +485,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -622,7 +624,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -486,6 +486,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
linode-python==1.1.1 linode-python==1.1.1
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -621,7 +623,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 paramiko==2.10.1
# via # via
# junos-eznc # junos-eznc

View file

@ -492,6 +492,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -622,6 +624,7 @@ oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# sphinx # sphinx
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -483,6 +483,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -616,7 +618,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -486,6 +486,8 @@ lazy-object-proxy==1.4.3
# via astroid # via astroid
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -619,7 +621,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via ansible-core # via
# -r requirements/base.txt
# ansible-core
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -500,6 +500,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -631,6 +633,7 @@ oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# pytest # pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -158,6 +158,8 @@ keyring==5.7.1
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
kubernetes==3.0.0 kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -192,7 +194,9 @@ multidict==6.0.2
ntlm-auth==1.5.0 ntlm-auth==1.5.0
# via requests-ntlm # via requests-ntlm
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
passlib[bcrypt]==1.7.4 passlib[bcrypt]==1.7.4
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
patch==1.16 patch==1.16

View file

@ -502,6 +502,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.3
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -641,7 +643,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in
@ -687,7 +691,7 @@ pyopenssl==20.0.1
# via # via
# -r requirements/static/pkg/linux.in # -r requirements/static/pkg/linux.in
# etcd3-py # etcd3-py
pyparsing==3.0.9 pyparsing==3.0.6
# via # via
# junos-eznc # junos-eznc
# packaging # packaging

View file

@ -511,6 +511,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.3
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -643,6 +645,7 @@ oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# sphinx # sphinx
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
@ -691,7 +694,7 @@ pyopenssl==19.1.0
# via # via
# -r requirements/static/pkg/linux.in # -r requirements/static/pkg/linux.in
# etcd3-py # etcd3-py
pyparsing==3.0.9 pyparsing==3.0.6
# via # via
# junos-eznc # junos-eznc
# packaging # packaging

View file

@ -507,6 +507,8 @@ lazy-object-proxy==1.4.3
# via astroid # via astroid
libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.3
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -642,7 +644,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via ansible-core # via
# -r requirements/base.txt
# ansible-core
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in
@ -693,7 +697,7 @@ pyopenssl==20.0.1
# via # via
# -r requirements/static/pkg/linux.in # -r requirements/static/pkg/linux.in
# etcd3-py # etcd3-py
pyparsing==3.0.9 pyparsing==3.0.6
# via # via
# junos-eznc # junos-eznc
# packaging # packaging

View file

@ -517,6 +517,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.3
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -650,6 +652,7 @@ oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# pytest # pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
@ -706,7 +709,7 @@ pyopenssl==19.1.0
# via # via
# -r requirements/static/pkg/linux.in # -r requirements/static/pkg/linux.in
# etcd3-py # etcd3-py
pyparsing==3.0.9 pyparsing==3.0.6
# via # via
# junos-eznc # junos-eznc
# packaging # packaging

View file

@ -511,6 +511,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -661,7 +663,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -516,6 +516,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -660,6 +662,7 @@ oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# sphinx # sphinx
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -508,6 +508,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -651,7 +653,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -512,6 +512,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -659,7 +661,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via ansible-core # via
# -r requirements/base.txt
# ansible-core
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -523,6 +523,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -664,6 +666,7 @@ oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# pytest # pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -174,6 +174,8 @@ keyring==5.7.1
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
kubernetes==3.0.0 kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -207,7 +209,9 @@ multidict==6.0.2
ntlm-auth==1.5.0 ntlm-auth==1.5.0
# via requests-ntlm # via requests-ntlm
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
passlib[bcrypt]==1.7.4 passlib[bcrypt]==1.7.4
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
patch==1.16 patch==1.16

View file

@ -500,6 +500,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -650,7 +652,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -507,6 +507,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -651,6 +653,7 @@ oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# sphinx # sphinx
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -498,6 +498,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -641,7 +643,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -503,6 +503,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -650,7 +652,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via ansible-core # via
# -r requirements/base.txt
# ansible-core
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -513,6 +513,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -654,6 +656,7 @@ oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# pytest # pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -162,6 +162,8 @@ keyring==5.7.1
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
kubernetes==3.0.0 kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -195,7 +197,9 @@ multidict==6.0.2
ntlm-auth==1.5.0 ntlm-auth==1.5.0
# via requests-ntlm # via requests-ntlm
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
passlib[bcrypt]==1.7.4 passlib[bcrypt]==1.7.4
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
patch==1.16 patch==1.16

View file

@ -500,6 +500,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -650,7 +652,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -501,6 +501,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
linode-python==1.1.1 linode-python==1.1.1
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -646,7 +648,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 paramiko==2.10.1
# via # via
# junos-eznc # junos-eznc

View file

@ -505,6 +505,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -649,6 +651,7 @@ oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# sphinx # sphinx
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -498,6 +498,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -641,7 +643,9 @@ oauthlib==3.2.1
oscrypto==1.2.0 oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -501,6 +501,8 @@ libnacl==1.8.0 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
loguru==0.6.0 loguru==0.6.0
# via ciscoconfparse # via ciscoconfparse
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -648,7 +650,9 @@ oauthlib==3.2.1
oscrypto==1.2.1 oscrypto==1.2.1
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via ansible-core # via
# -r requirements/base.txt
# ansible-core
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via # via
# -r requirements/static/ci/common.in # -r requirements/static/ci/common.in

View file

@ -515,6 +515,8 @@ kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin" libnacl==1.7.1 ; sys_platform != "win32" and sys_platform != "darwin"
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via # via
# junos-eznc # junos-eznc
@ -656,6 +658,7 @@ oscrypto==1.2.0
# via certvalidator # via certvalidator
packaging==21.3 packaging==21.3
# via # via
# -r requirements/base.txt
# ansible-core # ansible-core
# pytest # pytest
paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin"

View file

@ -162,6 +162,8 @@ keyring==5.7.1
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
kubernetes==3.0.0 kubernetes==3.0.0
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -195,7 +197,9 @@ multidict==6.0.2
ntlm-auth==1.5.0 ntlm-auth==1.5.0
# via requests-ntlm # via requests-ntlm
packaging==21.3 packaging==21.3
# via pytest # via
# -r requirements/base.txt
# pytest
passlib[bcrypt]==1.7.4 passlib[bcrypt]==1.7.4
# via -r requirements/static/ci/common.in # via -r requirements/static/ci/common.in
patch==1.16 patch==1.16

View file

@ -51,6 +51,8 @@ jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
linode-python==1.1.1 linode-python==1.1.1
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
looseversion==1.0.2
# via -r requirements/base.txt
mako==1.2.2 mako==1.2.2
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
markupsafe==2.0.1 markupsafe==2.0.1
@ -66,6 +68,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -41,6 +41,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -53,6 +55,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -41,6 +41,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -53,6 +55,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -54,6 +54,8 @@ jinja2==3.0.3
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -71,6 +73,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -45,6 +45,8 @@ jinja2==3.0.3
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==0.10.0 jmespath==0.10.0
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.3
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -57,6 +59,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==21.3
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0
@ -67,6 +71,8 @@ pycryptodomex==3.9.8
# via -r requirements/crypto.txt # via -r requirements/crypto.txt
pyopenssl==19.1.0 pyopenssl==19.1.0
# via -r requirements/static/pkg/linux.in # via -r requirements/static/pkg/linux.in
pyparsing==3.0.6
# via packaging
python-dateutil==2.8.1 python-dateutil==2.8.1
# via -r requirements/static/pkg/linux.in # via -r requirements/static/pkg/linux.in
python-gnupg==0.4.8 python-gnupg==0.4.8

View file

@ -43,6 +43,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -55,6 +57,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -41,6 +41,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -53,6 +55,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -58,6 +58,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -75,6 +77,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -43,6 +43,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -55,6 +57,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -41,6 +41,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -53,6 +55,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -56,6 +56,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -73,6 +75,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -53,6 +53,8 @@ jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
linode-python==1.1.1 linode-python==1.1.1
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
looseversion==1.0.2
# via -r requirements/base.txt
mako==1.2.2 mako==1.2.2
# via -r requirements/darwin.txt # via -r requirements/darwin.txt
markupsafe==2.0.1 markupsafe==2.0.1
@ -68,6 +70,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -43,6 +43,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -55,6 +57,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -41,6 +41,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
markupsafe==2.0.1 markupsafe==2.0.1
# via # via
# -r requirements/base.txt # -r requirements/base.txt
@ -53,6 +55,8 @@ more-itertools==5.0.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.4 portend==2.4
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -56,6 +56,8 @@ jinja2==3.1.0
# via -r requirements/base.txt # via -r requirements/base.txt
jmespath==1.0.1 jmespath==1.0.1
# via -r requirements/base.txt # via -r requirements/base.txt
looseversion==1.0.2
# via -r requirements/base.txt
lxml==4.9.1 lxml==4.9.1
# via -r requirements/windows.txt # via -r requirements/windows.txt
mako==1.2.2 mako==1.2.2
@ -73,6 +75,8 @@ more-itertools==8.2.0
# jaraco.functools # jaraco.functools
msgpack==1.0.2 msgpack==1.0.2
# via -r requirements/base.txt # via -r requirements/base.txt
packaging==22.0
# via -r requirements/base.txt
portend==2.6 portend==2.6
# via cherrypy # via cherrypy
psutil==5.8.0 psutil==5.8.0

View file

@ -31,7 +31,7 @@ import salt.utils.event
from salt.cloud.libcloudfuncs import * # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import from salt.cloud.libcloudfuncs import * # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import
from salt.exceptions import SaltCloudSystemExit from salt.exceptions import SaltCloudSystemExit
from salt.utils.functools import namespaced_function from salt.utils.functools import namespaced_function
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# CloudStackNetwork will be needed during creation of a new node # CloudStackNetwork will be needed during creation of a new node
# pylint: disable=import-error # pylint: disable=import-error
@ -43,7 +43,7 @@ try:
# this work-around. This work-around can be removed when the required # this work-around. This work-around can be removed when the required
# minimum version of libcloud is 2.0.0 (See PR #40837 - which is # minimum version of libcloud is 2.0.0 (See PR #40837 - which is
# implemented in Salt 2018.3.0). # implemented in Salt 2018.3.0).
if _LooseVersion(libcloud.__version__) < _LooseVersion("1.4.0"): if Version(libcloud.__version__) < Version("1.4.0"):
# See https://github.com/saltstack/salt/issues/32743 # See https://github.com/saltstack/salt/issues/32743
import libcloud.security import libcloud.security

View file

@ -34,7 +34,7 @@ from salt.exceptions import (
SaltCloudSystemExit, SaltCloudSystemExit,
) )
from salt.utils.functools import namespaced_function from salt.utils.functools import namespaced_function
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# Import libcloud # Import libcloud
try: try:
@ -51,7 +51,7 @@ try:
# this work-around. This work-around can be removed when the required # this work-around. This work-around can be removed when the required
# minimum version of libcloud is 2.0.0 (See PR #40837 - which is # minimum version of libcloud is 2.0.0 (See PR #40837 - which is
# implemented in Salt 2018.3.0). # implemented in Salt 2018.3.0).
if _LooseVersion(libcloud.__version__) < _LooseVersion("1.4.0"): if Version(libcloud.__version__) < Version("1.4.0"):
# See https://github.com/saltstack/salt/issues/32743 # See https://github.com/saltstack/salt/issues/32743
import libcloud.security import libcloud.security

View file

@ -60,7 +60,7 @@ import salt.utils.msgpack
from salt.cloud.libcloudfuncs import * # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import from salt.cloud.libcloudfuncs import * # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import
from salt.exceptions import SaltCloudSystemExit from salt.exceptions import SaltCloudSystemExit
from salt.utils.functools import namespaced_function from salt.utils.functools import namespaced_function
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# pylint: disable=import-error # pylint: disable=import-error
LIBCLOUD_IMPORT_ERROR = None LIBCLOUD_IMPORT_ERROR = None
@ -107,7 +107,7 @@ def __virtual__():
if not HAS_LIBCLOUD: if not HAS_LIBCLOUD:
return False, "apache-libcloud is not installed" return False, "apache-libcloud is not installed"
if _LooseVersion(libcloud.__version__) < _LooseVersion("2.5.0"): if Version(libcloud.__version__) < Version("2.5.0"):
return False, "The salt-cloud GCE driver requires apache-libcloud>=2.5.0" return False, "The salt-cloud GCE driver requires apache-libcloud>=2.5.0"
if get_configured_provider() is False: if get_configured_provider() is False:

View file

@ -231,13 +231,13 @@ import pprint
import socket import socket
import salt.config as config import salt.config as config
import salt.utils.versions
from salt.exceptions import ( from salt.exceptions import (
SaltCloudConfigError, SaltCloudConfigError,
SaltCloudExecutionFailure, SaltCloudExecutionFailure,
SaltCloudExecutionTimeout, SaltCloudExecutionTimeout,
SaltCloudSystemExit, SaltCloudSystemExit,
) )
from salt.utils.versions import Version
try: try:
import os_client_config import os_client_config
@ -246,8 +246,7 @@ try:
import shade.openstackcloud import shade.openstackcloud
HAS_SHADE = ( HAS_SHADE = (
salt.utils.versions._LooseVersion(shade.__version__) Version(shade.__version__) >= Version("1.19.0"),
>= salt.utils.versions._LooseVersion("1.19.0"),
"Please install newer version of shade: >= 1.19.0", "Please install newer version of shade: >= 1.19.0",
) )
except ImportError: except ImportError:

View file

@ -108,7 +108,7 @@ from salt.exceptions import (
SaltCloudNotFound, SaltCloudNotFound,
SaltCloudSystemExit, SaltCloudSystemExit,
) )
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
try: try:
# pylint: disable=no-name-in-module # pylint: disable=no-name-in-module
@ -174,7 +174,7 @@ def version_compatible(version):
""" """
Checks profitbricks version Checks profitbricks version
""" """
return LooseVersion(profitbricks.API_VERSION) >= LooseVersion(version) return Version(profitbricks.API_VERSION) >= Version(version)
def get_dependencies(): def get_dependencies():

View file

@ -58,12 +58,12 @@ import salt.utils.hashutils
import salt.utils.json import salt.utils.json
import salt.utils.path import salt.utils.path
import salt.utils.stringutils import salt.utils.stringutils
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
try: try:
import azure.storage import azure.storage
if LooseVersion(azure.storage.__version__) < LooseVersion("0.20.0"): if Version(azure.storage.__version__) < Version("0.20.0"):
raise ImportError("azure.storage.__version__ must be >= 0.20.0") raise ImportError("azure.storage.__version__ must be >= 0.20.0")
HAS_AZURE = True HAS_AZURE = True
except (ImportError, AttributeError): except (ImportError, AttributeError):

View file

@ -14,7 +14,7 @@ import shlex
import salt.utils.json import salt.utils.json
import salt.utils.path import salt.utils.path
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -37,10 +37,10 @@ def _check_valid_version():
bower must be at least version 1.3. bower must be at least version 1.3.
""" """
# pylint: disable=no-member # pylint: disable=no-member
bower_version = _LooseVersion( bower_version = Version(
__salt__["cmd.run"]("{} --version".format(salt.utils.path.which("bower"))) __salt__["cmd.run"]("{} --version".format(salt.utils.path.which("bower")))
) )
valid_version = _LooseVersion("1.3") valid_version = Version("1.3")
# pylint: enable=no-member # pylint: enable=no-member
if bower_version < valid_version: if bower_version < valid_version:
raise CommandExecutionError( raise CommandExecutionError(

View file

@ -21,7 +21,7 @@ from salt.exceptions import (
SaltInvocationError, SaltInvocationError,
) )
from salt.utils.data import CaseInsensitiveDict from salt.utils.data import CaseInsensitiveDict
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -68,7 +68,7 @@ def _yes():
""" """
if "chocolatey._yes" in __context__: if "chocolatey._yes" in __context__:
return __context__["chocolatey._yes"] return __context__["chocolatey._yes"]
if _LooseVersion(chocolatey_version()) >= _LooseVersion("0.9.9"): if Version(chocolatey_version()) >= Version("0.9.9"):
answer = ["--yes"] answer = ["--yes"]
else: else:
answer = [] answer = []
@ -83,7 +83,7 @@ def _no_progress():
""" """
if "chocolatey._no_progress" in __context__: if "chocolatey._no_progress" in __context__:
return __context__["chocolatey._no_progress"] return __context__["chocolatey._no_progress"]
if _LooseVersion(chocolatey_version()) >= _LooseVersion("0.10.4"): if Version(chocolatey_version()) >= Version("0.10.4"):
answer = ["--no-progress"] answer = ["--no-progress"]
else: else:
log.warning("--no-progress unsupported in choco < 0.10.4") log.warning("--no-progress unsupported in choco < 0.10.4")
@ -778,7 +778,7 @@ def install_missing(name, version=None, source=None):
salt '*' chocolatey.install_missing <package name> salt '*' chocolatey.install_missing <package name>
salt '*' chocolatey.install_missing <package name> version=<package version> salt '*' chocolatey.install_missing <package name> version=<package version>
""" """
if _LooseVersion(chocolatey_version()) >= _LooseVersion("0.9.8.24"): if Version(chocolatey_version()) >= Version("0.9.8.24"):
log.warning("installmissing is deprecated, using install") log.warning("installmissing is deprecated, using install")
return install(name, version=version) return install(name, version=version)
@ -1049,7 +1049,7 @@ def update(name, source=None, pre_versions=False):
salt "*" chocolatey.update <package name> pre_versions=True salt "*" chocolatey.update <package name> pre_versions=True
""" """
# chocolatey helpfully only supports a single package argument # chocolatey helpfully only supports a single package argument
if _LooseVersion(chocolatey_version()) >= _LooseVersion("0.9.8.24"): if Version(chocolatey_version()) >= Version("0.9.8.24"):
log.warning("update is deprecated, using upgrade") log.warning("update is deprecated, using upgrade")
return upgrade(name, source=source, pre_versions=pre_versions) return upgrade(name, source=source, pre_versions=pre_versions)

View file

@ -44,10 +44,10 @@ import salt.utils.stringutils
import salt.utils.templates import salt.utils.templates
import salt.utils.url import salt.utils.url
import salt.utils.user import salt.utils.user
import salt.utils.versions
from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError
from salt.exceptions import get_error_message as _get_error_message from salt.exceptions import get_error_message as _get_error_message
from salt.utils.files import HASHES, HASHES_REVMAP from salt.utils.files import HASHES, HASHES_REVMAP
from salt.utils.versions import Version
try: try:
import grp import grp
@ -192,8 +192,8 @@ def _chattr_has_extended_attrs():
if ver is None: if ver is None:
return False return False
needed_version = salt.utils.versions.LooseVersion("1.41.12") needed_version = Version("1.41.12")
chattr_version = salt.utils.versions.LooseVersion(ver) chattr_version = Version(ver)
return chattr_version > needed_version return chattr_version > needed_version

View file

@ -20,7 +20,7 @@ import salt.utils.stringutils
import salt.utils.templates import salt.utils.templates
import salt.utils.url import salt.utils.url
from salt.exceptions import CommandExecutionError, SaltInvocationError from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import LooseVersion
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -42,7 +42,7 @@ def _check_worktree_support(failhard=True):
Ensure that we don't try to operate on worktrees in git < 2.5.0. Ensure that we don't try to operate on worktrees in git < 2.5.0.
""" """
git_version = version(versioninfo=False) git_version = version(versioninfo=False)
if _LooseVersion(git_version) < _LooseVersion("2.5.0"): if LooseVersion(git_version) < LooseVersion("2.5.0"):
if failhard: if failhard:
raise CommandExecutionError( raise CommandExecutionError(
"Worktrees are only supported in git 2.5.0 and newer " "Worktrees are only supported in git 2.5.0 and newer "
@ -175,7 +175,7 @@ def _format_git_opts(opts):
""" """
if opts: if opts:
version_ = version(versioninfo=False) version_ = version(versioninfo=False)
if _LooseVersion(version_) < _LooseVersion("1.7.2"): if LooseVersion(version_) < LooseVersion("1.7.2"):
raise SaltInvocationError( raise SaltInvocationError(
"git_opts is only supported for git versions >= 1.7.2 " "git_opts is only supported for git versions >= 1.7.2 "
"(detected: {})".format(version_) "(detected: {})".format(version_)
@ -450,8 +450,8 @@ def _which_git_config(global_, cwd, user, password, output_encoding=None):
""" """
if global_: if global_:
return ["--global"] return ["--global"]
version_ = _LooseVersion(version(versioninfo=False)) version_ = LooseVersion(version(versioninfo=False))
if version_ >= _LooseVersion("1.7.10.2"): if version_ >= LooseVersion("1.7.10.2"):
# --local added in 1.7.10.2 # --local added in 1.7.10.2
return ["--local"] return ["--local"]
else: else:
@ -1825,7 +1825,7 @@ def describe(
""" """
cwd = _expand_path(cwd, user) cwd = _expand_path(cwd, user)
command = ["git", "describe"] command = ["git", "describe"]
if _LooseVersion(version(versioninfo=False)) >= _LooseVersion("1.5.6"): if LooseVersion(version(versioninfo=False)) >= LooseVersion("1.5.6"):
command.append("--always") command.append("--always")
command.append(rev) command.append(rev)
return _git_run( return _git_run(
@ -1970,7 +1970,7 @@ def diff(
failhard = True failhard = True
if no_index: if no_index:
if _LooseVersion(version(versioninfo=False)) < _LooseVersion("1.5.1"): if LooseVersion(version(versioninfo=False)) < LooseVersion("1.5.1"):
raise CommandExecutionError( raise CommandExecutionError(
"The 'no_index' option is only supported in Git 1.5.1 and newer" "The 'no_index' option is only supported in Git 1.5.1 and newer"
) )
@ -2701,8 +2701,8 @@ def list_worktrees(
tracked_data_points = ("worktree", "HEAD", "branch") tracked_data_points = ("worktree", "HEAD", "branch")
ret = {} ret = {}
git_version = _LooseVersion(version(versioninfo=False)) git_version = LooseVersion(version(versioninfo=False))
has_native_list_subcommand = git_version >= _LooseVersion("2.7.0") has_native_list_subcommand = git_version >= LooseVersion("2.7.0")
if has_native_list_subcommand: if has_native_list_subcommand:
out = _git_run( out = _git_run(
["git", "worktree", "list", "--porcelain"], ["git", "worktree", "list", "--porcelain"],
@ -3356,7 +3356,7 @@ def merge_base(
refs = ["HEAD"] refs = ["HEAD"]
if is_ancestor: if is_ancestor:
if _LooseVersion(version(versioninfo=False)) < _LooseVersion("1.8.0"): if LooseVersion(version(versioninfo=False)) < LooseVersion("1.8.0"):
# Pre 1.8.0 git doesn't have --is-ancestor, so the logic here is a # Pre 1.8.0 git doesn't have --is-ancestor, so the logic here is a
# little different. First we need to resolve the first ref to a # little different. First we need to resolve the first ref to a
# full SHA1, and then if running git merge-base on both commits # full SHA1, and then if running git merge-base on both commits
@ -5229,8 +5229,7 @@ def version(versioninfo=False):
Returns the version of Git installed on the minion Returns the version of Git installed on the minion
versioninfo : False versioninfo : False
If ``True``, return the version in a versioninfo list (e.g. ``[2, 5, If ``True``, return the version in a versioninfo list (e.g. ``[2, 5, 0]``)
0]``)
CLI Example: CLI Example:
@ -5249,9 +5248,15 @@ def version(versioninfo=False):
try: try:
# On macOS, the git version is displayed in a different format # On macOS, the git version is displayed in a different format
# git version 2.21.1 (Apple Git-122.3) # git version 2.21.1 (Apple Git-122.3)
# On Windows:
# git version 2.21.1.windows.1
# As opposed to: # As opposed to:
# git version 2.21.1 # git version 2.21.1
__context__[contextkey] = version_.split("(")[0].strip().split()[-1] if "(" in version_:
version_ = version_.split("(")[0].strip()
if ".windows" in version_:
version_ = version_.split(".windows")[0].strip()
__context__[contextkey] = version_.strip().split()[-1].strip()
except IndexError: except IndexError:
# Somehow git --version returned no stdout while not raising an # Somehow git --version returned no stdout while not raising an
# error. Should never happen but we should still account for this # error. Should never happen but we should still account for this
@ -5540,7 +5545,7 @@ def worktree_prune(
output_encoding=output_encoding, output_encoding=output_encoding,
) )
git_version = version(versioninfo=False) git_version = version(versioninfo=False)
if _LooseVersion(git_version) > _LooseVersion("2.35.0"): if LooseVersion(git_version) > LooseVersion("2.35.0"):
return result["stderr"] return result["stderr"]
return result["stdout"] return result["stdout"]

View file

@ -6,13 +6,8 @@ import functools
import logging import logging
import re import re
try: from salt.exceptions import CommandExecutionError
from salt.exceptions import CommandExecutionError from salt.utils.versions import LooseVersion
from salt.utils.versions import LooseVersion as _LooseVersion
HAS_REQUIRED_LIBS = True
except ImportError:
HAS_REQUIRED_LIBS = False
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -24,10 +19,6 @@ def __virtual__():
""" """
Load this module on Debian-based systems only Load this module on Debian-based systems only
""" """
if not HAS_REQUIRED_LIBS:
return (False, "Required library could not be imported")
if __grains__.get("os_family", "") in ("Kali", "Debian"): if __grains__.get("os_family", "") in ("Kali", "Debian"):
return __virtualname__ return __virtualname__
elif __grains__.get("os_family", "") == "Cumulus": elif __grains__.get("os_family", "") == "Cumulus":
@ -133,7 +124,7 @@ def needs_reboot():
salt '*' kernelpkg.needs_reboot salt '*' kernelpkg.needs_reboot
""" """
return _LooseVersion(active()) < _LooseVersion(latest_installed()) return LooseVersion(active()) < LooseVersion(latest_installed())
def upgrade(reboot=False, at_time=None): def upgrade(reboot=False, at_time=None):
@ -192,7 +183,7 @@ def upgrade_available():
salt '*' kernelpkg.upgrade_available salt '*' kernelpkg.upgrade_available
""" """
return _LooseVersion(latest_available()) > _LooseVersion(latest_installed()) return LooseVersion(latest_available()) > LooseVersion(latest_installed())
def remove(release): def remove(release):
@ -278,8 +269,8 @@ def _cmp_version(item1, item2):
""" """
Compare function for package version sorting Compare function for package version sorting
""" """
vers1 = _LooseVersion(item1) vers1 = LooseVersion(item1)
vers2 = _LooseVersion(item2) vers2 = LooseVersion(item2)
if vers1 < vers2: if vers1 < vers2:
return -1 return -1

View file

@ -5,37 +5,27 @@ Manage Linux kernel packages on YUM-based systems
import functools import functools
import logging import logging
try: import salt.modules.yumpkg
import salt.modules.yumpkg import salt.utils.data
import salt.utils.data import salt.utils.functools
import salt.utils.functools import salt.utils.systemd
import salt.utils.systemd from salt.exceptions import CommandExecutionError
from salt.exceptions import CommandExecutionError from salt.utils.versions import LooseVersion
from salt.utils.versions import LooseVersion as _LooseVersion
__IMPORT_ERROR = None
except ImportError as exc:
__IMPORT_ERROR = exc.__str__()
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
__virtualname__ = "kernelpkg" __virtualname__ = "kernelpkg"
if __IMPORT_ERROR is None: # Import functions from yumpkg
# Import functions from yumpkg # pylint: disable=invalid-name, protected-access
# pylint: disable=invalid-name, protected-access _yum = salt.utils.functools.namespaced_function(salt.modules.yumpkg._yum, globals())
_yum = salt.utils.functools.namespaced_function(salt.modules.yumpkg._yum, globals()) # pylint: enable=invalid-name, protected-access
# pylint: enable=invalid-name, protected-access
def __virtual__(): def __virtual__():
""" """
Load this module on RedHat-based systems only Load this module on RedHat-based systems only
""" """
if __IMPORT_ERROR:
return False, __IMPORT_ERROR
if __grains__.get("os_family", "") == "RedHat": if __grains__.get("os_family", "") == "RedHat":
return __virtualname__ return __virtualname__
elif __grains__.get("os", "").lower() in ( elif __grains__.get("os", "").lower() in (
@ -133,7 +123,7 @@ def needs_reboot():
salt '*' kernelpkg.needs_reboot salt '*' kernelpkg.needs_reboot
""" """
return _LooseVersion(active()) < _LooseVersion(latest_installed()) return LooseVersion(active()) < LooseVersion(latest_installed())
def upgrade(reboot=False, at_time=None): def upgrade(reboot=False, at_time=None):
@ -190,7 +180,7 @@ def upgrade_available():
salt '*' kernelpkg.upgrade_available salt '*' kernelpkg.upgrade_available
""" """
return _LooseVersion(latest_available()) > _LooseVersion(latest_installed()) return LooseVersion(latest_available()) > LooseVersion(latest_installed())
def remove(release): def remove(release):
@ -291,8 +281,8 @@ def _cmp_version(item1, item2):
""" """
Compare function for package version sorting Compare function for package version sorting
""" """
vers1 = _LooseVersion(item1) vers1 = LooseVersion(item1)
vers2 = _LooseVersion(item2) vers2 = LooseVersion(item2)
if vers1 < vers2: if vers1 < vers2:
return -1 return -1

View file

@ -23,7 +23,7 @@ import salt.utils.files
import salt.utils.path import salt.utils.path
import salt.utils.platform import salt.utils.platform
import salt.utils.stringutils import salt.utils.stringutils
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# Set up logging # Set up logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -51,14 +51,14 @@ def __virtual__():
'Required binary not found: "/bin/launchctl"', 'Required binary not found: "/bin/launchctl"',
) )
if _LooseVersion(__grains__["osrelease"]) >= _LooseVersion("10.11"): if Version(__grains__["osrelease"]) >= Version("10.11"):
return ( return (
False, False,
"Failed to load the mac_service module:\n" "Failed to load the mac_service module:\n"
"Not available on El Capitan, uses mac_service.py", "Not available on El Capitan, uses mac_service.py",
) )
if _LooseVersion(__grains__["osrelease"]) >= _LooseVersion("10.10"): if Version(__grains__["osrelease"]) >= Version("10.10"):
global BEFORE_YOSEMITE global BEFORE_YOSEMITE
BEFORE_YOSEMITE = False BEFORE_YOSEMITE = False

View file

@ -35,7 +35,7 @@ import os.path
import salt.utils.args import salt.utils.args
import salt.utils.compat import salt.utils.compat
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -47,9 +47,9 @@ try:
from libcloud.compute.providers import get_driver from libcloud.compute.providers import get_driver
# pylint: enable=unused-import # pylint: enable=unused-import
if hasattr(libcloud, "__version__") and _LooseVersion( if hasattr(libcloud, "__version__") and Version(libcloud.__version__) < Version(
libcloud.__version__ REQUIRED_LIBCLOUD_VERSION
) < _LooseVersion(REQUIRED_LIBCLOUD_VERSION): ):
raise ImportError() raise ImportError()
logging.getLogger("libcloud").setLevel(logging.CRITICAL) logging.getLogger("libcloud").setLevel(logging.CRITICAL)
HAS_LIBCLOUD = True HAS_LIBCLOUD = True

View file

@ -30,7 +30,7 @@ Connection module for Apache Libcloud DNS management
import logging import logging
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -42,9 +42,9 @@ try:
from libcloud.dns.types import RecordType from libcloud.dns.types import RecordType
# pylint: enable=unused-import # pylint: enable=unused-import
if hasattr(libcloud, "__version__") and _LooseVersion( if hasattr(libcloud, "__version__") and Version(libcloud.__version__) < Version(
libcloud.__version__ REQUIRED_LIBCLOUD_VERSION
) < _LooseVersion(REQUIRED_LIBCLOUD_VERSION): ):
raise ImportError() raise ImportError()
logging.getLogger("libcloud").setLevel(logging.CRITICAL) logging.getLogger("libcloud").setLevel(logging.CRITICAL)
HAS_LIBCLOUD = True HAS_LIBCLOUD = True

View file

@ -34,7 +34,7 @@ import logging
import salt.utils.args import salt.utils.args
import salt.utils.compat import salt.utils.compat
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -46,9 +46,9 @@ try:
from libcloud.loadbalancer.providers import get_driver from libcloud.loadbalancer.providers import get_driver
# pylint: enable=unused-import # pylint: enable=unused-import
if hasattr(libcloud, "__version__") and _LooseVersion( if hasattr(libcloud, "__version__") and Version(libcloud.__version__) < Version(
libcloud.__version__ REQUIRED_LIBCLOUD_VERSION
) < _LooseVersion(REQUIRED_LIBCLOUD_VERSION): ):
raise ImportError() raise ImportError()
logging.getLogger("libcloud").setLevel(logging.CRITICAL) logging.getLogger("libcloud").setLevel(logging.CRITICAL)
HAS_LIBCLOUD = True HAS_LIBCLOUD = True

View file

@ -34,7 +34,7 @@ import logging
import salt.utils.args import salt.utils.args
import salt.utils.compat import salt.utils.compat
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -45,9 +45,9 @@ try:
from libcloud.storage.providers import get_driver from libcloud.storage.providers import get_driver
# pylint: enable=unused-import # pylint: enable=unused-import
if hasattr(libcloud, "__version__") and _LooseVersion( if hasattr(libcloud, "__version__") and Version(libcloud.__version__) < Version(
libcloud.__version__ REQUIRED_LIBCLOUD_VERSION
) < _LooseVersion(REQUIRED_LIBCLOUD_VERSION): ):
raise ImportError() raise ImportError()
logging.getLogger("libcloud").setLevel(logging.CRITICAL) logging.getLogger("libcloud").setLevel(logging.CRITICAL)
HAS_LIBCLOUD = True HAS_LIBCLOUD = True

View file

@ -35,7 +35,7 @@ import salt.utils.odict
import salt.utils.path import salt.utils.path
import salt.utils.stringutils import salt.utils.stringutils
from salt.exceptions import CommandExecutionError, SaltInvocationError from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# Set up logging # Set up logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -116,8 +116,8 @@ def version():
if not __context__.get(k, None): if not __context__.get(k, None):
cversion = __salt__["cmd.run_all"]("lxc-info --version") cversion = __salt__["cmd.run_all"]("lxc-info --version")
if not cversion["retcode"]: if not cversion["retcode"]:
ver = _LooseVersion(cversion["stdout"]) ver = Version(cversion["stdout"])
if ver < _LooseVersion("1.0"): if ver < Version("1.0"):
raise CommandExecutionError("LXC should be at least 1.0") raise CommandExecutionError("LXC should be at least 1.0")
__context__[k] = "{}".format(ver) __context__[k] = "{}".format(ver)
return __context__.get(k, None) return __context__.get(k, None)
@ -878,7 +878,7 @@ def _network_conf(conf_tuples=None, **kwargs):
# if we didn't explicitly say no to # if we didn't explicitly say no to
# (lxc.network.ipv4.gateway: auto) # (lxc.network.ipv4.gateway: auto)
if ( if (
_LooseVersion(version()) <= _LooseVersion("1.0.7") Version(version()) <= Version("1.0.7")
and True not in ["lxc.network.ipv4.gateway" in a for a in ret] and True not in ["lxc.network.ipv4.gateway" in a for a in ret]
and True in ["lxc.network.ipv4" in a for a in ret] and True in ["lxc.network.ipv4" in a for a in ret]
): ):
@ -2129,7 +2129,7 @@ def clone(name, orig, profile=None, network_profile=None, nic_opts=None, **kwarg
if backing in ("dir", "overlayfs", "btrfs"): if backing in ("dir", "overlayfs", "btrfs"):
size = None size = None
# LXC commands and options changed in 2.0 - CF issue #34086 for details # LXC commands and options changed in 2.0 - CF issue #34086 for details
if _LooseVersion(version()) >= _LooseVersion("2.0"): if Version(version()) >= Version("2.0"):
# https://linuxcontainers.org/lxc/manpages//man1/lxc-copy.1.html # https://linuxcontainers.org/lxc/manpages//man1/lxc-copy.1.html
cmd = "lxc-copy" cmd = "lxc-copy"
cmd += " {} -n {} -N {}".format(snapshot, orig, name) cmd += " {} -n {} -N {}".format(snapshot, orig, name)

View file

@ -39,7 +39,7 @@ from datetime import datetime
import salt.utils.decorators.path import salt.utils.decorators.path
import salt.utils.files import salt.utils.files
from salt.exceptions import CommandExecutionError, SaltInvocationError from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
try: try:
import pylxd import pylxd
@ -82,7 +82,7 @@ _connection_pool = {}
def __virtual__(): def __virtual__():
if HAS_PYLXD: if HAS_PYLXD:
if LooseVersion(pylxd_version()) < LooseVersion(_pylxd_minimal_version): if Version(pylxd_version()) < Version(_pylxd_minimal_version):
return ( return (
False, False,
'The lxd execution module cannot be loaded: pylxd "{}" is ' 'The lxd execution module cannot be loaded: pylxd "{}" is '

View file

@ -15,7 +15,7 @@ import sqlite3
import salt.utils.platform import salt.utils.platform
import salt.utils.stringutils import salt.utils.stringutils
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -31,7 +31,7 @@ def __virtual__():
""" """
if not salt.utils.platform.is_darwin(): if not salt.utils.platform.is_darwin():
return False, "Must be run on macOS" return False, "Must be run on macOS"
if _LooseVersion(__grains__["osrelease"]) < salt.utils.stringutils.to_str("10.9"): if Version(__grains__["osrelease"]) < Version("10.9"):
return False, "Must be run on macOS 10.9 or newer" return False, "Must be run on macOS 10.9 or newer"
return __virtualname__ return __virtualname__

View file

@ -36,7 +36,7 @@ import salt.utils.path
import salt.utils.platform import salt.utils.platform
import salt.utils.stringutils import salt.utils.stringutils
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# Define the module's virtual name # Define the module's virtual name
__virtualname__ = "service" __virtualname__ = "service"
@ -79,7 +79,7 @@ def __virtual__():
'Required binary not found: "plutil"', 'Required binary not found: "plutil"',
) )
if _LooseVersion(__grains__["osrelease"]) < _LooseVersion("10.11"): if Version(__grains__["osrelease"]) < Version("10.11"):
return ( return (
False, False,
"Failed to load the mac_service module:\nRequires macOS 10.11 or newer", "Failed to load the mac_service module:\nRequires macOS 10.11 or newer",

View file

@ -18,7 +18,7 @@ import re
import salt.utils.json import salt.utils.json
from salt.exceptions import get_error_message as _get_error_message from salt.exceptions import get_error_message as _get_error_message
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
try: try:
import pymongo import pymongo
@ -336,7 +336,7 @@ def user_list(
output = [] output = []
mongodb_version = _version(mdb) mongodb_version = _version(mdb)
if _LooseVersion(mongodb_version) >= _LooseVersion("2.6"): if Version(mongodb_version) >= Version("2.6"):
for user in mdb.command("usersInfo")["users"]: for user in mdb.command("usersInfo")["users"]:
output.append({"user": user["user"], "roles": user["roles"]}) output.append({"user": user["user"], "roles": user["roles"]})
else: else:

View file

@ -11,7 +11,7 @@ import salt.utils.json
import salt.utils.path import salt.utils.path
import salt.utils.user import salt.utils.user
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -50,7 +50,8 @@ def _check_valid_version():
res = salt.modules.cmdmod.run( res = salt.modules.cmdmod.run(
"{npm} --version".format(npm=npm_path), output_loglevel="quiet" "{npm} --version".format(npm=npm_path), output_loglevel="quiet"
) )
npm_version, valid_version = _LooseVersion(res), _LooseVersion("1.2") npm_version = Version(res)
valid_version = Version("1.2")
# pylint: enable=no-member # pylint: enable=no-member
if npm_version < valid_version: if npm_version < valid_version:
raise CommandExecutionError( raise CommandExecutionError(

View file

@ -33,6 +33,7 @@ import salt.utils.pkg
import salt.utils.stringutils import salt.utils.stringutils
import salt.utils.versions import salt.utils.versions
from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError
from salt.utils.versions import Version
REPO_REGEXP = r'^#?\s*(src|src/gz)\s+([^\s<>]+|"[^<>]+")\s+[^\s<>]+' REPO_REGEXP = r'^#?\s*(src|src/gz)\s+([^\s<>]+|"[^<>]+")\s+[^\s<>]+'
OPKG_CONFDIR = "/etc/opkg" OPKG_CONFDIR = "/etc/opkg"
@ -1229,9 +1230,7 @@ def version_cmp(
["opkg", "--version"], output_loglevel="trace", python_shell=False ["opkg", "--version"], output_loglevel="trace", python_shell=False
) )
opkg_version = output.split(" ")[2].strip() opkg_version = output.split(" ")[2].strip()
if salt.utils.versions.LooseVersion( if Version(opkg_version) >= Version("0.3.4"):
opkg_version
) >= salt.utils.versions.LooseVersion("0.3.4"):
cmd_compare = ["opkg", "compare-versions"] cmd_compare = ["opkg", "compare-versions"]
elif salt.utils.path.which("opkg-compare-versions"): elif salt.utils.path.which("opkg-compare-versions"):
cmd_compare = ["opkg-compare-versions"] cmd_compare = ["opkg-compare-versions"]

View file

@ -20,7 +20,7 @@ import salt.utils.itertools
import salt.utils.pkg import salt.utils.pkg
import salt.utils.systemd import salt.utils.systemd
from salt.exceptions import CommandExecutionError, MinionError from salt.exceptions import CommandExecutionError, MinionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import LooseVersion
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -1036,7 +1036,7 @@ def list_repo_pkgs(*args, **kwargs):
# Sort versions newest to oldest # Sort versions newest to oldest
for pkgname in ret[reponame]: for pkgname in ret[reponame]:
sorted_versions = sorted( sorted_versions = sorted(
(_LooseVersion(x) for x in ret[reponame][pkgname]), reverse=True (LooseVersion(x) for x in ret[reponame][pkgname]), reverse=True
) )
ret[reponame][pkgname] = [x.vstring for x in sorted_versions] ret[reponame][pkgname] = [x.vstring for x in sorted_versions]
return ret return ret
@ -1047,7 +1047,7 @@ def list_repo_pkgs(*args, **kwargs):
byrepo_ret.setdefault(pkgname, []).extend(ret[reponame][pkgname]) byrepo_ret.setdefault(pkgname, []).extend(ret[reponame][pkgname])
for pkgname in byrepo_ret: for pkgname in byrepo_ret:
sorted_versions = sorted( sorted_versions = sorted(
(_LooseVersion(x) for x in byrepo_ret[pkgname]), reverse=True (LooseVersion(x) for x in byrepo_ret[pkgname]), reverse=True
) )
byrepo_ret[pkgname] = [x.vstring for x in sorted_versions] byrepo_ret[pkgname] = [x.vstring for x in sorted_versions]
return byrepo_ret return byrepo_ret

View file

@ -154,10 +154,8 @@ def _get_pip_bin(bin_env):
Locate the pip binary, either from `bin_env` as a virtualenv, as the Locate the pip binary, either from `bin_env` as a virtualenv, as the
executable itself, or from searching conventional filesystem locations executable itself, or from searching conventional filesystem locations
""" """
bundled = _check_bundled()
if not bin_env: if not bin_env:
if bundled: if _check_bundled():
logger.debug("pip: Using pip from bundled app") logger.debug("pip: Using pip from bundled app")
return [os.path.normpath(sys.executable), "pip"] return [os.path.normpath(sys.executable), "pip"]
else: else:

View file

@ -57,7 +57,7 @@ import salt.utils.path
import salt.utils.stringutils import salt.utils.stringutils
from salt.exceptions import CommandExecutionError, SaltInvocationError from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.ext.saslprep import saslprep from salt.ext.saslprep import saslprep
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import LooseVersion
try: try:
import csv import csv
@ -336,7 +336,7 @@ def _parsed_version(
) )
if psql_version: if psql_version:
return _LooseVersion(psql_version) return LooseVersion(psql_version)
else: else:
log.warning( log.warning(
"Attempt to parse version of Postgres server failed. " "Attempt to parse version of Postgres server failed. "
@ -998,11 +998,11 @@ def user_list(
runas=runas, runas=runas,
) )
if ver: if ver:
if ver >= _LooseVersion("9.1"): if ver >= LooseVersion("9.1"):
replication_column = "pg_roles.rolreplication" replication_column = "pg_roles.rolreplication"
else: else:
replication_column = "NULL" replication_column = "NULL"
if ver >= _LooseVersion("9.5"): if ver >= LooseVersion("9.5"):
rolcatupdate_column = "NULL" rolcatupdate_column = "NULL"
else: else:
rolcatupdate_column = "pg_roles.rolcatupdate" rolcatupdate_column = "pg_roles.rolcatupdate"
@ -1790,11 +1790,11 @@ def is_available_extension(
def _pg_is_older_ext_ver(a, b): def _pg_is_older_ext_ver(a, b):
""" """
Compare versions of extensions using salt.utils.versions.LooseVersion. Compare versions of extensions using `looseversion.LooseVersion`.
Returns ``True`` if version a is lesser than b. Returns ``True`` if version a is lesser than b.
""" """
return _LooseVersion(a) < _LooseVersion(b) return LooseVersion(a) < LooseVersion(b)
def is_installed_extension( def is_installed_extension(

View file

@ -16,7 +16,7 @@ import salt.utils.path
import salt.utils.platform import salt.utils.platform
import salt.utils.user import salt.utils.user
from salt.exceptions import CommandExecutionError, SaltInvocationError from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -973,7 +973,7 @@ def list_policies(vhost="/", runas=None):
ret[vhost] = {} ret[vhost] = {}
ret[vhost][name] = {} ret[vhost][name] = {}
if _LooseVersion(version) >= _LooseVersion("3.7"): if Version(version) >= Version("3.7"):
# in version 3.7 the position of apply_to and pattern has been # in version 3.7 the position of apply_to and pattern has been
# switched # switched
ret[vhost][name]["pattern"] = parts[2] ret[vhost][name]["pattern"] = parts[2]

View file

@ -111,7 +111,7 @@ import salt.utils.data
import salt.utils.files import salt.utils.files
import salt.utils.stringutils import salt.utils.stringutils
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
# pylint: disable=C0103 # pylint: disable=C0103
@ -122,7 +122,7 @@ try:
import OpenSSL import OpenSSL
HAS_SSL = True HAS_SSL = True
OpenSSL_version = _LooseVersion(OpenSSL.__dict__.get("__version__", "0.0")) OpenSSL_version = Version(OpenSSL.__dict__.get("__version__", "0.0"))
except ImportError: except ImportError:
pass pass
@ -138,14 +138,14 @@ def __virtual__():
Only load this module if the ca config options are set Only load this module if the ca config options are set
""" """
global X509_EXT_ENABLED global X509_EXT_ENABLED
if HAS_SSL and OpenSSL_version >= _LooseVersion("0.10"): if HAS_SSL and OpenSSL_version >= Version("0.10"):
if OpenSSL_version < _LooseVersion("0.14"): if OpenSSL_version < Version("0.14"):
X509_EXT_ENABLED = False X509_EXT_ENABLED = False
log.debug( log.debug(
"You should upgrade pyOpenSSL to at least 0.14.1 to " "You should upgrade pyOpenSSL to at least 0.14.1 to "
"enable the use of X509 extensions in the tls module" "enable the use of X509 extensions in the tls module"
) )
elif OpenSSL_version <= _LooseVersion("0.15"): elif OpenSSL_version <= Version("0.15"):
log.debug( log.debug(
"You should upgrade pyOpenSSL to at least 0.15.1 to " "You should upgrade pyOpenSSL to at least 0.15.1 to "
"enable the full use of X509 extensions in the tls module" "enable the full use of X509 extensions in the tls module"

View file

@ -7,7 +7,7 @@ import base64
import urllib.parse import urllib.parse
import salt.utils.json import salt.utils.json
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
try: try:
import OpenSSL import OpenSSL
@ -30,8 +30,8 @@ def __virtual__():
OPENSSL_MIN_VER OPENSSL_MIN_VER
), ),
) )
cur_version = _LooseVersion(OpenSSL.__version__) cur_version = Version(OpenSSL.__version__)
min_version = _LooseVersion(OPENSSL_MIN_VER) min_version = Version(OPENSSL_MIN_VER)
if cur_version < min_version: if cur_version < min_version:
return ( return (
False, False,

View file

@ -65,7 +65,7 @@ from salt.exceptions import (
SaltInvocationError, SaltInvocationError,
SaltRenderError, SaltRenderError,
) )
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -2356,7 +2356,7 @@ def _reverse_cmp_pkg_versions(pkg1, pkg2):
""" """
Compare software package versions Compare software package versions
""" """
return 1 if LooseVersion(pkg1) > LooseVersion(pkg2) else -1 return 1 if Version(pkg1) > Version(pkg2) else -1
def _get_latest_pkg_version(pkginfo): def _get_latest_pkg_version(pkginfo):

View file

@ -41,7 +41,7 @@ import salt.utils.pkg.rpm
import salt.utils.systemd import salt.utils.systemd
import salt.utils.versions import salt.utils.versions
from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError from salt.exceptions import CommandExecutionError, MinionError, SaltInvocationError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import LooseVersion
try: try:
import yum import yum
@ -559,7 +559,7 @@ def latest_version(*names, **kwargs):
# Sort by version number (highest to lowest) for loop below # Sort by version number (highest to lowest) for loop below
updates = sorted( updates = sorted(
_yum_pkginfo(out["stdout"]), _yum_pkginfo(out["stdout"]),
key=lambda pkginfo: _LooseVersion(pkginfo.version), key=lambda pkginfo: LooseVersion(pkginfo.version),
reverse=True, reverse=True,
) )
@ -963,14 +963,14 @@ def list_repo_pkgs(*args, **kwargs):
yum_version = ( yum_version = (
None None
if _yum() != "yum" if _yum() != "yum"
else _LooseVersion( else LooseVersion(
__salt__["cmd.run"](["yum", "--version"], python_shell=False) __salt__["cmd.run"](["yum", "--version"], python_shell=False)
.splitlines()[0] .splitlines()[0]
.strip() .strip()
) )
) )
# Really old version of yum; does not even have --showduplicates option # Really old version of yum; does not even have --showduplicates option
if yum_version and yum_version < _LooseVersion("3.2.13"): if yum_version and yum_version < LooseVersion("3.2.13"):
cmd_prefix = ["--quiet"] cmd_prefix = ["--quiet"]
if cacheonly: if cacheonly:
cmd_prefix.append("-C") cmd_prefix.append("-C")
@ -982,7 +982,7 @@ def list_repo_pkgs(*args, **kwargs):
_parse_output(out["stdout"], strict=True) _parse_output(out["stdout"], strict=True)
# The --showduplicates option is added in 3.2.13, but the # The --showduplicates option is added in 3.2.13, but the
# repository-packages subcommand is only in 3.4.3 and newer # repository-packages subcommand is only in 3.4.3 and newer
elif yum_version and yum_version < _LooseVersion("3.4.3"): elif yum_version and yum_version < LooseVersion("3.4.3"):
cmd_prefix = ["--quiet", "--showduplicates"] cmd_prefix = ["--quiet", "--showduplicates"]
if cacheonly: if cacheonly:
cmd_prefix.append("-C") cmd_prefix.append("-C")
@ -1018,7 +1018,7 @@ def list_repo_pkgs(*args, **kwargs):
# Sort versions newest to oldest # Sort versions newest to oldest
for pkgname in ret[reponame]: for pkgname in ret[reponame]:
sorted_versions = sorted( sorted_versions = sorted(
(_LooseVersion(x) for x in ret[reponame][pkgname]), reverse=True (LooseVersion(x) for x in ret[reponame][pkgname]), reverse=True
) )
ret[reponame][pkgname] = [x.vstring for x in sorted_versions] ret[reponame][pkgname] = [x.vstring for x in sorted_versions]
return ret return ret
@ -1029,7 +1029,7 @@ def list_repo_pkgs(*args, **kwargs):
byrepo_ret.setdefault(pkgname, []).extend(ret[reponame][pkgname]) byrepo_ret.setdefault(pkgname, []).extend(ret[reponame][pkgname])
for pkgname in byrepo_ret: for pkgname in byrepo_ret:
sorted_versions = sorted( sorted_versions = sorted(
(_LooseVersion(x) for x in byrepo_ret[pkgname]), reverse=True (LooseVersion(x) for x in byrepo_ret[pkgname]), reverse=True
) )
byrepo_ret[pkgname] = [x.vstring for x in sorted_versions] byrepo_ret[pkgname] = [x.vstring for x in sorted_versions]
return byrepo_ret return byrepo_ret

View file

@ -33,7 +33,7 @@ import salt.utils.files
import salt.utils.http import salt.utils.http
import salt.utils.json import salt.utils.json
from salt.exceptions import SaltException from salt.exceptions import SaltException
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -572,7 +572,7 @@ def user_create(alias, passwd, usrgrps, **connection_args):
username_field = "alias" username_field = "alias"
# Zabbix 5.4 changed object fields # Zabbix 5.4 changed object fields
if _LooseVersion(zabbix_version) > _LooseVersion("5.2"): if Version(zabbix_version) > Version("5.2"):
username_field = "username" username_field = "username"
try: try:
@ -655,7 +655,7 @@ def user_exists(alias, **connection_args):
username_field = "alias" username_field = "alias"
# Zabbix 5.4 changed object fields # Zabbix 5.4 changed object fields
if _LooseVersion(zabbix_version) > _LooseVersion("5.2"): if Version(zabbix_version) > Version("5.2"):
username_field = "username" username_field = "username"
try: try:
@ -697,7 +697,7 @@ def user_get(alias=None, userids=None, **connection_args):
username_field = "alias" username_field = "alias"
# Zabbix 5.4 changed object fields # Zabbix 5.4 changed object fields
if _LooseVersion(zabbix_version) > _LooseVersion("5.2"): if Version(zabbix_version) > Version("5.2"):
username_field = "username" username_field = "username"
try: try:
@ -772,19 +772,13 @@ def user_update(userid, **connection_args):
"userid": userid, "userid": userid,
} }
if ( if Version(zabbix_version) < Version("3.4") and medias is not None:
_LooseVersion(zabbix_version) < _LooseVersion("3.4")
and medias is not None
):
ret = { ret = {
"result": False, "result": False,
"comment": "Setting medias available in Zabbix 3.4+", "comment": "Setting medias available in Zabbix 3.4+",
} }
return ret return ret
elif ( elif Version(zabbix_version) > Version("5.0") and medias is not None:
_LooseVersion(zabbix_version) > _LooseVersion("5.0")
and medias is not None
):
params["medias"] = medias params["medias"] = medias
elif medias is not None: elif medias is not None:
params["user_medias"] = medias params["user_medias"] = medias
@ -833,7 +827,7 @@ def user_getmedia(userids=None, **connection_args):
zabbix_version = apiinfo_version(**connection_args) zabbix_version = apiinfo_version(**connection_args)
ret = False ret = False
if _LooseVersion(zabbix_version) > _LooseVersion("3.4"): if Version(zabbix_version) > Version("3.4"):
users = user_get(userids=userids, **connection_args) users = user_get(userids=userids, **connection_args)
medias = [] medias = []
for user in users: for user in users:
@ -889,7 +883,7 @@ def user_addmedia(
method = "user.addmedia" method = "user.addmedia"
if _LooseVersion(zabbix_version) > _LooseVersion("3.4"): if Version(zabbix_version) > Version("3.4"):
ret = { ret = {
"result": False, "result": False,
"comment": "Method '{}' removed in Zabbix 4.0+ use 'user.update'".format( "comment": "Method '{}' removed in Zabbix 4.0+ use 'user.update'".format(
@ -951,7 +945,7 @@ def user_deletemedia(mediaids, **connection_args):
method = "user.deletemedia" method = "user.deletemedia"
if _LooseVersion(zabbix_version) > _LooseVersion("3.4"): if Version(zabbix_version) > Version("3.4"):
ret = { ret = {
"result": False, "result": False,
"comment": "Method '{}' removed in Zabbix 4.0+ use 'user.update'".format( "comment": "Method '{}' removed in Zabbix 4.0+ use 'user.update'".format(
@ -1107,7 +1101,7 @@ def usergroup_exists(name=None, node=None, nodeids=None, **connection_args):
try: try:
if conn_args: if conn_args:
# usergroup.exists deprecated # usergroup.exists deprecated
if _LooseVersion(zabbix_version) > _LooseVersion("2.5"): if Version(zabbix_version) > Version("2.5"):
if not name: if not name:
name = "" name = ""
ret = usergroup_get(name, None, **connection_args) ret = usergroup_get(name, None, **connection_args)
@ -1127,7 +1121,7 @@ def usergroup_exists(name=None, node=None, nodeids=None, **connection_args):
if name: if name:
params["name"] = name params["name"] = name
# deprecated in 2.4 # deprecated in 2.4
if _LooseVersion(zabbix_version) < _LooseVersion("2.4"): if Version(zabbix_version) < Version("2.4"):
if node: if node:
params["node"] = node params["node"] = node
if nodeids: if nodeids:
@ -1174,7 +1168,7 @@ def usergroup_get(name=None, usrgrpids=None, userids=None, **connection_args):
if conn_args: if conn_args:
method = "usergroup.get" method = "usergroup.get"
# Versions above 2.4 allow retrieving user group permissions # Versions above 2.4 allow retrieving user group permissions
if _LooseVersion(zabbix_version) > _LooseVersion("2.5"): if Version(zabbix_version) > Version("2.5"):
params = {"selectRights": "extend", "output": "extend", "filter": {}} params = {"selectRights": "extend", "output": "extend", "filter": {}}
else: else:
params = {"output": "extend", "filter": {}} params = {"output": "extend", "filter": {}}
@ -1392,7 +1386,7 @@ def host_exists(
try: try:
if conn_args: if conn_args:
# hostgroup.exists deprecated # hostgroup.exists deprecated
if _LooseVersion(zabbix_version) > _LooseVersion("2.5"): if Version(zabbix_version) > Version("2.5"):
if not host: if not host:
host = None host = None
if not name: if not name:
@ -1412,7 +1406,7 @@ def host_exists(
if name: if name:
params["name"] = name params["name"] = name
# deprecated in 2.4 # deprecated in 2.4
if _LooseVersion(zabbix_version) < _LooseVersion("2.4"): if Version(zabbix_version) < Version("2.4"):
if node: if node:
params["node"] = node params["node"] = node
if nodeids: if nodeids:
@ -1774,7 +1768,7 @@ def hostgroup_exists(
try: try:
if conn_args: if conn_args:
# hostgroup.exists deprecated # hostgroup.exists deprecated
if _LooseVersion(zabbix_version) > _LooseVersion("2.5"): if Version(zabbix_version) > Version("2.5"):
if not groupid: if not groupid:
groupid = None groupid = None
if not name: if not name:
@ -1790,7 +1784,7 @@ def hostgroup_exists(
if name: if name:
params["name"] = name params["name"] = name
# deprecated in 2.4 # deprecated in 2.4
if _LooseVersion(zabbix_version) < _LooseVersion("2.4"): if Version(zabbix_version) < Version("2.4"):
if node: if node:
params["node"] = node params["node"] = node
if nodeids: if nodeids:
@ -2470,7 +2464,7 @@ def mediatype_get(name=None, mediatypeids=None, **connection_args):
params = {"output": "extend", "filter": {}} params = {"output": "extend", "filter": {}}
if name: if name:
# since zabbix API 4.4, mediatype has new attribute: name # since zabbix API 4.4, mediatype has new attribute: name
if _LooseVersion(zabbix_version) >= _LooseVersion("4.4"): if Version(zabbix_version) >= Version("4.4"):
params["filter"].setdefault("name", name) params["filter"].setdefault("name", name)
else: else:
params["filter"].setdefault("description", name) params["filter"].setdefault("description", name)
@ -2524,7 +2518,7 @@ def mediatype_create(name, mediatype, **connection_args):
if conn_args: if conn_args:
method = "mediatype.create" method = "mediatype.create"
# since zabbix 4.4 api, mediatype has new attribute: name # since zabbix 4.4 api, mediatype has new attribute: name
if _LooseVersion(zabbix_version) >= _LooseVersion("4.4"): if Version(zabbix_version) >= Version("4.4"):
params = {"name": name} params = {"name": name}
_ignore_name = False _ignore_name = False
else: else:
@ -2766,14 +2760,14 @@ def configuration_import(config_file, rules=None, file_format="xml", **connectio
}, },
"valueMaps": {"createMissing": True, "updateExisting": False}, "valueMaps": {"createMissing": True, "updateExisting": False},
} }
if _LooseVersion(zabbix_version) >= _LooseVersion("3.2"): if Version(zabbix_version) >= Version("3.2"):
# rules/httptests added # rules/httptests added
default_rules["httptests"] = { default_rules["httptests"] = {
"createMissing": True, "createMissing": True,
"updateExisting": True, "updateExisting": True,
"deleteMissing": False, "deleteMissing": False,
} }
if _LooseVersion(zabbix_version) >= _LooseVersion("3.4"): if Version(zabbix_version) >= Version("3.4"):
# rules/applications/upateExisting deprecated # rules/applications/upateExisting deprecated
default_rules["applications"] = {"createMissing": True, "deleteMissing": False} default_rules["applications"] = {"createMissing": True, "deleteMissing": False}
else: else:

View file

@ -7,6 +7,8 @@ This is run by ``salt-api`` and started in a multiprocess.
import logging import logging
import os import os
from salt.utils.versions import Version
# pylint: disable=C0103 # pylint: disable=C0103
@ -39,9 +41,9 @@ def __virtual__():
# CherryPy wasn't imported; explain why # CherryPy wasn't imported; explain why
if cpy_error: if cpy_error:
from salt.utils.versions import LooseVersion as V if "cherrypy" in globals() and Version(cherrypy.__version__) < Version(
cpy_min
if "cherrypy" in globals() and V(cherrypy.__version__) < V(cpy_min): ):
error_msg = "Required version of CherryPy is {} or greater.".format( error_msg = "Required version of CherryPy is {} or greater.".format(
cpy_min cpy_min
) )

View file

@ -3,7 +3,7 @@ import logging
import os import os
import salt.auth import salt.auth
from salt.utils.versions import StrictVersion as _StrictVersion from salt.utils.versions import Version
__virtualname__ = os.path.abspath(__file__).rsplit(os.sep)[-2] or "rest_tornado" __virtualname__ = os.path.abspath(__file__).rsplit(os.sep)[-2] or "rest_tornado"
@ -15,7 +15,7 @@ has_tornado = False
try: try:
import salt.ext.tornado import salt.ext.tornado
if _StrictVersion(salt.ext.tornado.version) >= _StrictVersion(min_tornado_version): if Version(salt.ext.tornado.version) >= Version(min_tornado_version):
has_tornado = True has_tornado = True
else: else:
log.error("rest_tornado requires at least tornado %s", min_tornado_version) log.error("rest_tornado requires at least tornado %s", min_tornado_version)

View file

@ -57,7 +57,7 @@ instance.
import logging import logging
import re import re
from salt.utils.versions import StrictVersion as _StrictVersion from salt.utils.versions import Version
try: try:
import boto.ec2 import boto.ec2
@ -82,8 +82,8 @@ def __virtual__():
""" """
if not HAS_BOTO: if not HAS_BOTO:
return False return False
boto_version = _StrictVersion(boto.__version__) boto_version = Version(boto.__version__)
required_boto_version = _StrictVersion("2.8.0") required_boto_version = Version("2.8.0")
if boto_version < required_boto_version: if boto_version < required_boto_version:
log.error( log.error(
"%s: installed boto version %s < %s, can't retrieve instance data", "%s: installed boto version %s < %s, can't retrieve instance data",

View file

@ -96,12 +96,12 @@ import logging
import salt.returners import salt.returners
import salt.utils.jid import salt.utils.jid
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
try: try:
import pymongo import pymongo
PYMONGO_VERSION = _LooseVersion(pymongo.version) PYMONGO_VERSION = Version(pymongo.version)
HAS_PYMONGO = True HAS_PYMONGO = True
except ImportError: except ImportError:
HAS_PYMONGO = False HAS_PYMONGO = False
@ -167,7 +167,7 @@ def _get_conn(ret):
# at some point we should remove support for # at some point we should remove support for
# pymongo versions < 2.3 until then there are # pymongo versions < 2.3 until then there are
# a bunch of these sections that need to be supported # a bunch of these sections that need to be supported
if uri and PYMONGO_VERSION > _LooseVersion("2.3"): if uri and PYMONGO_VERSION > Version("2.3"):
if uri and host: if uri and host:
raise salt.exceptions.SaltConfigurationError( raise salt.exceptions.SaltConfigurationError(
"Mongo returner expects either uri or host configuration. Both were" "Mongo returner expects either uri or host configuration. Both were"
@ -177,7 +177,7 @@ def _get_conn(ret):
conn = pymongo.MongoClient(uri) conn = pymongo.MongoClient(uri)
mdb = conn.get_database() mdb = conn.get_database()
else: else:
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
conn = pymongo.MongoClient(host, port, username=user, password=password) conn = pymongo.MongoClient(host, port, username=user, password=password)
else: else:
if uri: if uri:
@ -189,7 +189,7 @@ def _get_conn(ret):
mdb = conn[db_] mdb = conn[db_]
if indexes: if indexes:
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
mdb.saltReturns.create_index("minion") mdb.saltReturns.create_index("minion")
mdb.saltReturns.create_index("jid") mdb.saltReturns.create_index("jid")
mdb.jobs.create_index("jid") mdb.jobs.create_index("jid")
@ -236,7 +236,7 @@ def returner(ret):
# #
# again we run into the issue with deprecated code from previous versions # again we run into the issue with deprecated code from previous versions
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
# using .copy() to ensure that the original data is not changed, raising issue with pymongo team # using .copy() to ensure that the original data is not changed, raising issue with pymongo team
mdb.saltReturns.insert_one(sdata.copy()) mdb.saltReturns.insert_one(sdata.copy())
else: else:
@ -291,7 +291,7 @@ def save_load(jid, load, minions=None):
conn, mdb = _get_conn(ret=None) conn, mdb = _get_conn(ret=None)
to_save = _safe_copy(load) to_save = _safe_copy(load)
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
# using .copy() to ensure original data for load is unchanged # using .copy() to ensure original data for load is unchanged
mdb.jobs.insert_one(to_save) mdb.jobs.insert_one(to_save)
else: else:
@ -384,7 +384,7 @@ def event_return(events):
if isinstance(events, dict): if isinstance(events, dict):
log.debug(events) log.debug(events)
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
mdb.events.insert_one(events.copy()) mdb.events.insert_one(events.copy())
else: else:
mdb.events.insert(events.copy()) mdb.events.insert(events.copy())

View file

@ -64,12 +64,12 @@ import logging
import salt.returners import salt.returners
import salt.utils.jid import salt.utils.jid
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
try: try:
import pymongo import pymongo
PYMONGO_VERSION = _LooseVersion(pymongo.version) PYMONGO_VERSION = Version(pymongo.version)
HAS_PYMONGO = True HAS_PYMONGO = True
except ImportError: except ImportError:
HAS_PYMONGO = False HAS_PYMONGO = False
@ -136,7 +136,7 @@ def _get_conn(ret):
# pymongo versions < 2.3 until then there are # pymongo versions < 2.3 until then there are
# a bunch of these sections that need to be supported # a bunch of these sections that need to be supported
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
conn = pymongo.MongoClient(host, port) conn = pymongo.MongoClient(host, port)
else: else:
conn = pymongo.Connection(host, port) conn = pymongo.Connection(host, port)
@ -146,7 +146,7 @@ def _get_conn(ret):
mdb.authenticate(user, password) mdb.authenticate(user, password)
if indexes: if indexes:
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
mdb.saltReturns.create_index("minion") mdb.saltReturns.create_index("minion")
mdb.saltReturns.create_index("jid") mdb.saltReturns.create_index("jid")
@ -194,7 +194,7 @@ def returner(ret):
# again we run into the issue with deprecated code from previous versions # again we run into the issue with deprecated code from previous versions
if PYMONGO_VERSION > _LooseVersion("2.3"): if PYMONGO_VERSION > Version("2.3"):
# using .copy() to ensure original data for load is unchanged # using .copy() to ensure original data for load is unchanged
mdb.saltReturns.insert_one(sdata.copy()) mdb.saltReturns.insert_one(sdata.copy())
else: else:

View file

@ -71,7 +71,7 @@ import logging
import pprint import pprint
import salt.returners import salt.returners
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
HAS_LIBS = False HAS_LIBS = False
try: try:
@ -127,8 +127,8 @@ def __virtual__():
import sleekxmpp # pylint: disable=3rd-party-module-not-gated import sleekxmpp # pylint: disable=3rd-party-module-not-gated
# Certain XMPP functionaility we're using doesn't work with versions under 1.3.1 # Certain XMPP functionaility we're using doesn't work with versions under 1.3.1
sleekxmpp_version = _LooseVersion(sleekxmpp.__version__) sleekxmpp_version = Version(sleekxmpp.__version__)
valid_version = _LooseVersion(min_version) valid_version = Version(min_version)
if sleekxmpp_version >= valid_version: if sleekxmpp_version >= valid_version:
return __virtualname__ return __virtualname__
return ( return (

View file

@ -31,6 +31,12 @@ PER_REMOTE_ONLY = salt.utils.gitfs.PER_REMOTE_ONLY
GLOBAL_ONLY = ("branch",) GLOBAL_ONLY = ("branch",)
def _legacy_git():
return not any(
(salt.utils.gitfs.GITPYTHON_VERSION, salt.utils.gitfs.PYGIT2_VERSION)
)
def genrepo(opts=None, fire_event=True): def genrepo(opts=None, fire_event=True):
""" """
Generate winrepo_cachefile based on sls files in the winrepo_dir Generate winrepo_cachefile based on sls files in the winrepo_dir
@ -154,9 +160,7 @@ def update_git_repos(opts=None, clean=False, masterless=False):
ret = {} ret = {}
for remotes, base_dir in winrepo_cfg: for remotes, base_dir in winrepo_cfg:
if not any( if _legacy_git():
(salt.utils.gitfs.GITPYTHON_VERSION, salt.utils.gitfs.PYGIT2_VERSION)
):
# Use legacy code # Use legacy code
winrepo_result = {} winrepo_result = {}
for remote_info in remotes: for remote_info in remotes:

View file

@ -47,7 +47,7 @@ Manage Elasticsearch Service
import logging import logging
import salt.utils.json import salt.utils.json
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
__virtualname__ = "boto3_elasticsearch" __virtualname__ = "boto3_elasticsearch"
@ -544,7 +544,7 @@ def upgraded(
"at the desired version {}" "at the desired version {}"
"".format(name, elasticsearch_version) "".format(name, elasticsearch_version)
) )
elif LooseVersion(elasticsearch_version) < LooseVersion(current_version): elif Version(elasticsearch_version) < Version(current_version):
ret["result"] = False ret["result"] = False
ret["comment"].append( ret["comment"].append(
'Elasticsearch domain "{}" cannot be downgraded ' 'Elasticsearch domain "{}" cannot be downgraded '

View file

@ -21,7 +21,7 @@ import salt.utils.files
import salt.utils.url import salt.utils.url
import salt.utils.versions import salt.utils.versions
from salt.exceptions import CommandExecutionError from salt.exceptions import CommandExecutionError
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -32,8 +32,8 @@ def __virtual__():
""" """
if "git.version" not in __salt__: if "git.version" not in __salt__:
return (False, "git module could not be loaded") return (False, "git module could not be loaded")
git_ver = _LooseVersion(__salt__["git.version"](versioninfo=False)) git_ver = Version(__salt__["git.version"](versioninfo=False))
return git_ver >= _LooseVersion("1.6.5") return git_ver >= Version("1.6.5")
def _revs_equal(rev1, rev2, rev_type): def _revs_equal(rev1, rev2, rev_type):
@ -88,10 +88,10 @@ def _get_branch_opts(
return None return None
if git_ver is None: if git_ver is None:
git_ver = _LooseVersion(__salt__["git.version"](versioninfo=False)) git_ver = Version(__salt__["git.version"](versioninfo=False))
ret = [] ret = []
if git_ver >= _LooseVersion("1.8.0"): if git_ver >= Version("1.8.0"):
ret.extend(["--set-upstream-to", desired_upstream]) ret.extend(["--set-upstream-to", desired_upstream])
else: else:
ret.append("--set-upstream") ret.append("--set-upstream")
@ -828,7 +828,7 @@ def latest(
"No revision matching '{}' exists in the remote repository".format(rev), "No revision matching '{}' exists in the remote repository".format(rev),
) )
git_ver = _LooseVersion(__salt__["git.version"](versioninfo=False)) git_ver = Version(__salt__["git.version"](versioninfo=False))
check = "refs" if bare else ".git" check = "refs" if bare else ".git"
gitdir = os.path.join(target, check) gitdir = os.path.join(target, check)
@ -1313,7 +1313,7 @@ def latest(
# can only do this if the git version is 1.8.0 or newer, as # can only do this if the git version is 1.8.0 or newer, as
# the --unset-upstream option was not added until that # the --unset-upstream option was not added until that
# version. # version.
if git_ver >= _LooseVersion("1.8.0"): if git_ver >= Version("1.8.0"):
upstream_action = "Tracking branch was unset" upstream_action = "Tracking branch was unset"
branch_opts = ["--unset-upstream"] branch_opts = ["--unset-upstream"]
else: else:
@ -1575,7 +1575,7 @@ def latest(
output_encoding=output_encoding, output_encoding=output_encoding,
): ):
if git_ver >= _LooseVersion("1.8.1.6"): if git_ver >= Version("1.8.1.6"):
# --ff-only added in version 1.8.1.6. It's not # --ff-only added in version 1.8.1.6. It's not
# 100% necessary, but if we can use it, we'll # 100% necessary, but if we can use it, we'll
# ensure that the merge doesn't go through if # ensure that the merge doesn't go through if
@ -1909,7 +1909,7 @@ def latest(
# we can only do this if the git version is 1.8.0 or # we can only do this if the git version is 1.8.0 or
# newer, as the --unset-upstream option was not added # newer, as the --unset-upstream option was not added
# until that version. # until that version.
if git_ver >= _LooseVersion("1.8.0"): if git_ver >= Version("1.8.0"):
upstream_action = "Tracking branch was unset" upstream_action = "Tracking branch was unset"
branch_opts = ["--unset-upstream"] branch_opts = ["--unset-upstream"]
else: else:

View file

@ -14,7 +14,7 @@ Install, enable and disable assistive access on macOS minions
import logging import logging
import salt.utils.platform import salt.utils.platform
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -25,9 +25,9 @@ def __virtual__():
""" """
Only work on Mac OS Only work on Mac OS
""" """
if salt.utils.platform.is_darwin() and _LooseVersion( if salt.utils.platform.is_darwin() and Version(__grains__["osrelease"]) >= Version(
__grains__["osrelease"] "10.9"
) >= _LooseVersion("10.9"): ):
return True return True
return (False, "Only supported on Mac OS 10.9+") return (False, "Only supported on Mac OS 10.9+")

View file

@ -12,7 +12,7 @@ from copy import deepcopy
import salt.utils.json import salt.utils.json
from salt.exceptions import SaltException from salt.exceptions import SaltException
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -313,7 +313,7 @@ def present(alias, passwd, usrgrps, medias=None, password_reset=False, **kwargs)
if update_usrgrps or password_reset or update_medias: if update_usrgrps or password_reset or update_medias:
ret["comment"] = comment_user_updated ret["comment"] = comment_user_updated
if _LooseVersion(zabbix_version) > _LooseVersion("3.4"): if Version(zabbix_version) > Version("3.4"):
updates = deepcopy(connection_args) updates = deepcopy(connection_args)
if update_usrgrps: if update_usrgrps:
updates["usrgrps"] = usrgrps updates["usrgrps"] = usrgrps

View file

@ -39,7 +39,7 @@ from salt.exceptions import FileserverConfigError, GitLockError, get_error_messa
from salt.utils.event import tagify from salt.utils.event import tagify
from salt.utils.odict import OrderedDict from salt.utils.odict import OrderedDict
from salt.utils.process import os_is_running as pid_exists from salt.utils.process import os_is_running as pid_exists
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
VALID_REF_TYPES = _DEFAULT_MASTER_OPTS["gitfs_ref_types"] VALID_REF_TYPES = _DEFAULT_MASTER_OPTS["gitfs_ref_types"]
@ -95,7 +95,7 @@ try:
import git import git
import gitdb import gitdb
GITPYTHON_VERSION = _LooseVersion(git.__version__) GITPYTHON_VERSION = Version(git.__version__)
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
GITPYTHON_VERSION = None GITPYTHON_VERSION = None
@ -106,13 +106,13 @@ try:
with warnings.catch_warnings(): with warnings.catch_warnings():
warnings.simplefilter("ignore") warnings.simplefilter("ignore")
import pygit2 import pygit2
PYGIT2_VERSION = _LooseVersion(pygit2.__version__) PYGIT2_VERSION = Version(pygit2.__version__)
LIBGIT2_VERSION = _LooseVersion(pygit2.LIBGIT2_VERSION) LIBGIT2_VERSION = Version(pygit2.LIBGIT2_VERSION)
# Work around upstream bug where bytestrings were being decoded using the # Work around upstream bug where bytestrings were being decoded using the
# default encoding (which is usually ascii on Python 2). This was fixed # default encoding (which is usually ascii on Python 2). This was fixed
# on 2 Feb 2018, so releases prior to 0.26.3 will need a workaround. # on 2 Feb 2018, so releases prior to 0.26.3 will need a workaround.
if PYGIT2_VERSION <= _LooseVersion("0.26.3"): if PYGIT2_VERSION <= Version("0.26.3"):
try: try:
import pygit2.ffi import pygit2.ffi
import pygit2.remote import pygit2.remote
@ -150,9 +150,9 @@ except Exception as exc: # pylint: disable=broad-except
# pylint: enable=import-error # pylint: enable=import-error
# Minimum versions for backend providers # Minimum versions for backend providers
GITPYTHON_MINVER = _LooseVersion("0.3") GITPYTHON_MINVER = Version("0.3")
PYGIT2_MINVER = _LooseVersion("0.20.3") PYGIT2_MINVER = Version("0.20.3")
LIBGIT2_MINVER = _LooseVersion("0.20.0") LIBGIT2_MINVER = Version("0.20.0")
def enforce_types(key, val): def enforce_types(key, val):
@ -1780,7 +1780,7 @@ class Pygit2(GitProvider):
self.gitdir = salt.utils.path.join(self.repo.workdir, ".git") self.gitdir = salt.utils.path.join(self.repo.workdir, ".git")
self.enforce_git_config() self.enforce_git_config()
git_config = os.path.join(self.gitdir, "config") git_config = os.path.join(self.gitdir, "config")
if os.path.exists(git_config) and PYGIT2_VERSION >= _LooseVersion("0.28.0"): if os.path.exists(git_config) and PYGIT2_VERSION >= Version("0.28.0"):
self.repo.config.add_file(git_config) self.repo.config.add_file(git_config)
return new return new
@ -2057,7 +2057,7 @@ class Pygit2(GitProvider):
""" """
Assign attributes for pygit2 callbacks Assign attributes for pygit2 callbacks
""" """
if PYGIT2_VERSION >= _LooseVersion("0.23.2"): if PYGIT2_VERSION >= Version("0.23.2"):
self.remotecallbacks = pygit2.RemoteCallbacks(credentials=self.credentials) self.remotecallbacks = pygit2.RemoteCallbacks(credentials=self.credentials)
if not self.ssl_verify: if not self.ssl_verify:
# Override the certificate_check function with a lambda that # Override the certificate_check function with a lambda that

View file

@ -33,7 +33,7 @@ import salt.utils.yaml
from salt.exceptions import TemplateError from salt.exceptions import TemplateError
from salt.utils.decorators.jinja import jinja_filter, jinja_global, jinja_test from salt.utils.decorators.jinja import jinja_filter, jinja_global, jinja_test
from salt.utils.odict import OrderedDict from salt.utils.odict import OrderedDict
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
try: try:
from markupsafe import Markup from markupsafe import Markup
@ -46,7 +46,7 @@ log = logging.getLogger(__name__)
__all__ = ["SaltCacheLoader", "SerializerExtension"] __all__ = ["SaltCacheLoader", "SerializerExtension"]
GLOBAL_UUID = uuid.UUID("91633EBF-1C86-5E33-935A-28061F4B480E") GLOBAL_UUID = uuid.UUID("91633EBF-1C86-5E33-935A-28061F4B480E")
JINJA_VERSION = LooseVersion(jinja2.__version__) JINJA_VERSION = Version(jinja2.__version__)
class SaltCacheLoader(BaseLoader): class SaltCacheLoader(BaseLoader):

View file

@ -26,7 +26,7 @@ import salt.utils.stringutils
from salt._compat import ipaddress from salt._compat import ipaddress
from salt.exceptions import SaltClientError, SaltSystemExit from salt.exceptions import SaltClientError, SaltSystemExit
from salt.utils.decorators.jinja import jinja_filter from salt.utils.decorators.jinja import jinja_filter
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
try: try:
import salt.utils.win_network import salt.utils.win_network
@ -1096,7 +1096,7 @@ def netbsd_interfaces():
address) address)
""" """
# NetBSD versions prior to 8.0 can still use linux_interfaces() # NetBSD versions prior to 8.0 can still use linux_interfaces()
if LooseVersion(os.uname()[2]) < LooseVersion("8.0"): if Version(os.uname()[2]) < Version("8.0"):
return linux_interfaces() return linux_interfaces()
ifconfig_path = salt.utils.path.which("ifconfig") ifconfig_path = salt.utils.path.which("ifconfig")

View file

@ -10,7 +10,7 @@ import time
import salt.utils.cloud import salt.utils.cloud
import salt.utils.files import salt.utils.files
from salt.exceptions import SaltCloudSystemExit from salt.exceptions import SaltCloudSystemExit
from salt.utils.versions import LooseVersion as _LooseVersion from salt.utils.versions import Version
HAS_NOVA = False HAS_NOVA = False
# pylint: disable=import-error # pylint: disable=import-error
@ -63,9 +63,9 @@ CLIENT_BDM2_KEYS = {
def check_nova(): def check_nova():
if HAS_NOVA: if HAS_NOVA:
novaclient_ver = _LooseVersion(novaclient.__version__) novaclient_ver = Version(novaclient.__version__)
min_ver = _LooseVersion(NOVACLIENT_MINVER) min_ver = Version(NOVACLIENT_MINVER)
max_ver = _LooseVersion(NOVACLIENT_MAXVER) max_ver = Version(NOVACLIENT_MAXVER)
if min_ver <= novaclient_ver <= max_ver: if min_ver <= novaclient_ver <= max_ver:
return HAS_NOVA return HAS_NOVA
elif novaclient_ver > max_ver: elif novaclient_ver > max_ver:

View file

@ -1,16 +1,3 @@
# Copyright 2017 Damon Atkins
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
r""" r"""
Collect information about software installed on Windows OS Collect information about software installed on Windows OS
================ ================
@ -23,12 +10,6 @@ Collect information about software installed on Windows OS
Known Issue: install_date may not match Control Panel\Programs\Programs and Features Known Issue: install_date may not match Control Panel\Programs\Programs and Features
""" """
# Note although this code will work with Python 2.7, win32api does not
# support Unicode. i.e non ASCII characters may be returned with unexpected
# results e.g. a '?' instead of the correct character
# Python 3.6 or newer is recommended.
import collections import collections
import datetime import datetime
import locale import locale
@ -72,7 +53,7 @@ try:
except ImportError: except ImportError:
from collections import OrderedDict from collections import OrderedDict
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
# pylint: disable=too-many-instance-attributes # pylint: disable=too-many-instance-attributes
@ -864,14 +845,14 @@ class WinSoftware:
""" """
Used for sorting version numbers oldest to latest Used for sorting version numbers oldest to latest
""" """
return 1 if LooseVersion(ver1) > LooseVersion(ver2) else -1 return 1 if Version(ver1) > Version(ver2) else -1
@staticmethod @staticmethod
def __latest_to_oldest_version(ver1, ver2): def __latest_to_oldest_version(ver1, ver2):
""" """
Used for sorting version numbers, latest to oldest Used for sorting version numbers, latest to oldest
""" """
return 1 if LooseVersion(ver1) < LooseVersion(ver2) else -1 return 1 if Version(ver1) < Version(ver2) else -1
def pkg_version_list(self, pkg_id): def pkg_version_list(self, pkg_id):
""" """
@ -1189,7 +1170,7 @@ class WinSoftware:
# Not expecting the list to be big, simple search and insert # Not expecting the list to be big, simple search and insert
insert_point = 0 insert_point = 0
for ver_item in self.__reg_software[dict_key]: for ver_item in self.__reg_software[dict_key]:
if LooseVersion(version_text) <= LooseVersion(ver_item): if Version(version_text) <= Version(ver_item):
break break
insert_point += 1 insert_point += 1
self.__reg_software[dict_key].insert(insert_point, version_text) self.__reg_software[dict_key].insert(insert_point, version_text)

View file

@ -29,7 +29,7 @@ from salt.exceptions import CommandExecutionError, SaltInvocationError, SaltRend
from salt.loader.context import NamedLoaderContext from salt.loader.context import NamedLoaderContext
from salt.utils.decorators.jinja import JinjaFilter, JinjaGlobal, JinjaTest from salt.utils.decorators.jinja import JinjaFilter, JinjaGlobal, JinjaTest
from salt.utils.odict import OrderedDict from salt.utils.odict import OrderedDict
from salt.utils.versions import LooseVersion from salt.utils.versions import Version
if sys.version_info[:2] >= (3, 5): if sys.version_info[:2] >= (3, 5):
import importlib.machinery # pylint: disable=no-name-in-module,import-error import importlib.machinery # pylint: disable=no-name-in-module,import-error
@ -434,7 +434,7 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
indent_filter = jinja_env.filters.get("indent") indent_filter = jinja_env.filters.get("indent")
jinja_env.tests.update(JinjaTest.salt_jinja_tests) jinja_env.tests.update(JinjaTest.salt_jinja_tests)
jinja_env.filters.update(JinjaFilter.salt_jinja_filters) jinja_env.filters.update(JinjaFilter.salt_jinja_filters)
if salt.utils.jinja.JINJA_VERSION >= LooseVersion("2.11"): if salt.utils.jinja.JINJA_VERSION >= Version("2.11"):
# Use the existing indent filter on Jinja versions where it's not broken # Use the existing indent filter on Jinja versions where it's not broken
jinja_env.filters["indent"] = indent_filter jinja_env.filters["indent"] = indent_filter
jinja_env.globals.update(JinjaGlobal.salt_jinja_globals) jinja_env.globals.update(JinjaGlobal.salt_jinja_globals)

View file

@ -17,7 +17,9 @@ import zipfile
import distro import distro
import jinja2 import jinja2
import looseversion
import msgpack import msgpack
import packaging
import yaml import yaml
import salt import salt
@ -279,6 +281,8 @@ def get_tops_python(py_ver, exclude=None, ext_py_ver=None):
"ssl_match_hostname", "ssl_match_hostname",
"markupsafe", "markupsafe",
"backports_abc", "backports_abc",
"looseversion",
"packaging",
] ]
if ext_py_ver and tuple(ext_py_ver) >= (3, 0): if ext_py_ver and tuple(ext_py_ver) >= (3, 0):
mods.append("distro") mods.append("distro")
@ -426,6 +430,8 @@ def get_tops(extra_mods="", so_mods=""):
ssl_match_hostname, ssl_match_hostname,
markupsafe, markupsafe,
backports_abc, backports_abc,
looseversion,
packaging,
] ]
modules = find_site_modules("contextvars") modules = find_site_modules("contextvars")
if modules: if modules:

View file

@ -1,13 +1,10 @@
""" """
:copyright: Copyright 2017 by the SaltStack Team, see AUTHORS for more details.
:license: Apache 2.0, see LICENSE for more details.
salt.utils.versions salt.utils.versions
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Version parsing based on distutils.version which works under python 3 Version parsing based on `packaging.version` and `looseversion.LooseVersion`
because on python 3 you can no longer compare strings against integers. which works under python 3 because on python 3 you can no longer compare
strings against integers.
""" """
@ -18,40 +15,49 @@ import numbers
import sys import sys
import warnings import warnings
# pylint: disable=blacklisted-module import looseversion
try: import packaging.version
from setuptools.distutils.version import LooseVersion as _LooseVersion
from setuptools.distutils.version import StrictVersion as _StrictVersion
except ImportError:
try:
from setuptools._distutils.version import LooseVersion as _LooseVersion
from setuptools._distutils.version import StrictVersion as _StrictVersion
except ImportError:
from distutils.version import LooseVersion as _LooseVersion
from distutils.version import StrictVersion as _StrictVersion
# pylint: enable=blacklisted-module
import salt.version import salt.version
# pylint: disable=blacklisted-module
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class StrictVersion(_StrictVersion): class Version(packaging.version.Version):
def parse(self, vstring): def __lt__(self, other):
_StrictVersion.parse(self, vstring)
def _cmp(self, other):
if isinstance(other, str): if isinstance(other, str):
other = StrictVersion(other) other = Version(other)
return _StrictVersion._cmp(self, other) return super().__lt__(other)
def __le__(self, other):
if isinstance(other, str):
other = Version(other)
return super().__le__(other)
def __eq__(self, other):
if isinstance(other, str):
other = Version(other)
return super().__eq__(other)
def __ge__(self, other):
if isinstance(other, str):
other = Version(other)
return super().__ge__(other)
def __gt__(self, other):
if isinstance(other, str):
other = Version(other)
return super().__gt__(other)
def __ne__(self, other):
if isinstance(other, str):
other = Version(other)
return super().__ne__(other)
class LooseVersion(_LooseVersion): class LooseVersion(looseversion.LooseVersion):
def parse(self, vstring): def parse(self, vstring):
_LooseVersion.parse(self, vstring) super().parse(vstring)
# Convert every part of the version to string in order to be able to compare # Convert every part of the version to string in order to be able to compare
self._str_version = [ self._str_version = [
str(vp).zfill(8) if isinstance(vp, int) else vp for vp in self.version str(vp).zfill(8) if isinstance(vp, int) else vp for vp in self.version
@ -68,7 +74,7 @@ class LooseVersion(_LooseVersion):
break break
if string_in_version is False: if string_in_version is False:
return _LooseVersion._cmp(self, other) return super()._cmp(other)
# If we reached this far, it means at least a part of the version contains a string # If we reached this far, it means at least a part of the version contains a string
# In python 3, strings and integers are not comparable # In python 3, strings and integers are not comparable
@ -313,7 +319,7 @@ def kwargs_warn_until(
def version_cmp(pkg1, pkg2, ignore_epoch=False): def version_cmp(pkg1, pkg2, ignore_epoch=False):
""" """
Compares two version strings using salt.utils.versions.LooseVersion. This Compares two version strings using `LooseVersion`. This
is a fallback for providers which don't have a version comparison utility is a fallback for providers which don't have a version comparison utility
built into them. Return -1 if version1 < version2, 0 if version1 == built into them. Return -1 if version1 < version2, 0 if version1 ==
version2, and 1 if version1 > version2. Return None if there was a problem version2, and 1 if version1 > version2. Return None if there was a problem

Some files were not shown because too many files have changed in this diff Show more