Skip to content

Commit

Permalink
chore!: remove "apiclient" package
Browse files Browse the repository at this point in the history
"apiclient" was created in 2014 as a stop-gap to help people transition from
"apiclient" to "googleapiclient". This transition should have been completed in
the past 10 years.

However now this is creating package pollution that interferes with another PyPI
package called "api-client" that also writes to ".../site-packages/apiclient/"
and conflicts with this package.

BREAKING CHANGE: removes "apiclient" package which may still break those
who haven't transitioned.
  • Loading branch information
kruton committed Jan 28, 2025
1 parent 74d230f commit 294bb51
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 38 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
recursive-include apiclient *.json *.py
recursive-include googleapiclient *.json *.py
include CHANGELOG
include LICENSE
Expand Down
27 changes: 0 additions & 27 deletions apiclient/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Author: [email protected] (Joe Gregorio)
#
# Creates the documentation set for the library by
# running pydoc on all the files in apiclient.
# running pydoc on all the files in googleapiclient.
#
# Notes: You may have to update the location of the
# App Engine library for your local system.
Expand Down
2 changes: 1 addition & 1 deletion docs/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If a request fails, an [`googleapiclient.errors.HttpError`](https://googleapis.g
The following is a good exception handling pattern for resumable media uploads:

```py
except apiclient.errors.HttpError, e:
except googleapiclient.errors.HttpError, e:
if e.resp.status in [404]:
# Start the upload all over again.
elif e.resp.status in [500, 502, 503, 504]:
Expand Down
6 changes: 3 additions & 3 deletions googleapiclient/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,9 @@ def new_batch_http_request(callback=None):
callback: callable, A callback to be called for each response, of the
form callback(id, response, exception). The first parameter is the
request id, and the second is the deserialized response object. The
third is an apiclient.errors.HttpError exception object if an HTTP
error occurred while processing the request, or None if no error
occurred.
third is a googleapiclient.errors.HttpError exception object if an
HTTP error occurred while processing the request, or None if no
error occurred.
Returns:
A BatchHttpRequest object based on the discovery document.
Expand Down
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
BLACK_VERSION = "black==22.3.0"
ISORT_VERSION = "isort==5.10.1"
BLACK_PATHS = [
"apiclient",
"googleapiclient",
"scripts",
"tests",
Expand Down
2 changes: 1 addition & 1 deletion samples/prediction/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import sys
import time

from apiclient import sample_tools
from googleapiclient import sample_tools
from oauth2client import client


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from setuptools import setup

packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
packages = ["googleapiclient", "googleapiclient/discovery_cache"]

install_requires = [
"httplib2>=0.19.0,<1.dev0",
Expand Down
4 changes: 2 additions & 2 deletions tools/gae-zip-creator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV_PATH=${ROOT_PATH}/ve
LOG_PATH=${ROOT_PATH}/gae_zip_build.log

# The api client version
APICLIENT_VERSION=$(python -c "import apiclient; print apiclient.__version__")
APICLIENT_VERSION=$(python -c "import googleapiclient; print googleapiclient.__version__")

# Where to create the zip.
DIST_PATH=$(pwd)/dist/gae
Expand Down Expand Up @@ -57,7 +57,7 @@ echo "Built zip in ${ZIP_PATH}"
# Sanity test the zip.
# TODO (afshar): Run the complete test suite.
echo "Sanity testing the zip:"
export SANITY_MODS="httplib2 apiclient uritemplate oauth2client"
export SANITY_MODS="httplib2 googleapiclient uritemplate oauth2client"
export SANITY_ZIP=${ZIP_PATH}
export PYTHONPATH=${ZIP_PATH}
${ENV_PATH}/bin/python -c "import sys, os
Expand Down

0 comments on commit 294bb51

Please sign in to comment.