Skip to content

Enable use of f-strings in Python 3.6.#858

Merged
hynek merged 1 commit intopython-attrs:mainfrom
thetorpedodog:f-strings-for-all
Nov 2, 2021
Merged

Enable use of f-strings in Python 3.6.#858
hynek merged 1 commit intopython-attrs:mainfrom
thetorpedodog:f-strings-for-all

Conversation

@thetorpedodog
Copy link
Copy Markdown
Contributor

CPython 3.6 has f-strings:

Python 3.6.13 |Anaconda, Inc.| (default, Jun  4 2021, 14:25:59)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f"hello"
'hello'

A quick thing I noticed. Feel free to reject if there's an assumption I'm missing (e.g. a feature of f-strings that was introduced after 3.6 that attrs uses).

Checklist: All N/A.

@Tinche
Copy link
Copy Markdown
Member

Tinche commented Nov 1, 2021

I guess you're right, must have been a brain fart?

CPython 3.6 has f-strings:

```
Python 3.6.13 |Anaconda, Inc.| (default, Jun  4 2021, 14:25:59)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f"hello"
'hello'
```
@hynek hynek merged commit 5a368d8 into python-attrs:main Nov 2, 2021
@hynek
Copy link
Copy Markdown
Member

hynek commented Nov 2, 2021

Thanks! Confusing when f-strings and dataclasses came to CPythonm respectively has become a national pastime!

@andersk
Copy link
Copy Markdown

andersk commented Dec 28, 2021

This seems to have somehow broken coverage report on Python 3.6: #895.

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.

4 participants