Commit Graph

13596 Commits

Author SHA1 Message Date
Ran Benita e5292ed8dc
Merge pull request #8561 from pytest-dev/update-plugin-list/patch-9078c3c
[automated] Update plugin list
2021-04-20 16:26:23 +03:00
Ran Benita 513247863a
Merge pull request #8562 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-asyncio-0.15.0
Bump pytest-asyncio from 0.14.0 to 0.15.0 in /testing/plugins_integration
2021-04-20 16:25:57 +03:00
Ran Benita c7e146da0f
Merge pull request #8567 from codingjoe/patch-1
Fix typos & missing commas in CONTRIBUTING.rst
2021-04-20 16:25:30 +03:00
Johannes Maron 3cbbb0bb0d
Fix typos & missing commas in CONTRIBUTING.rst 2021-04-20 12:30:27 +02:00
Miroslav Šedivý fbe66244b8
Fix some typos, remove redundant words and escapes (#8564)
* doc: Fix typos, remove double words

* Remove redundant escapes in regex
2021-04-19 20:39:08 +00:00
dependabot[bot] fb35851440
Bump pytest-asyncio in /testing/plugins_integration
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.14.0...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 03:01:33 +00:00
pytest bot c117bc350e [automated] Update plugin list 2021-04-18 00:18:53 +00:00
Abdelrahman Elbehery 9078c3ce23
fix #8464 wrong root dir when -c is passed (#8537)
fix #8464 wrong root dir when -c is passed
2021-04-16 14:38:35 -03:00
Florian Bruhin d2f3d40510
doc: Update open trainings (#8551) 2021-04-15 19:09:06 +02:00
Bruno Oliveira af31c60db1
Merge pull request #8540 from hauntsaninja/assert310 2021-04-15 08:55:42 -03:00
Ran Benita 8dd64622ca
Merge pull request #8538 from pytest-dev/update-plugin-list/patch-9653a0e
[automated] Update plugin list
2021-04-14 12:52:29 +03:00
Ran Benita 3c451751af
Merge pull request #8542 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.2.0
Bump pytest-django from 4.1.0 to 4.2.0 in /testing/plugins_integration
2021-04-14 12:50:28 +03:00
Ran Benita 6152135c29
Merge pull request #8541 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.2
Bump django from 3.1.8 to 3.2 in /testing/plugins_integration
2021-04-14 12:50:01 +03:00
pre-commit-ci[bot] d200598de9
[pre-commit.ci] pre-commit autoupdate (#8547)
* [pre-commit.ci] pre-commit autoupdate

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2021-04-14 12:49:09 +03:00
Albert Villanova del Moral 4b214a6049
Add tmp_path_factory methods to the docs (#8550)
* Add tmp_path_factory methods to the docs

Add the methods of tmp_path_factory to the docs.

Currently, only the class description appears in the docs.

* Add tmpdir_factory methods to the docs
2021-04-14 12:06:35 +03:00
hauntsaninja e3dc34ee41 fixup comments 2021-04-12 11:34:14 -07:00
dependabot[bot] 22a17dba4e
Bump pytest-django from 4.1.0 to 4.2.0 in /testing/plugins_integration
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.1.0...v4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 03:01:33 +00:00
dependabot[bot] e14bd4a480
Bump django from 3.1.8 to 3.2 in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 3.1.8 to 3.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.8...3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 03:01:30 +00:00
pre-commit-ci[bot] da66f00413 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-04-11 22:44:33 +00:00
hauntsaninja 8be1628042 Fix assertion rewriting on Python 3.10
Fixes https://github.com/pytest-dev/pytest/issues/8539

This seems to have been the result of https://bugs.python.org/issue43798
2021-04-11 15:42:42 -07:00
pytest bot 67d61e56e9 [automated] Update plugin list 2021-04-11 00:20:34 +00:00
Ran Benita 9653a0e9f4
Merge pull request #8531 from pytest-dev/graingert-patch-1
fix pytest 6.2.3 #8414 changelog entry grammar
2021-04-10 19:05:19 +03:00
Bruno Oliveira 047c9603f6
Merge pull request #8535 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.1.8
Bump django from 3.1.7 to 3.1.8 in /testing/plugins_integration
2021-04-08 22:15:45 -03:00
Daniele Procida 70daa279a7
Further rationalised "how to invoke pytest" material. (#8536)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-04-08 21:19:30 -03:00
dependabot[bot] 207c07285f
Bump django from 3.1.7 to 3.1.8 in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 3.1.7 to 3.1.8.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.7...3.1.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-08 20:05:44 +00:00
Thomas Grainger 97a61916a6
fix pytest 6.2.3 #8414 changelog entry grammar 2021-04-08 15:40:58 +01:00
Ronny Pfannschmidt 41a90cd9fe
Merge pull request #8463 from RonnyPfannschmidt/workaround-8361
address #8361 - introduce hook caller wrappers that enable backward compat
2021-04-05 22:50:31 +02:00
Tadeu Manoel b706a2c048
Fix error with --import-mode=importlib and modules containing dataclasses or pickle (#7870)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>

Fixes #7856, fixes #7859
2021-04-05 17:10:03 -03:00
Anthony Sottile 366c36a168
Merge pull request #8522 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-04-05 10:52:33 -07:00
pre-commit-ci[bot] 0b299044d1
[pre-commit.ci] pre-commit autoupdate 2021-04-05 17:10:40 +00:00
Ran Benita 43b547a1cb
Merge pull request #8521 from pytest-dev/update-plugin-list/patch-07c6b3f
[automated] Update plugin list
2021-04-04 13:40:37 +03:00
Ran Benita 00f4cfe403
Merge pull request #8520 from bluetech/cherry-pick-release
Cherry pick 6.2.3 release notes
2021-04-04 13:40:18 +03:00
pytest bot f3337c1854 [automated] Update plugin list 2021-04-04 00:19:23 +00:00
Ran Benita 5d2fad5362 Merge pull request #8519 from pytest-dev/release-6.2.3
Prepare release 6.2.3

(cherry picked from commit 724e22cb003031b88ae6fe50fa3eabdcc538a8bc)
2021-04-04 01:08:26 +03:00
Ran Benita 07c6b3fb21
Merge pull request #8516 from bluetech/mktmp
Fix minor temporary directory security issue
2021-04-04 00:33:53 +03:00
Ran Benita c49100cef8 tmpdir: prevent using a non-private root temp directory
pytest uses a root temp directory named `/tmp/pytest-of-<username>`. The
name is predictable, and the directory might already exists from a
previous run, so that's allowed.

This makes it possible for my_user to pre-create
`/tmp/pytest-of-another_user`, thus giving my_user control of
another_user's tempdir.

Prevent this scenario by adding a couple of safety checks. I believe
they are sufficient.

Testing the first check requires changing the owner, which requires
root permissions, so can't be unit-tested easily, but I checked it
manually.
2021-04-03 23:42:53 +03:00
Ran Benita 1278f8b97e tmpdir: fix temporary directories created with world-readable permissions
(Written for a Unix system, but might be applicable to Windows as well).

pytest creates a root temporary directory under /tmp, named
`pytest-of-<username>`, and creates tmp_path's and other under it.
/tmp is shared between all users of the system.

This root temporary directory was created with 0o777&~umask permissions,
which usually becomes 0o755, meaning any user in the system could list
and read the files, which is undesirable.

Use 0o700 permissions instead. Also for subdirectories, because the root
dir is adjustable.
2021-04-03 23:42:53 +03:00
Ran Benita 0dd1e5b4f4 pathlib: inline ensure_reset_dir()
This is only used in TempPathFactory.getbasetemp(). We'll be wanting
further control/care there, so move it into there.
2021-04-03 23:42:53 +03:00
Ran Benita 78122a5304 pathlib: remove useless temporary variable 2021-04-03 23:42:53 +03:00
Ronny Pfannschmidt aa10bff750 fix deprecation test for path/fspath hook args 2021-04-03 14:51:36 +02:00
Ronny Pfannschmidt 53ebe34ca2
Apply suggestions from code review
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-04-03 12:46:50 +02:00
Ronny Pfannschmidt deb5b5bd96 fix #8371: fix stack-level 2021-04-02 00:58:05 +02:00
Ronny Pfannschmidt 9c151a65c8
Merge pull request #8503 from pytest-dev/require_setuptools
monkeypatch.syspath_prepend: Skip fixup_namespace_packages if pkg_resources not imported
2021-04-01 21:49:29 +02:00
Miro Hrončok 778d2b2499 monkeypatch.syspath_prepend: Skip fixup_namespace_packages if pkg_resources not imported
Calling pkg_resources.fixup_namespace_packages() is only needed for packages
that use pkg_resources.declare_namespace() and hence they already imported
pkg_resources. When pkg_resources is not imported, we don't need to use it.

This avoids an unneeded runtime dependency on setuptools.
The code is tested by test_syspath_prepend_with_namespace_packages,
behavior should remain unchanged, hence no new test was added.

When people drop pkg_resources from sys.modules, they are on their own.
If someone has a actual use case making this valid to support,
they can come in and provide a test, a reference and a fix.
2021-04-01 20:24:21 +02:00
Mehera Emrich 0061ec5555
Fix typo (#8504) 2021-04-01 15:13:12 +02:00
Bruno Oliveira b96e229c95
Fix plugin-list label in the docs (#8505)
Last time I "fixed" this I left a `\` at the start of the string
to avoid an initial newline, but didn't realize it was a raw string.

This should fix it now for good.
2021-04-01 15:12:46 +02:00
Ronny Pfannschmidt bad1963697 fix #8361: address review/quality comments 2021-03-29 22:29:35 +02:00
Bruno Oliveira ca4a7a085e
Merge pull request #8496 from pytest-dev/update-plugin-list/patch-9052a9e
[automated] Update plugin list
2021-03-27 22:53:43 -03:00
pytest bot bfdfab00dd [automated] Update plugin list 2021-03-28 00:18:38 +00:00
Ronny Pfannschmidt 9052a9e313
Merge pull request #8462 from RonnyPfannschmidt/main_fixup_followup
port the rest of the scripts/docs over to the main branch
2021-03-27 15:49:20 +01:00