Bruno Oliveira
0b58f73d44
Merge pull request #7476 from bluetech/pylint-callable
...
mark/structure: fix pylint complaining that builtin marks are not callable
2020-07-10 17:26:37 -03:00
Bruno Oliveira
cf648d9cad
Merge pull request #7474 from nicoddemus/env-vars-docs
2020-07-10 17:20:06 -03:00
Ran Benita
c1ca42b5c2
mark/structure: fix pylint complaining that builtin marks are not callable
2020-07-10 23:10:17 +03:00
Bruno Oliveira
906d8496c9
New doc role: globalvar for special variables
...
This introduces a new role, `:globalvar:`, so we can mark/reference
variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful
also makes the documentation look more consistent.
2020-07-10 09:50:03 -03:00
Bruno Oliveira
1667d138aa
Use sphinx references for NO_COLOR and FORCE_COLOR in changelog
2020-07-10 09:30:04 -03:00
Hugo van Kemenade
c1c5a2b34a
Add support for NO_COLOR and FORCE_COLOR ( #7466 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-10 08:49:10 -03:00
Ran Benita
7934ac280f
Add changelog entry for Frame removals
2020-07-10 13:08:56 +03:00
Ran Benita
c8676002a7
code/code: remove redundant __ne__ implementation
...
This implementation is the default when __eq__ is implemented.
2020-07-10 13:08:56 +03:00
Ran Benita
85ef2bf698
code/code: remove Frame.exec_() method
...
Not used.
2020-07-10 13:08:56 +03:00
Ran Benita
c3864bc12b
code/code: remove Frame.is_true() method
...
Really odd one, let's just inline it.
2020-07-10 13:08:56 +03:00
Ran Benita
77f3cb4baa
code/code: type annotations & doc cleanups
2020-07-10 13:08:56 +03:00
Ran Benita
087b047426
cacheprovider: type annotations
2020-07-10 13:08:56 +03:00
Ran Benita
a2f021b6f3
Remove no longer needed `noqa: F821` uses
...
Not needed since pyflakes 2.2.0.
2020-07-10 13:08:56 +03:00
Ran Benita
fc702ab7e4
fixtures: some type annotations
2020-07-10 13:08:56 +03:00
Ran Benita
168d9adefc
hookspec: change Node -> Union[Item, Collector] to avoid exposing Node
...
We don't really want `Node` itself as a public API, only its two
subclasses.
2020-07-10 13:08:56 +03:00
Ran Benita
8e8d639276
tmpdir: type annotations
2020-07-10 13:08:56 +03:00
Ran Benita
bcff02c4c6
pytester: some type annotations
2020-07-10 13:08:56 +03:00
Ran Benita
c7a1db5d01
junitxml: few typing fixes & additions
2020-07-10 13:08:56 +03:00
Ran Benita
5da4a1d84f
capture: type annotate return value of fixtures
2020-07-10 13:08:56 +03:00
Ran Benita
e079ebbd57
python: more type annotations
2020-07-10 13:08:56 +03:00
Ran Benita
fb2640b82f
Stop using ExceptionInfo.errisinstance internally
...
It does the same as a simple isinstance check, but adds a little layer
of obscurity on top, which the type checker can't penetrate.
2020-07-10 13:08:48 +03:00
Ran Benita
2ae721cda5
Merge pull request #7470 from nicoddemus/fix-required-plugins-test
...
Make test_missing_required_plugins xdist-independent
2020-07-10 12:47:52 +03:00
Bruno Oliveira
be7b02c3b8
Make test_missing_required_plugins xdist-independent
...
Also cleaned up the parametrized list using `pytest.param` to assign ids
and removed some redundant cases.
Follow up to #7459
2020-07-09 22:09:28 -03:00
Bruno Oliveira
0a0c14dfac
Merge pull request #7459 from nicoddemus/release-6.0.0rc1
2020-07-09 21:25:58 -03:00
Arvin Firouzi
c3e2b11a62
Fix reported location of skip when --runxfail is used ( #7432 )
...
Co-authored-by: Arvin Firouzi <427014@student.fontys.nl>
2020-07-09 23:10:32 +03:00
Bruno Oliveira
b22d466345
Remove duplicated users from release announcement
2020-07-08 17:51:57 -04:00
Bruno Oliveira
7d033a8950
Prepare release version 6.0.0rc1
2020-07-08 17:51:01 -04:00
Bruno Oliveira
64b19595a5
Set correct version during regen
2020-07-08 17:49:09 -04:00
Bruno Oliveira
d812690569
Adjust regendoc for getting-started
2020-07-08 17:49:09 -04:00
Bruno Oliveira
9db9f04432
Use builtin compile in doc example
...
Follow up to #7438
2020-07-08 17:49:09 -04:00
Vlad-Radz
678c1a0745
assertion: improve diff output of recursive dataclass/attrs
...
Co-authored-by: Vlad <uladzislau.radziuk@nordcloud.com>
2020-07-08 19:04:56 +03:00
Bruno Oliveira
9caca5c434
Merge pull request #7454 from nicoddemus/remove-warning-banner
2020-07-08 10:11:08 -03:00
Bruno Oliveira
93d2ccbfb7
Point to stable docs instead of latest
...
Now that our master might contain new features, it is best to point
users to the stable docs rather than the latest
2020-07-07 07:45:27 -03:00
Bruno Oliveira
b6a31b9c4d
Remove warning about development/outdated docs
...
Unfortunately couldn't figure out how to fix the generated link, so at least
for now remove it to avoid confusion.
Fix #7331
2020-07-06 20:28:30 -03:00
Ran Benita
ef62b865f0
Merge pull request #7448 from bluetech/typing-publish
...
Publish our types
2020-07-05 16:51:26 +03:00
Ran Benita
2bcad38fbd
Publish our types
2020-07-04 13:18:15 +03:00
Ran Benita
36b958c99e
Merge pull request #7438 from bluetech/source-cleanups
...
code/source: some cleanups
2020-07-04 12:57:32 +03:00
Ran Benita
11efe057ea
testing: skip some unreachable code in coverage
2020-07-04 12:12:52 +03:00
Ran Benita
40301effb8
Add changelog entry for code/source changes
2020-07-04 11:45:28 +03:00
Ran Benita
64dd7000e5
Merge pull request #7436 from bluetech/cleanup-lsof
...
pytester: slightly clean up LsofFdLeakChecker
2020-07-04 10:55:11 +03:00
Ran Benita
f76ac4c570
Merge pull request #7437 from bluetech/flaky-coroutine-never-awaited
...
testing: fix flaky tests due to "coroutine never awaited" warnings
2020-07-04 10:54:38 +03:00
Ran Benita
eced536eaf
Merge pull request #7435 from bluetech/python-cleanups
...
python: a few cleanups
2020-07-04 10:54:07 +03:00
Ran Benita
bd4977eba8
Merge pull request #7442 from gnikonorov/issue_7439
...
fix mypy issue by using typing Match instead of re.Match
2020-07-03 10:23:52 +03:00
Gleb Nikonorov
e596b26f1a
Don't quote the Match type since it's imported from Typing
2020-07-02 18:22:54 -04:00
Gleb Nikonorov
04d052e306
fix mypy issue by using typing Match instead of re.Match
2020-07-02 15:32:23 -04:00
Ran Benita
74f20f9fba
Merge pull request #7434 from bluetech/distinct_log_handlers-rebased
...
logging: use unique handlers for caplog and reports
2020-07-01 20:54:55 +03:00
Ran Benita
c8cfff6de5
testing: fix flaky tests due to "coroutine never awaited" warnings
...
They sometime leak into other test's warnings and cause them to fail.
2020-07-01 20:29:04 +03:00
Ran Benita
f5c69f3eb2
code/source: inline getsource()
...
The recursive way in which Source and getsource interact is a bit
confusing, just inline it.
2020-07-01 20:20:13 +03:00
Ran Benita
ef39115001
code/source: remove compiling functions
...
A lot of complex code that isn't used anymore outside of tests after
the previous commit.
2020-07-01 20:20:12 +03:00
Ran Benita
9640c9c9eb
skipping: use plain compile() instead of _pytest._code.compile()
...
eval() is used for evaluating string conditions in skipif/xfail e.g.
@pytest.mark.skipif("1 == 0")
This is the only code that uses `_pytest._code.compile()`, so removing
its last use enables us to remove it entirely.
In this case it doesn't add much. Plain compile() gives a good enough
error message.
For regular exceptions, the message is the same.
For SyntaxError exceptions, e.g. "1 ==", the previous code adds a little
bit of useful context:
```
invalid syntax (skipping.py:108>, line 1)
The above exception was the direct cause of the following exception:
1 ==
^
(code was compiled probably from here: <0-codegen /pytest/src/_pytest/skipping.py:108>) (line 1)
During handling of the above exception, another exception occurred:
Error evaluating 'skipif' condition
1 ==
^
SyntaxError: invalid syntax
```
The new code loses it:
```
unexpected EOF while parsing (<skipif condition>, line 1)
During handling of the above exception, another exception occurred:
Error evaluating 'skipif' condition
1 ==
^
SyntaxError: invalid syntax
```
Since the old message is a minor improvement to an unlikely error
condition in a deprecated feature, I think it is not worth all the code
that it requires.
2020-07-01 20:20:12 +03:00