Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Bump flake8-bugbear from 21.3.2 to 22.9.23 #14042

Merged
merged 9 commits into from
Oct 19, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 4, 2022

Bumps flake8-bugbear from 21.3.2 to 22.9.23.

Release notes

Sourced from flake8-bugbear's releases.

22.9.23

  • add B026: find argument unpacking after keyword argument (#287)
  • Move to setup.cfg like flake8 (#288)

22.9.11

  • Add B025: Find duplicate except clauses (#284)

22.8.23

  • Add B024 error code to message for B024 (#276)

22.8.22

  • Add B024: abstract base class with no abstract methods (#273)

22.7.1

22.6.22

  • Don't crash when select / extend_select are None (#261)
  • Ignore lambda arguments for B020 (#259)
  • Fix missing space typos in B021, B022 error messages (#257)

22.4.25

  • Ignore black formatting for b013 test case (#251)
  • B010 Fix lambda false positive (#246)
  • B008 Fix edge case with lambda functions (#243)

22.3.23

  • B006 and B008: Detect function calls at any level of the default expression (#239)
  • B020: Fix comprehension false postives (#238)
  • Tweak B019 desc (#237)

22.3.20

  • B022: No arguments passed to contextlib.suppress (#231)
  • B021: f-string used as docstring. (#230)
  • B020: ensure loop control variable doesn't overrides iterable it iterates (#220)
  • B019: check to find cache decorators on class methods (#218)
  • Fix crash on long empty string (#223)

22.1.11

  • B018: Ignore JoinedStr (#216)
  • Build universal Python 3 wheels (#214)
  • B950: Add same special cases as E501 (#213)

21.11.29

  • B018: Disable strings from check for now (#209)

21.11.28

  • B904: ensure the raise is in the same context with the except (#191)

... (truncated)

Commits
  • 8d9c457 Update version + Change Log for 22.9.23 release
  • 87e4d66 Migrate metadata from setup.py to setup.cfg (#288)
  • 2b4c163 B026 - Argument unpacking after keyword argument (#287)
  • 3f3fd33 Update version + Change Log for 22.9.11 release
  • 651ed80 Add new check which finds duplicate except clauses (#284)
  • 4c34177 [pre-commit.ci] pre-commit autoupdate (#283)
  • bc46cb5 Update version + Change Log for 22.8.23 release
  • 7d1adf9 Add missing error code to message for B024 (#276)
  • 1007f5c Update version + Change Log for 22.8.22 release
  • 881f054 Merge pull request #274 from jakkdl/abstract_class_no_abstract_methods
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner October 4, 2022 12:26
@dependabot dependabot bot added dependencies Pull requests from dependabot that update a dependency file python Pull requests that update Python code labels Oct 4, 2022
@dependabot dependabot bot force-pushed the dependabot/pip/flake8-bugbear-22.9.23 branch from 4445715 to 2ef6ecf Compare October 4, 2022 14:04
@clokep
Copy link
Member

clokep commented Oct 4, 2022

Looks like this has some new checks which are failing, unfortunately most of them seem to be bogus (IMO). 😢

@erikjohnston
Copy link
Member

B019 Use of functools.lru_cache or functools.cache on methods can lead to memory leaks. The cache may retain instance references, preventing garbage collection.

Oh wow that is an opinionated linter!

I think some of these new lints we should just ignore. Does anyone know how best to ignore flake8 lints? Doesn't look like you can configure them via pyproject.toml :(

@DMRobertson
Copy link
Contributor

Does anyone know how best to ignore flake8 lints?

See https://github.com/matrix-org/synapse/blob/94a396e7c4b4488d7f0ca08672114a4a586cf42c/.flake8#L12-L11

Doesn't look like you can configure them via pyproject.toml :(

Correct. The flake8 maintainer explains their motivation in PyCQA/flake8#234.

@erikjohnston
Copy link
Member

Does anyone know how best to ignore flake8 lints?

See https://github.com/matrix-org/synapse/blob/94a396e7c4b4488d7f0ca08672114a4a586cf42c/.flake8#L12-L11

I appear to be utterly blind today.


I think the following are probably bogus for us:

  • B019: Use of functools.lru_cache or functools.cache on methods can lead to memory leaks
  • B023: Functions defined inside a loop must not use variables redefined in the loop
  • B024: Abstract base class with no abstract method.

There are a couple of others that look much more sensible.

@clokep
Copy link
Member

clokep commented Oct 12, 2022

That list matches what I quickly thought too. 👍

@reivilibre
Copy link
Contributor

B023 seems potentially useful in that the issue it spots is massively footgunny and personally I wouldn't notice it quickly.
However it seems to have a substantial rate of false positives; there's an open issue at PyCQA/flake8-bugbear#269 and I suspect we can't use it until it has a better precision rate ((true positives)/(true positives + false positives))

Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.3.2 to 22.9.23.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](PyCQA/flake8-bugbear@21.3.2...22.9.23)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/flake8-bugbear-22.9.23 branch from 2ef6ecf to c96ba46 Compare October 17, 2022 11:04
@erikjohnston erikjohnston self-assigned this Oct 17, 2022
@erikjohnston
Copy link
Member

I've made the changes, so hopefully this should pass now.

@erikjohnston erikjohnston removed their assignment Oct 17, 2022
pyproject.toml Outdated
flake8-bugbear = "==21.3.2"
flake8-bugbear = "==22.9.23"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want a pin in here when we have a pin in the lockfile? 🤷

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sytest-with-workers was unhappy (which is odd). Needs develop merging in to resolve lockfile conflicts.

Edit: probably easiest to do by hand: checkout lockfile develop and pyproject from this PR, then poetry lock --no-update

@DMRobertson DMRobertson force-pushed the dependabot/pip/flake8-bugbear-22.9.23 branch from a18c401 to 23b6c62 Compare October 19, 2022 18:55
.flake8 Outdated Show resolved Hide resolved
Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI passes.

@DMRobertson DMRobertson enabled auto-merge (squash) October 19, 2022 19:02
@DMRobertson DMRobertson merged commit 0b7830e into develop Oct 19, 2022
@DMRobertson DMRobertson deleted the dependabot/pip/flake8-bugbear-22.9.23 branch October 19, 2022 19:38
bradtgmurray added a commit to beeper/synapse-legacy-fork that referenced this pull request Nov 15, 2022
Synapse 1.71.0 (2022-11-08)
===========================

Please note that, as announced in the release notes for Synapse 1.69.0, legacy Prometheus metric names are now disabled by default.
They will be removed altogether in Synapse 1.73.0.
If not already done, server administrators should update their dashboards and alerting rules to avoid using the deprecated metric names.
See the [upgrade notes](https://matrix-org.github.io/synapse/v1.71/upgrade.html#upgrading-to-v1710) for more details.

**Note:** in line with our [deprecation policy](https://matrix-org.github.io/synapse/latest/deprecation_policy.html) for platform dependencies, this will be the last release to support PostgreSQL 10, which reaches upstream end-of-life on November 10th, 2022. Future releases of Synapse will require PostgreSQL 11+.

No significant changes since 1.71.0rc2.

Synapse 1.71.0rc2 (2022-11-04)
==============================

Improved Documentation
----------------------

- Document the changes to monthly active user metrics due to deprecation of legacy Prometheus metric names. ([\matrix-org#14358](matrix-org#14358), [\matrix-org#14360](matrix-org#14360))

Deprecations and Removals
-------------------------

- Disable legacy Prometheus metric names by default. They can still be re-enabled for now, but they will be removed altogether in Synapse 1.73.0. ([\matrix-org#14353](matrix-org#14353))

Internal Changes
----------------

- Run unit tests against Python 3.11. ([\matrix-org#13812](matrix-org#13812))

Synapse 1.71.0rc1 (2022-11-01)
==============================

Features
--------

- Support back-channel logouts from OpenID Connect providers. ([\matrix-org#11414](matrix-org#11414))
- Allow use of Postgres and SQLlite full-text search operators in search queries. ([\matrix-org#11635](matrix-org#11635), [\matrix-org#14310](matrix-org#14310), [\matrix-org#14311](matrix-org#14311))
- Implement [MSC3664](matrix-org/matrix-spec-proposals#3664), Pushrules for relations. Contributed by Nico. ([\matrix-org#11804](matrix-org#11804))
- Improve aesthetics of HTML templates. Note that these changes do not retroactively apply to templates which have been [customised](https://matrix-org.github.io/synapse/latest/templates.html#templates) by server admins. ([\matrix-org#13652](matrix-org#13652))
- Enable write-ahead logging for SQLite installations. Contributed by [@asymmetric](https://github.com/asymmetric). ([\matrix-org#13897](matrix-org#13897))
- Show erasure status when [listing users](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#query-user-account) in the Admin API. ([\matrix-org#14205](matrix-org#14205))
- Provide a specific error code when a `/sync` request provides a filter which doesn't represent a JSON object. ([\matrix-org#14262](matrix-org#14262))

Bugfixes
--------

- Fix a long-standing bug where the `update_synapse_database` script could not be run with multiple databases. Contributed by @thefinn93 @ Beeper. ([\matrix-org#13422](matrix-org#13422))
- Fix a bug which prevented setting an avatar on homeservers which have an explicit port in their `server_name` and have `max_avatar_size` and/or `allowed_avatar_mimetypes` configuration. Contributed by @ashfame. ([\matrix-org#13927](matrix-org#13927))
- Check appservice user interest against the local users instead of all users in the room to align with [MSC3905](matrix-org/matrix-spec-proposals#3905). ([\matrix-org#13958](matrix-org#13958))
- Fix a long-standing bug where Synapse would accidentally include extra information in the response to [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid). ([\matrix-org#14064](matrix-org#14064))
- Fix a bug introduced in Synapse 1.64.0 where presence updates could be missing from `/sync` responses. ([\matrix-org#14243](matrix-org#14243))
- Fix a bug introduced in Synapse 1.60.0 which caused an error to be logged when Synapse received a SIGHUP signal if debug logging was enabled. ([\matrix-org#14258](matrix-org#14258))
- Prevent history insertion ([MSC2716](matrix-org/matrix-spec-proposals#2716)) during an partial join ([MSC3706](matrix-org/matrix-spec-proposals#3706)). ([\matrix-org#14291](matrix-org#14291))
- Fix a bug introduced in Synapse 1.34.0 where device names would be returned via a federation user key query request when `allow_device_name_lookup_over_federation` was set to `false`. ([\matrix-org#14304](matrix-org#14304))
- Fix a bug introduced in Synapse 0.34.0 where logs could include error spam when background processes are measured as taking a negative amount of time. ([\matrix-org#14323](matrix-org#14323))
- Fix a bug introduced in Synapse 1.70.0 where clients were unable to PUT new [dehydrated devices](matrix-org/matrix-spec-proposals#2697). ([\matrix-org#14336](matrix-org#14336))

Improved Documentation
----------------------

- Explain how to disable the use of [`trusted_key_servers`](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#trusted_key_servers). ([\matrix-org#13999](matrix-org#13999))
- Add workers settings to [configuration manual](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#individual-worker-configuration). ([\matrix-org#14086](matrix-org#14086))
- Correct the name of the config option [`encryption_enabled_by_default_for_room_type`](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#encryption_enabled_by_default_for_room_type). ([\matrix-org#14110](matrix-org#14110))
- Update docstrings of `SynapseError` and `FederationError` to bettter describe what they are used for and the effects of using them are. ([\matrix-org#14191](matrix-org#14191))

Internal Changes
----------------

- Remove unused `@lru_cache` decorator. ([\matrix-org#13595](matrix-org#13595))
- Save login tokens in database and prevent login token reuse. ([\matrix-org#13844](matrix-org#13844))
- Refactor OIDC tests to better mimic an actual OIDC provider. ([\matrix-org#13910](matrix-org#13910))
- Fix type annotation causing import time error in the Complement forking launcher. ([\matrix-org#14084](matrix-org#14084))
- Refactor [MSC3030](matrix-org/matrix-spec-proposals#3030) `/timestamp_to_event` endpoint to loop over federation destinations with standard pattern and error handling. ([\matrix-org#14096](matrix-org#14096))
- Add initial power level event to batch of bulk persisted events when creating a new room. ([\matrix-org#14228](matrix-org#14228))
- Refactor `/key/` endpoints to use `RestServlet` classes. ([\matrix-org#14229](matrix-org#14229))
- Switch to using the `matrix-org/backend-meta` version of `triage-incoming` for new issues in CI. ([\matrix-org#14230](matrix-org#14230))
- Build wheels on macos 11, not 10.15. ([\matrix-org#14249](matrix-org#14249))
- Add debugging to help diagnose lost device list updates. ([\matrix-org#14268](matrix-org#14268))
- Add Rust cache to CI for `trial` runs. ([\matrix-org#14287](matrix-org#14287))
- Improve type hinting of `RawHeaders`. ([\matrix-org#14303](matrix-org#14303))
- Use Poetry 1.2.0 in the Twisted Trunk CI job. ([\matrix-org#14305](matrix-org#14305))

<details>
<summary>Dependency updates</summary>

Runtime:

- Bump anyhow from 1.0.65 to 1.0.66. ([\matrix-org#14278](matrix-org#14278))
- Bump jinja2 from 3.0.3 to 3.1.2. ([\matrix-org#14271](matrix-org#14271))
- Bump prometheus-client from 0.14.0 to 0.15.0. ([\matrix-org#14274](matrix-org#14274))
- Bump psycopg2 from 2.9.4 to 2.9.5. ([\matrix-org#14331](matrix-org#14331))
- Bump pysaml2 from 7.1.2 to 7.2.1. ([\matrix-org#14270](matrix-org#14270))
- Bump sentry-sdk from 1.5.11 to 1.10.1. ([\matrix-org#14330](matrix-org#14330))
- Bump serde from 1.0.145 to 1.0.147. ([\matrix-org#14277](matrix-org#14277))
- Bump serde_json from 1.0.86 to 1.0.87. ([\matrix-org#14279](matrix-org#14279))

Tooling and CI:

- Bump black from 22.3.0 to 22.10.0. ([\matrix-org#14328](matrix-org#14328))
- Bump flake8-bugbear from 21.3.2 to 22.9.23. ([\matrix-org#14042](matrix-org#14042))
- Bump peaceiris/actions-gh-pages from 3.8.0 to 3.9.0. ([\matrix-org#14276](matrix-org#14276))
- Bump peaceiris/actions-mdbook from 1.1.14 to 1.2.0. ([\matrix-org#14275](matrix-org#14275))
- Bump setuptools-rust from 1.5.1 to 1.5.2. ([\matrix-org#14273](matrix-org#14273))
- Bump twine from 3.8.0 to 4.0.1. ([\matrix-org#14332](matrix-org#14332))
- Bump types-opentracing from 2.4.7 to 2.4.10. ([\matrix-org#14133](matrix-org#14133))
- Bump types-requests from 2.28.11 to 2.28.11.2. ([\matrix-org#14272](matrix-org#14272))
</details>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests from dependabot that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants