Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: prepare Falcon 4.0.0a1 #2342

Merged
merged 5 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 44 additions & 10 deletions docs/changes/4.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ Changelog for Falcon 4.0.0
Summary
-------

Falcon 4.0 is in development. The progress is tracked via the
`Version 4.0 milestone <https://github.com/falconry/falcon/milestone/34>`__
on GitHub.
The first alpha release of Falcon 4.0.0 is here!

We would really appreciate if you could help with early testing on your code!
You can grab this release from PyPI (``pip install falcon==4.0.0a1``),
and :ref:`let us know how it went <chat>`!

Although we are still in the process of polishing the last items from the
`version 4.0 milestone <https://github.com/falconry/falcon/milestone/34>`__,
we do not expect (m)any radical changes from now on until Falcon 4.0.0 final.
The full changelog of new features, breaking changes and fixes will be rendered
as part of the first beta release.


Changes to Supported Platforms
------------------------------

- CPython 3.11 is now fully supported. (`#2072 <https://github.com/falconry/falcon/issues/2072>`__)
- CPython 3.12 is now fully supported. (`#2196 <https://github.com/falconry/falcon/issues/2196>`__)
- CPython 3.13 is now fully supported. (`#2258 <https://github.com/falconry/falcon/issues/2258>`__)
- End-of-life Python 3.5, 3.6 & 3.7 are no longer supported. (`#2074 <https://github.com/falconry/falcon/pull/2074>`__, `#2273 <https://github.com/falconry/falcon/pull/2273>`__)
- CPython 3.11 is now fully supported.
(`#2072 <https://github.com/falconry/falcon/issues/2072>`__)
- CPython 3.12 is now fully supported.
(`#2196 <https://github.com/falconry/falcon/issues/2196>`__)
- CPython 3.13 is now fully supported.
(`#2258 <https://github.com/falconry/falcon/issues/2258>`__)
- End-of-life Python 3.5, 3.6 & 3.7 are no longer supported.
(`#2074 <https://github.com/falconry/falcon/pull/2074>`__,
`#2273 <https://github.com/falconry/falcon/pull/2273>`__)
- Soon end-of-life Python 3.8 is no longer actively supported, but
the framework should still continue to install from source and function.
- The Falcon 4.x series is guaranteed to support CPython 3.10 and
Expand All @@ -32,17 +45,38 @@ now typed, further type annotations may be added throughout the 4.x release cycl
To improve them, we may introduce changes to the typing that do not affect
runtime behavior, but may surface new or different errors with type checkers.

.. role:: python(code)
:language: python

.. note::
All undocumented type aliases coming from ``falcon._typing`` are considered
private to the framework itself, and not meant for annotating applications
using Falcon. To that end, it is advisable to only use classes from the
public interface, and public aliases from :mod:`falcon.typing`, e.g.:

.. code-block:: python

All type aliases in falcon are considered private, and if used should be
imported inside ``if TYPE_CHECKING:`` blocks to avoid possible import errors
after an update.
class MyResource:
def on_get(self, req: falcon.Request, resp: falcon.Response) -> None:
resp.media = {'message': 'Hello, World!'}

If you still decide to reuse the private aliases anyway, they should
preferably be imported inside :python:`if TYPE_CHECKING:` blocks in order
to avoid possible runtime errors after an update.
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
Also, make sure to :ref:`let us know <chat>` which essential aliases are
missing from the public interface!

.. towncrier release notes start

Contributors to this Release
----------------------------

.. note::
If we missed you below, don’t worry!

We will refresh the full list of contributors before the 4.0.0 final
release.

Many thanks to all of our talented and stylish contributors for this release!

- `aarcex3 <https://github.com/aarcex3>`__
Expand Down
2 changes: 1 addition & 1 deletion docs/user/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Now, if you do make changes to Falcon itself, please consider contributing your
Falcon License
--------------

Copyright 2012-2017 by Rackspace Hosting, Inc. and other contributors,
Copyright 2012-2024 by Rackspace Hosting, Inc. and other contributors,
as noted in the individual source code files.

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2021 by Vytautas Liuolia.
# Copyright 2020-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/test_e2e.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2021 by Vytautas Liuolia.
# Copyright 2020-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions falcon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
'HTTP_BAD_GATEWAY',
'HTTP_BAD_REQUEST',
'HTTP_CONFLICT',
'HTTP_CONTENT_TOO_LARGE',
'HTTP_CONTINUE',
'HTTP_CREATED',
'HTTP_EARLY_HINTS',
Expand Down
2 changes: 1 addition & 1 deletion falcon/_typing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2023 by Vytautas Liuolia.
# Copyright 2021-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/asgi/_asgi_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 by Vytautas Liuolia.
# Copyright 2020-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/asgi/multipart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/asgi/reader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions falcon/asgi/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from falcon._typing import _UNSET
from falcon._typing import ResponseCallbacks
from falcon.typing import AsyncReadableIO
from falcon.typing import SseEmitter
from falcon.typing import SSEEmitter
from falcon.util.misc import _encode_items_to_latin1
from falcon.util.misc import is_python_func

Expand All @@ -53,7 +53,7 @@ class Response(response.Response):
# PERF(kgriffs): These will be shadowed when set on an instance; let's
# us avoid having to implement __init__ and incur the overhead of
# an additional function call.
_sse: Optional[SseEmitter] = None
_sse: Optional[SSEEmitter] = None
_registered_callbacks: Optional[List[ResponseCallbacks]] = None

stream: Union[AsyncReadableIO, AsyncIterator[bytes], None] # type: ignore[assignment]
Expand Down Expand Up @@ -95,7 +95,7 @@ async def producer():
"""

@property
def sse(self) -> Optional[SseEmitter]:
def sse(self) -> Optional[SSEEmitter]:
"""A Server-Sent Event (SSE) emitter, implemented as
an async iterator or generator that yields a series of
of :class:`falcon.asgi.SSEvent` instances. Each event will be
Expand Down Expand Up @@ -143,7 +143,7 @@ async def emitter():
return self._sse

@sse.setter
def sse(self, value: Optional[SseEmitter]) -> None:
def sse(self, value: Optional[SSEEmitter]) -> None:
self._sse = value

def set_stream(
Expand Down
2 changes: 1 addition & 1 deletion falcon/cyutil/misc.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2021 by Vytautas Liuolia.
# Copyright 2020-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/cyutil/reader.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/cyutil/uri.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/media/multipart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions falcon/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def read(self, n: Optional[int] = ..., /) -> bytes: ...

# ASGI
class AsyncReadableIO(Protocol):
"""Async file like protocol that defines only a read method and is iterable."""
"""Async file-like protocol that defines only a read method, and is iterable."""

async def read(self, n: Optional[int] = ..., /) -> bytes: ...
def __aiter__(self) -> AsyncIterator[bytes]: ...


SseEmitter = AsyncIterator[Optional['SSEvent']]
"""Async iterator or generator that generates Server-Sent Events
returning :class:`falcon.asgi.SSEvent` insatnces.
SSEEmitter = AsyncIterator[Optional['SSEvent']]
"""Async generator or iterator over Server-Sent Events
(instances of :class:`falcon.asgi.SSEvent`).
"""
2 changes: 1 addition & 1 deletion falcon/util/reader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 by Vytautas Liuolia.
# Copyright 2019-2024 by Vytautas Liuolia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion falcon/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

"""Falcon version."""

__version__ = '4.0.0.dev2'
__version__ = '4.0.0a1'
"""Current version of Falcon."""