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

Fix for Loop properties revindex and revindex0 still wrong in Jinja2 2.10 #794 #993

Merged
merged 1 commit into from Oct 14, 2019

Conversation

@aayushuppal
Copy link
Contributor

aayushuppal commented May 6, 2019

  • The approach to set length param is costly and should be avoided. only if someone expects the iterator length should the cost be borne.
  • Added test cases to validate rendering and LoopContext behavior

fixes #459
fixes #751
fixes #794

@davidism davidism closed this May 6, 2019
@davidism davidism reopened this May 6, 2019
@aayushuppal aayushuppal force-pushed the aayushuppal:loop_fix branch from 9b3f65f to 8667c6c May 6, 2019
@aayushuppal

This comment has been minimized.

Copy link
Contributor Author

aayushuppal commented May 7, 2019

Issue & Fix summary

  • The LoopContext length property implementation was incorrect & suboptimal which in turn messed up the values of revindex revindex0
  • Fixed LoopContext length property implementation
  • Added testcases
@davidism davidism changed the base branch from 2.10.x to master Oct 14, 2019
@davidism davidism force-pushed the aayushuppal:loop_fix branch from 624d8bc to ef1a4c6 Oct 14, 2019
@davidism davidism changed the base branch from master to 2.10.x Oct 14, 2019
@davidism davidism changed the base branch from 2.10.x to master Oct 14, 2019
@davidism davidism merged commit 81b3224 into pallets:master Oct 14, 2019
10 checks passed
10 checks passed
Tests Build #20191014.5 succeeded
Details
Tests (Job Docs) Job Docs succeeded
Details
Tests (Job PyPy 3 Linux) Job PyPy 3 Linux succeeded
Details
Tests (Job Python 2.7 Linux) Job Python 2.7 Linux succeeded
Details
Tests (Job Python 2.7 Windows) Job Python 2.7 Windows succeeded
Details
Tests (Job Python 3.5 Linux) Job Python 3.5 Linux succeeded
Details
Tests (Job Python 3.6 Linux) Job Python 3.6 Linux succeeded
Details
Tests (Job Python 3.7 Linux) Job Python 3.7 Linux succeeded
Details
Tests (Job Python 3.7 Mac) Job Python 3.7 Mac succeeded
Details
Tests (Job Python 3.7 Windows) Job Python 3.7 Windows succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.