Python language level support (3.4/3.5/3.6/3.7)
See original GitHub issuePython3.4
Done
bpo-15958: bytes.join
and bytearray.join
with arbitrary buffer objects (memoryview).
Probably Easy
pep 424: object.__length_hint__
is used by operator.length_hint
if the length can’t be directly obtained
Unknown
pep 3156: Get asyncio to import properly (see issue #616 )
Python3.5
Done
pep 448: Allow multiple *
and **
unpacking
pep 448: Allow *
and **
unpacking inside list
, tuple
, set
, and dict
literals.
Partial
pep 465: matrix multiplication operator a @ b
currently supports __matmult__
and __imatmult__
but not __rmatmult__
Probably Easy
Pep 461: %
formatting for bytes
and bytearray
bpo-9951: bytes.hex()
, bytearray.hex()
bpo-19235: RecursionError
instead of RuntimeError
on too much recursion
Unknown
bpo-9951: memoryview.hex()
memoryview
raises NotImplemented
pep 492: async and await syntax
bpo-24450: gi_yieldfrom
attribute of generators returns inner iterables used by yield from
PEP 479: generator_stop
future import, which causes a RuntimeError
if a generator throws StopIteration
instead of returning
Python3.6
Done
pep 498: Format strings
pep 468: Preserve keyword argument order – dict
s preserve str
key insertion order, but not int
key insertion order. This is fine since dict
s preserving key insertion order is an implementation detail of CPython 3.6. Preserving the string key insertion order means keyword argument order is properly preserved.
pep 515: Ignore underscores in numeric literals
Probably Easy
pep 487: Call __init_subclass__()
on new class creation, call __set_name__()
on attributes implementing the descriptor protocol. Might be a bit tricky to get argumentless super()
to work properly.
Unknown
pep 526: Syntax for variable annotations pep 525: Asynchronous generators pep 530: Asynchronous comprehensions
Python3.7
Done
async
and await
are now reserved keywords
New Module: contextvars
Probably Easy
pep 563: Postpone evaluating type annotations
pep 562: Allow __getattr__
at module level
Unknown
New Module: dataclasses
fails to import with the same error as asyncio
: ImportError: cannot import name 'unicode_iscased'
(from _sre_utils
)
Python3.8
Probably Easy
bpo-32489: Allow continue
in finally
clause
bpo-33073: Add as_integer_ratio
to int
type.
bpo-32117: Allow iterable unpacking in yield
and return
statements without parenthesis.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top GitHub Comments
Resuming work on this old issue…
The commit referenced above makes
bytes.join()
andbytearray.join()
work withmemoryview
andbytearray
objects. PEP 424 already works.Re async features: I think these are actually very relevant in the browser. They can be used to avoid JavaScript callback hell (even JavaScript is getting async/await support): suppose, for example, that we want to chain a few AJAX calls, say we want to retrieve a list of friends of someone. The api allows us to find a user-id by his name, a list of friend_ids by user id and user info by id. Normal callback style would look something like this:
Compared with async style:
The beauty of the async version (in my opinion at least) is that it is written as if the AJAX requests were synchronous. However, unlike synchronous requests, the async version doesn’t block the browser at all! Now all of this is doable with a little bit of generator magic which can already be implemented (see my port of asyncio, or the, hopefully coming soon, simpleaio rewrite) in Brython. The only difficult part (at least for me) is the syntactic sugar of being able to write
instead of the more verbose
and
instead of
There are other async-related things, which would be nice to have:
but these are not needed for compatibility with newer Python versions. And even here I am optimistic. It seems to me that async imports wouldn’t be too much harder than the recent changes (108f633590b74260dd361cd, 3a904a6852bdfc8ee840e8) Pierre made to input handling. But then again, I might be mistaken, I haven’t really gotten familiar enough with Brython’s compilation engine to try to implement it on my own. As far as webworkers are concerned, the main obstacle is that they don’t have access to the dom. But this shouldn’t be insurmountable…
Anyway, it seems that my comment has grown far too much and is probably off-topic. Do you think it makes sense to open a discussion on the google groups?