Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99ce1d3

Browse files
committed
Prepare Release 0.8.1
Merge remote-tracking branch 'origin/develop'
2 parentsfc6aef6 +7301f28 commit99ce1d3

File tree

133 files changed

+2961
-1231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2961
-1231
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ venv/
1414
venv*/
1515
build/
1616
*.egg
17+
.env

‎.travis.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
language:python
22
python:
3-
-2.6
4-
-2.7
5-
-3.2
6-
-3.3
7-
-pypy
8-
# # command to run tests, e.g. python setup.py test
3+
-2.6
4+
-2.7
5+
-3.2
6+
-3.3
7+
-pypy
8+
# command to run tests, e.g. python setup.py test
9+
before_script:
10+
-pip install -r dev-requirements.txt
11+
-pip install -U requests"$REQUESTS_VERSION"
12+
13+
# test script
914
script:make travis
1015
notifications:
1116
on_success:change
1217
on_failure:always
1318

14-
branches:
15-
except:
16-
-uricore
19+
env:
20+
global:
21+
-TRAVIS_GH3="True"
22+
matrix:
23+
-REQUESTS_VERSION="==2.0.1"
24+
-REQUESTS_VERSION=""# Latest

‎AUTHORS.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Development Lead
33

44
- Ian Cordasco <graffatcolmingov@gmail.com>
55

