Commit Graph

495 Commits

Author SHA1 Message Date
Anthony Sottile 789eea2464 Run setup-py-upgrade and setup-cfg-fmt
- also ran `pre-commit autoupdate`
- https://github.com/asottile/setup-py-upgrade
- https://github.com/asottile/setup-cfg-fmt
2020-06-04 09:58:58 -07:00
Keri Volans 2748feed38 7291: Replace py.iniconfig with iniconfig 2020-06-01 18:09:57 +01:00
Ran Benita aca534c67d Improve our own wcwidth implementation and remove dependency on wcwidth package
`TerminalWriter`, imported recently from `py`, contains its own
incomplete wcwidth (`char_with`/`get_line_width`) implementation. The
`TerminalReporter` also needs this, but uses the external `wcwidth`
package.

This commit brings the `TerminalWriter` implementation up-to-par with
`wcwidth`, moves to implementation to a new file `_pytest._io.wcwidth`
which is used everywhere, and removes the dependency.

The differences compared to the `wcwidth` package are:

- Normalizes the string before counting.

- Uses Python's `unicodedata` instead of vendored Unicode tables. This
  means the data corresponds to the Python's version Unicode version
  instead of the `wcwidth`'s package version.

- Apply some optimizations.
2020-05-26 17:14:01 +03:00
Ran Benita 817537523c Upgrade mypy 0.761 -> 0.770
https://mypy-lang.blogspot.com/2020/03/mypy-0770-released.html
2020-03-21 17:16:30 +02:00
Daniel Hahler 0e70acab79 tox: add mypy toxenv
This is different from what pre-commit (in "linting") runs in that it
uses stubs from (test) dependencies.

It would make sense to run this on CI additionally (since there is no
"pre-commit --skip mypy", and a separate config is not worth it).
But currently it triggers a false positive though anyway
(https://github.com/erikrose/more-itertools/pull/374).
2020-01-14 08:59:48 +01:00
Daniel Hahler 45c4a8fb3d Use atomicrewrites only on Windows
Fixes https://github.com/pytest-dev/pytest/issues/6147
2019-11-07 20:57:45 +01:00
Daniel Hahler b0fd8742da ci: test oldest supported attrs 2019-10-06 16:12:56 +02:00
Bruno Oliveira ba76080b59 Validate xunit2 files against the schema
Fix #5095
2019-08-09 10:55:06 -03:00
Miro Hrončok c54cbd63c8 Replace importlib_metadata with importlib.metadata on Python 3.8+
Fixes https://github.com/pytest-dev/pytest/issues/5537
2019-07-04 15:00:10 +02:00
Anthony Sottile 5dcf85c17e manual: remove dependence on six 2019-06-03 12:08:02 -03:00
Anthony Sottile 5034399d7a pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
Bruno Oliveira 4d49ba6529 Drop Python 2.7 and 3.4 support
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs

Related to #5275
2019-06-02 14:39:11 -03:00
Daniel Hahler e032904413 Merge master into features 2019-05-28 01:46:16 +02:00
Anthony Sottile 13f02af97d Switch to importlib-metadata 2019-05-27 13:24:08 -07:00
Anthony Sottile dc75b6af47 Use fix-encoding-pragma pre-commit hook 2019-05-14 15:56:31 -07:00
Bruno Oliveira ccf6c3cb46 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2019-05-09 19:22:40 -03:00
Bruno Oliveira e1756fc631 Pin pluggy to <1.0
Make sure we don't update to pluggy 1.0 automatically, as there are planned breaking
changes in the 1.0 release.
2019-05-09 08:47:01 -03:00
Sitaktif 7161f5b372 Require pluggy>=0.11
Pluggy 0.10.0 introduced a new dependency `importlib-metadata` but that
package cannot be imported when installed as an egg and that is causing
problems for users relying on `setup.py` to install packages present in
`test_require`. This change was quickly reverted in pluggy 0.11.0.

See https://github.com/pytest-dev/pluggy/issues/205
2019-05-08 16:06:41 +01:00
Daniel Hahler df377b589f use wcwidth 2019-04-05 17:43:11 +02:00
Daniel Hahler 76687030f0 Merge branch 'master' into merge-master-into-features
Conflicts:
	appveyor.yml
	setup.py
2019-03-05 19:07:36 +01:00
Daniel Hahler c4aa57bc4c tox/setup.py: remove _PYTEST_SETUP_SKIP_PLUGGY_DEP=1 hack 2019-03-03 13:15:13 +01:00
Daniel Hahler 0d31e852b1 Run isort 2019-03-01 14:24:18 +01:00
Daniel Hahler ccab469a0c Fix test_argcomplete: use python -m pytest
Previously it was not run with a) xdist ("-c"), and b) "python -m
pytest" ("…/pytest.py", not executable).
2019-02-27 16:52:46 +01:00
Bruno Oliveira 2cf1de3f2d
Merge pull request #4727 from nicoddemus/early-load-4718
Change -p so it is possible to early load setuptools plugins
2019-02-25 10:05:51 -03:00
Bruno Oliveira a0207274f4 -p option now can be used to early-load plugins by entry-point name
Fixes #4718
2019-02-24 13:20:17 -03:00
Bruno Oliveira ede6387caa Require funcsigs>=1.0 on Python 2.7
Fix #4815
2019-02-24 12:11:08 -03:00
Sam Brightman b4be228330 Constrain more_itertools for Python 2.7 compatibility
Fixes #4772, #4770.
2019-02-12 11:53:23 +00:00
Daniel Hahler e46f995cc7 setup.py: add "testing" extra requirement
Use this in tox to stream-line base testing requirements.

