Skip to content

Commit

Permalink
Fix bug with __all__ creation in partner app
Browse files Browse the repository at this point in the history
A simple typo lead to star imports not working as expected. As it's
easily worked around, we won't issue a release right away.

Closes #1553.
  • Loading branch information
maiksprenger committed Nov 7, 2014
1 parent 0238d5a commit 80babf2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/releases/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ Release notes for each version of Oscar published to PyPI.
:maxdepth: 1

v1.0
v1.0.1
15 changes: 15 additions & 0 deletions docs/source/releases/v1.0.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
=============================================
Oscar 1.0.1 release notes - UNDER DEVELOPMENT
=============================================

This is Oscar 1.0.1, a bug fix release.

Bug fixes
=========

* `#1553`_: ``from oscar.apps.partner.models import *`` could lead to the
wrong models being imported.


.. _#1553: https://github.com/django-oscar/django-oscar/issues/1553

9 changes: 9 additions & 0 deletions docs/source/releases/v1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -729,3 +729,12 @@ These classes have been removed:
* ``oscar.apps.partner.prices.DelegateToStockRecord``
* ``oscar.apps.partner.availability.DelegateToStockRecord``
* ``oscar.apps.payment.utils.Bankcard``

Known issues
------------
* ``models.py`` dynamically sets ``__all__`` to control what models are
importable through the star import. A bug in the ``models.py`` for the
``partner`` app means you'll have to explicitly import them. More info in
`#1553`_.

.. _#1553: https://github.com/django-oscar/django-oscar/issues/1553
2 changes: 1 addition & 1 deletion oscar/apps/partner/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class Partner(AbstractPartner):
pass

__all__.append('PartnerAddress')
__all__.append('Partner')


if not is_model_registered('partner', 'PartnerAddress'):
Expand Down

0 comments on commit 80babf2

Please sign in to comment.