Opened 8 months ago

Closed 7 months ago

#7317 closed change (fixed)

[python-abp] Make abp a namespace package

Reported by: kvas Assignee: kvas
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: tudor Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/30020555/

Description (last modified by kvas)

Background

We are starting to have other packages in the abp namespace, for example abp-request-classifier. If abp is a normal package (not namespace), only one of them can be imported. This is rather suboptimal.

What to change

Make abp in python-abp a namespace package by placing the following line in its __init__.py:

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

This is the second option from namespace packaging guide. Unfortunately we can't go with the first as long as python-abp supports Python 2.

The new version should be released to PyPI. This can be a patch version bump so the new version will be 0.1.1.

Change History (5)

comment:1 Changed 8 months ago by kvas

  • Description modified (diff)
  • Owner set to kvas

comment:2 Changed 8 months ago by kvas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 7 months ago by abpbot

A commit referencing this issue has landed:
Issue 7317 - Make abp a namespace package

comment:5 Changed 7 months ago by kvas

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.