jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[IMPR] move page.py to its own folder

page.py is one of the biggest framework files with 253 KB disk space
and 6800 lines of code. It contains 17 classes and 5 functions.
This should be splitted into smaller parts for readability and
maintainability. Moving page.py to page/__init__.py is the first step.
See I8495a6ae7 for a splitted example.

Change-Id: I01a2c5701d6e094efc20dc86706e34c1ef7cbaf2
---
A docs/api_ref/pywikibot.page.rst
M docs/api_ref/pywikibot.rst
M pywikibot/CONTENT.rst
M pywikibot/DIRECTORIES.rst
R pywikibot/page/__init__.py
M tox.ini
6 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/docs/api_ref/pywikibot.page.rst b/docs/api_ref/pywikibot.page.rst
new file mode 100644
index 0000000..ced5431
--- /dev/null
+++ b/docs/api_ref/pywikibot.page.rst
@@ -0,0 +1,4 @@
+pywikibot.page package
+=======================
+
+.. automodule:: pywikibot.page
diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst
index c100475..5c05135 100644
--- a/docs/api_ref/pywikibot.rst
+++ b/docs/api_ref/pywikibot.rst
@@ -11,6 +11,7 @@
pywikibot.comms
pywikibot.data
pywikibot.families
+ pywikibot.page
pywikibot.site
pywikibot.tools
pywikibot.userinterfaces
@@ -108,11 +109,6 @@

.. automodule:: pywikibot.login

-pywikibot.page module
----------------------
-
-.. automodule:: pywikibot.page
-
pywikibot.pagegenerators module
-------------------------------

diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst
index 37c7786..7d56f9d 100644
--- a/pywikibot/CONTENT.rst
+++ b/pywikibot/CONTENT.rst
@@ -50,8 +50,6 @@
| login.py | Log in to an account on your "home" wiki. or check |
| | login status |
+----------------------------+------------------------------------------------------+
- | page.py | Allows access to the site's bot user list. |
- +----------------------------+------------------------------------------------------+
| pagegenerators.py | Generator pages. |
+----------------------------+------------------------------------------------------+
| plural.py | Module containing plural rules of various languages |
@@ -115,6 +113,13 @@


+----------------------------+------------------------------------------------------+
+ | page | Module with classes for MediaWiki page content |
+ +============================+======================================================+
+ | __init__.py | Objects representing MediaWiki pages |
+ +----------------------------+------------------------------------------------------+
+
+
+ +----------------------------+------------------------------------------------------+
| site | Module with classes for MediaWiki sites |
+============================+======================================================+
| __init__.py | Objects representing MediaWiki sites (wikis) |
diff --git a/pywikibot/DIRECTORIES.rst b/pywikibot/DIRECTORIES.rst
index c837fc4..d6fff39 100644
--- a/pywikibot/DIRECTORIES.rst
+++ b/pywikibot/DIRECTORIES.rst
@@ -14,6 +14,8 @@
+---------------------------+------------------------------------------------------+
| pywikibot/families | wiki-specific information and settings |
+---------------------------+------------------------------------------------------+
+ | pywikibot/page | Module with classes for MediaWiki page content |
+ +---------------------------+------------------------------------------------------+
| pywikibot/site | Module with classes for MediaWiki sites |
+---------------------------+------------------------------------------------------+
| pywikibot/tools | Miscellaneous helper functions (not wiki-dependent) |
diff --git a/pywikibot/page.py b/pywikibot/page/__init__.py
similarity index 100%
rename from pywikibot/page.py
rename to pywikibot/page/__init__.py
diff --git a/tox.ini b/tox.ini
index 1ec19c1..5c51189 100644
--- a/tox.ini
+++ b/tox.ini
@@ -144,7 +144,7 @@
pywikibot/logentries.py: N802
pywikibot/logging.py : N803
pywikibot/login.py: N802, N816
- pywikibot/page.py: N802
+ pywikibot/page/__init__.py: N802
pywikibot/pagegenerators.py : N802, N803, N806, N816
pywikibot/site/__init__.py: N802, N815
pywikibot/specialbots.py : N803, N806, N802

To view, visit change 579732. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I01a2c5701d6e094efc20dc86706e34c1ef7cbaf2
Gerrit-Change-Number: 579732
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)