Skip to content

Use of f-strings is not compatible with python 3.5 #4

@brendonmackenzie

Description

@brendonmackenzie

Bumped in to the use of f-strings relatively early on. I am using Ubuntu 16.04 which has python 3.5 by default, which does not support f-strings.
I raised a couple of pull requests for chapter 04-asyncio but haven't yet gone further.

Using grep, I located additional files that may have issues:
grep -rnw . -e "f[\'\"]"

./src/09-built-on-asyncio/the_trio/prod_sync.py:24: print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/09-built-on-asyncio/the_trio/prod_asyncio.py:32: print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/09-built-on-asyncio/the_trio/prod_trio.py:29: print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/10-async-web/acityscape_api/config/settings.py:6: file = os.path.join(os.path.dirname(file), f"{mode}.json")
./src/10-async-web/acityscape_api/services/location_service.py:16: key = f'{zip_code}, {country}'
./src/10-async-web/acityscape_api/services/location_service.py:29: city_data = data.get(f'{zip_code}, {country}', dict())
./src/10-async-web/cityscape_api/config/settings.py:6: file = os.path.join(os.path.dirname(file), f"{mode}.json")
./src/10-async-web/cityscape_api/services/location_service.py:14: key = f'{zip_code}, {country}'
./src/10-async-web/cityscape_api/services/location_service.py:26: city_data = data.get(f'{zip_code}, {country}', dict())
./src/04-asyncio/producer_consumer/prod_async/async_program.py:32: #print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/04-asyncio/producer_consumer/prod_sync/sync_program.py:23: #print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/05-threads/basic_threads/threaded_prod.py:44: print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)
./src/05-threads/basic_threads/sync_prod.py:25: print(colorama.Fore.YELLOW + f" -- generated item {idx}", flush=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions