Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18685 closed Bug (duplicate)

Managements commands in multiple submodules in the same virtual package don't work

Reported by: cberner Owned by: cberner
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


If you have commands in two packages, mypackage.A and mypackage.B which are installed from separate egg-link files (develop mode of setuptools), only the commands in the first package will be available at the django command line.

I've attached an example which shows the problem. To try it out, do the following:
1) run "python develop" in project-A/ and project-B/
2) run "python command_A" and "python command_B" in project-C/

Expected: both commands work
Actual: only command_A works

Attachments (1)

django-commands-develop.tar.gz (5.1 KB) - added by cberner 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by cberner

comment:1 Changed 4 years ago by cberner

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to cberner
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 4 years ago by cberner

Fixed this in my Github fork: git@…:cberner/django.git commit: be5eb957c2dfeea2ce64888359791d3554ce6607

comment:3 Changed 4 years ago by charettes

  • Component changed from Uncategorized to Core (Management commands)
  • Has patch set
  • Needs tests set
  • Type changed from Uncategorized to Bug
  • Version changed from 1.4 to master

FWIW the patch can be found here.

comment:4 Changed 4 years ago by cberner

  • Needs tests unset

Added a regression test. Let me know if there's anything else that's needed!

Version 0, edited 4 years ago by cberner (next)

comment:5 Changed 4 years ago by ptone

  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

I've verified the attached bug demonstration - the fix looks good as pkgutil is more informed about package imports

however testing this is hard - I did some experiments with creating a test local site-packages-like folder with the .egg-link files with relative paths, but didn't work on my first try.

Current tests not working as implemented

link to patch above is stale as it was to a single commit - pull request is here

comment:6 Changed 4 years ago by jezdez

  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #18603 which has a more complete patch.

comment:7 Changed 4 years ago by bhuztez

This is a duplicate of #14087.

for namespace package, you can try my patch:

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