6+
Maintainer(s)
7+
`````````````
8+
9+
- Barry Morrison (@esacteksab)
10+
611
Requests
712
````````
813

@@ -48,4 +53,8 @@ Contributors
4853

4954
- Matias Bordese (@matiasb)
5055

51-
- Aleksey Ostapenko (@kbakba)
56+
- Aleksey Ostapenko (@kbakba)
57+
58+
- Vincent Driessen (@nvie)
59+
60+
- Philip Chimento (@ptomato)

‎CONTRIBUTING.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Guidelines for Contributing to github3.py
33

44
#. Read theREADME_
55

6+
#. Please do **not** use the issue tracker for questions.
7+
8+
#. Please use GitHub's search feature to look for already reported issues
9+
before reporting your own.
10+
611
#. Regardless of the magnitude your pull request (a couple lines to a couple
712
hundred lines), please add your name to theAUTHORS.rst_ file under the
813
heading Contributors.
@@ -41,7 +46,7 @@ Guidelines for Contributing to github3.py
4146

4247
#. In case you haven't caught on, for anything you add, write tests.
4348

44-
#. Becordial_. Seriously,ifanyone who isn't cordial will be sent packing,
49+
#. Becordial_. Seriously, anyone who isn't cordial will be sent packing,
4550
regardless of the value of their contributions. I will not tolerate some
4651
contributors creating a hostile environment for others.
4752

‎HISTORY.rst

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,54 @@
11
History/Changelog
2-
=================
2+
-----------------
3+
4+
0.8.0: 2014-01-03
5+
~~~~~~~~~~~~~~~~~
6+
7+
- **Breaking Change** Remove legacy search API
8+
9+
I realize this should have been scheduled for 1.0 but I was a bit eager to
10+
remove this.
11+
12+
- Use Betamax to start recording integration tests
13+
14+
- Add support for Releases API
15+
16+
- Add support for Feeds API
17+
18+
- Add support for Two-Factor Authentication via the API
19+
20+
- Add support for New Search API
21+
22+
- Add ``github3.search_code``, ``github3.search_issues``,
23+
``github3.search_repositories``, ``github3.search_users``
24+
25+
- Add ``GitHub#search_code``, ``GitHub#search_issues``,
26+
``GitHub#search_repositories``, ``GitHub#search_users``
27+
28+
- Switch to requests >= 2.0
29+
30+
- Totally remove all references to the Downloads API
31+
32+
- Fix bug in ``Repository#update_file`` where ``branch`` was not being sent to
33+
the API. Thanks @tpetr!
34+
35+
- Add ``GitHub#rate_limit`` to return all of the information from the
36+
``/rate_limit`` endpoint.
37+
38+
- Catch missing attributes -- ``diff_hunk``, ``original_commit_id`` -- on
39+
``ReviewComment``.
40+
41+
- Add support for the Emojis endpoint
42+
43+
- Note deprecation of a few object attributes
44+
45+
- Add support for the ``ReleaseEvent``
46+
47+
- Add ``GitHub#iter_user_teams`` to return all of the teams the authenticated
48+
user belongs to
349

450
0.7.1: 2013-09-30
5-
-----------------
51+
~~~~~~~~~~~~~~~~~
652

753
- Add dependency onuritemplate.py_ to add URITemplates to different classes.
854
See the documentation for attributes which are templates.
@@ -17,7 +63,7 @@ History/Changelog
1763
.. _uritemplate.py:https://github.com/sigmavirus24/uritemplate
1864

1965
0.7.0: 2013-05-19
20-
-----------------
66+
~~~~~~~~~~~~~~~~~
2167

2268
- Fix ``Issue.close``, ``Issue.reopen``, and ``Issue.assign``. (Issue #106)
2369

@@ -46,12 +92,12 @@ History/Changelog
4692
u = gh.user('sigmavirus24')
4793

4894
0.6.1: 2013-04-06
49-
-----------------
95+
~~~~~~~~~~~~~~~~~
5096

5197
- Add equality for labels courtesy of Alejandro Gomez (@alejandrogomez)
5298

5399
0.6.0: 2013-04-05
54-
-----------------
100+
~~~~~~~~~~~~~~~~~
55101

56102
- Add ``sort`` and ``order`` parameters to ``github3.GitHub.search_users`` and
57103
``github3.GitHub.search_repos``.
@@ -91,22 +137,22 @@ History/Changelog
91137
about how equivalence is determined.
92138

93139
0.5.3: 2013-03-19
94-
-----------------
140+
~~~~~~~~~~~~~~~~~
95141

96142
- Add missing optional parameter to Repository.contents. Thanks @tpetr
97143

98144
0.5.2: 2013-03-02
99-
-----------------
145+
~~~~~~~~~~~~~~~~~
100146

101147
- Stop trying to decode the byte strings returned by ``b64decode``. Fixes #72
102148

103149
0.5.1: 2013-02-21
104-
-----------------
150+
~~~~~~~~~~~~~~~~~
105151

106152
- Hot fix an issue when a user doesn't have a real name set
107153

108154
0.5: 2013-02-16
109-
---------------
155+
~~~~~~~~~~~~~~~
110156

111157
- 100% (mock) test coverage
112158

@@ -203,7 +249,7 @@ History/Changelog
203249
.. _pengwynn/octokit:https://github.com/pengwynn/octokit
204250

205251
0.4: 2013-01-16
206-
---------------
252+
~~~~~~~~~~~~~~~
207253

208254
- In github3.legacy.LegacyRepo
209255

@@ -235,7 +281,7 @@ History/Changelog
235281
- 70% test coverage
236282

237283
0.3: 2013-01-01
238-
---------------
284+
~~~~~~~~~~~~~~~
239285

240286
- In github3.repos.Repository
241287

@@ -305,7 +351,7 @@ History/Changelog
305351
.. _types:http://developer.github.com/v3/repos/#list-organization-repositories
306352

307353
0.2: 2012-11-21
308-
---------------
354+
~~~~~~~~~~~~~~~
309355

310356
- MAJOR API CHANGES:
311357

@@ -323,12 +369,12 @@ History/Changelog
323369
- 50% test coverage via mock tests
324370

325371
0.1: 2012-11-13
326-
---------------
372+
~~~~~~~~~~~~~~~
327373

328374
- Add API for GitHub Enterprise customers.
329375

330376
0.1b2: 2012-11-10
331-
-----------------
377+
~~~~~~~~~~~~~~~~~
332378

333379
- Handle 500 errors better, courtesy of Kristian Glass (@doismellburning)
334380
- Handle sending json with `%` symbols better, courtesy of Kristian Glass
@@ -337,14 +383,14 @@ History/Changelog
337383
- Correctly display method signatures in documentation courtesy of (@seveas)
338384

339385
0.1b1: 2012-10-31
340-
-----------------
386+
~~~~~~~~~~~~~~~~~
341387

342388
- unit tests implemented using mock instead of hitting the GitHub API (#37)
343389
- removed ``list_*`` functions from GitHub object
344390
- Notifications API coverage
345391

346392
0.1b0: 2012-10-06
347-
-----------------
393+
~~~~~~~~~~~~~~~~~
348394

349395
- Support for the complete GitHub API (accomplished)
350396

‎README.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ Please read the `CONTRIBUTING`_ document.
3232
Testing
3333
~~~~~~~
3434

35-
You can run either ``pip install -r requirements.txt`` to install the
35+
You can run either ``pip install -rdev-requirements.txt`` to install the
3636
following before testing or simply ``make test-deps``. It is suggested you do
3737
this in a virtual enviroment. These need to be installed for the tests to run.
3838

39-
-expecter_ by Gary Bernhardt
40-
-mock_ by Michael Foord
39+
-betamax_
4140
-coverage_ by Ned Batchelder
41+
-mock_ by Michael Foord
4242

43-
.._expecter:https://github.com/garybernhardt/expecter
43+
.._betamax:https://github.com/sigmavirus24/betamax
4444
.. _coverage:http://nedbatchelder.com/code/coverage/
4545
.. _mock:http://mock.readthedocs.org/en/latest/
4646

@@ -63,11 +63,6 @@ Testing
6363

6464
Install the dependencies from requirements.txt e.g.:
6565

66-
::
67-
68-
pip install -r requirements.txt
69-
# or make test-deps
70-
7166
::
7267

7368
make tests

‎dev-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
requests==1.2.3
1+
requests>=2.0.0,<=3.0.0
22
uritemplate.py==0.2.0
3-
betamax==0.1.0
4-
coverage==3.5.2
3+
#coverage==3.5.2
54
mock==1.0.1
6-
pytest==2.3.5
5+
pytest>=2.3.5
76
wheel==0.21.0
7+
git+git://github.com/sigmavirus24/betamax

‎docs/api.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,20 @@ Or you can simply use the following functions
129129

130130
------
131131

132-
..autofunction::github3.search_issues
132+
..autofunction::github3.search_code
133133

134134
------
135135

136-
..autofunction::github3.search_repos
136+
..autofunction::github3.search_issues
137137

138138
------
139139

140-
..autofunction::github3.search_users
140+
..autofunction::github3.search_repositories
141141

142142
------
143143

144-
..autofunction::github3.search_email
144+
..autofunction::github3.search_users
145+
145146

146147
------
147148

‎docs/examples/gist.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ Creating an anonymous gist
5353
# Which of course it didn't, because you're not logged in
5454
# comment == None
5555
print(gist.html_url)
56+
57+
In the above examples ``'spam.txt'`` is the file name. GitHub will auto-detect
58+
file type based on extension provided. ``'What... is the air-speed velocity of
59+
an unladen swallow?'`` is the file's content or body. ``'Answer this to cross
60+
the bridge'`` is the gists's description. While required by github3.py, it is
61+
allowed to be empty, e.g., ``''`` is accepted by GitHub.

‎docs/examples/two_factor_auth.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Using Two Factor Authentication with github3.py
2+
===============================================
3+
4+
GitHub recently added support for Two Factor Authentication to ``github.com``
5+
and shortly thereafter added support for it on ``api.github.com``. In version
6+
0.8, github3.py also added support for it and you can use it right now.
7+
8+
To use Two Factor Authentication, you must define your own function that will
9+
return your one time authentication code. You then provide that function when
10+
logging in with github3.py.
11+
12+
For example:
13+
14+
..code::
15+
16+
import github3
17+
18+
try:
19+
# Python 2
20+
prompt = raw_input
21+
except NameError:
22+
# Python 3
23+
prompt = input
24+
25+
def my_two_factor_function():
26+
code = ''
27+
while not code:
28+
# The user could accidentally press Enter before being ready,
29+
# let's protect them from doing that.
30+
code = prompt('Enter 2FA code: ')
31+
return code
32+
33+
g = github3.login('sigmavirus24', 'my_password',
34+
two_factor_callback=my_two_factor_function)
35+
36+
Then each the API tells github3.py it requires a Two Factor Authentication
37+
code, github3.py will call ``my_two_factor_function`` which prompt you for it.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp