-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bump python-dotenv from 0.19.1 to 0.19.2 in /webapp #353
Conversation
a658cc2
to
da7dec9
Compare
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>
da7dec9
to
c4a7731
Compare
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(): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGreatTM
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! :)
Kudos, SonarCloud Quality Gate passed!
|
Bumps python-dotenv from 0.19.1 to 0.19.2.
Release notes
Sourced from python-dotenv's releases.
Changelog
Sourced from python-dotenv's changelog.
Commits
2471a5a
Release version 0.19.245848bb
Add missing trailing newline when adding new valueDependabot 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)