falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

chore: deprecate func compile_uri_template() #1971

Closed nix010 closed 2 years ago

nix010 commented 2 years ago

Summary of Changes

First timer, I don't know if this is a correct for this so please advise.

Add deprecated warning for func compile_uri_template()

Related Issues

1967

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1971 (5384248) into master (c99972e) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1971   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           63        63           
  Lines         6677      6678    +1     
  Branches      1239      1239           
=========================================
+ Hits          6677      6678    +1     
Impacted Files Coverage Δ
falcon/response.py 100.00% <100.00%> (ø)
falcon/routing/util.py 100.00% <100.00%> (ø)

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 c99972e...5384248. Read the comment docs.

CaselIT commented 2 years ago

Thanks for the pr!

CaselIT commented 2 years ago

Furthermore, we need to either wrap all tests in tests/test_uri_templates_legacy.py with pytest.warns(...), or add a rule to ignore this warning, because we don't want to get spam in the test output about this.

it may make sense to make pytest fail the test if a warning gets raised, so that's explicitly handled

vytas7 commented 2 years ago

it may make sense to make pytest fail the test if a warning gets raised, so that's explicitly handled

That would be great if we could restrict this only to warnings originating from Falcon's codebase. Otherwise it might incur extra amount of CI fighting whenever there's a new warning in a 3rd party package.

vytas7 commented 2 years ago

@nix010 Just checking whether you are still working on this PR? We'd need to clean up the tests etc to make all CI gates pass as a first step, and check there are no new warnings introduced.