We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PubSub protobuf dependency requirements incorrect
I think the minimum version for the `protobuf` package dependency is not correct.  google-cloud-python has the version requirements as protobuf>=3.0.0, but it fails to import when using version up to and including protobuf==3.3.0.  I'm not sure what the exact correct version is, but the last version of google-cloud-pubsub to work with protobuf==3.3.0 is google-cloud-pubsub==0.35.4.  I believe after this commit (https://github.com/GoogleCloudPlatform/google-cloud-python/commit/371333a51165e99d4d02876b1ef133618485b6fc#diff-29280288794caf553b0b008084a0e854), a protobuf version >3.3.0 is required:

Python version
```
$ python --version
Python 2.7.15rc1
```

Package versions:
```
$ pip list | grep -E '(cloud|protobuf)'
google-cloud-core                  0.28.1      
google-cloud-datastore             1.7.0       
google-cloud-pubsub                0.38.0      
google-cloud-storage               1.12.0      
protobuf                           3.3.0 
```

Getting a stack track just importing pubsub (in ipython here)
```
In [1]: from google.cloud import pubsub
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-8fba37b708ad> in <module>()
----> 1 from google.cloud import pubsub

/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub.py in <module>()
     17 from __future__ import absolute_import
     18 
---> 19 from google.cloud.pubsub_v1 import PublisherClient
     20 from google.cloud.pubsub_v1 import SubscriberClient
     21 from google.cloud.pubsub_v1 import types

/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/__init__.py in <module>()
     15 from __future__ import absolute_import
     16 
---> 17 from google.cloud.pubsub_v1 import types
     18 from google.cloud.pubsub_v1 import publisher
     19 from google.cloud.pubsub_v1 import subscriber

/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/types.py in <module>()
     28 
     29 from google.api_core.protobuf_helpers import get_messages
---> 30 from google.cloud.pubsub_v1.proto import pubsub_pb2
     31 
     32 

/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/proto/pubsub_pb2.py in <module>()
     45       message_type=None, enum_type=None, containing_type=None,
     46       is_extension=False, extension_scope=None,
---> 47       options=None, file=DESCRIPTOR),
     48   ],
     49   extensions=[

TypeError: __new__() got an unexpected keyword argument 'file'
```

