Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#34663 closed Cleanup/optimization (invalid)

Documentation typo in using Argon2 with Django.

Reported by: HeartthrobRob Owned by: nobody
Component: Documentation Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

"Using Argon2 with Django" section lists the command to install argon-2 (step 1) as python -m pip install django[argon2]. If this is run as written, it will produce the following error: no matches found: django[argon2].

A small formatting change is required to run successfully. the package should be nested in quotation marks instead, so it reads: python -m pip install 'django[argon2]'
This is because the zsh shell uses square brackets for globbing/pattern matching, and they need to be escaped if they're part of an argument.

References:

  1. Django docs: https://docs.djangoproject.com/en/4.2/topics/auth/passwords/#using-argon2-with-django
  2. Solution outline: https://stackoverflow.com/a/30539963/11790080

Change History (7)

comment:1 by HeartthrobRob, 18 months ago

UI/UX: unset

comment:2 by Akash Kumar Sen, 18 months ago

The current DOCs work perfectly fine with me, getting error with the proposed solution instead. What OS and Configuration are you using?

comment:3 by Mariusz Felisiak, 18 months ago

Resolution: worksforme
Status: newclosed

Thanks for the report, however it works for me.

comment:4 by Mariusz Felisiak, 18 months ago

Summary: Documentation TypoDocumentation typo in using Argon2 with Django.

comment:5 by Jeremy Swerdlow, 18 months ago

Summary: Documentation typo in using Argon2 with Django.Documentation Typo

Can confirm the issue with the given command:

> python3 -m pip install django[argon2]
zsh: no matches found: django[argon2]

Running from zsh:

> zsh --version
zsh 5.8.1 (x86_64-apple-darwin21.0)

Running with the single quotes succeeds. If I run the current documented command from bash, it is able to properly process.

comment:6 by Mariusz Felisiak, 18 months ago

Resolution: worksformeinvalid
Summary: Documentation TypoDocumentation typo in using Argon2 with Django.

I don't think this is something to fix in Django docs, see e.g. https://stackoverflow.com/questions/30539798/zsh-no-matches-found-requestssecurity#30539963.

comment:7 by Jeremy Swerdlow, 18 months ago

I understand your position. It's not an issue with Django, but instead an issue due to using a specific shell. I'm new to Django's patterns, but I think it can be useful in documentation to capture common failures the user may see. Given that zsh is the default shell for macOS now, it may be useful to new Django users to include a description of this issue

Note: See TracTickets for help on using tickets.
Back to Top