* Support named unicode characters in f-strings
Fixes#154
The previous behavior misinterpreted the curly braces as enclosing an
expression. This change does some cursory validation so we can still
get parse errors in the most egregious cases, but does not validate that
the names are actually valid, only that they are name-shaped and have a
chance of being valid.
The character names appear to obey a few rules:
* Case insensitive
* Name characters are `[A-Z0-9 \-]`
* Whitespace before or after is not allowed
* Whitespace in the middle may only be a single space between words
* Dashes may occur at the start or middle of a word
```py
f"\N{A B}" # might be legal
f"\N{a b}" # equivalent to above
f"\N{A B}" # no way
f"\N{ A B }" # no way
f"""\N{A
B}""" # no way
```
For confirming this regex matches all (current) unicode character names:
```py
import re
import sys
import unicodedata
R = re.compile(r"[A-Za-z0-9\-]+(?: [A-Za-z0-9\-]+)*")
for i in range(sys.maxunicode):
try:
name = unicodedata.name(chr(i))
except ValueError:
# Some small values like 0 and 1 have no name, /shrug
continue
m = R.fullmatch(name)
if m is None:
print("FAIL", repr(name))
```
* Improve tests for named unicode escapes
Cache files that weren't accessed in the last 30 days will be automatically
garbage collected. This collection happens when the `save_module` is called
via a lock system that would make it happen only one time per day.
Thanks to [bpo-32489](https://bugs.python.org/issue32489) and sadly
for rejection of my [PEP 601](https://www.python.org/dev/peps/pep-0601/)
finally in continue is supported in 3.8+. I checked the blame and looks
like there was already a commit for the same subject, but that only
changes the test and not actually changes the checker (dfe7fba08e)
PEP 563 brought a new `__future__` import for post-poning evaluation
of annotations that introduced in 3.7. This patch adds support for
that future feature, and removes 'all_feature_names' from that list
since it is not valid a syntax
(`from __future__ import all_feature_names`). Also it fixes a bug
related usage of `ALLOWED_FUTURES` (global and version independant
flags) instead of `allowed_futures` (extended version of the previ
ous flag that has some version specific flags, probably unnoticed)