Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(oslogin): add py2 deprecation warning; bump copyright year to 2020; add 3.8 unit tests (via synth) #10071

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oslogin/docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}
1 change: 1 addition & 0 deletions oslogin/docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

{% extends "!layout.html" %}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
Expand Down
2 changes: 1 addition & 1 deletion oslogin/google/__init__.py
Original file line number Diff line number Diff line change
@@ -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 oslogin/google/cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -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 oslogin/google/cloud/oslogin.py
Original file line number Diff line number Diff line change
@@ -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 oslogin/google/cloud/oslogin_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -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 oslogin/google/cloud/oslogin_v1/gapic/enums.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 oslogin/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 oslogin/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 oslogin/google/cloud/oslogin_v1/types.py
Original file line number Diff line number Diff line change
@@ -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 oslogin/noxfile.py
Original file line number Diff line number Diff line change
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 oslogin/synth.metadata
Original file line number Diff line number Diff line change
@@ -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 oslogin/synth.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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