lists.wikimedia.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
List overview
Download
Pywikibot-commits
----- 2024 -----
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
pywikibot-commits@lists.wikimedia.org
1 participants
13500 discussions
Start a n
N
ew thread
[Gerrit] ...core[master]: [tests] Update github actions
by Xqt (Code Review)
10 Nov '22
10 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855178
) Change subject: [tests] Update github actions ...................................................................... [tests] Update github actions - Python 12 can be used with actions/setup-python - fix/add concurrency - split is not available for os other than ubuntu Change-Id: Icc95d5458b39cec7af08cd5e4aaec46325ee6d19 --- M .github/workflows/doctest.yml M .github/workflows/login_tests-ci.yml M .github/workflows/oauth_tests-ci.yml M .github/workflows/pywikibot-ci.yml 4 files changed, 12 insertions(+), 36 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml index 34c3aeb..27e3117 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -1,14 +1,15 @@ -# This workflow will install Python dependencies, run Pywikibot tests -# with a variety of Python versions. For more information see: -#
https://docs.github.com/en/actions/automating-builds-and-tests/building-and…
- name: Doctest CI +# Run Pywikibot doctests with a variety of Python versions on: push: branches: [ master ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: PYWIKIBOT_TEST_RUNNING: 1 PYWIKIBOT_USERNAME: Pywikibot-test @@ -26,7 +27,7 @@ os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ] python-version: ["pypy3.7", "3.11", "3.6" ] include: - - python-version: "3.12" + - python-version: "3.12.0-alpha - 3.12.0" os: ubuntu-latest steps: @@ -37,14 +38,6 @@ - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 - if: ${{ matrix.python-version != '3.12' }} - with: - python-version: ${{ matrix.python-version }} - - # use deadsnakes/action until actions/setup-python supports Python 3.12 - - name: Set up development Python ${{ matrix.python-version }} - uses: deadsnakes/action(a)v2.1.1 - if: ${{ matrix.python-version == '3.12' }} with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/login_tests-ci.yml b/.github/workflows/login_tests-ci.yml index c5d1b6d..c1c9d80 100644 --- a/.github/workflows/login_tests-ci.yml +++ b/.github/workflows/login_tests-ci.yml @@ -23,7 +23,7 @@ max-parallel: 1 matrix: - python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12.0"] site: ['wikipedia:en', 'wikisource:zh'] include: - python-version: 3.6 @@ -46,7 +46,7 @@ site: wikidata:wikidata - python-version: 3.8 site: wowwiki:uk - - python-version: 3.12 + - python-version: "3.12.0-alpha - 3.12.0" site: wikipedia:test - python-version: 3 site: wikipedia:de @@ -60,14 +60,6 @@ - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 - if: ${{ matrix.python-version != '3.12' }} - with: - python-version: ${{ matrix.python-version }} - - # use deadsnakes/action until actions/setup-python supports Python 3.12 - - name: Set up development Python ${{ matrix.python-version }} - uses: deadsnakes/action(a)v2.1.1 - if: ${{ matrix.python-version == '3.12' }} with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index d04b23d..42d42c7 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -6,7 +6,7 @@ branches: [ master ] concurrency: - group: ${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: @@ -16,7 +16,7 @@ jobs: build: - runs-on: ${{ matrix.os || 'ubuntu-latest' }} + runs-on: ubuntu-latest timeout-minutes: 2 strategy: @@ -24,7 +24,6 @@ max-parallel: 15 matrix: - os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ] python-version: ["pypy3.7", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"] family: ['wikipedia'] code: ['test'] diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 5e6f876..cb734b5 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -8,7 +8,7 @@ branches: [ master ] concurrency: - group: ${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: @@ -26,7 +26,7 @@ max-parallel: 15 matrix: - python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12.0"] site: ['wikipedia:en', 'wikisource:zh'] test_prod_only: [true] include: @@ -68,14 +68,6 @@ - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 - if: ${{ matrix.python-version != '3.12' }} - with: - python-version: ${{ matrix.python-version }} - - # use deadsnakes/action until actions/setup-python supports Python 3.12 - - name: Set up development Python ${{ matrix.python-version }} - uses: deadsnakes/action(a)v2.1.1 - if: ${{ matrix.python-version == '3.12' }} with: python-version: ${{ matrix.python-version }} -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855178
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Icc95d5458b39cec7af08cd5e4aaec46325ee6d19 Gerrit-Change-Number: 855178 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [test] Improvements for oauth_tests-ci.yml
by jenkins-bot (Code Review)
09 Nov '22
09 Nov '22
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855036
) Change subject: [test] Improvements for oauth_tests-ci.yml ...................................................................... [test] Improvements for oauth_tests-ci.yml - use PYWIKIBOT_TEST_OAUTH as environment variable instead of OAUTH_TOKEN_<site>_<code> within oauth_tests-ci.yml - update tests/README.rst - always run oauth_tests-ci - cancel job if new job was started - run tests on windows and macOS - use actions/setup-python because 3.12 is available now Change-Id: Ia912326678b0c71fe63574f2347fe8cfb604ff2f --- M .github/workflows/oauth_tests-ci.yml M tests/README.rst M tests/oauth_tests.py 3 files changed, 26 insertions(+), 21 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index 658ada7..d04b23d 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -2,16 +2,17 @@ # Run login tests using OAuth on: - workflow_run: - workflows: [ "Pywikibot CI" ] + push: branches: [ master ] - types: - - completed + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true env: PYWIKIBOT_TEST_RUNNING: 1 - PYWIKIBOT_LOGIN_LOGOUT: 1 PYWIKIBOT_USERNAME: Pywikibot-oauth + PYWIKIBOT_LOGIN_LOGOUT: 1 jobs: build: @@ -20,19 +21,24 @@ strategy: fail-fast: false - max-parallel: 8 + max-parallel: 15 matrix: - python-version: ["pypy3.7", "3.12", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"] + os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ] + python-version: ["pypy3.7", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"] family: ['wikipedia'] code: ['test'] domain: ['
test.wikipedia.org
'] include: + - python-version: "3.12.0-alpha - 3.12.0" + family: wikipedia + code: test + domain:
test.wikipedia.org
- python-version: 3.6 family: wpbeta code: en domain:
en.wikipedia.beta.wmflabs.org
- - python-version: 3.11 + - python-version: 3.7 family: wpbeta code: zh domain:
zh.wikipedia.beta.wmflabs.org
@@ -45,20 +51,12 @@ - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 - if: ${{ matrix.python-version != '3.12' }} with: python-version: ${{ matrix.python-version }} - # use deadsnakes/action until actions/setup-python supports Python 3.12 - - name: Set up development Python ${{ matrix.python-version }} - uses: deadsnakes/action(a)v2.1.1 - if: ${{ matrix.python-version == '3.12' }} - with: - python-version: ${{ matrix.python-version }} - - name: Get token name env: - _oauth_token: OAUTH_TOKEN_${{ matrix.family }}_${{ matrix.code }} + _oauth_token: OAUTH_TOKEN_${{ matrix.family }}_${{ matrix.code }} uses: ASzc/change-string-case-action@v5 id: token with: @@ -100,7 +98,7 @@ - name: Test with unittest timeout-minutes: 1 env: - ${{ steps.token.outputs.uppercase }}: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} + PYWIKIBOT_TEST_OAUTH: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} run: | python pwb.py version coverage run -m unittest -vv tests/site_login_logout_tests.py diff --git a/tests/README.rst b/tests/README.rst index acc4b21..cd07199 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -123,6 +123,15 @@ .. note:: test names must be given without subsequent ``_tests``. +**PYWIKIBOT_TEST_OAUTH** + This environment variable holds the Oauth token. It is set by + ``oauth_tests-ci.yml`` CI config file and is solely used by + :mod:`tests.oauth_tests`. You can use it for your private tests. The + environment variabke must contain consumer key and secret and access + key and secret delimited by ``:`` as:: + + PYWIKIBOT_TEST_OAUTH=consumer_key:consumer_secret:access_key:access:secret + **PYWIKIBOT_TEST_RUNNING** This environment variable skips tests instead of raising :exc:`exceptions.MaxlagTimeoutError` when maximum retries attempted due to diff --git a/tests/oauth_tests.py b/tests/oauth_tests.py index 242c126..f66413c 100755 --- a/tests/oauth_tests.py +++ b/tests/oauth_tests.py @@ -26,9 +26,7 @@ def _get_oauth_tokens(self): """Get valid OAuth tokens from environment variables.""" - tokens_env = 'OAUTH_TOKEN_' + self.family.upper() - tokens = os.environ.get(tokens_env + '_' + self.code.upper()) - tokens = tokens or os.environ.get(tokens_env) + tokens = os.environ.get('PYWIKIBOT_TEST_OAUTH') return tuple(tokens.split(':')) if tokens is not None else None def setUp(self): -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855036
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ia912326678b0c71fe63574f2347fe8cfb604ff2f Gerrit-Change-Number: 855036 Gerrit-PatchSet: 3 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [tests] oauth does not have a logout function, no need to restrict pa...
by Xqt (Code Review)
09 Nov '22
09 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854878
) Change subject: [tests] oauth does not have a logout function, no need to restrict parallel runs ...................................................................... [tests] oauth does not have a logout function, no need to restrict parallel runs Change-Id: Ifffffbacde419d78b06ebd7723290495d6dea79b --- M .github/workflows/oauth_tests-ci.yml 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index e1eadaf..658ada7 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -20,10 +20,10 @@ strategy: fail-fast: false - max-parallel: 1 + max-parallel: 8 matrix: - python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["pypy3.7", "3.12", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"] family: ['wikipedia'] code: ['test'] domain: ['
test.wikipedia.org
'] -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854878
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ifffffbacde419d78b06ebd7723290495d6dea79b Gerrit-Change-Number: 854878 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [tests] Update CI tests
by Xqt (Code Review)
09 Nov '22
09 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854876
) Change subject: [tests] Update CI tests ...................................................................... [tests] Update CI tests - add Python 3.12 to the test matrix - remove experimental flag for wikipedia:test site - remove 3.12 test on wikipedia:test due to matrix expansion - increase max-parallel because pypy3.7 tests are faster Change-Id: I6968b2d2452c054624fe622ca5c73fa81c36e62b --- M .github/workflows/pywikibot-ci.yml 1 file changed, 2 insertions(+), 5 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 7bf3122..5e6f876 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -23,10 +23,10 @@ strategy: fail-fast: false - max-parallel: 11 + max-parallel: 15 matrix: - python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] site: ['wikipedia:en', 'wikisource:zh'] test_prod_only: [true] include: @@ -46,7 +46,6 @@ - python-version: 3.7 site: wikipedia:test write-test: true - experimental: true - python-version: 3.7 site: wikidata:test - python-version: 3.9 @@ -57,8 +56,6 @@ - python-version: 3.8 site: wowwiki:uk experimental: true - - python-version: 3.12 - site: wikipedia:test - python-version: 3 site: wikipedia:de os: macOS-latest -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854876
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I6968b2d2452c054624fe622ca5c73fa81c36e62b Gerrit-Change-Number: 854876 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [doc] Fix version hints
by Xqt (Code Review)
09 Nov '22
09 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854869
) Change subject: [doc] Fix version hints ...................................................................... [doc] Fix version hints Change-Id: I34402143b7948715e53a8b7cec1f0fc13f7ecff1 --- M pywikibot/site/_siteinfo.py M pywikibot/time.py M pywikibot/tools/__init__.py M pywikibot/tools/itertools.py M scripts/checkimages.py 5 files changed, 14 insertions(+), 14 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/pywikibot/site/_siteinfo.py b/pywikibot/site/_siteinfo.py index 4c1ab93..3e3afac 100644 --- a/pywikibot/site/_siteinfo.py +++ b/pywikibot/site/_siteinfo.py @@ -63,7 +63,7 @@ def clear(self) -> None: """Remove all items from Siteinfo. - .. versionadded: 7.1 + .. versionadded:: 7.1 """ self._cache.clear() diff --git a/pywikibot/time.py b/pywikibot/time.py index 14f5371..cf90546 100644 --- a/pywikibot/time.py +++ b/pywikibot/time.py @@ -79,7 +79,7 @@ - ISO8601 format: YYYY-MM-DD[T ]HH:MM:SS[Z|±HH[MM[SS[.ffffff]]]] - POSIX format: seconds from Unix epoch S{1,13}[.ffffff]] - .. versionadded: 7.5 + .. versionadded:: 7.5 :param ts: Timestamp, datetime.datetime or str :return: Timestamp object @@ -98,7 +98,7 @@ def _from_datetime(dt: datetime.datetime) -> 'Timestamp': """Convert a datetime.datetime timestamp to a Timestamp object. - .. versionadded: 7.5 + .. versionadded:: 7.5 """ return Timestamp(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond, @@ -110,7 +110,7 @@ Mediwiki timestamp format: YYYYMMDDHHMMSS - .. versionadded: 7.5 + .. versionadded:: 7.5 """ RE_MW = r'\d{14}$' # noqa: N806 m = re.match(RE_MW, timestr) @@ -128,7 +128,7 @@ ISO8601 format: - YYYY-MM-DD[T ]HH:MM:SS[[.,]ffffff][Z|±HH[MM[SS[.ffffff]]]] - .. versionadded: 7.5 + .. versionadded:: 7.5 """ RE_ISO8601 = (r'(?:\d{4}-\d{2}-\d{2})(?P<sep>[T ])' # noqa: N806 r'(?:\d{2}:\d{2}:\d{2})(?P<u>[.,]\d{1,6})?' @@ -170,7 +170,7 @@ POSIX format: SECONDS[.ffffff]] - .. versionadded: 7.5 + .. versionadded:: 7.5 """ RE_POSIX = r'(?P<S>-?\d{1,13})(?:\.(?P<u>\d{1,6}))?$' # noqa: N806 m = re.match(RE_POSIX, timestr) @@ -194,7 +194,7 @@ def _from_string(cls: Type['Timestamp'], timestr: str) -> 'Timestamp': """Convert a string to a Timestamp object. - .. versionadded: 7.5 + .. versionadded:: 7.5 """ handlers = [ cls._from_mw, @@ -280,14 +280,14 @@ See Note in datetime.timestamp(). - .. versionadded: 7.5 + .. versionadded:: 7.5 """ return self.replace(tzinfo=datetime.timezone.utc).timestamp() def posix_timestamp_format(self) -> str: """Convert object to a POSIX timestamp format. - .. versionadded: 7.5 + .. versionadded:: 7.5 """ return f'{self.posix_timestamp():.6f}' diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 72ce89b..f59c46e 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -602,7 +602,7 @@ The positional arguments are the dictionaries to be merged. It is also possible to define an additional dict using the keyword arguments. - .. versionadded: 3.0 + .. versionadded:: 3.0 """ args = list(args) + [dict(kwargs)] conflicts = set() @@ -625,7 +625,7 @@ ): """Check file mode and update it, if needed. - .. versionadded: 3.0 + .. versionadded:: 3.0 :param filename: filename path :param mode: requested file mode @@ -654,7 +654,7 @@ Result is expressed as hexdigest(). - .. versionadded: 3.0 + .. versionadded:: 3.0 :param filename: filename path :param sha: hashing function among the following in hashlib: diff --git a/pywikibot/tools/itertools.py b/pywikibot/tools/itertools.py index 7d8547d..50fb740 100644 --- a/pywikibot/tools/itertools.py +++ b/pywikibot/tools/itertools.py @@ -259,7 +259,7 @@ .. warning:: This is not thread safe. - .. versionadded: 3.0 + .. versionadded:: 3.0 :param iterable: the source iterable :type iterable: collections.abc.Iterable diff --git a/scripts/checkimages.py b/scripts/checkimages.py index d0fc38b..49c3985 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -791,7 +791,7 @@ """ Get tuples of image and time, return the most used or oldest image. - .. versionchanged: 7.2 + .. versionchanged:: 7.2 itertools.zip_longest is used to stop `using_pages` as soon as possible. -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854869
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I34402143b7948715e53a8b7cec1f0fc13f7ecff1 Gerrit-Change-Number: 854869 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [test] Fix User.usercontribs test
by jenkins-bot (Code Review)
08 Nov '22
08 Nov '22
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854548
) Change subject: [test] Fix User.usercontribs test ...................................................................... [test] Fix User.usercontribs test Change-Id: I74b74ceaa6066548ad7a5eb413bc21741703b22b --- M tests/user_tests.py 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/user_tests.py b/tests/user_tests.py index 0488dca..81c8443 100755 --- a/tests/user_tests.py +++ b/tests/user_tests.py @@ -173,15 +173,16 @@ def test_contribution(self): """Test the User.usercontribs() method.""" + total = 50 mysite = self.get_site() user = User(mysite, mysite.user()) - uc = list(user.contributions(total=50)) + uc = list(user.contributions(total=total)) if not uc: self.skipTest('User {} has no contributions on site {}.' .format(mysite.user(), mysite)) - self.assertLessEqual(len(uc), 10) + self.assertLessEqual(len(uc), total) self.assertEqual(uc[0], user.last_edit) - first_edit = uc[-1] if len(uc) < 50 else list( + first_edit = uc[-1] if len(uc) < total else list( user.contributions(total=1, reverse=True))[0] self.assertEqual(first_edit, user.first_edit) for contrib in uc: -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854548
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I74b74ceaa6066548ad7a5eb413bc21741703b22b Gerrit-Change-Number: 854548 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [test] Run login tests even main tests were no successful
by Xqt (Code Review)
08 Nov '22
08 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854469
) Change subject: [test] Run login tests even main tests were no successful ...................................................................... [test] Run login tests even main tests were no successful Change-Id: I45400aa8980328b79c4b72cd5eb93fa81630e3ed --- M .github/workflows/login_tests-ci.yml M .github/workflows/oauth_tests-ci.yml 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.github/workflows/login_tests-ci.yml b/.github/workflows/login_tests-ci.yml index f89b920..c5d1b6d 100644 --- a/.github/workflows/login_tests-ci.yml +++ b/.github/workflows/login_tests-ci.yml @@ -16,7 +16,6 @@ jobs: build: runs-on: ${{ matrix.os || 'ubuntu-latest' }} - if: ${{ github.event.workflow_run.conclusion == 'success' }} timeout-minutes: 2 strategy: diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index 09dec5f..e1eadaf 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -16,7 +16,6 @@ jobs: build: runs-on: ${{ matrix.os || 'ubuntu-latest' }} - if: ${{ github.event.workflow_run.conclusion == 'success' }} timeout-minutes: 2 strategy: -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854469
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I45400aa8980328b79c4b72cd5eb93fa81630e3ed Gerrit-Change-Number: 854469 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [tests] Enable Appveyor tests with Python 3.11
by Xqt (Code Review)
08 Nov '22
08 Nov '22
Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854418
) Change subject: [tests] Enable Appveyor tests with Python 3.11 ...................................................................... [tests] Enable Appveyor tests with Python 3.11 Change-Id: Ief0d74946709c0b83a70ed4fb3113b78ca60274d --- M .appveyor.yml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.appveyor.yml b/.appveyor.yml index 2deca7a..e9544db 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -42,6 +42,10 @@ PYTHON_VERSION: "3.10.x" PYTHON_ARCH: "32" + - PYTHON: "C:\\Python311-x64" + PYTHON_VERSION: "3.11.x" + PYTHON_ARCH: "64" + matrix: fast_finish: false -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854418
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: Ief0d74946709c0b83a70ed4fb3113b78ca60274d Gerrit-Change-Number: 854418 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [tests] Enable oauth_tests.py
by jenkins-bot (Code Review)
08 Nov '22
08 Nov '22
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854415
) Change subject: [tests] Enable oauth_tests.py ...................................................................... [tests] Enable oauth_tests.py Change-Id: I7a60a7740d2f756a09e07dac4d4eb1328c43a948 --- M .github/workflows/oauth_tests-ci.yml M tests/__init__.py M tests/oauth_tests.py 3 files changed, 5 insertions(+), 12 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index 465cdb7..09dec5f 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -69,7 +69,6 @@ uses: jungwinter/split@v2 id: split with: - # msg: ${{ env._oauth_token_val }} msg: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} separator: ":" @@ -98,15 +97,15 @@ echo "noisysleep = float('inf')" >> user-config.py echo "maximum_GET_length = 5000" >> user-config.py echo "console_encoding = 'utf8'" >> user-config.py - echo "import os" >> user-config.py - echo "password_file = os.path.expanduser('passwordfile')" >> user-config.py - echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ secrets.PYWIKIBOT_OAUTHPWD }}')" > passwordfile - name: Test with unittest timeout-minutes: 1 + env: + ${{ steps.token.outputs.uppercase }}: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} run: | python pwb.py version coverage run -m unittest -vv tests/site_login_logout_tests.py + coverage run -m unittest -vv tests/oauth_tests.py - name: Upload coverage to Codecov run: codecov \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py index 5b2b952..c4b9b3c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -104,7 +104,6 @@ 'memento', 'mysql', 'namespace', - 'oauth', 'page', 'pagegenerators', 'paraminfo', diff --git a/tests/oauth_tests.py b/tests/oauth_tests.py index 2885c98..242c126 100755 --- a/tests/oauth_tests.py +++ b/tests/oauth_tests.py @@ -26,7 +26,7 @@ def _get_oauth_tokens(self): """Get valid OAuth tokens from environment variables.""" - tokens_env = 'OAUTH_TOKENS_' + self.family.upper() + tokens_env = 'OAUTH_TOKEN_' + self.family.upper() tokens = os.environ.get(tokens_env + '_' + self.code.upper()) tokens = tokens or os.environ.get(tokens_env) return tuple(tokens.split(':')) if tokens is not None else None @@ -45,12 +45,7 @@ self.access_token = tokens[2:] -class DefaultOAuthSiteTestCase(DefaultSiteTestCase, OAuthSiteTestCase): - - """Default OAuth site test.""" - - -class TestOauthLoginManger(DefaultOAuthSiteTestCase): +class TestOauthLoginManger(DefaultSiteTestCase, OAuthSiteTestCase): """Test OAuth login manager.""" -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854415
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I7a60a7740d2f756a09e07dac4d4eb1328c43a948 Gerrit-Change-Number: 854415 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
[Gerrit] ...core[master]: [test] Fix User.usercontribs test
by jenkins-bot (Code Review)
08 Nov '22
08 Nov '22
jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854152
) Change subject: [test] Fix User.usercontribs test ...................................................................... [test] Fix User.usercontribs test Change-Id: I8c7ce01bc24bb637d72012412f6544ed7b323b37 --- M tests/user_tests.py 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/user_tests.py b/tests/user_tests.py index 2b35e1d..0488dca 100755 --- a/tests/user_tests.py +++ b/tests/user_tests.py @@ -175,13 +175,15 @@ """Test the User.usercontribs() method.""" mysite = self.get_site() user = User(mysite, mysite.user()) - uc = list(user.contributions(total=10)) + uc = list(user.contributions(total=50)) if not uc: self.skipTest('User {} has no contributions on site {}.' .format(mysite.user(), mysite)) self.assertLessEqual(len(uc), 10) self.assertEqual(uc[0], user.last_edit) - self.assertEqual(uc[-1], user.first_edit) + first_edit = uc[-1] if len(uc) < 50 else list( + user.contributions(total=1, reverse=True))[0] + self.assertEqual(first_edit, user.first_edit) for contrib in uc: self.assertIsInstance(contrib, tuple) self.assertLength(contrib, 4) -- To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/854152
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I8c7ce01bc24bb637d72012412f6544ed7b323b37 Gerrit-Change-Number: 854152 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <info(a)gno.de> Gerrit-Reviewer: Xqt <info(a)gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
1
0
0
0
← Newer
1
...
130
131
132
133
134
135
136
...
1350
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
Results per page:
10
25
50
100
200