I am working in my school project using djangorestframework. I got a conflict error while deploying my project in heroku. Heroku depends on python-dateutil version 1.5. But elasticsearch dsl uses newer version of python-dateutil package. So i get error while deploying. If i use python-dateutil package of 1.5, i get error in release phase due to elasticsearch. If i use newer version i get error in build phase due to heroku. Any solution? plzz help me
Error when using python-dateutil package 1.5
.........................................
.........................................
File "C:\Users\karun\AppData\Local\Programs\Python\Python310\lib\site-packages\elasticsearch_dsl\document.py", line 30, in
from .field import Field
File "C:\Users\karun\AppData\Local\Programs\Python\Python310\lib\site-packages\elasticsearch_dsl\field.py", line 29, in
from dateutil import parser, tz
File "C:\Users\karun\AppData\Local\Programs\Python\Python310\lib\site-packages\dateutil\parser.py", line 158
l.append("%s=%s" % (attr, value))
^
SyntaxError: invalid syntax
Error while using newer python-dateutil package
The conflict is caused by: The user requested python-dateutil==2.8.2 elasticsearch-dsl 7.4.0 depends on python-dateutil heroku 0.1.4 depends on python-dateutil==1.5
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
! Push rejected, failed to compile Python app. ! Push failed