Closes https://github.com/pytest-dev/pytest/issues/4410.
2018-11-18 08:55:17 +01:00
Anthony Sottile 2368fbb63c Apply reorder-python-imports to all files 2018-10-25 00:01:29 -07:00
Ronny Pfannschmidt 4f4c91caf5 fix #4177 - pin setuptools>=40.0 2018-10-17 20:08:07 +02:00
Ronny Pfannschmidt 7855284ef7 move most setuptools parameters over to setup.cfg 2018-10-15 07:30:07 +02:00
Ronny Pfannschmidt d4351ac5a2 modernize packaging for setuptools>30.3 2018-10-14 21:44:32 +02:00
Bruno Oliveira 96aad2983b Move code to get width of current line to a function 2018-08-30 21:16:35 -03:00
wim glenn c18a5b5179
try to be backwards compat 2018-08-30 19:06:20 -05:00
wim glenn 29c5ac71bc
improve line width estimate 2018-08-30 18:59:58 -05:00
Steve Piercy bde3d1a0cd Use https; save a redirect 2018-08-28 14:34:39 -07:00
Ronny Pfannschmidt 57a8f208bc fix #3757 by pinning to pathlib2 that supports __fspath__ 2018-08-01 11:45:39 +02:00
Bruno Oliveira e3d412d1f4 Warn when implementations exist for pytest_namespace hook
This hook has been deprecated and will be removed in the future.

Fix #2639
2018-07-29 22:20:23 -03:00
Bruno Oliveira 0e47599572 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-07-29 21:15:51 -03:00
Bruno Oliveira 7f27512a48 Pin pluggy to <0.8 2018-07-28 09:46:35 -03:00
Ronny Pfannschmidt 89e0a3ec27 merge from master to features 2018-06-26 17:01:05 +02:00
Ronny Pfannschmidt 603df1ea1c whops, its supported starting with python 3.6, not python 3.5 2018-06-22 23:56:22 +02:00
Ronny Pfannschmidt abbf73ad1a use pathlib2 up to python3.4 - damn the stdlib 2018-06-22 23:56:22 +02:00
Ronny Pfannschmidt c7eb53317b port cache plugin internals to pathlib
warning logging got broken by detanglement from config
2018-06-22 23:56:22 +02:00
Anthony Sottile b285078db4
Merge pull request #3535 from RonnyPfannschmidt/config-split
begin to turn config into package
2018-06-15 10:28:06 -07:00
Anthony Sottile c1d9ca81df Remove setup.py test now that it's broken 2018-06-07 22:01:14 -07:00
Ronny Pfannschmidt bc2247219f turn config into package
this prepares the splitting
2018-06-05 09:08:53 +02:00
Ronny Pfannschmidt eaa882f3d5 switch to src layout 2018-05-26 09:10:38 +02:00
Ronny Pfannschmidt 703e4b11ba run black 2018-05-23 16:48:46 +02:00
Bruno Oliveira 63368e07ea Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-04-24 21:26:45 -03:00