Opened 5 years ago

Closed 5 years ago

#15219 closed (duplicate)

'runserver' no longer accepts hostname for address:port pair arguments

Reported by: andrewl Owned by: nobody
Component: runserver Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


runserver used to accept a hostname as the 'address' argument for the address:port pair. For example:

  python runserver myhostname:8765

However this now fails with the following error message:

  Error: 'myhostname:8765' is not a valid port numberor address:port pair.

...which, incidentally, is missing a space between 'number' and 'or' (see lines 46-47 in

Obviously dummy host:port values are used in the example above, but (just to clarify) the error message also occurs when real, valid host:port values are used.

The error is because of the naiveip_re regular expression defined on line 12 of, which is used to validate the 'address' portion of the arguments, which will only accept IPv4/v6 addresses, not hostnames (which, admittedly, may be the desired behaviour...?).

Change History (1)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #14928.

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