Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump python-dotenv from 0.19.1 to 0.19.2 in /webapp #353

Merged
merged 7 commits into from
Dec 3, 2021

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Nov 12, 2021

Bumps python-dotenv from 0.19.1 to 0.19.2.

Release notes

Sourced from python-dotenv's releases.

Version 0.19.2

What's Changed

Fixed

Full Changelog: theskumar/python-dotenv@v0.19.1...v0.19.2

Changelog

Sourced from python-dotenv's changelog.

[0.19.2] - 2021-11-11

Fixed

  • In set_key, add missing newline character before new entry if necessary. (#361 by [@​bbc2])
Commits

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 added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Nov 12, 2021
@dependabot dependabot bot force-pushed the dependabot/pip/webapp/python-dotenv-0.19.2 branch 2 times, most recently from a658cc2 to da7dec9 Compare November 23, 2021 14:03
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.19.1 to 0.19.2.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/master/CHANGELOG.md)
- [Commits](theskumar/python-dotenv@v0.19.1...v0.19.2)

---
updated-dependencies:
- dependency-name: python-dotenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/webapp/python-dotenv-0.19.2 branch from da7dec9 to c4a7731 Compare November 23, 2021 14:49
@JulianRoesner JulianRoesner self-assigned this Nov 26, 2021
@JulianRoesner
Copy link

Similarly to #351 this also adds WTForms 3.0. Because the new version changes the fields a lot, I had to adapt how they are imported and adapt some of our own fields

@@ -20,7 +20,7 @@

class DecimalOnly:
def __call__(self, form, field):
if not field.data.isdecimal():
if field.data and not field.data.isdecimal():

Choose a reason for hiding this comment

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

The StringField will now set the data to None if nothing was provided. In the old version this was an empty string. We needed to change the DecimalOnly validator because of that. Before, we would not accept an empty string as decimalOnly. However, this could have meant an implicit inputRequired. Therefore, I have changed it.

Do you think that is correct or should we test explicitly for None?

Copy link
Member

Choose a reason for hiding this comment

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

No, I think this is great.

Choose a reason for hiding this comment

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

That worries me a little bit, if we check somewhere for "" but not for None. This also affects the string validators, date validators and probably others where we don't explicitly validate on InputRequired or on None.

Choose a reason for hiding this comment

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

Great point. I had another look.

StringField
We use the StringField only for the SteuerlotseStringField. I have checked all the validators that we use with that field. These are InputRequired and validators.length. Both can work with None.

Fields that inherit from SteuerlotseStringField are the following. The fields marked with * check if data is None in the pre_process method and change it accordingly. I would say that those do not lead to any problems. For the others I described what I checked:

  • IdNrField *
  • LegacyIdNrField *
  • TaxNumberField *
  • UnlockCodeField *
  • SteuerlotseIbanField: This does not get an error because the data is changed while being processed (s. fields.py l. 116 and StringField's process_formdata). Nevertheless, I have adapted the validator ValidIBan.
  • SteuerlotseNameStringField: Does not use any special validators
  • SteuerlotseNumericStringField: Uses DecimalOnly which has been adapted.

Besides the StringField we use these fields RadioField, Field, BooleanField, DateField, SelectField, IntegerField. I had a look into their inheritance tree and none of them inherits from the StringField.

Our validators
Although they should not receive None, I have changed the following validators to check for None:

  • ValidUnlockCode
  • ValidElsterCharacterSet
  • ValidUnlockCodeCharacterSet

I would not change the following because they all work with split fields and those should already process None correctly:

  • ValidTaxNumberLength
  • ValidHessenTaxNumber
  • ValidTaxNumber
  • ValidIdNr
  • IntegerLength and NoZero: Do already work with None.

@JulianRoesner JulianRoesner requested review from a team and SannyNguyenHung and removed request for a team November 26, 2021 10:29
Copy link
Member

@frederike-ramin frederike-ramin left a comment

Choose a reason for hiding this comment

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

LGreatTM

@JulianRoesner
Copy link

I had a look at the WTForms changelog for v. 3.0. including the alpha version. The main part that has been changed is the StringField, the dropped support for Python version < 3.6 ( does not affect us) and that HTML5 widgets are now used by default.

Besides that ValueErrors raised in validators are now raised as normal exceptions. They should be exchanged with ValidationErrors. I have added that change.

All the other changes seem to fix broken functionality or add new one.

Copy link

@SannyNguyenHung SannyNguyenHung left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@JulianRoesner JulianRoesner merged commit cc060fc into main Dec 3, 2021
@JulianRoesner JulianRoesner deleted the dependabot/pip/webapp/python-dotenv-0.19.2 branch December 3, 2021 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests 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.

3 participants