Commit Graph
154 Commits
Author SHA1 Message Date
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
Wan Liuyang f0e0762a0d Publish version 1.43.5 2019-01-29 17:34:47 +08:00
Wan Liuyang 4a6daf6b9f Publish version 1.43.4 2018-12-21 17:29:21 +08:00
Wan Liuyang 395fd5c98b Publish version 1.43.3 2018-10-31 08:38:13 +08:00
Wan Liuyang 8ef6990889 Publish version 1.43.2 2018-09-12 15:01:08 +08:00
Wan Liuyang d92389be07 Restore RateLimit.rate attribute, raise deprecation warning instead 2018-09-12 14:53:44 +08:00
Wan Liuyang 54eb59cf6e Publish version 1.43.1 2018-09-11 13:10:13 +08:00
Vincent Jacques 4e3d47c0e8 Publish version 1.43 2018-09-08 09:09:08 +02:00
Wan Liuyang df57bf17a8 Publish version 1.42 2018-08-19 12:27:09 +08:00
Wan Liuyang 2c97823a95 Publish version 1.41 2018-08-19 11:32:31 +08:00
Wan Liuyang 3f0caa4057 Sync copyright header 2018-08-19 10:47:41 +08:00
sfdye d897e86aa9 Publish version 1.40 2018-06-26 09:05:38 +08:00
Wan Liuyang 286272aaf1 Publish version 1.40a4 2018-05-21 10:42:33 +08:00
Wan Liuyang b0fc5da5ae Publish version 1.40a3 2018-04-26 14:52:47 +08:00
Wan Liuyang d9071a9eda Publish version 1.40a2 2018-04-23 14:31:58 +08:00
Wan Liuyang 981111dbe0 Publish version 1.40a1 2018-04-17 12:15:02 +08:00
Mike Miller 9aed19ddbe Use 'requests' instead of 'httplib' (#664)
* works (but tests fail)

* Refactor to use python requests rather than httplib

* add requests dependency in setup.py

* touch so travis-ci will run

* clean up some unused comments

* Handle HTTP vs HTTPS; handle custom base_url

* Use requests session

* Don't use a persistent session in tests (which don't use the real requests library)

* Use an older version of requests for python 3.2

Requests dropped support for Python 3.2 in the 2.10 series (though it
didn't detect this until 2.11).

PyGithub probably doesn't need to support Python 3.2 at all; it's quite
old, with negligably few users, but that should be addressed elsewhere.

* Revert "Use an older version of requests for python 3.2"

This reverts commit fb0367614f5413968eeab98f4094e710aa1bc2d1.

* Improve readability

* Update requirements.txt

* Disable custom proxy handling code (unneeded and broken); use requests'

* Remove comment and superflous code

* Fix iteritems() removal from Python3

* pin requests to 2.14.0 or greater in prep for no_proxy

* pin requests to 2.14.0 or greater in prep for no_proxy
2018-04-17 10:25:42 +08:00
Wan Liuyang 6563ce12f5 Publish version 1.39 2018-04-10 10:21:49 +08:00
Wan Liuyang 193aeaad2a Publish version 1.38 2018-03-21 10:19:03 +08:00
sfdye 365a0a24d3 Apply fix_headers script to update copyright info 2018-03-17 20:06:16 +08:00
sfdye 58e1ef9ccb Fix copyright formatting 2018-03-13 22:30:47 +08:00
sfdye 020c136a40 Update doc link in copyright text 2018-03-13 22:07:38 +08:00