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

Removed usages of deprecated fields #595

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kamikaz1k
Copy link

(preface) Hi o/ not sure if you're looking for PRs in this category of work but I saw #571 and it was annoying me in my builds, so I thought I would try to solve it instead of piling on. That being said, I did a very naive refactor based on what I understood. Ya'll might have had more comprehensive plans about how you wanted to arrange things. But hopefully this is roughly in the ballpark. (/preface)

There were a number of deprecation errors being emitted from the package, so I have attempted to update all those references by essentially taking the wrapping code and moving it closer to the calling site. I did my best with the understanding of the interactions.

I have also added a Makefile that makes is easier to set up a dev environment and get tests running. I realize I am imposing this, so let me know if you would rather not have this.

Makefile output:

$ make
=======================================================
=============== schematics dev commands ===============
=======================================================
env 		setup virtualenv
tests 		setup virtualenv and run tests in it

$ make env
test -d venv || virtualenv venv || @echo "please install virtualenv"
venv/bin/pip install -r test-requirements.txt
... pip do the installs ...
Successfully installed schematics

$ make test
... does `make env`
coverage pytest ... # the command from the README

@codecov-io
Copy link

Codecov Report

Merging #595 into master will decrease coverage by 0.68%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   91.06%   90.38%   -0.69%     
==========================================
  Files          24       24              
  Lines        2541     2547       +6     
==========================================
- Hits         2314     2302      -12     
- Misses        227      245      +18
Impacted Files Coverage Δ
schematics/types/base.py 93.65% <100%> (ø) ⬆️
schematics/validate.py 96.66% <100%> (+0.23%) ⬆️
schematics/transforms.py 98.45% <100%> (ø) ⬆️
schematics/iteration.py 86.48% <100%> (+0.37%) ⬆️
schematics/models.py 97.88% <100%> (ø) ⬆️
schematics/types/compound.py 93.92% <100%> (ø) ⬆️
schematics/deprecated.py 78.02% <0%> (-19.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90dee53...4df7f17. Read the comment docs.

4 similar comments
@codecov-io
Copy link

Codecov Report

Merging #595 into master will decrease coverage by 0.68%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   91.06%   90.38%   -0.69%     
==========================================
  Files          24       24              
  Lines        2541     2547       +6     
==========================================
- Hits         2314     2302      -12     
- Misses        227      245      +18
Impacted Files Coverage Δ
schematics/types/base.py 93.65% <100%> (ø) ⬆️
schematics/validate.py 96.66% <100%> (+0.23%) ⬆️
schematics/transforms.py 98.45% <100%> (ø) ⬆️
schematics/iteration.py 86.48% <100%> (+0.37%) ⬆️
schematics/models.py 97.88% <100%> (ø) ⬆️
schematics/types/compound.py 93.92% <100%> (ø) ⬆️
schematics/deprecated.py 78.02% <0%> (-19.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90dee53...4df7f17. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #595 into master will decrease coverage by 0.68%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   91.06%   90.38%   -0.69%     
==========================================
  Files          24       24              
  Lines        2541     2547       +6     
==========================================
- Hits         2314     2302      -12     
- Misses        227      245      +18
Impacted Files Coverage Δ
schematics/types/base.py 93.65% <100%> (ø) ⬆️
schematics/validate.py 96.66% <100%> (+0.23%) ⬆️
schematics/transforms.py 98.45% <100%> (ø) ⬆️
schematics/iteration.py 86.48% <100%> (+0.37%) ⬆️
schematics/models.py 97.88% <100%> (ø) ⬆️
schematics/types/compound.py 93.92% <100%> (ø) ⬆️
schematics/deprecated.py 78.02% <0%> (-19.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90dee53...4df7f17. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #595 into master will decrease coverage by 0.68%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   91.06%   90.38%   -0.69%     
==========================================
  Files          24       24              
  Lines        2541     2547       +6     
==========================================
- Hits         2314     2302      -12     
- Misses        227      245      +18
Impacted Files Coverage Δ
schematics/types/base.py 93.65% <100%> (ø) ⬆️
schematics/validate.py 96.66% <100%> (+0.23%) ⬆️
schematics/transforms.py 98.45% <100%> (ø) ⬆️
schematics/iteration.py 86.48% <100%> (+0.37%) ⬆️
schematics/models.py 97.88% <100%> (ø) ⬆️
schematics/types/compound.py 93.92% <100%> (ø) ⬆️
schematics/deprecated.py 78.02% <0%> (-19.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90dee53...4df7f17. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Jun 16, 2019

Codecov Report

Merging #595 into master will decrease coverage by 0.68%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   91.06%   90.38%   -0.69%     
==========================================
  Files          24       24              
  Lines        2541     2547       +6     
==========================================
- Hits         2314     2302      -12     
- Misses        227      245      +18
Impacted Files Coverage Δ
schematics/types/base.py 93.65% <100%> (ø) ⬆️
schematics/validate.py 96.66% <100%> (+0.23%) ⬆️
schematics/transforms.py 98.45% <100%> (ø) ⬆️
schematics/iteration.py 86.48% <100%> (+0.37%) ⬆️
schematics/models.py 97.88% <100%> (ø) ⬆️
schematics/types/compound.py 93.92% <100%> (ø) ⬆️
schematics/deprecated.py 78.02% <0%> (-19.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90dee53...4df7f17. Read the comment docs.

@jimorie
Copy link

jimorie commented Oct 7, 2019

+1 from me to get this or a similar fix merged.

This greatly reduces the number of deprecation warning I see in my schematics project. (Still have one call to deprecated function fields, from deprecated.py line 65.)

@dhallam
Copy link

dhallam commented Jun 19, 2020

Is there a maintainer who can review, merge and release a 2.1.1 if this is okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants