Skip to content

Commit fb037a7

Browse files
authored
Merge pull request #346 from reef-technologies/nox-session-install-fix
Replace nox session.install() with session.run('pip', 'install')
2 parents 764e496 + 4b930f5 commit fb037a7

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Fixed
1010
* Fix: replace `ReplicationScanResult.source_has_sse_c_enabled` with `source_encryption_mode`
1111

12+
### Infrastructure
13+
* Fix nox's deprecated `session.install()` calls
14+
1215
## [1.17.3] - 2022-07-15
1316

1417
### Fixed

doc/source/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Glossary
55
.. glossary::
66

77
absoluteMinimumPartSize
8-
The smallest large file part size, as indicated during authorization process by the server (in 2019 it used to be ``5MB``, but the server can set it dynamincally)
8+
The smallest large file part size, as indicated during authorization process by the server (in 2019 it used to be ``5MB``, but the server can set it dynamically)
99

1010
account ID
1111
An identifier of the B2 account (not login). Looks like this: ``4ba5845d7aaf``.

noxfile.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ def install_myself(session, extras=None):
5959
if extras:
6060
arg += '[%s]' % ','.join(extras)
6161

62-
session.install('-e', arg)
62+
session.run('pip', 'install', '-e', arg)
6363

6464

6565
@nox.session(name='format', python=PYTHON_DEFAULT_VERSION)
6666
def format_(session):
6767
"""Format the code."""
68-
session.install(*REQUIREMENTS_FORMAT)
68+
session.run('pip', 'install', *REQUIREMENTS_FORMAT)
6969
# TODO: incremental mode for yapf
7070
session.run('yapf', '--in-place', '--parallel', '--recursive', *PY_PATHS)
7171
# TODO: uncomment if we want to use isort and docformatter
@@ -84,7 +84,7 @@ def format_(session):
8484
def lint(session):
8585
"""Run linters."""
8686
install_myself(session)
87-
session.install(*REQUIREMENTS_LINT)
87+
session.run('pip', 'install', *REQUIREMENTS_LINT)
8888
session.run('yapf', '--diff', '--parallel', '--recursive', *PY_PATHS)
8989
# TODO: uncomment if we want to use isort and docformatter
9090
# session.run('isort', '--check', *PY_PATHS)
@@ -115,7 +115,7 @@ def lint(session):
115115
def unit(session):
116116
"""Run unit tests."""
117117
install_myself(session)
118-
session.install(*REQUIREMENTS_TEST)
118+
session.run('pip', 'install', *REQUIREMENTS_TEST)
119119
args = ['--doctest-modules', '-p', 'pyfakefs', '-n', 'auto']
120120
if not SKIP_COVERAGE:
121121
args += ['--cov=b2sdk', '--cov-branch', '--cov-report=xml']
@@ -135,15 +135,15 @@ def unit(session):
135135
def integration(session):
136136
"""Run integration tests."""
137137
install_myself(session)
138-
session.install(*REQUIREMENTS_TEST)
138+
session.run('pip', 'install', *REQUIREMENTS_TEST)
139139
session.run('pytest', '-s', *session.posargs, 'test/integration')
140140

141141

142142
@nox.session(python=PYTHON_DEFAULT_VERSION)
143143
def cleanup_old_buckets(session):
144144
"""Remove buckets from previous test runs."""
145145
install_myself(session)
146-
session.install(*REQUIREMENTS_TEST)
146+
session.run('pip', 'install', *REQUIREMENTS_TEST)
147147
session.run('python', '-m', 'test.integration.cleanup_buckets')
148148

149149

@@ -161,7 +161,7 @@ def test(session):
161161
@nox.session
162162
def cover(session):
163163
"""Perform coverage analysis."""
164-
session.install('coverage')
164+
session.run('pip', 'install', 'coverage')
165165
session.run('coverage', 'report', '--fail-under=75', '--show-missing', '--skip-covered')
166166
session.run('coverage', 'erase')
167167

@@ -170,7 +170,7 @@ def cover(session):
170170
def build(session):
171171
"""Build the distribution."""
172172
# TODO: consider using wheel as well
173-
session.install(*REQUIREMENTS_BUILD)
173+
session.run('pip', 'install', *REQUIREMENTS_BUILD)
174174
session.run('python', 'setup.py', 'check', '--metadata', '--strict')
175175
session.run('rm', '-rf', 'build', 'dist', 'b2sdk.egg-info', external=True)
176176
session.run('python', 'setup.py', 'sdist', *session.posargs)

0 commit comments

Comments
 (0)