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

[BUG] pytz not defined as a requirement, thus "quick start" instructions on homepage fail #2007

Closed
1 task done
tswfi opened this issue Dec 18, 2021 · 2 comments · Fixed by #2009
Closed
1 task done

Comments

@tswfi
Copy link
Contributor

tswfi commented Dec 18, 2021

Is there an existing issue for this?

  • I have searched the existing Issues

Current Behavior

Pytz is not installed by default. Following the "quick start" instructions from homepage:

demo> pipenv install mezzanine
Installing mezzanine...
Adding mezzanine to Pipfile's [packages]...
✔ Installation Succeeded 
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Updated Pipfile.lock (9c2e16)!
Installing dependencies from Pipfile.lock (9c2e16)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
demo> mezzanine-project myproject
demo> cd myproject
demo> python manage.py createdb
Traceback (most recent call last):
  File "/home/tsw/git/mezzazine_vanilla/myproject/manage.py", line 7, in <module>
    from mezzanine.utils.conf import real_project_name
  File "/home/tsw/.local/share/virtualenvs/mezzazine_vanilla-ZPLJQPDu/lib/python3.9/site-packages/mezzanine/utils/conf.py", line 11, in <module>
    from mezzanine.utils.timezone import get_best_local_timezone
  File "/home/tsw/.local/share/virtualenvs/mezzazine_vanilla-ZPLJQPDu/lib/python3.9/site-packages/mezzanine/utils/timezone.py", line 4, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'
demo> 

pytz-deprecation-shim seems to be installed but is probably not enough

demo> pipenv graph
Mezzanine==5.0.0
  - beautifulsoup4 [required: >=4.5.3, installed: 4.10.0]
    - soupsieve [required: >1.2, installed: 2.3.1]
  - bleach [required: >=2, installed: 4.1.0]
    - packaging [required: Any, installed: 21.3]
      - pyparsing [required: >=2.0.2,!=3.0.5, installed: 3.0.6]
    - six [required: >=1.9.0, installed: 1.16.0]
    - webencodings [required: Any, installed: 0.5.1]
  - chardet [required: >=4, installed: 4.0.0]
  - django [required: >=2.2, installed: 4.0]
    - asgiref [required: >=3.4.1,<4, installed: 3.4.1]
    - sqlparse [required: >=0.2.2, installed: 0.4.2]
  - django-contrib-comments [required: >=1.9, installed: 2.1.0]
    - Django [required: >=2.2, installed: 4.0]
      - asgiref [required: >=3.4.1,<4, installed: 3.4.1]
      - sqlparse [required: >=0.2.2, installed: 0.4.2]
  - filebrowser-safe [required: >=1.0.0, installed: 1.0.0]
  - grappelli-safe [required: >=1.0.0, installed: 1.0.0]
  - pillow [required: >=7, installed: 8.4.0]
  - requests [required: >=2.1.0, installed: 2.26.0]
    - certifi [required: >=2017.4.17, installed: 2021.10.8]
    - charset-normalizer [required: ~=2.0.0, installed: 2.0.9]
    - idna [required: >=2.5,<4, installed: 3.3]
    - urllib3 [required: >=1.21.1,<1.27, installed: 1.26.7]
  - requests-oauthlib [required: >=1.3, installed: 1.3.0]
    - oauthlib [required: >=3.0.0, installed: 3.1.1]
    - requests [required: >=2.0.0, installed: 2.26.0]
      - certifi [required: >=2017.4.17, installed: 2021.10.8]
      - charset-normalizer [required: ~=2.0.0, installed: 2.0.9]
      - idna [required: >=2.5,<4, installed: 3.3]
      - urllib3 [required: >=1.21.1,<1.27, installed: 1.26.7]
  - tzlocal [required: >=2, installed: 4.1]
    - pytz-deprecation-shim [required: Any, installed: 0.1.0.post0]
      - tzdata [required: Any, installed: 2021.5]
demo> 

Expected Behavior

"quick start" from homepage works

Steps To Reproduce

follow the "quick start" instructions from the homepage

Environment

- Operating System: linux
- Python version: 3.9.9
- Django version: 4.0.0 (comes automatically as it is defined as a requirement for mezzanine, see pipenv graph)
- Database engine and version: I'm guessing the "quick start" defaults to sqlite?
- Mezzanine version: 5.0.0

Anything else?

I'm guessing this comes from the fact that Django 4.0.0 was just released and it moved away from pytz (https://docs.djangoproject.com/en/4.0/releases/4.0/#zoneinfo-default-timezone-implementation)

mezzanine requirements define Django > 2.2 but no upper limit (https://github.com/stephenmcd/mezzanine/blob/master/setup.cfg#L43)

@skru
Copy link

skru commented Dec 19, 2021

#2008

@jerivas jerivas linked a pull request Dec 30, 2021 that will close this issue
@jerivas
Copy link
Collaborator

jerivas commented Dec 30, 2021

Fixed in #2009

@jerivas jerivas closed this as completed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants