Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
fix(oslogin): add py2 deprecation warning; bump copyright year to 202…
Browse files Browse the repository at this point in the history
…0; add 3.8 unit tests (via synth) (#10071)

* [CHANGE ME] Re-generated oslogin to pick up changes in the API or client library generator.

* chore: regen

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
  • Loading branch information
yoshi-automation and busunkim96 committed Jan 30, 2020
1 parent 87baa37 commit 3085490
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/_static/custom.css
@@ -1,4 +1,4 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}
1 change: 1 addition & 0 deletions docs/_templates/layout.html
@@ -1,3 +1,4 @@

{% extends "!layout.html" %}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
Expand Down
2 changes: 1 addition & 1 deletion google/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/oslogin.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/oslogin_v1/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,23 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.oslogin_v1 import types
from google.cloud.oslogin_v1.gapic import enums
from google.cloud.oslogin_v1.gapic import os_login_service_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class OsLoginServiceClient(os_login_service_client.OsLoginServiceClient):
__doc__ = os_login_service_client.OsLoginServiceClient.__doc__
enums = enums
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/oslogin_v1/gapic/enums.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/oslogin_v1/gapic/os_login_service_client.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 4 additions & 2 deletions google/cloud/oslogin_v1/proto/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions google/cloud/oslogin_v1/proto/oslogin_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion google/cloud/oslogin_v1/types.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Expand Up @@ -86,7 +86,7 @@ def default(session):
)


@nox.session(python=["2.7", "3.5", "3.6", "3.7"])
@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
def unit(session):
"""Run the unit test suite."""
default(session)
Expand Down
101 changes: 95 additions & 6 deletions synth.metadata
@@ -1,19 +1,19 @@
{
"updateTime": "2019-11-07T00:17:37.354583Z",
"updateTime": "2020-01-30T02:35:03.193416Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.41.0",
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
"version": "0.44.4",
"dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "2275670a746ab2bc03ebba0d914b45320ea15af4",
"internalRef": "278922329"
"remote": "git@github.com:googleapis/googleapis.git",
"sha": "b491d07cadaae7cde5608321f913e5ca1459b32d",
"internalRef": "292245373"
}
},
{
Expand All @@ -35,5 +35,94 @@
"config": "google/cloud/oslogin/artman_oslogin_v1.yaml"
}
}
],
"newFiles": [
{
"path": "MANIFEST.in"
},
{
"path": ".flake8"
},
{
"path": "noxfile.py"
},
{
"path": ".coveragerc"
},
{
"path": "setup.cfg"
},
{
"path": "LICENSE"
},
{
"path": "docs/conf.py"
},
{
"path": "docs/_static/custom.css"
},
{
"path": "docs/gapic/v1/api.rst"
},
{
"path": "docs/gapic/v1/types.rst"
},
{
"path": "docs/_templates/layout.html"
},
{
"path": "google/__init__.py"
},
{
"path": "google/cloud/__init__.py"
},
{
"path": "google/cloud/oslogin.py"
},
{
"path": "google/cloud/oslogin_v1/types.py"
},
{
"path": "google/cloud/oslogin_v1/__init__.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/__init__.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/os_login_service_client.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/os_login_service_client_config.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/enums.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/transports/__init__.py"
},
{
"path": "google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py"
},
{
"path": "google/cloud/oslogin_v1/proto/oslogin.proto"
},
{
"path": "google/cloud/oslogin_v1/proto/oslogin_pb2_grpc.py"
},
{
"path": "google/cloud/oslogin_v1/proto/__init__.py"
},
{
"path": "google/cloud/oslogin_v1/proto/common_pb2.py"
},
{
"path": "google/cloud/oslogin_v1/proto/common_pb2_grpc.py"
},
{
"path": "google/cloud/oslogin_v1/proto/oslogin_pb2.py"
},
{
"path": "tests/unit/gapic/v1/test_os_login_service_client_v1.py"
}
]
}
2 changes: 1 addition & 1 deletion synth.py
Expand Up @@ -41,7 +41,7 @@
library / "google/cloud/oslogin_v1/proto/oslogin_v1/**",
],
)
s.move(library / "google/cloud/oslogin_v1/proto/**/*", "google/cloud/oslogin_v1/proto")
s.move(library / "google/cloud/oslogin_v1/proto/**/*.py", "google/cloud/oslogin_v1/proto")


# Fix up imports
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/gapic/v1/test_os_login_service_client_v1.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 3085490

Please sign in to comment.