Commit 6197638
authored
chore(deps): update dependency pytest to v6.2.1 (GoogleCloudPlatform#5076)
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [pytest](https://docs.pytest.org/en/latest/) ([source](https://togithub.com/pytest-dev/pytest)) | minor | `==6.1.2` -> `==6.2.1` |
---
### Release Notes
<details>
<summary>pytest-dev/pytest</summary>
### [`v6.2.1`](https://togithub.com/pytest-dev/pytest/releases/6.2.1)
[Compare Source](https://togithub.com/pytest-dev/pytest/compare/6.2.0...6.2.1)
# pytest 6.2.1 (2020-12-15)
## Bug Fixes
- [#&GoogleCloudPlatform#8203;7678](https://togithub.com/pytest-dev/pytest/issues/7678): Fixed bug where `ImportPathMismatchError` would be raised for files compiled in
the host and loaded later from an UNC mounted path (Windows).
- [#&GoogleCloudPlatform#8203;8132](https://togithub.com/pytest-dev/pytest/issues/8132): Fixed regression in `approx`: in 6.2.0 `approx` no longer raises
`TypeError` when dealing with non-numeric types, falling back to normal comparison.
Before 6.2.0, array types like tf.DeviceArray fell through to the scalar case,
and happened to compare correctly to a scalar if they had only one element.
After 6.2.0, these types began failing, because they inherited neither from
standard Python number hierarchy nor from `numpy.ndarray`.
`approx` now converts arguments to `numpy.ndarray` if they expose the array
protocol and are not scalars. This treats array-like objects like numpy arrays,
regardless of size.
### [`v6.2.0`](https://togithub.com/pytest-dev/pytest/releases/6.2.0)
[Compare Source](https://togithub.com/pytest-dev/pytest/compare/6.1.2...6.2.0)
# pytest 6.2.0 (2020-12-12)
## Breaking Changes
- [#&GoogleCloudPlatform#8203;7808](https://togithub.com/pytest-dev/pytest/issues/7808): pytest now supports python3.6+ only.
## Deprecations
- [#&GoogleCloudPlatform#8203;7469](https://togithub.com/pytest-dev/pytest/issues/7469): Directly constructing/calling the following classes/functions is now deprecated:
- `_pytest.cacheprovider.Cache`
- `_pytest.cacheprovider.Cache.for_config()`
- `_pytest.cacheprovider.Cache.clear_cache()`
- `_pytest.cacheprovider.Cache.cache_dir_from_config()`
- `_pytest.capture.CaptureFixture`
- `_pytest.fixtures.FixtureRequest`
- `_pytest.fixtures.SubRequest`
- `_pytest.logging.LogCaptureFixture`
- `_pytest.pytester.Pytester`
- `_pytest.pytester.Testdir`
- `_pytest.recwarn.WarningsRecorder`
- `_pytest.recwarn.WarningsChecker`
- `_pytest.tmpdir.TempPathFactory`
- `_pytest.tmpdir.TempdirFactory`
These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.
- [#&GoogleCloudPlatform#8203;7530](https://togithub.com/pytest-dev/pytest/issues/7530): The `--strict` command-line option has been deprecated, use `--strict-markers` instead.
We have plans to maybe in the future to reintroduce `--strict` and make it an encompassing flag for all strictness
related options (`--strict-markers` and `--strict-config` at the moment, more might be introduced in the future).
- [#&GoogleCloudPlatform#8203;7988](https://togithub.com/pytest-dev/pytest/issues/7988): The `@pytest.yield_fixture` decorator/function is now deprecated. Use pytest.fixture instead.
`yield_fixture` has been an alias for `fixture` for a very long time, so can be search/replaced safely.
## Features
- [#&GoogleCloudPlatform#8203;5299](https://togithub.com/pytest-dev/pytest/issues/5299): pytest now warns about unraisable exceptions and unhandled thread exceptions that occur in tests on Python>=3.8.
See unraisable for more information.
- [#&GoogleCloudPlatform#8203;7425](https://togithub.com/pytest-dev/pytest/issues/7425): New pytester fixture, which is identical to testdir but its methods return pathlib.Path when appropriate instead of `py.path.local`.
This is part of the movement to use pathlib.Path objects internally, in order to remove the dependency to `py` in the future.
Internally, the old Testdir <\_pytest.pytester.Testdir> is now a thin wrapper around Pytester <\_pytest.pytester.Pytester>, preserving the old interface.
- [#&GoogleCloudPlatform#8203;7695](https://togithub.com/pytest-dev/pytest/issues/7695): A new hook was added, pytest_markeval_namespace which should return a dictionary.
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.
Pseudo example
`conftest.py`:
```{.sourceCode .python}
def pytest_markeval_namespace():
return {"color": "red"}
```
`test_func.py`:
```{.sourceCode .python}
@&GoogleCloudPlatform#8203;pytest.mark.skipif("color == 'blue'", reason="Color is not red")
def test_func():
assert False
```
- [#&GoogleCloudPlatform#8203;8006](https://togithub.com/pytest-dev/pytest/issues/8006): It is now possible to construct a ~pytest.MonkeyPatch object directly as `pytest.MonkeyPatch()`,
in cases when the monkeypatch fixture cannot be used. Previously some users imported it
from the private \_pytest.monkeypatch.MonkeyPatch namespace.
Additionally, MonkeyPatch.context <pytest.MonkeyPatch.context> is now a classmethod,
and can be used as `with MonkeyPatch.context() as mp: ...`. This is the recommended way to use
`MonkeyPatch` directly, since unlike the `monkeypatch` fixture, an instance created directly
is not `undo()`-ed automatically.
## Improvements
- [#&GoogleCloudPlatform#8203;1265](https://togithub.com/pytest-dev/pytest/issues/1265): Added an `__str__` implementation to the ~pytest.pytester.LineMatcher class which is returned from `pytester.run_pytest().stdout` and similar. It returns the entire output, like the existing `str()` method.
- [#&GoogleCloudPlatform#8203;2044](https://togithub.com/pytest-dev/pytest/issues/2044): Verbose mode now shows the reason that a test was skipped in the test's terminal line after the "SKIPPED", "XFAIL" or "XPASS".
- [#&GoogleCloudPlatform#8203;7469](https://togithub.com/pytest-dev/pytest/issues/7469) The types of builtin pytest fixtures are now exported so they may be used in type annotations of test functions.
The newly-exported types are:
- `pytest.FixtureRequest` for the request fixture.
- `pytest.Cache` for the cache fixture.
- `pytest.CaptureFixture[str]` for the capfd and capsys fixtures.
- `pytest.CaptureFixture[bytes]` for the capfdbinary and capsysbinary fixtures.
- `pytest.LogCaptureFixture` for the caplog fixture.
- `pytest.Pytester` for the pytester fixture.
- `pytest.Testdir` for the testdir fixture.
- `pytest.TempdirFactory` for the tmpdir_factory fixture.
- `pytest.TempPathFactory` for the tmp_path_factory fixture.
- `pytest.MonkeyPatch` for the monkeypatch fixture.
- `pytest.WarningsRecorder` for the recwarn fixture.
Constructing them is not supported (except for MonkeyPatch); they are only meant for use in type annotations.
Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0.
Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.
- [#&GoogleCloudPlatform#8203;7527](https://togithub.com/pytest-dev/pytest/issues/7527): When a comparison between namedtuple <collections.namedtuple> instances of the same type fails, pytest now shows the differing field names (possibly nested) instead of their indexes.
- [#&GoogleCloudPlatform#8203;7615](https://togithub.com/pytest-dev/pytest/issues/7615): Node.warn <\_pytest.nodes.Node.warn> now permits any subclass of Warning, not just PytestWarning <pytest.PytestWarning>.
- [#&GoogleCloudPlatform#8203;7701](https://togithub.com/pytest-dev/pytest/issues/7701): Improved reporting when using `--collected-only`. It will now show the number of collected tests in the summary stats.
- [#&GoogleCloudPlatform#8203;7710](https://togithub.com/pytest-dev/pytest/issues/7710): Use strict equality comparison for non-numeric types in pytest.approx instead of
raising TypeError.
This was the undocumented behavior before 3.7, but is now officially a supported feature.
- [#&GoogleCloudPlatform#8203;7938](https://togithub.com/pytest-dev/pytest/issues/7938): New `--sw-skip` argument which is a shorthand for `--stepwise-skip`.
- [#&GoogleCloudPlatform#8203;8023](https://togithub.com/pytest-dev/pytest/issues/8023): Added `'node_modules'` to default value for norecursedirs.
- [#&GoogleCloudPlatform#8203;8032](https://togithub.com/pytest-dev/pytest/issues/8032): doClassCleanups <unittest.TestCase.doClassCleanups> (introduced in unittest in Python and 3.8) is now called appropriately.
## Bug Fixes
- [#&GoogleCloudPlatform#8203;4824](https://togithub.com/pytest-dev/pytest/issues/4824): Fixed quadratic behavior and improved performance of collection of items using autouse fixtures and xunit fixtures.
- [#&GoogleCloudPlatform#8203;7758](https://togithub.com/pytest-dev/pytest/issues/7758): Fixed an issue where some files in packages are getting lost from `--lf` even though they contain tests that failed. Regressed in pytest 5.4.0.
- [#&GoogleCloudPlatform#8203;7911](https://togithub.com/pytest-dev/pytest/issues/7911): Directories created by by tmp_path and tmpdir are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites.
- [#&GoogleCloudPlatform#8203;7913](https://togithub.com/pytest-dev/pytest/issues/7913): Fixed a crash or hang in pytester.spawn <\_pytest.pytester.Pytester.spawn> when the readline module is involved.
- [#&GoogleCloudPlatform#8203;7951](https://togithub.com/pytest-dev/pytest/issues/7951): Fixed handling of recursive symlinks when collecting tests.
- [#&GoogleCloudPlatform#8203;7981](https://togithub.com/pytest-dev/pytest/issues/7981): Fixed symlinked directories not being followed during collection. Regressed in pytest 6.1.0.
- [#&GoogleCloudPlatform#8203;8016](https://togithub.com/pytest-dev/pytest/issues/8016): Fixed only one doctest being collected when using `pytest --doctest-modules path/to/an/__init__.py`.
## Improved Documentation
- [#&GoogleCloudPlatform#8203;7429](https://togithub.com/pytest-dev/pytest/issues/7429): Add more information and use cases about skipping doctests.
- [#&GoogleCloudPlatform#8203;7780](https://togithub.com/pytest-dev/pytest/issues/7780): Classes which should not be inherited from are now marked `final class` in the API reference.
- [#&GoogleCloudPlatform#8203;7872](https://togithub.com/pytest-dev/pytest/issues/7872): `_pytest.config.argparsing.Parser.addini()` accepts explicit `None` and `"string"`.
- [#&GoogleCloudPlatform#8203;7878](https://togithub.com/pytest-dev/pytest/issues/7878): In pull request section, ask to commit after editing changelog and authors file.
## Trivial/Internal Changes
- [#&GoogleCloudPlatform#8203;7802](https://togithub.com/pytest-dev/pytest/issues/7802): The `attrs` dependency requirement is now >=19.2.0 instead of >=17.4.0.
- [#&GoogleCloudPlatform#8203;8014](https://togithub.com/pytest-dev/pytest/issues/8014): .pyc files created by pytest's assertion rewriting now conform to the newer PEP-552 format on Python>=3.7.
(These files are internal and only interpreted by pytest itself.)
</details>
---
### Renovate configuration
:date: **Schedule**: At any time (no schedule defined).
:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
:recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox.
:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/GoogleCloudPlatform/python-docs-samples).1 parent 01ed44b commit 6197638
151 files changed
Lines changed: 151 additions & 151 deletions
File tree
- appengine
- flexible
- analytics
- cloudsql_postgresql
- cloudsql
- datastore
- disk
- django_cloudsql
- extending_runtime
- hello_world_django
- hello_world
- mailgun
- mailjet
- memcache
- metadata
- multiple_services
- gateway-service
- static-service
- numpy
- pubsub
- redis
- scipy
- sendgrid
- static_files
- storage
- tasks
- twilio
- websockets
- standard_python3
- bigquery
- building-an-app
- building-an-app-1
- building-an-app-2
- building-an-app-3
- building-an-app-4
- cloud_debugger
- cloudsql
- custom-server
- django
- hello_world
- migration/urlfetch
- pubsub
- redis
- spanner
- warmup
- auth
- api-client
- cloud-client
- end-user/web
- service-to-service
- bigquery
- bqml
- datalab-migration
- pandas-gbq-migration
- blog/introduction_to_data_models_in_cloud_datastore
- cdn
- cloud-sql
- mysql/sqlalchemy
- postgres/sqlalchemy
- sql-server/sqlalchemy
- codelabs/flex_and_vision
- composer
- functions
- rest
- workflows
- compute
- api
- auth
- encryption
- managed-instances/demo
- metadata
- oslogin
- xmpp_wikibot
- data-science-onramp
- data-cleaning
- data-ingestion
- dataflow
- encryption-keys
- flex-templates/streaming_beam
- run_template
- datastore
- cloud-client
- cloud-ndb
- schedule-export
- dns/api
- document/cloud-client
- endpoints
- bookstore-grpc-transcoding
- bookstore-grpc
- getting-started-grpc
- getting-started
- clients/service_to_service_non_default
- eventarc
- audit-storage
- generic
- pubsub
- firestore
- cloud-async-client
- cloud-client
- functions
- bigtable
- billing
- concepts
- env_vars
- firebase
- helloworld
- http
- imagemagick
- log
- memorystore/redis
- ocr/app
- pubsub
- security
- slack
- spanner
- tips
- healthcare/api-client
- v1beta1/fhir
- v1
- datasets
- dicom
- fhir
- hl7v2
- iam/api-client
- iap
- app_engine_app
- iot/api-client
- codelabs
- end_to_end_example
- gcs_file_to_device
- http_example
- mqtt_example
- scripts
- jobs/v3/api_client
- kubernetes_engine
- api-client
- django_tutorial
- media-translation/cloud-client
- media/transcoder
- memorystore/redis
- ml_engine/online_prediction
- monitoring/api/v3/api-client
- notebooks
- samples
- opencensus
- profiler
- appengine
- flexible
- standard_python37
- quickstart
- pubsub/streaming-analytics
- run
- deployment-previews
- django
- hello-broken
- helloworld
- image-processing
- logging-manual
- markdown-preview
- editor
- renderer
- pubsub
- system-package
- servicedirectory
- storage
- api
- cloud-client
- s3-sdk
- signed_urls
- transfer_service
- trace
- cloud-trace-demo-app-opentelemetry/app
- cloud-trace-demo-app/app
- trace-python-sample-opentelemetry
- trace-python-sample
- vision/automl
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
0 commit comments