Closed rickecon closed 5 years ago
@asmockler. I am having trouble pushing these changes to Heroku. The part that the push seems to be getting hung up on is the change I made to requirements.txt
. GitHub sent me a security warning suggesting that I change the line Jinja2 < 2.10.1
to Jinja2 ~> 2.10.1
. When I run everything locally, it looks like it runs OK. Now when I try to push these changes to Heroku, I get the following output. This suggests to me that it is my requirements.txt
change causing the problem. Any ideas, will be appreciated. I guess I could just revert the requirements.txt
file to Jinja2 < 2.10.1
and not worry about the security warning. Let me know what you think.
Richards-MacBook-Pro-2:oselab rwe$ git push heroku master
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 4 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.74 KiB | 888.00 KiB/s, done.
Total 10 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
remote: req = REQUIREMENT.parseString(requirement_string)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1617, in parseString
remote: raise exc
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1607, in parseString
remote: loc, tokens = self._parse( instring, 0 )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3376, in parseImpl
remote: loc, exprtokens = e._parse( instring, loc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3164, in parseImpl
remote: raise ParseException(instring, loc, self.errmsg, self)
remote: pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 7), (line:1, col:8)
remote:
remote: During handling of the above exception, another exception occurred:
remote:
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 82, in __init__
remote: req = Requirement(req)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
remote: requirement_string[e.loc:e.loc + 8]))
remote: pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'~> 2.10.'"
remote:
remote: During handling of the above exception, another exception occurred:
remote:
remote: Traceback (most recent call last):
remote: File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 117, in <module>
remote: main()
remote: File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 113, in main
remote: diff(**kwargs)
remote: File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 86, in diff
remote: r2 = Requirements(r2)
remote: File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 29, in __init__
remote: self.load(reqfile)
remote: File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 39, in load
remote: for requirement in parse_requirements(reqfile, finder=finder, session=requests):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_file.py", line 93, in parse_requirements
remote: for req in req_iter:
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_file.py", line 158, in process_line
remote: isolated=isolated, options=req_options, wheel_cache=wheel_cache
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 235, in from_line
remote: wheel_cache=wheel_cache, constraint=constraint)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 91, in __init__
remote: "Invalid requirement: '%s'\n%s" % (req, add_msg))
remote: pip.exceptions.InstallationError: Invalid requirement: 'Jinja2 ~> 2.10.1'
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
remote: req = REQUIREMENT.parseString(requirement_string)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1617, in parseString
remote: raise exc
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1607, in parseString
remote: loc, tokens = self._parse( instring, 0 )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3376, in parseImpl
remote: loc, exprtokens = e._parse( instring, loc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3164, in parseImpl
remote: raise ParseException(instring, loc, self.errmsg, self)
remote: pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 7), (line:1, col:8)
remote:
remote: During handling of the above exception, another exception occurred:
remote:
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 82, in __init__
remote: req = Requirement(req)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
remote: requirement_string[e.loc:e.loc + 8]))
remote: pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'~> 2.10.'"
remote:
remote: mount: failure.bad-requirements: No such file or directory
remote: -----> Installing requirements with pip
remote: Invalid requirement: 'Jinja2 ~> 2.10.1'
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
remote: req = REQUIREMENT.parseString(requirement_string)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1617, in parseString
remote: raise exc
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1607, in parseString
remote: loc, tokens = self._parse( instring, 0 )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3376, in parseImpl
remote: loc, exprtokens = e._parse( instring, loc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
remote: loc,tokens = self.parseImpl( instring, preloc, doActions )
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/pyparsing.py", line 3164, in parseImpl
remote: raise ParseException(instring, loc, self.errmsg, self)
remote: pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 7), (line:1, col:8)
remote:
remote: During handling of the above exception, another exception occurred:
remote:
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 82, in __init__
remote: req = Requirement(req)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
remote: requirement_string[e.loc:e.loc + 8]))
remote: pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'~> 2.10.'"
remote:
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to oselab.
remote:
To https://git.heroku.com/oselab.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/oselab.git'
This PR:
requirements.txt
to avoidJinja2
security issue.