Skip to content

Deprecation warnings should be printed for dev versions #2308

@half-duplex

Description

@half-duplex

Description

sopel.logger.get_logger is marked as deprecated, but no deprecation warning is raised when it's used.

Reproduction steps

  1. Create a Sopel plugin with from sopel.logger import get_logger; LOGGER=get_logger(__name__)
  2. Start Sopel with that plugin
  3. No deprecation warnings are produced

Expected behavior

A deprecation warning is produced

Relevant logs

Tested by replacing the logger in admin.py.

[2022-06-11 13:00:50,089] sopel.bot            INFO     - Plugin loaded: ping
[2022-06-11 13:00:50,090] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.join []>
[2022-06-11 13:00:50,090] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.tmpjoin []>
[2022-06-11 13:00:50,091] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.part []>
[2022-06-11 13:00:50,091] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.tmppart []>
[2022-06-11 13:00:50,092] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.chanlist [channels]>
[2022-06-11 13:00:50,092] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.restart []>
[2022-06-11 13:00:50,093] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.quit []>
[2022-06-11 13:00:50,093] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.raw []>
[2022-06-11 13:00:50,094] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.say [msg]>
[2022-06-11 13:00:50,094] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.me []>
[2022-06-11 13:00:50,094] sopel.plugins.rules  DEBUG    - Rule registered: <Rule admin.invite_join (1)>
[2022-06-11 13:00:50,094] sopel.plugins.rules  DEBUG    - Rule registered: <Rule admin.hold_ground (1)>
[2022-06-11 13:00:50,095] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.mode []>
[2022-06-11 13:00:50,095] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.set []>
[2022-06-11 13:00:50,096] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.unset []>
[2022-06-11 13:00:50,096] sopel.plugins.rules  DEBUG    - Command registered: <Command admin.save []>
[2022-06-11 13:00:50,096] sopel.bot            INFO     - Plugin loaded: admin

Notes

No response

Sopel version

eac71b0

Installation method

pip install

Python version

3.10.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions