Fixed
Status Update
Comments
rm...@google.com <rm...@google.com> #2
Hello,
Thank you for reaching out.
The Product team is working on this issue. This request has no ETA, but you can follow the progress in this thread.
fl...@gmail.com <fl...@gmail.com> #3
Any updates on this? Fedora 35 uses python 3.10 and gcloud is broken on this OS currently.
fl...@gmail.com <fl...@gmail.com> #4
Workaround for Fedora 35: Downgrade python 3 or add the following to .bashrc:
export CLOUDSDK_PYTHON=/usr/bin/python2
rm...@google.com <rm...@google.com> #5
fl...@gmail.com <fl...@gmail.com> #6
It's fixed now on Fedora 35 with latest sdk
br...@capitalone.com <br...@capitalone.com> #7
It's not. Google Cloud SDK still doesn't support Python 3.10 with the latest 366.0:
>gcloud
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import cli
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import markdown
from googlecloudsdk.calliope import usage_text
from googlecloudsdk.calliope import parser_arguments
from googlecloudsdk.calliope import parser_completer
from googlecloudsdk.core.console import progress_tracker
class _BaseStagedProgressTracker(collections.Mapping):
>gcloud
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import cli
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import markdown
from googlecloudsdk.calliope import usage_text
from googlecloudsdk.calliope import parser_arguments
from googlecloudsdk.calliope import parser_completer
from googlecloudsdk.core.console import progress_tracker
class _BaseStagedProgressTracker(collections.Mapping):
tn...@google.com <tn...@google.com> #8
Strange I don't have problem anymore with same version. I didn't set CLOUDSDK_PYTHON
tn...@google.com <tn...@google.com> #9
It seems that is fixed in SDK 367.0.0
br...@capitalone.com <br...@capitalone.com> #10
The fix is released with gcloud version 367.0.0 today. Please download latest gcloud version to work with Python 3.10.
tn...@google.com <tn...@google.com> #11
Thanks. I can confirm that at least on Windows 10 using latest Python 3.10 from MS Store I'm now able to run gcloud SDK.
dy...@gmail.com <dy...@gmail.com> #12
for some reason running gcloud
on it's own still produces error (on Mac)
~ ❯ gcloud --version
Google Cloud SDK 367.0.0
beta 2021.12.10
bq 2.0.72
core 2021.12.10
gsutil 5.5
~ ❯ gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.events: module 'collections' has no attribute 'MutableMapping'.
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
tn...@google.com <tn...@google.com> #13
Hi i could not reproduce the issue. could you please try fresh download the latest gcloud?
$ export CLOUDSDK_PYTHON=/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
$ gcloud --version
Google Cloud SDK 367.0.0
bq 2.0.72
core 2021.12.10
gsutil 5.5
dy...@gmail.com <dy...@gmail.com> #14
I can. gcloud when used with any of parameters works fine. However without parameters it produces an error:
>gcloud --version
Google Cloud SDK 367.0.0
beta 2021.12.10
bq 2.0.72
core 2021.12.10
gsutil 5.5
kubectl 1.20.8
>gcloud projects list
PROJECT_ID NAME PROJECT_NUMBER
xxxxxxxxxxxx XXXXXXXXXXXXX 1234556789
>gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.events: module 'collections' has no attribute 'MutableMapping'.
>gcloud --version
Google Cloud SDK 367.0.0
beta 2021.12.10
bq 2.0.72
core 2021.12.10
gsutil 5.5
kubectl 1.20.8
>gcloud projects list
PROJECT_ID NAME PROJECT_NUMBER
xxxxxxxxxxxx XXXXXXXXXXXXX 1234556789
>gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.events: module 'collections' has no attribute 'MutableMapping'.
tn...@google.com <tn...@google.com> #15
Thanks. I can reproduce it. We will work on a fix.
dy...@gmail.com <dy...@gmail.com> #16
i can confirm - gcloud with parameters doesn't work.
Version: 367.0.0
Python: 3.10
Version: 367.0.0
Python: 3.10
br...@capitalone.com <br...@capitalone.com> #17
HI Coco,
I see another bug related to this and it says it fixed, is that true?
https://buganizer.corp.google.com/issues/202258405
Thanks!
I see another bug related to this and it says it fixed, is that true?
Thanks!
tn...@google.com <tn...@google.com> #18
vinwong@
br...@capitalone.com <br...@capitalone.com> #19
thanks cocosheng@
So, just want to verify one last thing, so is GCP SDK now fully support Python 3.10? I just want to make sure it is before I tell the customer, thanks!
Vincent
So, just want to verify one last thing, so is GCP SDK now fully support Python 3.10? I just want to make sure it is before I tell the customer, thanks!
Vincent
tn...@google.com <tn...@google.com> #20
for now, running gcloud
without any parameters still throws an error.
tn...@google.com <tn...@google.com> #21
I'm still getting the error when I try to deploy to App Engine Flexible using the `gloud app deploy` command. As a temporary workaround, I've set the SDK to use Python 3.9.
Description
Strange issue with Lint indicating false positives on API errors (NewApi, InlinedApi or ObsoleteSdkInt) when not using directly Build.VERSION_CODES constants.
It's broken since AGP 3.3.0, worked with AGP 3.2.1 and previous versions.
Example:
```
object AndroidVersions {
const val API_28 = Build.VERSION_CODES.P
private val infoFlag: Int =
if (Build.VERSION.SDK_INT >= API_28)
PackageManager.GET_SIGNING_CERTIFICATES
else
PackageManager.GET_SIGNATURES
```
Lint report the following warning: `Warning: Unnecessary; SDK_INT is never < 21 [ObsoleteSdkInt]` which has nothing to do here.
If we wrap the condition into a method, it produces a wrong InlinedApi warning:
````
object AndroidVersions {
const val API_28 = Build.VERSION_CODES.P
inline fun hasApi28() = Build.VERSION.SDK_INT >= API_28
private val infoFlag: Int =
if (AndroidVersions.hasApi28())
PackageManager.GET_SIGNING_CERTIFICATES
else
PackageManager.GET_SIGNATURES
}
Produces `Warning: Field requires API level 28 (current min is 21): android.content.pm.PackageManager#GET_SIGNING_CERTIFICATES [InlinedApi]`
When calling a method that requires an higher API level than min SDK using this method it produces an NewApi error.
```
Configuration:
Android Studio 3.3 RC 1
Build #AI-182.5107.16.33.5138683, built on November 19, 2018
JRE: 1.8.0_152-release-1248-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.1