175 Commits
Author SHA1 Message Date
Jirka BorovecandTrim21 2edc0f8f17 Unify requirements files location & source in setup.py (#2598)
Co-authored-by: Trim21 <trim21.me@gmail.com>
2023-07-18 12:30:02 +02:00
Trim21andEnrico Minack c5682489d9 Merge Branch type stubs back to source (#2571)
Introduces new helper methods `is_defined`, `is_undefined`, `is_optional`, `is_optional_list` that is going to simplify input assertions in all our methods.

Co-authored-by: Enrico Minack <github@enrico.minack.dev>
2023-07-04 09:42:53 +02:00
Enrico MinackandJohn T. Wodder II 0177f7c513 Make datetime objects timezone-aware (#2565)
Comparing timestamps returned by the API with naive datetime objects (without timezone information) will raise an error. Add `tzinfo=datetime.timezone.utc` to your datetime instance.

Co-authored-by: John T. Wodder II <git@varonathe.org>
2023-06-28 21:47:48 +02:00
Enrico Minack 006766f985 Link to stable docs, update introduction in package used by pypi, move auth arg front (#2557) 2023-06-20 15:04:04 +02:00
Enrico Minack 554b2b28db Add crypto extras to pyjwt, which pulls in cryptogaphy package (#2443)
* Add crypto extras to pyjwt, which pulls in cryptogaphy package
* Remove cryptography dependency from more places
* Remove integrations extra from docs
2023-03-15 09:45:48 +11:00
Liuyang Wan 3ea91a3a36 Use use_scm_version to get current version from git tag (#2429) 2023-02-19 19:29:29 +08:00
Liuyang Wan 5d1d1612ad Bump version to 1.58.0 2023-02-19 18:12:47 +08:00
Liuyang Wan 948edc5bb3 Publish version 1.57 2022-11-05 09:07:58 +08:00
Hugo van Kemenade a71cd37a86 Require pyjwt>=2.4.0 to avoid CVE-2022-29217 (#2333) 2022-10-25 11:08:36 +08:00
Hugo van Kemenade 1e2f10dcb2 Add support for Python 3.11, drop EOL 3.6 (#2332) 2022-10-25 10:51:28 +08:00
Liuyang Wan c677ced98d Publish version 1.56 2022-10-13 09:23:01 +08:00
Steve Kowalik aa694f8edc Add support for Python 3.10 (#2073)
Now that Python 3.10 has been released, we should test it in CI.
2021-10-13 15:34:01 +11:00
Steve Kowalik 31538337fa Publish version 1.55 2021-04-26 14:43:40 +10:00
Sam Morgan a68577b76a Update PyJWT Version to 2.0+ (#1891)
* Update PyJWT version
* Fix `GitRelease.testUploadAssetWithName` test
  MIME type wasn't as expected

Fixes #1832
2021-03-24 10:14:35 +11:00
Sorin Sbarnea 64f532aecc Add missing links to project metadata (#1789)
Fixes: #1788
2021-03-08 14:12:51 +11:00
Chris KeatingandLiuyang Wan c90c050ef1 Adding github actions secrets (#1681)
* Fixed pre-commit issues

* Fixed mypy linting error

* Fix flake8 error

* Update PublicKey.py

* Update PublicKey.py

* Update setup.py

* Update setup.py

* Update requirements.txt

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
2021-03-07 05:40:52 +08:00
Steve Kowalik 34d097ce47 Publish version 1.54.1 2020-12-24 15:11:01 +11:00
Edouard Benauw 31a1c00780 Pin pyjwt version (#1797)
* Pin pyjwt version

Pyjwt version is not fixed, which can cause syntax error for user since the release of breaking changes from pyjwt (https://pypi.org/project/PyJWT/#history)

* Update setup.py

Fixes #1796
2020-12-24 15:09:32 +11:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Steve Kowalik 63e4fae997 Drop support for Python 3.5 (#1770)
In preperation for starting to use 3.6+ only features, stop testing
Python 3.5 in our CI, and bump our minimum required version.
2020-12-02 14:47:45 +11:00
Sébastien Besson a806b5233f Revert "Pin requests to <2.25 as well (#1757)" (#1763)
* Revert "Pin requests to <2.25 as well (#1757)"
* Ensure httpretty is more recent than 1.0.3

This reverts commit d159425f36.
2020-12-01 10:17:18 +11:00
Steve Kowalik 951fcdf23f Publish version 1.54 2020-11-30 16:43:49 +11:00
Steve Kowalik d159425f36 Pin requests to <2.25 as well (#1757)
requests 2.26 and its requirements break httpretty (see
gabrielfalcao/HTTPretty#409), so pin for the time being. Thanks to
Sébastien Besson and Dhruv Manilawala for the debugging assistance.
2020-11-19 21:48:10 +11:00
Steve Kowalik 1bb18ab52e Add support for Python 3.9 (#1735)
With Python 3.9 released, we should support it. A later commit will
remove support for Python 3.5.
2020-11-03 16:39:06 +11:00
Steve Kowalik 743f5a58b0 Publish version 1.53 2020-08-18 18:15:44 +10:00
Steve Kowalik 707246519e Publish version 1.52 2020-08-03 18:45:52 +10:00
Wan Liuyang 0ca534ee1c Publish version 1.51 2020-05-03 00:58:45 +08:00
Emily 6eba4506d4 Improve type stubs (#1489)
* Add type stubs for GithubException subclasses

* Install type stubs per PEP 561

See https://mypy.readthedocs.io/en/stable/installed_packages.html#making-pep-561-compatible-packages.

* Make PaginatedList a generic type

* Add type stubs for __init__.py

* Add type stub for NamedUser.get_projects

* Add GithubObject superclasses to type stubs

Fixes #1490
2020-05-01 12:00:00 +10:00
Wan Liuyang a9f174bd1d Publish version 1.50 2020-04-26 16:46:19 +08:00
Michał Górny d2e9bd69dd Use pytest to parametrize tests (#1438)
* Use pytest to parametrize tests

Use built-in pytest test case parametrization support over external
'parameterize' package.  The latter is not well maintained, and has
known Python 3.8 failures unsolved since November 2019.

Since pytest fixtures are incompatible with unittest-style tests,
rewrite the relevant test case to use pytest-style asserts.  This also
makes the resulting code simpler, as we no longer have to pass TestCase
to the helper classes.

* Refactor input cleaning in ReplayingConnection.__readNextRequest()
2020-03-18 18:44:40 +11:00
Steve Kowalik afb1259a4e Publish version 1.47 2020-03-15 13:01:20 +11:00
Steve Kowalik c822dd1ce0 Switch to using pytest (#1423)
Due to the recent deprecation of setup.py test, we should move with the
times, and switch to a non-deprecated test runner.

Add configuration for pytest, and switch tox to using it. Remove
AllTests, since it is no longer required to locate test classes, and
rewrite tests/__main__.py as a pytest conftest plugin.

Also drop the test function from manage.sh, tox does a much better job.
2020-03-07 12:43:49 +11:00
Steve Kowalik e5ce4912f5 Publish version 1.46 2020-02-11 12:33:45 +11:00
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Steve Kowalik 7134752c36 Publish version 1.45 2019-12-29 14:48:30 +11:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Jiri Popelka fb19d2f271 Use inclusive ordered comparison for 'parameterized' requirement (#1281) 2019-11-25 20:38:07 +11:00
Steve Kowalik 05b9ecb471 Publish version 1.44.1 2019-11-07 12:44:10 +11:00
Steve Kowalik fec6034a07 Add Python 3.8 to classifiers list (#1280)
Add 3.8 to the classifiers list, drop the use of 2to3, and run tests
against 3.8.
2019-11-06 22:11:09 +11:00
Adam Baratz faa1bbd61f Handle unicode strings when recording responses (#1253) (#1254)
* Handle unicode strings when recording responses (#1253)

* Add new test requirements

* Make requirement conditional

* Fix flake8 error

* Compare dict values without worrying about key order

* Improve readability
2019-10-23 14:50:08 +11:00
Steve Kowalik ff716654fd Publish version 1.44 2019-10-19 18:32:53 +11:00
Steve Kowalik 27092fb055 Bump httpretty to be a greater or equal to (#1262)
Some distributions do not include httpretty 0.9.6 as is required by
setup.py. Set it to >= rather than ==.
2019-10-18 16:12:44 +11:00
Steve Kowalik a840a90671 Add six to install_requires (#1245)
dc2f2ad8 introduced a dependancy on six, and added it to requirements,
but not to setup.py, add it.
2019-10-08 16:49:12 +11:00
Wan Liuyang 1ced054592 Publish version 1.43.8 2019-07-20 23:56:37 +08:00
Wan Liuyang f716df86bb Publish version 1.43.7 2019-04-16 11:49:45 +08:00
TechnicalPirate 78d283b9b5 Updated setup.py to exclude tests (#1031)
# Problem #
The `.whl` available on PyPi for this repository contains its entire `tests` submodule. 

The total size of the `pygithub` module is less than `1mb` without tests and `>23mb` with. 

Previous discussions on this topic indicated the removal of tests would be accepted if someone created a pull request to do so: https://github.com/PyGithub/PyGithub/issues/672 

This is that pull request! 😄

# Solution/Implementation # 

- Moved "tests" to root of the repository ( outside the package ) 
    - Added `tests.` module path to the imports in `AllTests.py`
- Updated `setup.py`
    - Removed `package_data` from product
    - Removed "tests" from packages definition
    - Repointed `test_suite` to new location
- Updated `travis.yml`
    - Added conditional ( if not `py2.7` ) conversion of code to `py3`

_... apologies for all the failed build spam below - new to working with Travis CI / had some gotcha moments!_
2019-04-16 11:45:02 +08:00
Wan Liuyang fcc2670873 Publish version 1.43.6 2019-04-05 14:32:18 +08:00
Isac Souza 5ae7af55ea Adding communications Retry functionality into requests via urllib3 retry object. (#1002)
This is a continuation of the work started by @allevin on https://github.com/PyGithub/PyGithub/pull/860.

I have refactored the testing Framework to use the `httpretty` library in order to use the urllib3 retry feature and therefore be able to test it.

Please refer to https://github.com/PyGithub/PyGithub/pull/860 for additional context.

cc: @allevin @mfonville @jrouquie @sfdye

Closes #757 
Closes #860
2019-04-05 13:49:01 +08:00
cclauss 6faa00ac9f Travis CI: Add Python 3.7 to the testing (#1028)
Also:
* Python 3.4 reaches its end of life in 44 days so let's remove it from the testing.  https://devguide.python.org/#branchstatus
* [Travis are now recommending removing the __sudo__ tag](https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration).
2019-03-29 15:41:57 +08:00
秋葉 6a89eb645d resolves #1023 (#1042)
resolves #1023
2019-02-14 10:50:11 +08:00