Commit 35c24f21 authored by Emmanuel Arias's avatar Emmanuel Arias

Update upstream source from tag 'upstream/1.43.3'

Update to upstream version '1.43.3'
with Debian dir 63f7f5f883f466a365b9d16fda44291d592ade0a
parents c0c1e5e1 98eb62e9
Metadata-Version: 1.1
Metadata-Version: 2.1
Name: PyGithub
Version: 1.35
Version: 1.43.3
Summary: Use the full Github API v3
Home-page: http://pygithub.github.io/PyGithub/v1/index.html
Home-page: http://pygithub.readthedocs.io/en/latest/
Author: Vincent Jacques
Author-email: vincent@vincent-jacques.net
License: UNKNOWN
......@@ -13,26 +13,22 @@ Description: (Very short) Tutorial
from github import Github
# using username and password
g = Github("user", "password")
# or using an access token
g = Github("access_token")
Then play with your Github objects::
for repo in g.get_user().get_repos():
print repo.name
print(repo.name)
repo.edit(has_wiki=False)
You can also create a Github instance with an OAuth token::
g = Github(token)
Or without authentication::
g = Github()
Reference documentation
=======================
See http://pygithub.github.io/PyGithub/v1/index.html
See http://pygithub.readthedocs.io/en/latest/
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
......@@ -41,12 +37,11 @@ Classifier: License :: OSI Approved :: GNU Library or Lesser General Public Lice
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Provides-Extra: integrations
Metadata-Version: 1.1
Name: PyGithub
Version: 1.35
Summary: Use the full Github API v3
Home-page: http://pygithub.github.io/PyGithub/v1/index.html
Author: Vincent Jacques
Author-email: vincent@vincent-jacques.net
License: UNKNOWN
Description: (Very short) Tutorial
=====================
First create a Github instance::
from github import Github
g = Github("user", "password")
Then play with your Github objects::
for repo in g.get_user().get_repos():
print repo.name
repo.edit(has_wiki=False)
You can also create a Github instance with an OAuth token::
g = Github(token)
Or without authentication::
g = Github()
Reference documentation
=======================
See http://pygithub.github.io/PyGithub/v1/index.html
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development
This diff is collapsed.
pyjwt
[integrations]
cryptography
# PyGitHub
[![PyPI](https://img.shields.io/pypi/v/PyGithub.svg)](https://pypi.python.org/pypi/PyGithub)
[![Build Status](https://travis-ci.org/PyGithub/PyGithub.svg?branch=master)](https://travis-ci.org/PyGithub/PyGithub)
[![PyPi](https://img.shields.io/pypi/dm/pygithub.svg)](https://pypi.python.org/pypi?%3Aaction=search&term=pygithub&submit=search)
[![readthedocs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://pygithub.readthedocs.org/en/stable)
[![readthedocs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://pygithub.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/license-LGPL-blue.svg)](https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License)
[![Join the chat at https://gitter.im/PyGithub/PyGithub](https://badges.gitter.im/PyGithub/PyGithub.svg)](https://gitter.im/PyGithub/PyGithub?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Open Source Helpers](https://www.codetriage.com/pygithub/pygithub/badges/users.svg)](https://www.codetriage.com/pygithub/pygithub)
PyGitHub is a Python (2 and 3) library to access the [GitHub API v3].
PyGitHub is a Python (2 and 3) library to access the [GitHub API v3] and [Github Enterprise API v3].
This library enables you to manage [GitHub] resources such as repositories, user profiles, and organizations in your Python applications.
[GitHub API v3]: https://developer.github.com/v3
[Github Enterprise API v3]: https://developer.github.com/enterprise/2.13/v3/
[GitHub]: https://github.com
## Install
```bash
$ pip install PyGithub
```
## Simple Demo
```python
from github import Github
# First create a Github instance:
# using username and password
g = Github("user", "password")
# or using an access token
g = Github("access_token")
# Github Enterprise with custom hostname
g = Github(base_url="https://{hostname}/api/v3", login_or_token="access_token")
# Then play with your Github objects:
for repo in g.get_user().get_repos():
print repo.name
print(repo.name)
```
## Documentation
More information can be found on the [PyGitHub documentation site.](http://pygithub.readthedocs.io/en/latest/introduction.html)
More information can be found on the [PyGitHub documentation site.](https://pygithub.readthedocs.io/en/latest/introduction.html)
## Development
......
pygithub (1.40-2) UNRELEASED; urgency=medium
pygithub (1.43.3-1) unstable; urgency=medium
[Ondřej Nový]
* Convert git repository from git-dpm to gbp layout
-- Ondřej Nový <onovy@debian.org> Wed, 08 Aug 2018 09:17:50 +0200
[Emmanuel Arias]
* New upstream version (1.43.3)
* Update d/rules
-- Emmanuel Arias <emmanuelarias30@gmail.com> Thu, 29 Nov 2018 23:58:30 -0300
pygithub (1.40-1) unstable; urgency=medium
......
......@@ -7,6 +7,10 @@ export PYBUILD_DISABLE=test
%:
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_auto_clean:
rm -rf *.egg-info
dh_auto_clean
override_dh_python3:
dh_python3
rm -rfv debian/python3-github/usr/lib/python3.*
This diff is collapsed.
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> #
# Copyright 2013 AKFish <akfish@gmail.com> #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
# Copyright 2018 sfdye <tsfdye@gmail.com> #
# #
# This file is part of PyGithub. #
# http://pygithub.github.io/PyGithub/v1/index.html #
# http://pygithub.readthedocs.io/ #
# #
# PyGithub is free software: you can redistribute it and/or modify it under #
# the terms of the GNU Lesser General Public License as published by the Free #
......@@ -23,7 +28,7 @@
# You should have received a copy of the GNU Lesser General Public License #
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
# #
# ##############################################################################
################################################################################
import github.GithubObject
......@@ -32,7 +37,7 @@ import github.AuthorizationApplication
class Authorization(github.GithubObject.CompletableGithubObject):
"""
This class represents Authorizations as returned for example by http://developer.github.com/v3/todo
This class represents Authorizations. The reference can be found here https://developer.github.com/v3/oauth_authorizations/
"""
def __repr__(self):
......
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> #
# Copyright 2013 AKFish <akfish@gmail.com> #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
# Copyright 2018 sfdye <tsfdye@gmail.com> #
# #
# This file is part of PyGithub. #
# http://pygithub.github.io/PyGithub/v1/index.html #
# http://pygithub.readthedocs.io/ #
# #
# PyGithub is free software: you can redistribute it and/or modify it under #
# the terms of the GNU Lesser General Public License as published by the Free #
......@@ -23,14 +28,14 @@
# You should have received a copy of the GNU Lesser General Public License #
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
# #
# ##############################################################################
################################################################################
import github.GithubObject
class AuthorizationApplication(github.GithubObject.CompletableGithubObject):
"""
This class represents AuthorizationApplications as returned for example by http://developer.github.com/v3/todo
This class represents AuthorizationApplications
"""
def __repr__(self):
......
This diff is collapsed.
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2018 Steve Kowalik <steven@wedontsleep.org> #
# #
# This file is part of PyGithub. #
# http://pygithub.readthedocs.io/ #
# #
# PyGithub is free software: you can redistribute it and/or modify it under #
# the terms of the GNU Lesser General Public License as published by the Free #
# Software Foundation, either version 3 of the License, or (at your option) #
# any later version. #
# #
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
# details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
# #
################################################################################
import github.GithubObject
import github.NamedUser
import github.RequiredPullRequestReviews
import github.RequiredStatusChecks
import github.Team
class BranchProtection(github.GithubObject.CompletableGithubObject):
"""
This class represents Branch Protection. The reference can be found here https://developer.github.com/v3/repos/branches/#get-branch-protection
"""
def __repr__(self):
return self.get__repr__({"url": self._url.value})
@property
def url(self):
"""
:type: string
"""
self._completeIfNotSet(self._url)
return self._url.value
@property
def required_status_checks(self):
"""
:type: :class:`github.RequiredStatusChecks.RequiredStatusChecks`
"""
self._completeIfNotSet(self._required_status_checks)
return self._required_status_checks.value
@property
def enforce_admins(self):
"""
:type: bool
"""
self._completeIfNotSet(self._enforce_admins)
return self._enforce_admins.value
@property
def required_pull_request_reviews(self):
"""
:type: :class:`github.RequiredPullRequestReviews.RequiredPullRequestReviews`
"""
self._completeIfNotSet(self._required_pull_request_reviews)
return self._required_pull_request_reviews.value
def get_user_push_restrictions(self):
"""
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
if self._user_push_restrictions is github.GithubObject.NotSet:
return None
return github.PaginatedList.PaginatedList(
github.NamedUser.NamedUser,
self._requester,
self._user_push_restrictions,
None
)
def get_team_push_restrictions(self):
"""
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
"""
if self._team_push_restrictions is github.GithubObject.NotSet:
return None
return github.PaginatedList.PaginatedList(
github.Team.Team,
self._requester,
self._team_push_restrictions,
None
)
def _initAttributes(self):
self._url = github.GithubObject.NotSet
self._required_status_checks = github.GithubObject.NotSet
self._enforce_admins = github.GithubObject.NotSet
self._required_pull_request_reviews = github.GithubObject.NotSet
self._user_push_restrictions = github.GithubObject.NotSet
self._team_push_restrictions = github.GithubObject.NotSet
def _useAttributes(self, attributes):
if "url" in attributes: # pragma no branch
self._url = self._makeStringAttribute(attributes["url"])
if "required_status_checks" in attributes: # pragma no branch
self._required_status_checks = self._makeClassAttribute(github.RequiredStatusChecks.RequiredStatusChecks, attributes["required_status_checks"])
if "enforce_admins" in attributes: # pragma no branch
self._enforce_admins = self._makeBoolAttribute(attributes["enforce_admins"]["enabled"])
if "required_pull_request_reviews" in attributes: # pragma no branch
self._required_pull_request_reviews = self._makeClassAttribute(github.RequiredPullRequestReviews.RequiredPullRequestReviews, attributes["required_pull_request_reviews"])
if "restrictions" in attributes: # pragma no branch
self._user_push_restrictions = attributes["restrictions"]["users_url"]
self._team_push_restrictions = attributes["restrictions"]["teams_url"]
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> #
# Copyright 2013 AKFish <akfish@gmail.com> #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2013 martinqt <m.ki2@laposte.net> #
# Copyright 2014 Andy Casey <acasey@mso.anu.edu.au> #
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #