Improve PyPI packaging & upgrade test dependencies#72
Improve PyPI packaging & upgrade test dependencies#72seratch merged 1 commit intoslackapi:masterfrom
Conversation
* Remove unnecessary `requests`, `six` from `install_requires` * Do tests with `install_requires` settings and removed `requirements.txt` * Migrate to `pyee` 7 (`EventEmitter` is deprecated) * Migrate `pytest` to the latest in each Python version * Add python 3.7, 3.8 to CI builds & remove unsupported 3.4 * Add the missing long description to PyPI package
| .vscode/ | ||
| .eggs/ | ||
| build/ | ||
| .python-version No newline at end of file |
There was a problem hiding this comment.
this file can be generated by pyenv
| @@ -1,16 +1,18 @@ | |||
| dist: trusty | |||
| dist: xenial | |||
There was a problem hiding this comment.
just wanted to use the same distribution with slackclient to reuse the team's knowledge
| script: | ||
| - flake8 slackeventsapi | ||
| - py.test --cov-report= --cov=slackeventsapi tests | ||
| - pytest --cov-report= --cov=slackeventsapi tests |
There was a problem hiding this comment.
needed to change the command as this PR upgraded the major version from 3 to 4 for python 2.7 & 5+ for python 3
| - "3.7" | ||
| - "3.8" | ||
| install: | ||
| - travis_retry pip install -r requirements.txt |
There was a problem hiding this comment.
removed as this is confusing and we should use install_requires instead
| @@ -0,0 +1,6 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
just for local debug
| 'six', | ||
| 'flask>=1,<2', | ||
| 'pyee>=7,<8', | ||
| 'itsdangerous<2', # for Python 2.7 |
There was a problem hiding this comment.
we can remove these when we drop python 2.7 support
| @@ -1,12 +1,12 @@ | |||
| from pyee import EventEmitter | |||
| from pyee import BaseEventEmitter | |||
There was a problem hiding this comment.
BaseEventEmitter is 100% compatible
| return json.dumps(event_data) | ||
|
|
||
|
|
||
| def pytest_namespace(): |
There was a problem hiding this comment.
pytest_namespace has been removed since v4
|
|
||
| @pytest.fixture | ||
| def app(): | ||
| events_adapter = adapter() |
There was a problem hiding this comment.
directly using __call__() is no longer supported
Summary
This pull request cleans up the build and makes the packaging more specific about dependency versions. The following changes are done by this PR.
requests,sixfrominstall_requiresinstall_requiressettings and removedrequirements.txtpyee7 (EventEmitteris deprecated)pytestto the latest in each Python versionRequirements (place an
xin each[ ])