Project

General

Profile

Actions

Bug #7587

closed

Deprecation warnings

Added by Rajmund Hruška about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Testing
Target version:
Start date:
06/01/2022
Due date:
% Done:

100%

Estimated time:
To be discussed:

Description

There are 2 parts of this issue:
1. Fix existing deprecation warnings
2. Automatically check and report deprecation warnings


Related issues

Related to Mentat - Bug #7583: Report feedback not workingClosedRadko Krkoš05/06/2022

Actions
Actions #1

Updated by Rajmund Hruška about 2 years ago

  • Related to Bug #7583: Report feedback not working added
Actions #2

Updated by Rajmund Hruška about 2 years ago

  • Status changed from In Progress to Feedback
  • To be discussed changed from No to Yes

There is a bunch of these deprecation warnings:

/vagrant/lib/hawat/base.py:636: DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1. Import 'markupsafe.Markup' instead.
  self.config.get('ICONS').get(default_icon)
/vagrant/lib/hawat/view/__init__.py:1846: DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1. Import 'markupsafe.Markup' instead.
  flask.Markup(self.get_message_success(item = item, parent = parent)),

So, we are using Markup from flask which is deprecated. flask fixed this warning (and a bunch of other warnings) in version 2.0.0. We are using version 1.1.1, so I suggest moving to the latest version (which is 2.1.2).

Regarding the second part of this issue, I would go with the solution described at https://stackoverflow.com/questions/59680450/how-to-detect-compiler-warnings-in-gitlab-ci. It won't produce any emails but on GitLab it will be visible that there are some warnings.

Actions #3

Updated by Rajmund Hruška almost 2 years ago

  • Status changed from Feedback to In Progress
  • Target version changed from Backlog to 2.10
  • % Done changed from 0 to 20
  • To be discussed deleted (Yes)
Actions #4

Updated by Rajmund Hruška almost 2 years ago

  • Category set to Testing
Actions #5

Updated by Rajmund Hruška almost 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 20 to 100

I changed Flask and internal packages (Pynspect, Pyzenkit, Pydgets, Idea, TypedCols, IPRanges) to use the most up to date versions. Now the version is limited by the major version, so those packages should be regularly updated, when minor versions are released. (https://stackoverflow.com/questions/46601761/is-it-a-good-practice-to-upgrade-all-python-packages-in-production-to-their-late)

I added wtforms_sqlalchemy package to replace wtforms.ext.sqlalchemy which has deprecation warnings. (https://github.com/wtforms/wtforms-sqlalchemy)

I also fixed the broken/skipped tests (#7494), so now all of the existing tests should be executed and deprecation warnings are printed.

I didn't update the other packages (such as pytz or wtforms), as they didn't produce any deprecation warnings.

Actions #6

Updated by Rajmund Hruška almost 2 years ago

Also, regarding checking the deprecation warnings - the mechanism will be implemented in GitLab CI/CD with #7539.

Actions #7

Updated by Rajmund Hruška almost 2 years ago

  • Status changed from Resolved to In Review

Merged into devel and deployed on mentat-alt.

Actions #8

Updated by Pavel Kácha almost 2 years ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF