Skip to content

Commit ca7f003

Browse files
fix(oslogin): add py2 deprecation warning; bump copyright year to 2020; 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 <[email protected]>
1 parent b270311 commit ca7f003

16 files changed

+127
-24
lines changed

oslogin/docs/_static/custom.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}

oslogin/docs/_templates/layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
{% extends "!layout.html" %}
23
{%- block content %}
34
{%- if theme_fixed_sidebar|lower == 'true' %}

oslogin/google/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/oslogin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/oslogin_v1/__init__.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,12 +16,23 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.oslogin_v1 import types
2123
from google.cloud.oslogin_v1.gapic import enums
2224
from google.cloud.oslogin_v1.gapic import os_login_service_client
2325

2426

27+
if sys.version_info[:2] == (2, 7):
28+
message = (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message, DeprecationWarning)
34+
35+
2536
class OsLoginServiceClient(os_login_service_client.OsLoginServiceClient):
2637
__doc__ = os_login_service_client.OsLoginServiceClient.__doc__
2738
enums = enums

oslogin/google/cloud/oslogin_v1/gapic/enums.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/oslogin_v1/gapic/os_login_service_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/google/cloud/oslogin_v1/proto/common_pb2.py

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

oslogin/google/cloud/oslogin_v1/proto/oslogin_pb2.py

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

oslogin/google/cloud/oslogin_v1/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

oslogin/noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def default(session):
8686
)
8787

8888

89-
@nox.session(python=["2.7", "3.5", "3.6", "3.7"])
89+
@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
9090
def unit(session):
9191
"""Run the unit test suite."""
9292
default(session)

oslogin/synth.metadata

+95-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-11-07T00:17:37.354583Z",
2+
"updateTime": "2020-01-30T02:35:03.193416Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.41.0",
8-
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
7+
"version": "0.44.4",
8+
"dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
14-
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "2275670a746ab2bc03ebba0d914b45320ea15af4",
16-
"internalRef": "278922329"
14+
"remote": "git@github.com:googleapis/googleapis.git",
15+
"sha": "b491d07cadaae7cde5608321f913e5ca1459b32d",
16+
"internalRef": "292245373"
1717
}
1818
},
1919
{
@@ -35,5 +35,94 @@
3535
"config": "google/cloud/oslogin/artman_oslogin_v1.yaml"
3636
}
3737
}
38+
],
39+
"newFiles": [
40+
{
41+
"path": "MANIFEST.in"
42+
},
43+
{
44+
"path": ".flake8"
45+
},
46+
{
47+
"path": "noxfile.py"
48+
},
49+
{
50+
"path": ".coveragerc"
51+
},
52+
{
53+
"path": "setup.cfg"
54+
},
55+
{
56+
"path": "LICENSE"
57+
},
58+
{
59+
"path": "docs/conf.py"
60+
},
61+
{
62+
"path": "docs/_static/custom.css"
63+
},
64+
{
65+
"path": "docs/gapic/v1/api.rst"
66+
},
67+
{
68+
"path": "docs/gapic/v1/types.rst"
69+
},
70+
{
71+
"path": "docs/_templates/layout.html"
72+
},
73+
{
74+
"path": "google/__init__.py"
75+
},
76+
{
77+
"path": "google/cloud/__init__.py"
78+
},
79+
{
80+
"path": "google/cloud/oslogin.py"
81+
},
82+
{
83+
"path": "google/cloud/oslogin_v1/types.py"
84+
},
85+
{
86+
"path": "google/cloud/oslogin_v1/__init__.py"
87+
},
88+
{
89+
"path": "google/cloud/oslogin_v1/gapic/__init__.py"
90+
},
91+
{
92+
"path": "google/cloud/oslogin_v1/gapic/os_login_service_client.py"
93+
},
94+
{
95+
"path": "google/cloud/oslogin_v1/gapic/os_login_service_client_config.py"
96+
},
97+
{
98+
"path": "google/cloud/oslogin_v1/gapic/enums.py"
99+
},
100+
{
101+
"path": "google/cloud/oslogin_v1/gapic/transports/__init__.py"
102+
},
103+
{
104+
"path": "google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py"
105+
},
106+
{
107+
"path": "google/cloud/oslogin_v1/proto/oslogin.proto"
108+
},
109+
{
110+
"path": "google/cloud/oslogin_v1/proto/oslogin_pb2_grpc.py"
111+
},
112+
{
113+
"path": "google/cloud/oslogin_v1/proto/__init__.py"
114+
},
115+
{
116+
"path": "google/cloud/oslogin_v1/proto/common_pb2.py"
117+
},
118+
{
119+
"path": "google/cloud/oslogin_v1/proto/common_pb2_grpc.py"
120+
},
121+
{
122+
"path": "google/cloud/oslogin_v1/proto/oslogin_pb2.py"
123+
},
124+
{
125+
"path": "tests/unit/gapic/v1/test_os_login_service_client_v1.py"
126+
}
38127
]
39128
}

oslogin/synth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
library / "google/cloud/oslogin_v1/proto/oslogin_v1/**",
4242
],
4343
)
44-
s.move(library / "google/cloud/oslogin_v1/proto/**/*", "google/cloud/oslogin_v1/proto")
44+
s.move(library / "google/cloud/oslogin_v1/proto/**/*.py", "google/cloud/oslogin_v1/proto")
4545

4646

4747
# Fix up imports

oslogin/tests/unit/gapic/v1/test_os_login_service_client_v1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)