Python strings are immutable and `.replace` returns a new string. This means you should do:

```python
url = url.replace('gs://', 'https://storage.googleapis.com/', 1)
```