GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.46k stars 6.45k forks source link

fix: remove arbitrary equality comparisons (not supported by renovate) #12561

Closed glasnt closed 2 months ago

glasnt commented 2 months ago

Should help resolves errors while running renovate

Currently, #4745 reports "Unexpected range error"

Unexpected range error

Running npx renovate --platform local gives more details:

 WARN: Unexpected range error (repository=local)
       "currentValue": "===2.0.1",
       "err": {
         "message": "PEP440 arbitrary equality (===) not supported",
         "stack": "TypeError: PEP440 arbitrary equality (===) not supported [...]"

Checking all requirements*.txt files, I've removed all === references (markupsafe and mock)

While this is valid in PEP440, per the message it's not supported in Renovate.

This may help unblock a number of pending dependency updates (e.g. https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12093#issuecomment-2327875438)

glasnt commented 2 months ago

A number of samples in this set have linting errors, and Python 3+ errors

../appengine_helper.py:24: in 
    import six
E   ModuleNotFoundError: No module named 'six'

(Numerous import order errors)