Ran Benita
755ce9bc80
hookspec: improve legacy path deprecation docs
2021-10-23 22:49:54 +03:00
oleg.hoefling
d58ee2b677
replace hardcoded urls to docs.pytest.org with internal crossrefs, add external crossrefs where possible
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-10-04 00:23:41 +02:00
Simon K
c27db3bd8e
Deprecate pytest_cmdline_preparse
...
Close #8592
PR #8956
2021-07-31 10:53:43 -03:00
Bruno Oliveira
2c4c57e135
Revert fspath deprecation
...
It is not clear yet how we should proceed with this deprecation
because `pytest.Item.reportinfo` is public API and returns a `py.path` object,
and is not clear how plugins and our examples should handle that.
Reverting just the deprecation aspect of #8251 so we can get a 7.0.0 release out.
We will reintroduce the deprecation later once we have a clear path moving forward with replacing `reportinfo`.
Closes #8445
Closes #8821
2021-07-13 08:24:39 -03:00
Ronny Pfannschmidt
d7b0e17205
issue a warning when Item and Collector are used in diamond inheritance ( #8447 )
...
* issue a warning when Items and Collector form a diamond
addresses #8435
* Apply suggestions from code review
Co-authored-by: Ran Benita <ran@unusedvar.com>
* Return support for the broken File/Item hybrids
* adds deprecation
* ads necessary support code in node construction
* fix incorrect mypy based assertions
* add docs for deprecation of Item/File inheritance
* warn when a non-cooperative ctor is encountered
* use getattr instead of cast to get the class __init__ for legacy ctors
* update documentation references for node inheritance
* clean up file+item inheritance test
enhance docs
move import upwards
Co-authored-by: Ran Benita <ran@unusedvar.com>
2021-06-24 11:45:32 +02:00
Ran Benita
538b5c2499
argparsing: export Parser and OptionGroup for typing purposes
...
`Parser` is used by many plugins and custom hooks. `OptionGroup` is
exposed by the `parser.addgroup` API.
The constructors of both are marked private, they are not meant to be
constructed directly.
2021-05-24 00:52:03 +03: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
bad1963697
fix #8361 : address review/quality comments
2021-03-29 22:29:35 +02:00
Thomas Grainger
12efc58479
document deprecation in deprecations.rst
2021-03-19 09:43:22 +00:00
Ronny Pfannschmidt
22dad53a24
implement Node.path as pathlib.Path
...
* reorganize lastfailed node sort
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-03-06 21:32:03 +01:00
Ran Benita
d358a060ad
config/argparsing: use proper deprecations instead of ad-hoc DeprecationWarning
...
Proper for removing this in the next major pytest release.
2021-02-05 00:05:47 +02:00
Ran Benita
25e657bfc1
Deprecate raising unittest.SkipTest to skip tests during collection
...
It is not very clear why this code exists -- we are not running any
unittest or nose code during collection, and really these frameworks
don't have the concept of collection at all, and just raising these
exceptions at e.g. the module level would cause an error. So unless I'm
missing something, I don't think anyone is using this.
Deprecate it so we can eventually clear up this code and keep unittest
more tightly restricted to its plugin.
2021-01-15 00:05:33 +02:00
Ran Benita
bd76042344
python: export pytest.Metafunc for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-26 21:05:02 +02:00
Ran Benita
4c0513bc18
fixtures: deprecate pytest.yield_fixture()
2020-11-07 17:06:40 +02:00
Bruno Oliveira
30287b49cd
Deprecate --strict ( #7985 )
...
Fix #7530
2020-11-06 09:48:20 +01:00
Ran Benita
e503c9a9f8
doc: fix broken cross references
2020-09-06 19:06:43 +03:00
Bruno Oliveira
7605150eaa
Move --no-print-logs removal notice to 'Removed Features'
2020-08-19 08:14:28 -03:00
Bruno Oliveira
ef946d557c
Remove resultlog plugin
2020-08-19 08:14:28 -03:00
Bruno Oliveira
52b0cc4f19
Remove broken pytest_collect_directory hook
2020-08-19 08:14:25 -03:00
Bruno Oliveira
457d351941
Remove deprecated TerminalReporter.writer property
2020-08-19 08:13:34 -03:00
Bruno Oliveira
345a59dd53
Add note about pytest.collect deprecation
2020-08-19 08:13:06 -03:00
Bruno Oliveira
6ecbd008c4
Change junit_family default to xunit2
2020-08-19 08:13:06 -03:00
Bruno Oliveira
73e06373dc
Hard failure when constructing Node subclasses
2020-08-19 08:13:03 -03:00
Bruno Oliveira
c747dc5248
Drop support for positional arguments in @pytest.fixture
2020-08-19 08:11:42 -03:00
Bruno Oliveira
98530184a5
Remove funcargnames compatibility property
2020-08-19 08:11:39 -03:00
Florian Bruhin
1c9b84756f
Properly remove log_print
...
This is a follow up to 3f8200676f
which didn't
make it clear that log_print is also removed in the changelog and didn't remove
it from the reference docs.
2020-08-04 08:53:09 +02: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
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
Ran Benita
85b5a289f0
warnings: fix missing None in existing hook & add some docs ( #7288 )
2020-06-02 19:59:25 +03:00
Ran Benita
3f8200676f
logging: remove deprecated --no-print-logs option/ini
...
This option was deprecated in 5.4.0 and was marked for removal in 6.0.0.
2020-05-17 21:41:38 +03:00
Bruno Oliveira
199f45d0a9
Merge pull request #7027 from blueyed/doc-rm-rm
2020-05-06 12:43:51 -03:00
Bruno Oliveira
095a195d71
Improve docs about junit_family warning message
...
From discussion in #6178
2020-05-02 13:01:15 -03:00
Ran Benita
907e29a47b
fixtures: deprecate pytest._fillfuncargs function
...
This function is exposed and kept alive for the oejskit plugin which is
abandoned and no longer works with recent plugins, so let's prepare to
completely remove it.
2020-04-24 18:54:46 +03:00
Daniel Hahler
51c1ae89cd
doc: remove deprecations from pytest 3
...
This is in line with 9c5da9c0d
, which versionadded instructions.
2020-04-06 07:02:15 +02:00
Bruno Oliveira
d161bedcee
Add an example of how to port the code
2020-03-04 09:23:31 -03:00
Ronny Pfannschmidt
3637d9eb3f
followup: add note on from_parent kwargs
2020-03-01 20:34:38 +01:00
Ronny Pfannschmidt
5c1e56d350
docs: from_parent - add minimal before/after example
...
fixup: fix from_parent version
2020-03-01 20:34:38 +01:00
Bruno Oliveira
435ad221f9
Deprecate TerminalReporter.writer
...
Fix #6779
2020-02-20 21:04:49 -03:00
Vinay Calastry
afbaee7649
Deprecate --no-print-logs option
2019-12-14 16:46:30 -08:00
Ronny Pfannschmidt
15ffe63204
update doc examples **untested**
2019-11-23 21:54:11 +01:00
Bruno Oliveira
d2ea9e2db5
Remove report_log in favor of pytest-reportlog
...
Fix #6180
2019-11-14 19:47:26 -03:00
Bruno Oliveira
2a67637acc
Issue a warning to prepare change of 'junit_family' default value
...
Fix #6179
2019-11-13 19:55:13 -03:00
Bruno Oliveira
b99661b9d7
Introduce --report-log option
...
Fix #4488
2019-10-30 09:43:33 -03:00
Bruno Oliveira
2f065a555f
Merge remote-tracking branch 'upstream/master' into release-5.1.0
2019-08-09 12:36:19 -03:00
boris
78de9d4677
replace implicit code tag with colon .replace("::\n\n.. code-block", ":\n\n.. code-block")
2019-08-06 16:20:06 -07:00
boris
23a0b532db
Revert "remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")"
...
This reverts commit 9fce0bdd88
.
2019-08-06 16:18:06 -07:00
boris
9fce0bdd88
remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")
2019-08-06 15:46:57 -07:00
boris
7f90e74e02
label code blocks
2019-08-06 13:25:54 -07:00
Bruno Oliveira
7e58defc15
Remove 'pytest.config'
2019-06-30 13:18:07 -03:00
Bruno Oliveira
13f7f27fd2
Remove 'message' parameter from pytest.raises
2019-06-30 13:18:06 -03:00
Bruno Oliveira
279733a30b
Remove support for 'code as string' from pytest.raises and pytest.warns
2019-06-30 11:40:24 -03:00
Zac Hatfield-Dodds
ed85c83154
Deprecate funcargnames alias
2019-06-26 08:53:17 +10:00
Bruno Oliveira
52780f39ce
Postpone removal of --result-log to pytest 6.0
...
As we did not provide an alternative yet, it is better to postpone
the actual removal until we have provided a suitable and stable
alternative.
Related to #4488
2019-06-12 08:26:11 -03:00
Bruno Oliveira
784e1e3b7e
Add links to pytest.raises `message` workaround
...
Related to #3974
2019-05-06 12:35:27 -03:00
Bruno Oliveira
af40473c9a
Add quick note about accessing config through session or item objects
...
Fix #5030
2019-05-01 11:46:35 -03:00
Bruno Oliveira
9c5da9c0d1
Remove all version references to obsolete pytest versions
...
Remove version references to pytest 2 and 3.
Just like Python 3 no longer has references to Python 2, I think
we should follow the same approach in pytest.
2019-04-28 12:37:58 -03:00
Bruno Oliveira
067f2c6148
Improve pytest.raises 'message' deprecation docs
...
Based on recent discussions in #3974
2019-01-24 20:41:18 -02:00
Bruno Oliveira
81c2780d2b
Move Node.get_marker and markname deprecations next to the other 4.0 ones
2019-01-02 19:37:17 -02:00
Bruno Oliveira
b39b69a730
Use sphinx-removed-in extension in the documentation
...
Fix #4568
2019-01-02 19:34:46 -02:00
Ronny Pfannschmidt
8f8d3114dd
apply suggested enhancements in deprecations.rst
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
64a353f2b6
update deprecation docs
2018-12-21 14:02:38 +01:00
Bruno Oliveira
c378cb4793
Remove support for applying marks to values in parametrize
...
Fix #3082
2018-12-20 16:16:13 -02:00
Bruno Oliveira
a93f41233a
Raise an error if pytest_plugins is defined in a non-top-level conftest.py file
...
Fix #4548
2018-12-19 18:09:47 -02:00
Bruno Oliveira
9138419379
Remove support for '[pytest]' section in setup.cfg file
...
Fix #3086
2018-12-19 17:43:17 -02:00
Bruno Oliveira
0115766df3
Calling fixtures directly is now an error instead of a warning
...
Fix #4545
2018-12-19 09:26:29 -02:00
Bruno Oliveira
b7e8171cf8
Merge branch 'features' into remove-legacy-warn
2018-12-17 10:37:31 -02:00
Bruno Oliveira
a7e401656e
Remove support to pass strings to pytest.main()
...
Fix #3085
2018-12-14 15:45:47 -02:00
Bruno Oliveira
6e1b1abfa7
Remove deprecated record_xml_property
...
Fix #4547
2018-12-14 15:10:08 -02:00
Bruno Oliveira
fd48cd57f9
Remove config.warn, Node.warn; pytest_logwarning issues a warning when implemented
...
Fix #3078
2018-12-14 12:50:18 -02:00
Bruno Oliveira
1e80a9cb34
Remove pytest_funcarg__ prefix support for defining fixtures
...
Fix #4543
2018-12-13 21:41:38 -02:00
Bruno Oliveira
5b83417afc
Deprecate the 'message' parameter of pytest.raises
...
Fix #3974
2018-12-12 22:26:30 -02:00
Bruno Oliveira
e3d30f8ebf
Remove deprecated PyCollector.makeitem
...
Fix #4535
2018-12-12 14:15:52 -02:00
Anthony Sottile
b88c3f8f82
Deprecate pytest.config
2018-12-03 09:01:42 -08:00
Bruno Oliveira
a131f0acf6
Merge pull request #4490 from nicoddemus/remove-cached-setup-add-call
...
Remove cached_setup and Metafunc.addcall
2018-12-01 18:44:51 -02:00
Bruno Oliveira
40b85d7ee8
Remove Metafunc.addcall
...
Fix #3083
2018-12-01 16:41:59 -02:00
Bruno Oliveira
090f7ff449
Remove request.cached_setup
...
Fix #4489
2018-12-01 15:59:44 -02:00
Bruno Oliveira
b05061dcd2
Change deprecation type of --result-log to PytestDeprecationWarning
...
It was decided to deprecate this on a later date (see discussion in #4447 )
2018-12-01 14:29:50 -02:00
Bruno Oliveira
63f38de38e
Merge remote-tracking branch 'upstream/features' into update-deprecations-docs
2018-12-01 14:16:20 -02:00
Anthony Sottile
1bba0a9714
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')
2018-11-29 09:34:51 -08:00
Bruno Oliveira
5d2e2377ff
Update deprecations.rst now that we have removed a few features
...
* yield tests
* compat properties
* pytest_namespace
All merciless cut down by Ronny :'(
2018-11-22 20:38:47 -02:00
Bruno Oliveira
8a768b0db0
Merge pull request #4182 from nicoddemus/fix-deprecations-hook-name
...
Fix hook name in deprecations.rst
2018-10-17 16:18:52 -03:00
Bruno Oliveira
ba5a295544
Fix hook name in deprecations.rst
...
As mentioned in https://github.com/pytest-dev/pytest/issues/4128#issuecomment-430690498
2018-10-17 14:53:41 -03:00
Anthony Sottile
ab8907f6f5
s/comparision/comparison/g [ci skip]
2018-10-16 17:23:29 -07:00
Bruno Oliveira
9646a1cd7a
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-15 12:55:28 -03:00
Thomas Hess
91b2797498
docs: deprecation.rst: Add missing arguments to code example
...
In the proposed new style using `@pytest.mark.parametrize`,
the example function signature missed the actual arguments.
Add the missing arguments
2018-10-13 20:33:31 +02:00
Bruno Oliveira
1101a20408
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-02 18:13:54 -03:00
Bruno Oliveira
9899b8f1fb
Add an example on how to update config.warn calls
...
As commented in https://github.com/pytest-dev/pytest-cov/pull/230#pullrequestreview-157958838
2018-09-23 22:42:09 -03:00
Bruno Oliveira
0d04aa7c59
Add 3.9 deprecated features to deprecations.rst
2018-09-23 09:26:12 -03:00
Bruno Oliveira
c2841542af
Introduce deprecations page
...
fix #3996
2018-09-19 19:51:29 -03:00
Bruno Oliveira
ccb90b5c46
[WIP] Introduce deprecations page
...
fix #3996
2018-09-18 20:56:40 -03:00