Skip to content

Use older string format to support earlier python versions#11920

Merged
oranagra merged 1 commit intoredis:unstablefrom
tezc:fix-python
Mar 15, 2023
Merged

Use older string format to support earlier python versions#11920
oranagra merged 1 commit intoredis:unstablefrom
tezc:fix-python

Conversation

@tezc
Copy link
Collaborator

@tezc tezc commented Mar 15, 2023

Redis build runs utils/generate-command-code.py if there is a change in src/commands/*.json files.

In #10273, we used f-string format in this script. f-string feature was introduced in python3.6.
If a system has an earlier python version, build might fail.

Added some changes to make that script compatible with earlier python versions.

@oranagra oranagra requested a review from guybe7 March 15, 2023 11:53
@oranagra oranagra merged commit 72f5aad into redis:unstable Mar 15, 2023
@tezc tezc deleted the fix-python branch March 15, 2023 11:56
enjoy-binbin added a commit to enjoy-binbin/redis that referenced this pull request Mar 17, 2023
`{commands_filename}` the extra {} actually make it
become a Set, and the output print was like this:
```
Processing json files...
Linking container command to subcommands...
Checking all commands...
Generating {'commands'}.c...
All done, exiting.
```

Introduced in redis#11920
oranagra pushed a commit that referenced this pull request Mar 17, 2023
* Minor fix to print, set to str

`{commands_filename}` the extra {} actually make it
become a Set, and the output print was like this:
```
Processing json files...
Linking container command to subcommands...
Checking all commands...
Generating {'commands'}.c...
All done, exiting.
```

Introduced in #11920

* more fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants