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
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
R1kk3r
cbfe8d0f62
Remove the default "null" input send during GET request ( #691 )
...
* Remove the default "null" input send during GET request
* Remove the 'null' value from all tests
2018-01-31 16:16:11 -08:00
Simon
6bc804dc15
♻️ Fix all pep8 coding conventions
2018-01-16 13:41:02 -08:00
Hugo
6735be4933
Drop support for EOL Python 2.5-2.6 and 3.2-3.3 ( #674 )
2017-12-20 22:52:00 -08:00
Chris McBride
52449649a4
Add ability to access github Release Asset API. ( #525 )
...
* Add ability to access github Release Asset API.
See: https://developer.github.com/v3/repos/releases
2017-11-27 10:01:03 -06:00
Jimmy Zelinskie
aca37dbb14
Merge pull request #462 from geex-arts/fix-rate-limit-exception
...
Fix diffrerent case
2016-09-28 21:19:16 -04:00
Denis K
fcf6cfb50a
Fix diffrerent case
2016-09-25 22:31:20 +03:00
Denis K
073bb442f6
Fix status check
2016-09-16 20:44:01 +03:00
Jared K. Smith
464259da91
Add missing space
2016-08-30 06:17:22 -04:00
Jared K. Smith
d015154c98
Properly handle HTTP Proxy authentication with Python 3
2016-08-29 13:19:18 -04:00
Peter Buckley
cb0cf0a680
update doc url everywhere ( #420 )
2016-07-12 16:38:02 -04:00
Mathieu Mitchell
c29f5335cc
Follow redirects in the case of a 301 status code
2016-05-27 09:25:32 -04:00
Brian Eugley
9be7506f15
code improvement
2015-04-15 15:50:30 -04:00
Brian Eugley
f035591d70
Get proxy info from http_proxy first, HTTP_PROXY second
2015-04-15 15:23:17 -04:00
Brian Eugley
7c79c1b80b
Connect through a proxy with authentication
2015-04-15 13:56:46 -04:00
Jimmy Zelinskie
5e34bfeb2e
Merge pull request #294 from dpocock/dpocock-accept
...
Allow access to preview versions of the server-side API
2015-03-18 15:16:45 -04:00
Daniel Pocock
cd8fe788e4
Allow access to preview versions of the server-side API
2015-02-03 11:56:13 +01:00
Jimmy Zelinskie
33b9ce9658
Remove URL scheme assertion.
...
This part of the URL isn't used and can be wrong due to bugs in GitHub
Enterprise.
2014-12-15 15:00:40 -05:00
Vincent Jacques
abca7a026e
pep8
...
This is strange, maybe Cygwin's version is stricter.
No time to investigate.
2014-05-04 12:54:05 -07:00
Vincent Jacques
580528876a
Acknowledge some lack of test coverage
2014-05-04 12:18:00 -07:00
Vincent Jacques
4dfc3dec5f
Merge branch 'develop'
2013-12-23 19:40:04 -08:00
Vincent Jacques
f74c95a944
Integrate #220 (fix tests and pep8)
2013-12-23 19:38:39 -08:00
Vincent Jacques
6767e75c52
Fix #216 : handle 'Link' header
...
Headers with capitals are returned by http.client (replacing httplib in Python 3)
2013-12-23 19:25:11 -08:00
Cameron White
36352598ae
Added onetime_password to create_authorization
...
github.AuthenticatedUser.create_authorization has been modified to
support two-factor authentication. When two-factor authentication
is enabled create_authorization will throw an TwoFactorException.
The onetime password can be then be passed to create_authorization
on a subsequent call.
2013-12-19 04:05:26 -08:00
Vincent Jacques
a9b9765254
Acknowledge branch coverage lack
2013-09-06 11:17:09 +02:00
Vincent Jacques
c819580ce8
Get status of Github API ( #188 )
2013-09-06 11:01:33 +02:00
Vincent Jacques
f2feb81dae
Add default parameters to greatly reduce code redoundancy
2013-09-06 11:01:32 +02:00
Vincent Jacques
1d0ba7ef64
Don't assume there is a 'message' field in case of error
2013-09-05 18:23:47 +02:00
Vincent Jacques
fb6980ce36
Move the DEBUG_ON_RESPONSE call to Requester.__requestEncode
2013-08-23 19:05:53 +02:00
Vincent Jacques
e084b51381
#193 : Fix test coverage
2013-08-23 14:51:34 +02:00
Vincent Jacques
64cf539c83
#193 : Add a param to Requester.requestXxx for request headers
2013-08-23 11:31:01 +02:00
Vincent Jacques
03d7fb012e
#193 : Add remarks
2013-08-23 11:15:17 +02:00
Vincent Jacques
bae0a37d18
#193 : Don't use a try-except for a usual execution flow in GithubObject.update
...
(and factorize assignment of headers in _storeAndUseAttributes,
as done for rawData)
2013-08-23 11:10:35 +02:00
Vincent Jacques
fb7325884e
Fix remarks on #189 to #193
2013-08-23 09:32:47 +02:00
Vincent Jacques
0f74e4389b
Review of #189 : pep8, copyrights, style, remarks
...
For remarks, run: git grep "#189 "
They are only my first thoughts while reviewing this pull request,
and should be reviewed themselves.
2013-08-22 12:12:38 +02:00
Vincent Jacques
1787765a61
Review of #189 : use dict.get
...
http://docs.python.org/2/library/stdtypes.html#dict.get
2013-08-22 11:41:15 +02:00
Vincent Jacques
cc1bcd5f2d
Merge branch 'develop' into topic/ConditionalRequest
...
Conflicts:
.gitignore
github/Requester.py
2013-08-22 11:01:51 +02:00
Vincent Jacques
8a2624e3a1
Merge branch 'topic/RememberHeaders' into develop ( #192 )
...
Conflicts:
github/Issue.py
github/MainClass.py
github/PaginatedList.py
github/Repository.py
github/Requester.py
2013-08-22 10:30:14 +02:00
Vincent Jacques
5c475c7683
First review of #192 (pep8, headers... nothing important)
...
./manage.sh check
./manage.sh fix_headers
2013-08-22 10:12:38 +02:00
AKFish
70a7e9c83d
Fix update
2013-08-22 07:45:27 +08:00
AKFish
5b09f6c821
Implement conditional request
2013-08-21 23:17:59 +08:00
AKFish
6fd05baf6b
Handle response code 304
2013-08-21 23:09:30 +08:00
Vincent Jacques
20107078d2
Fix copyrights ( #181 #182 #184 #186 #187 )
2013-08-21 16:08:02 +02:00
AKFish
e06257d060
Enable debug in TestCase
2013-08-21 20:58:29 +08:00
AKFish
1d18ea75cc
Add debug / test mechanism
2013-08-21 19:25:05 +08:00
Vincent Jacques
07c0871281
Merge branch 'topic/HandleNonJsonResponses' into develop
2013-08-20 22:54:16 +02:00
Ed Jackson
211e4633ee
Minor enhancements to rate limiting information
...
If rate limiting information hasn't been retrieved already, it will be checked
rather than just assuming 5000 requests remaining of 5000.
Add an additional attribute `rate_limiting_resettime` to reflect github's new
X-RateLimit-Reset header. This integer value is a unix timestamp.
RateLimiting unit test updated accordingly.
2013-08-06 10:42:57 -05:00