Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #1013 from sigmavirus24/deprecated-code-removal
Browse files Browse the repository at this point in the history
Deprecated code removal
  • Loading branch information
sigmavirus24 committed Jan 6, 2021
2 parents 52b9d5f + 4881f53 commit 5766ecd
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 1,448 deletions.
73 changes: 0 additions & 73 deletions docs/source/api-reference/api.rst
Expand Up @@ -35,79 +35,6 @@ To use the API anonymously, you can also create a new
gh = GitHub()
Or you can use the following functions:

Anonymous Functions
-------------------

.. autofunction:: github3.authorize

Deprecated Functions
~~~~~~~~~~~~~~~~~~~~

.. warning::

Due to GitHub's anonymous rate limits, it's strongly advised that you don't
use these functions.

.. autofunction:: github3.create_gist

.. autofunction:: github3.gist

.. autofunction:: github3.gitignore_template

.. autofunction:: github3.gitignore_templates

.. autofunction:: github3.issue

.. autofunction:: github3.issues_on

.. autofunction:: github3.all_repositories

.. autofunction:: github3.all_users

.. autofunction:: github3.all_events

.. autofunction:: github3.followers_of

.. autofunction:: github3.followed_by

.. autofunction:: github3.public_gists

.. autofunction:: github3.gists_by

.. autofunction:: github3.organizations_with

.. autofunction:: github3.repositories_by

.. autofunction:: github3.starred_by

.. autofunction:: github3.subscriptions_for

.. autofunction:: github3.markdown

.. autofunction:: github3.octocat

.. autofunction:: github3.organization

.. autofunction:: github3.pull_request

.. autofunction:: github3.rate_limit

.. autofunction:: github3.repository

.. autofunction:: github3.search_code

.. autofunction:: github3.search_issues

.. autofunction:: github3.search_repositories

.. autofunction:: github3.search_users

.. autofunction:: github3.user

.. autofunction:: github3.zen

Enterprise Use
==============

Expand Down
48 changes: 47 additions & 1 deletion docs/source/release-notes/2.0.0.rst
@@ -1,4 +1,4 @@
1.4.0: 2020-12-29
2.0.0: 2020-01-02
-----------------

Features Added
Expand All @@ -9,3 +9,49 @@ Features Added
- Update CI/CD to thoroughly test all supported version.
- Remove compatibility imports for Python 2.
- Remove dev-dependency for mock.

Removals
````````

Removal of already deprecated code on version 1.x:

- ``github3.api.all_events`` use ``github.GitHub.all_events``
- ``github3.api.all_repositories`` use ``github.GitHub.all_repositories``
- ``github3.api.all_users`` use ``github.GitHub.all_users``
- ``github3.api.authorize`` use ``github.GitHub.authorize``
- ``github3.api.create_gist`` use ``github.GitHub.create_gist``
- ``github3.api.emojis``
- ``github3.api.followed_by`` use ``github.GitHub.followed_by``
- ``github3.api.followers_of`` use ``github.GitHub.followers_of``
- ``github3.api.gist`` use ``github.GitHub.gist``
- ``github3.api.gists_by`` use ``github.GitHub.gists_by``
- ``github3.api.gitignore_template`` use ``github.GitHub.gitignore_template``
- ``github3.api.gitignore_templates`` use ``github.GitHub.gitignore_templates``
- ``github3.api.issue`` use ``github.GitHub.issue``
- ``github3.api.issues_on`` use ``github.GitHub.issues_on``
- ``github3.api.markdown`` use ``github.GitHub.markdown``
- ``github3.api.octocat`` use ``github.GitHub.octocat``
- ``github3.api.organization``
- ``github3.api.organizations_with`` use ``github.GitHub.organizations_with``
- ``github3.api.public_gists`` use ``github.GitHub.public_gists``
- ``github3.api.pull_request`` use ``github.GitHub.pull_request``
- ``github3.api.rate_limit``
- ``github3.api.repositories_by`` use ``github.GitHub.organizations_with``
- ``github3.api.repository``
- ``github3.api.search_code`` use ``github.GitHub.search_code``
- ``github3.api.search_issues`` use ``github.GitHub.search_issues``
- ``github3.api.search_repositories`` use ``github.GitHub.search_repositories``
- ``github3.api.search_users`` use ``github.GitHub.search_users``
- ``github3.api.starred_by`` use ``github.GitHub.starred_by``
- ``github3.api.subscriptions_for`` use ``github.GitHub.subscriptions_for``
- ``github3.api.user``
- ``github3.api.zen`` use ``github.GitHub.zen``
- ``Git#Blob.decoded`` use ``Git#Blob.decode_content``
- ``Team#is_member`` use ``Login#is_member``
- ``Team#add_member`` use ``Team#add_or_update_membership``
- ``Team#invite`` use ``Team#add_or_update_membership``
- ``Team#remove_member`` use ``Team#add_or_update_membership``
- ``Organization#add_member`` add ``username`` to ``team``.
- ``Organization#events`` use ``Organization#public_events``
- ``Issue#assign`` use ``issues.issue.Issue.add_assignees``

2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -62,7 +62,7 @@ def run_tests(self): # noqa: D102
# import here, cause outside the eggs aren't loaded
import pytest

warnings.warn("pyton setup.py test support is deprecated.", DeprecationWarning)
warnings.warn("python setup.py test support is deprecated.", DeprecationWarning)
errno = pytest.main(self.test_args)
sys.exit(errno)

Expand Down
31 changes: 0 additions & 31 deletions src/github3/__init__.py
Expand Up @@ -22,39 +22,8 @@
__url__,
)
from .api import (
all_events,
all_repositories,
all_users,
authorize,
create_gist,
emojis,
enterprise_login,
followed_by,
followers_of,
gist,
gists_by,
gitignore_template,
gitignore_templates,
issue,
issues_on,
login,
markdown,
octocat,
organization,
organizations_with,
public_gists,
pull_request,
rate_limit,
repositories_by,
repository,
search_code,
search_issues,
search_repositories,
search_users,
starred_by,
subscriptions_for,
user,
zen,
)
from .github import GitHub, GitHubEnterprise
from .exceptions import GitHubError
Expand Down

0 comments on commit 5766ecd

Please sign in to comment.