Skip to content

Commit

Permalink
Use logging.WARNING instead of logging.WARN
Browse files Browse the repository at this point in the history
The `WARN` constant is an undocumented alias for `WARNING`. Whilst it’s not deprecated, it’s not mentioned at all in the documentation. This references one of  `flake8-logging` plugins [rule](https://github.com/adamchainz/flake8-logging?tab=readme-ov-file#log009-warn-is-undocumented-use-warning-instead).

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
Changed all uses of `logging.WARN` to `logging.WARNING`.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [x] A documentation / typographical error fix
	- Good to go, no issue or tests are needed
- [ ] A short code fix
	- please include the issue number, and create an issue if none exists, which
	  must include a complete example of the issue.  one line code fixes without an
	  issue and demonstration will not be accepted.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
	- please include the issue number, and create an issue if none exists, which must
	  include a complete example of how the feature would look.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.

**Have a nice day!**

Closes: #1548
Pull-request: #1548
Pull-request-sha: 249b9a2

Change-Id: I7c64ce9bb18af551c761ed9216713ee02cbbb83b
  • Loading branch information
thirtysixpw authored and sqla-tester committed Oct 5, 2024
1 parent 9cc68f5 commit bd50ba3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions alembic/templates/async/alembic.ini.mako
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ keys = console
keys = generic

[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
level = WARNING
handlers =
qualname = sqlalchemy.engine

Expand Down
4 changes: 2 additions & 2 deletions alembic/templates/generic/alembic.ini.mako
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ keys = console
keys = generic

[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
level = WARNING
handlers =
qualname = sqlalchemy.engine

Expand Down
4 changes: 2 additions & 2 deletions alembic/templates/multidb/alembic.ini.mako
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ keys = console
keys = generic

[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
level = WARNING
handlers =
qualname = sqlalchemy.engine

Expand Down
8 changes: 4 additions & 4 deletions alembic/testing/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _sqlite_testing_config(sourceless=False, future=False):
keys = console
[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =
Expand Down Expand Up @@ -171,7 +171,7 @@ def _multi_dir_testing_config(sourceless=False, extra_version_location=""):
keys = console
[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =
Expand Down Expand Up @@ -216,7 +216,7 @@ def _no_sql_testing_config(dialect="postgresql", directives=""):
keys = console
[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =
Expand Down Expand Up @@ -497,7 +497,7 @@ def _multidb_testing_config(engines):
keys = console
[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =
Expand Down
4 changes: 2 additions & 2 deletions docs/build/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ The file generated with the "generic" configuration looks like::
keys = generic

[logger_root]
level = WARN
level = WARNING
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
level = WARNING
handlers =
qualname = sqlalchemy.engine

Expand Down

0 comments on commit bd50ba3

Please sign in to comment.