jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/411613 )
Change subject: [PEP396] Follow PEP 396 versioning ......................................................................
[PEP396] Follow PEP 396 versioning
Keep __release__ for a while for compatibility reasons
Change-Id: I537b361b91de4df1d2469baa000ce89986672d2b --- M pywikibot/__init__.py M pywikibot/comms/http.py M scripts/version.py M tests/dry_site_tests.py M tests/http_tests.py 5 files changed, 11 insertions(+), 11 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index b64f7ba..7347173 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -7,7 +7,7 @@ # from __future__ import absolute_import, unicode_literals
-__release__ = '3.0-dev' +__version__ = __release__ = '3.1.dev0' __url__ = 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot'
import atexit diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index ed253ef..e7a85b1 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -29,7 +29,7 @@
import requests
-from pywikibot import __release__ +from pywikibot import __version__ from pywikibot.bot import calledModuleName from pywikibot.comms import threadedhttp from pywikibot import config @@ -128,7 +128,7 @@ USER_AGENT_PRODUCTS = { 'python': 'Python/' + '.'.join([str(i) for i in sys.version_info]), 'http_backend': 'requests/' + requests.__version__, - 'pwb': 'Pywikibot/' + __release__, + 'pwb': 'Pywikibot/' + __version__, }
diff --git a/scripts/version.py b/scripts/version.py index 9d7d26f..f01897d 100755 --- a/scripts/version.py +++ b/scripts/version.py @@ -3,8 +3,8 @@ """Script to determine the Pywikibot version (tag, revision and date).""" # # (C) Merlijn 'valhallasw' van Deen, 2007-2008 -# (C) xqt, 2010-2016 -# (C) Pywikibot team, 2007-2017 +# (C) xqt, 2010-2018 +# (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # @@ -42,7 +42,7 @@ def main(*args): """Print pywikibot version and important settings.""" pywikibot.output('Pywikibot: %s' % getversion()) - pywikibot.output('Release version: %s' % pywikibot.__release__) + pywikibot.output('Release version: %s' % pywikibot.__version__) pywikibot.output('requests version: %s' % requests.__version__)
has_wikimedia_cert = False diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py index b384e48..18a98a9 100644 --- a/tests/dry_site_tests.py +++ b/tests/dry_site_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests against a fake Site object.""" # -# (C) Pywikibot team, 2012-2014 +# (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # @@ -53,7 +53,7 @@ x._userinfo = {'name': 'foo'} x._username = ('foo', None)
- self.assertEqual('Pywikibot/' + pywikibot.__release__, + self.assertEqual('Pywikibot/' + pywikibot.__version__, user_agent(x, format_string='{pwb}'))
self.assertEqual(x.family.name, diff --git a/tests/http_tests.py b/tests/http_tests.py index e348f5a..6b6c89d 100644 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -239,11 +239,11 @@ self.assertEqual('', http.user_agent(format_string='{family}')) self.assertEqual('', http.user_agent(format_string='{lang}'))
- self.assertEqual('Pywikibot/' + pywikibot.__release__, + self.assertEqual('Pywikibot/' + pywikibot.__version__, http.user_agent(format_string='{pwb}')) self.assertNotIn(' ', http.user_agent(format_string=' {pwb} '))
- self.assertIn('Pywikibot/' + pywikibot.__release__, + self.assertIn('Pywikibot/' + pywikibot.__version__, http.user_agent(format_string='SVN/1.7.5 {pwb}'))
def test_user_agent_username(self): @@ -295,7 +295,7 @@ """Config defined format string test.""" self.assertTrue(http.user_agent().startswith( pywikibot.calledModuleName())) - self.assertIn('Pywikibot/' + pywikibot.__release__, http.user_agent()) + self.assertIn('Pywikibot/' + pywikibot.__version__, http.user_agent()) self.assertNotIn(' ', http.user_agent()) self.assertNotIn('()', http.user_agent()) self.assertNotIn('(;', http.user_agent())