FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
🟠 Minor breaking changes: This release will change some of the git revision dates:
We now ignore changes to files that only contain whitespaces or blanklines, as these are not 'real' revisions to the content. This maps to the git log --ignore_all_space --ignore_blank_lines.
We now ignore rename commits for determining the last revision date, as these are not 'real' revisions to the content. This maps to the git log diff-filter=r command (see git log docs)
We will now follow changes to a file across file renames (including moving files around). This maps to git log --follow. While giving more accurate revision and creation dates, there is an edge case: if you commit empty files, the revision date might wrong. For details see this blogpost. You can opt-out of this behavior by using the new option enable_git_follow (which defaults to True). If you still hit inaccurate revision dates for specific files, consider manually defining them.
Added: complete test framework, using pytest and Mkdocs-Test (#244)
A number of automated test cases are implemented.
Changed: move from setup.py to pyproject.toml (#250)
1.2.0, 2024-09-15
Added: three hooks register_variables/macros/filters to facilitate
cooperation with other MkDocs plugins.
Fixed: `define_env() was always required in module (#191)
Added: trace the case when no module is found (INFO)
Improved documentation, particularly about HTML pages
Added: parameters j2_comment_start_string and
j2_comment_end_string to plugin's parameters,
to specify alternate markers for comments.
Added the multiline parameter force_render_paths in the config file,
to specify directories or file patterns to be rendered for the case when render_by_default = false
(the render_macros parameter in the YAML header of the page
has the last word).
class Pet(Enum):
CAT = 1 # Member attribute
DOG = 2 # Member attribute
WOLF: int = 3 # New error: Enum members must be left unannotated
species: str # Considered a non-member attribute
In particular, the specification change can result in issues in type stubs (.pyi files), since
historically it was common to leave the value absent:
# In a type stub (.pyi file)
class Pet(Enum):
# Change in semantics: previously considered members, now non-member attributes
CAT: int
DOG: int
# Mypy will now issue a warning if it detects this situation in type stubs:
# > Detected enum "Pet" in a type stub with zero members.
# > There is a chance this is due to a recent change in the semantics of enum membership.
# > If so, use `member = value` to mark an enum member, instead of `member: type`
class Pet(Enum):
# As per the specification, you should now do one of the following:
DOG = 1 # Member attribute with value 1 and known type
WOLF = cast(int, ...) # Member attribute with unknown value but known type
LION = ... # Member attribute with unknown value and unknown type
Contributed by Terence Honles in PR 17207 and
Shantanu Jain in PR 18068.
Mypy 1.13
We’ve just uploaded mypy 1.13 to the Python Package Index (PyPI).
Mypy is a static type checker for Python. You can install it as follows:
[flake8-pyi] Improve autofix for nested and mixed type unions for unnecessary-type-union (PYI055) (#14272)
[flake8-pyi] Mark fix as unsafe when type annotation contains comments for duplicate-literal-member (PYI062) (#14268)
Server
Use the current working directory to resolve settings from ruff.configuration (#14352)
Bug fixes
Avoid conflicts between PLC014 (useless-import-alias) and I002 (missing-required-import) by considering lint.isort.required-imports for PLC014 (#14287)
[flake8-type-checking] Skip quoting annotation if it becomes invalid syntax (TCH001)
[flake8-pyi] Avoid using typing.Self in stub files pre-Python 3.11 (PYI034) (#14230)
[flake8-pytest-style] Flag pytest.raises call with keyword argument expected_exception (PT011) (#14298)
[flake8-simplify] Infer "unknown" truthiness for literal iterables whose items are all unpacks (SIM222) (#14263)
[flake8-type-checking] Fix false positives for typing.Annotated (TCH001) (#14311)
[pylint] Allow await at the top-level scope of a notebook (PLE1142) (#14225)
[pylint] Fix miscellaneous issues in await-outside-async detection (PLE1142) (#14218)
[pyupgrade] Avoid applying PEP 646 rewrites in invalid contexts (UP044) (#14234)
[pyupgrade] Detect permutations in redundant open modes (UP015) (#14255)
[refurb] Avoid triggering hardcoded-string-charset for reordered sets (FURB156) (#14233)
[refurb] Further special cases added to verbose-decimal-constructor (FURB157) (#14216)
[refurb] Use UserString instead of non-existent UserStr (FURB189) (#14209)
[flake8-pyi] Improve autofix for nested and mixed type unions for unnecessary-type-union (PYI055) (#14272)
[flake8-pyi] Mark fix as unsafe when type annotation contains comments for duplicate-literal-member (PYI062) (#14268)
Server
Use the current working directory to resolve settings from ruff.configuration (#14352)
Bug fixes
Avoid conflicts between PLC014 (useless-import-alias) and I002 (missing-required-import) by considering lint.isort.required-imports for PLC014 (#14287)
[flake8-type-checking] Skip quoting annotation if it becomes invalid syntax (TCH001)
[flake8-pyi] Avoid using typing.Self in stub files pre-Python 3.11 (PYI034) (#14230)
[flake8-pytest-style] Flag pytest.raises call with keyword argument expected_exception (PT011) (#14298)
[flake8-simplify] Infer "unknown" truthiness for literal iterables whose items are all unpacks (SIM222) (#14263)
[flake8-type-checking] Fix false positives for typing.Annotated (TCH001) (#14311)
[pylint] Allow await at the top-level scope of a notebook (PLE1142) (#14225)
[pylint] Fix miscellaneous issues in await-outside-async detection (PLE1142) (#14218)
[pyupgrade] Avoid applying PEP 646 rewrites in invalid contexts (UP044) (#14234)
[pyupgrade] Detect permutations in redundant open modes (UP015) (#14255)
[refurb] Avoid triggering hardcoded-string-charset for reordered sets (FURB156) (#14233)
[refurb] Further special cases added to verbose-decimal-constructor (FURB157) (#14216)
[refurb] Use UserString instead of non-existent UserStr (FURB189) (#14209)
The pro engine now handles duplicate function names in C. When duplicate
functions are found, we assume that any of the duplicated functions could be
called. For example, if the function foo is defined in two different files,
taint errors will be reported for both instances:
</code></pre>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Reduced memory allocations while processing nosemgrep comments, improving memory use and time for scans with a large number of findings. (nosem-mem)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Optimized taint-mode (only in Pro) to scale better when there is a large number
of matches of sources/propagators/sanitizers/sinks within a function. (flow-83)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/semgrep/semgrep/blob/develop/CHANGELOG.md">semgrep's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/returntocorp/semgrep/releases/tag/v1.96.0">1.96.0</a> - 2024-11-07</h2>
<h3>Added</h3>
<ul>
<li>
<p>The pro engine now handles duplicate function names in C. When duplicate
functions are found, we assume that any of the duplicated functions could be
called. For example, if the function <code>foo</code> is defined in two different files,
taint errors will be reported for both instances:</p>
<pre><code>// "a/test.h"
void foo(int x) {
//deepruleid: dup-symbols
sink(x);
}
// "b/test.h"
void foo(int x) {
//deepruleid: dup-symbols
sink(x);
}
// "main.c"
#ifdef HEADER_A
#include "a/test.h"
#else
#include "b/test.h"
#endif
int main() {
int x = source();
foo(x);
}
``` (code-7654)
</code></pre>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Reduced memory allocations while processing nosemgrep comments, improving memory use and time for scans with a large number of findings. (nosem-mem)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Optimized taint-mode (only in Pro) to scale better when there is a large number
of matches of sources/propagators/sanitizers/sinks within a function. (flow-83)</li>
<li>Fixed a bug in the supply chain scanner's gradle lockfile parser. Previously, semgrep would fail to parse</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/semgrep/semgrep/commit/e743e2d243c83e6ba20e8f2096569f7383c00239"><code>e743e2d</code></a> chore: release version 1.96.0</li>
<li><a href="https://github.com/semgrep/semgrep/commit/497836cd643b7222a475296858c67841be605d74"><code>497836c</code></a><code>semgrep/semgrep-proprietary#2577</code></li>
<li><a href="https://github.com/semgrep/semgrep/commit/c9686ca8ab9fcabf93267dd5cfe9c5525d5cf6c6"><code>c9686ca</code></a><code>semgrep/semgrep-proprietary#2574</code></li>
<li><a href="https://github.com/semgrep/semgrep/commit/6a001bc5842955c66ae0f136d68a009868dbadef"><code>6a001bc</code></a> Add test for updating PATH to scripts directory (semgrep/semgrep-proprietary#...</li>
<li><a href="https://github.com/semgrep/semgrep/commit/71f1556517c7d770ce6491f873e4fa1d53c2111d"><code>71f1556</code></a> refactor: move is_logged_in_weak() to Semgrep_login.ml (semgrep/semgrep-propr...</li>
<li><a href="https://github.com/semgrep/semgrep/commit/298e2dfc9276c324e9b24eb849c98ed4ca41ded5"><code>298e2df</code></a> pro: tainting: Improve time complexity of taint spec predicates (semgrep/semg...</li>
<li><a href="https://github.com/semgrep/semgrep/commit/5b06af334a09ac77e5f98f19dcc866eaf8e3eb8d"><code>5b06af3</code></a> Switching to osemgrep for the gitlab-xxx output format (semgrep/semgrep-propr...</li>
<li><a href="https://github.com/semgrep/semgrep/commit/913b96e0b13c25ff2269e3ecd27e56c0af5dab3e"><code>913b96e</code></a><code>semgrep/semgrep-proprietary#2570</code></li>
<li><a href="https://github.com/semgrep/semgrep/commit/26c0b1b64e5d46e57b9b567358d412f58417a093"><code>26c0b1b</code></a><code>semgrep/semgrep-proprietary#2548</code></li>
<li><a href="https://github.com/semgrep/semgrep/commit/07ff4374d20d34f660f163da4ce19fc55972ff9e"><code>07ff437</code></a> Update PATH from entrypoint parent directory to scripts directory (semgrep/se...</li>
<li>Additional commits viewable in <a href="https://github.com/returntocorp/semgrep/compare/v1.92.0...v1.96.0">compare view</a></li>
</ul>
</details>
<br />
Updates `coverage[toml]` from 7.6.1 to 7.6.7
Release notes
fix: fine-tuned the exact Python version (3.12.6) when exiting from with statements changed how they traced. This affected whether people saw the fix for issue 1880.
fix: isolate our code more from mocking in the os module that in rare cases can cause bizarre behavior.
refactor: some code unreachable code paths in parser.py were changed to asserts. If you encounter any of these, please let me know!
Fix: nested context managers could incorrectly be analyzed to flag a missing branch on the last context manager, as described in issue 1876. This is now fixed.
Fix: the missing branch message about not exiting a module had an extra “didn’t,” as described in issue 1873. This is now fixed.
Fix: a final wildcard match/case clause assigning to a name (case _ as value) was incorrectly marked as a missing branch. This is now fixed, closing issue 1860.
Fewer things are considered branches now. Lambdas, comprehensions, and generator expressions are no longer marked as missing branches if they don’t complete execution. Closes issue 1852.
Fix: the HTML report didn’t properly show multi-line f-strings that end with a backslash continuation. This is now fixed, closing issue 1836, thanks to LiuYinCarl and Marco Ricci.
fix: fine-tuned the exact Python version (3.12.6) when exiting from with
statements changed how they traced. This affected whether people saw the
fix for issue 1880_.
fix: isolate our code more from mocking in the os module that in rare cases
can cause bizarre behavior <pytest-cov-666_>_.
refactor: some code unreachable code paths in parser.py were changed to
asserts. If you encounter any of these, please let me know!
Bumps the pip group with 9 updates in the / directory:
9.5.42
9.5.44
0.26.2
0.27.0
1.2.9
1.3.0
1.3.6
1.3.7
1.12.1
1.13.0
0.7.0
0.7.4
1.92.0
1.96.0
7.6.1
7.6.7
0.115.2
0.115.5
Updates
mkdocs-material
from 9.5.42 to 9.5.44Release notes
Sourced from mkdocs-material's releases.
Changelog
Sourced from mkdocs-material's changelog.
... (truncated)
Commits
aa4ef56
Prepare 9.5.44 releaseeb63b60
Fixed file save regression in privacy plugin (#7673)ac3315f
Updated dependencies8a60b49
Prepare 9.5.43 releasef82a345
Documentation4918a10
Added support for quoted external CSS URLs in privacy plugin (#7651)7dc96f1
Added support for downloading external images in SVG for privacy plugin (#7650)1357cd2
Updated dependencies198a680
Documentation (#7633)9aebe14
Updated dependenciesUpdates
mkdocstrings[python]
from 0.26.2 to 0.27.0Release notes
Sourced from mkdocstrings[python]'s releases.
Changelog
Sourced from mkdocstrings[python]'s changelog.
Commits
e0af800
chore: Prepare release 0.27.05648e5a
perf: Reduce footprint of template debug messages0bbb8ca
refactor: Use %-formatting for logging messages1c23c1b
feat: Add support for authentication in inventory file URLsabc5acd
Merge branch 'main' of github.com:mkdocstrings/mkdocstrings31b3b37
chore: Template upgradee732aaa
docs: Update contributing document to include tag pulling instructionsUpdates
mkdocs-git-revision-date-localized-plugin
from 1.2.9 to 1.3.0Release notes
Sourced from mkdocs-git-revision-date-localized-plugin's releases.
Commits
2e7646e
update to v1.31e69247
support python 3.139e064cd
Merge pull request #148 from skywarth/master36b2159
chore: rename option, add documentationf848ea1
feat: reverted previous changes about exclude option, new option for follow i...466e577
feat: option for excluding renames and move operations for last update dateUpdates
mkdocs-macros-plugin
from 1.3.6 to 1.3.7Release notes
Sourced from mkdocs-macros-plugin's releases.
Changelog
Sourced from mkdocs-macros-plugin's changelog.
Commits
b906a36
Bump version number5641806
Fixed incompatibility with d2 module (#249)Updates
mypy
from 1.12.1 to 1.13.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
eb31034
Bump version to 1.13.02eeb588
Update changelog for 1.12.1 (#17999)bc0386b
Changelog for 1.13 (#18000)5c4d2db
Add faster-cache extra, test in CI (#17978)854ad18
Make is_sub_path faster (#17962)50aa4ca
Speed up stubs suggestions (#17965)7c27808
Use orjson instead of json, when available (#17955)2cd2406
Use fast path in modulefinder more often (#17950)e20aaee
Let mypyc optimise os.path.join (#17949)159974c
Use sha1 for hashing (#17953)Updates
ruff
from 0.7.0 to 0.7.4Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
ed7b98c
Bump version to 0.7.4 (#14358)6591775
[flake8-type-checking
] Skip quoting annotation if it becomes invalid syntax...1f82731
Use CWD to resolve settings fromruff.configuration
(#14352)874da9c
[red-knot] Display raw characters for string literal (#14351)375cead
Sync vendored typeshed stubs (#14350)9ec690b
[red-knot] Add support for string annotations (#14151)a48d779
[red-knot] function signature representation (#14304)ba6c7f6
[pylint
] Remove check for dot in alias name in `useless-import-alias (PLC04...8095ff0
enforce required imports even with useless alias (#14287)24cd592
Avoid module lookup for known classes when possible (#14343)Updates
semgrep
from 1.92.0 to 1.96.0Release notes
Sourced from semgrep's releases.