Snipped the pubsub section from pipdeptree output showing the protobuf requirement is >=3.0.0:
```
 - google-cloud-pubsub [required: Any, installed: 0.38.0]
    - enum34 [required: Any, installed: 1.1.6]
    - google-api-core [required: >=1.1.0,<2.0.0dev, installed: 1.4.0]
      - futures [required: >=3.2.0, installed: 3.2.0]
      - google-auth [required: >=0.4.0,<2.0.0dev, installed: 1.5.1]
        - cachetools [required: >=2.0.0, installed: 2.1.0]
        - pyasn1-modules [required: >=0.2.1, installed: 0.2.2]
          - pyasn1 [required: >=0.4.1,<0.5.0, installed: 0.4.4]
        - rsa [required: >=3.1.4, installed: 4.0]
          - pyasn1 [required: >=0.1.3, installed: 0.4.4]
        - six [required: >=1.9.0, installed: 1.11.0]
      - googleapis-common-protos [required: >=1.5.3,<2.0dev, installed: 1.5.3]
        - protobuf [required: >=3.0.0, installed: 3.3.0]
          - setuptools [required: Any, installed: 40.4.3]
          - six [required: >=1.9, installed: 1.11.0]
      - protobuf [required: >=3.0.0, installed: 3.3.0]
        - setuptools [required: Any, installed: 40.4.3]
        - six [required: >=1.9, installed: 1.11.0]
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pubsub/setup.py`
Content:
```
1 # Copyright 2018 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import io
16 import os
17 
18 import setuptools
19 
20 
21 # Package metadata.
22 
23 name = 'google-cloud-pubsub'
24 description = 'Google Cloud Pub/Sub API client library'
25 version = '0.38.0'
26 # Should be one of:
27 # 'Development Status :: 3 - Alpha'
28 # 'Development Status :: 4 - Beta'
29 # 'Development Status :: 5 - Production/Stable'
30 release_status = 'Development Status :: 4 - Beta'
31 dependencies = [
32     'google-api-core[grpc] >= 1.1.0, < 2.0.0dev',
33     'grpc-google-iam-v1 >= 0.11.1, < 0.12dev',
34     'enum34; python_version < "3.4"',
35 ]
36 extras = {
37 }
38 
39 
40 # Setup boilerplate below this line.
41 
42 package_root = os.path.abspath(os.path.dirname(__file__))
43 
44 readme_filename = os.path.join(package_root, 'README.rst')
45 with io.open(readme_filename, encoding='utf-8') as readme_file:
46     readme = readme_file.read()
47 
48 # Only include packages under the 'google' namespace. Do not include tests,
49 # benchmarks, etc.
50 packages = [
51     package for package in setuptools.find_packages()
52     if package.startswith('google')]
53 
54 # Determine which namespaces are needed.
55 namespaces = ['google']
56 if 'google.cloud' in packages:
57     namespaces.append('google.cloud')
58 
59 
60 setuptools.setup(
61     name=name,
62     version=version,
63     description=description,
64     long_description=readme,
65     author='Google LLC',
66     author_email='googleapis-packages@google.com',
67     license='Apache 2.0',
68     url='https://github.com/GoogleCloudPlatform/google-cloud-python',
69     classifiers=[
70         release_status,
71         'Intended Audience :: Developers',
72         'License :: OSI Approved :: Apache Software License',
73         'Programming Language :: Python',
74         'Programming Language :: Python :: 2',
75         'Programming Language :: Python :: 2.7',
76         'Programming Language :: Python :: 3',
77         'Programming Language :: Python :: 3.4',
78         'Programming Language :: Python :: 3.5',
79         'Programming Language :: Python :: 3.6',
80         'Operating System :: OS Independent',
81         'Topic :: Internet',
82     ],
83     platforms='Posix; MacOS X; Windows',
84     packages=packages,
85     namespace_packages=namespaces,
86     install_requires=dependencies,
87     extras_require=extras,
88     include_package_data=True,
89     zip_safe=False,
90 )
91
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pubsub/setup.py b/pubsub/setup.py
--- a/pubsub/setup.py
+++ b/pubsub/setup.py
@@ -29,7 +29,7 @@
 # 'Development Status :: 5 - Production/Stable'
 release_status = 'Development Status :: 4 - Beta'
 dependencies = [
-    'google-api-core[grpc] >= 1.1.0, < 2.0.0dev',
+    'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',
     'grpc-google-iam-v1 >= 0.11.1, < 0.12dev',
     'enum34; python_version < "3.4"',
 ]

{"golden_diff": "diff --git a/pubsub/setup.py b/pubsub/setup.py\n--- a/pubsub/setup.py\n+++ b/pubsub/setup.py\n@@ -29,7 +29,7 @@\n # 'Development Status :: 5 - Production/Stable'\n release_status = 'Development Status :: 4 - Beta'\n dependencies = [\n-    'google-api-core[grpc] >= 1.1.0, < 2.0.0dev',\n+    'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',\n     'grpc-google-iam-v1 >= 0.11.1, < 0.12dev',\n     'enum34; python_version < \"3.4\"',\n ]\n", "issue": "PubSub protobuf dependency requirements incorrect\nI think the minimum version for the `protobuf` package dependency is not correct.  google-cloud-python has the version requirements as protobuf>=3.0.0, but it fails to import when using version up to and including protobuf==3.3.0.  I'm not sure what the exact correct version is, but the last version of google-cloud-pubsub to work with protobuf==3.3.0 is google-cloud-pubsub==0.35.4.  I believe after this commit (https://github.com/GoogleCloudPlatform/google-cloud-python/commit/371333a51165e99d4d02876b1ef133618485b6fc#diff-29280288794caf553b0b008084a0e854), a protobuf version >3.3.0 is required:\r\n\r\nPython version\r\n```\r\n$ python --version\r\nPython 2.7.15rc1\r\n```\r\n\r\nPackage versions:\r\n```\r\n$ pip list | grep -E '(cloud|protobuf)'\r\ngoogle-cloud-core                  0.28.1      \r\ngoogle-cloud-datastore             1.7.0       \r\ngoogle-cloud-pubsub                0.38.0      \r\ngoogle-cloud-storage               1.12.0      \r\nprotobuf                           3.3.0 \r\n```\r\n\r\nGetting a stack track just importing pubsub (in ipython here)\r\n```\r\nIn [1]: from google.cloud import pubsub\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-1-8fba37b708ad> in <module>()\r\n----> 1 from google.cloud import pubsub\r\n\r\n/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub.py in <module>()\r\n     17 from __future__ import absolute_import\r\n     18 \r\n---> 19 from google.cloud.pubsub_v1 import PublisherClient\r\n     20 from google.cloud.pubsub_v1 import SubscriberClient\r\n     21 from google.cloud.pubsub_v1 import types\r\n\r\n/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/__init__.py in <module>()\r\n     15 from __future__ import absolute_import\r\n     16 \r\n---> 17 from google.cloud.pubsub_v1 import types\r\n     18 from google.cloud.pubsub_v1 import publisher\r\n     19 from google.cloud.pubsub_v1 import subscriber\r\n\r\n/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/types.py in <module>()\r\n     28 \r\n     29 from google.api_core.protobuf_helpers import get_messages\r\n---> 30 from google.cloud.pubsub_v1.proto import pubsub_pb2\r\n     31 \r\n     32 \r\n\r\n/home/aaronpeterson/.local/share/virtualenvs/turbinia-docs-oOHvuNoj/local/lib/python2.7/site-packages/google/cloud/pubsub_v1/proto/pubsub_pb2.py in <module>()\r\n     45       message_type=None, enum_type=None, containing_type=None,\r\n     46       is_extension=False, extension_scope=None,\r\n---> 47       options=None, file=DESCRIPTOR),\r\n     48   ],\r\n     49   extensions=[\r\n\r\nTypeError: __new__() got an unexpected keyword argument 'file'\r\n```\r\n\r\nSnipped the pubsub section from pipdeptree output showing the protobuf requirement is >=3.0.0:\r\n```\r\n - google-cloud-pubsub [required: Any, installed: 0.38.0]\r\n    - enum34 [required: Any, installed: 1.1.6]\r\n    - google-api-core [required: >=1.1.0,<2.0.0dev, installed: 1.4.0]\r\n      - futures [required: >=3.2.0, installed: 3.2.0]\r\n      - google-auth [required: >=0.4.0,<2.0.0dev, installed: 1.5.1]\r\n        - cachetools [required: >=2.0.0, installed: 2.1.0]\r\n        - pyasn1-modules [required: >=0.2.1, installed: 0.2.2]\r\n          - pyasn1 [required: >=0.4.1,<0.5.0, installed: 0.4.4]\r\n        - rsa [required: >=3.1.4, installed: 4.0]\r\n          - pyasn1 [required: >=0.1.3, installed: 0.4.4]\r\n        - six [required: >=1.9.0, installed: 1.11.0]\r\n      - googleapis-common-protos [required: >=1.5.3,<2.0dev, installed: 1.5.3]\r\n        - protobuf [required: >=3.0.0, installed: 3.3.0]\r\n          - setuptools [required: Any, installed: 40.4.3]\r\n          - six [required: >=1.9, installed: 1.11.0]\r\n      - protobuf [required: >=3.0.0, installed: 3.3.0]\r\n        - setuptools [required: Any, installed: 40.4.3]\r\n        - six [required: >=1.9, installed: 1.11.0]\r\n```\n", "before_files": [{"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = 'google-cloud-pubsub'\ndescription = 'Google Cloud Pub/Sub API client library'\nversion = '0.38.0'\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = 'Development Status :: 4 - Beta'\ndependencies = [\n    'google-api-core[grpc] >= 1.1.0, < 2.0.0dev',\n    'grpc-google-iam-v1 >= 0.11.1, < 0.12dev',\n    'enum34; python_version < \"3.4\"',\n]\nextras = {\n}\n\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, 'README.rst')\nwith io.open(readme_filename, encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages()\n    if package.startswith('google')]\n\n# Determine which namespaces are needed.\nnamespaces = ['google']\nif 'google.cloud' in packages:\n    namespaces.append('google.cloud')\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author='Google LLC',\n    author_email='googleapis-packages@google.com',\n    license='Apache 2.0',\n    url='https://github.com/GoogleCloudPlatform/google-cloud-python',\n    classifiers=[\n        release_status,\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Operating System :: OS Independent',\n        'Topic :: Internet',\n    ],\n    platforms='Posix; MacOS X; Windows',\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "pubsub/setup.py"}], "after_files": [{"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = 'google-cloud-pubsub'\ndescription = 'Google Cloud Pub/Sub API client library'\nversion = '0.38.0'\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = 'Development Status :: 4 - Beta'\ndependencies = [\n    'google-api-core[grpc] >= 1.4.1, < 2.0.0dev',\n    'grpc-google-iam-v1 >= 0.11.1, < 0.12dev',\n    'enum34; python_version < \"3.4\"',\n]\nextras = {\n}\n\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, 'README.rst')\nwith io.open(readme_filename, encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages()\n    if package.startswith('google')]\n\n# Determine which namespaces are needed.\nnamespaces = ['google']\nif 'google.cloud' in packages:\n    namespaces.append('google.cloud')\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author='Google LLC',\n    author_email='googleapis-packages@google.com',\n    license='Apache 2.0',\n    url='https://github.com/GoogleCloudPlatform/google-cloud-python',\n    classifiers=[\n        release_status,\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Operating System :: OS Independent',\n        'Topic :: Internet',\n    ],\n    platforms='Posix; MacOS X; Windows',\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "pubsub/setup.py"}]}