Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
Change-Id: I15774e6cd593d123d565babf40abab19dbcb72ab
  • Loading branch information
xqt committed Jul 28, 2024
2 parents e7da58a + 27ca7ee commit e1692d2
Show file tree
Hide file tree
Showing 140 changed files with 3,144 additions and 2,029 deletions.
101 changes: 0 additions & 101 deletions .appveyor.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
fail-fast: false
max-parallel: 14
max-parallel: 17

matrix:
python-version: [ "pypy3.7", "pypy3.10", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0" ]
Expand Down Expand Up @@ -63,6 +63,7 @@ jobs:
pip install "PyMySQL >= 1.0.0"
pip install pytest
pip install "sseclient<0.0.23,>=0.0.18"
pip install wikitextparser
- name: Generate user files
run: |
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/lint_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Lint test
# Run Pywikibot lint tests with a variety of Python versions

on:
push:
branches: [ master, stable ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYWIKIBOT_TEST_RUNNING: 1
PYWIKIBOT_NO_USER_CONFIG: 2

jobs:
build:
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.experimental || false }}
timeout-minutes: 100

strategy:
fail-fast: false

matrix:
python-version: [ "pypy3.7", "pypy3.10", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0", "3.14-dev" ]
deps: [ flake8, hacking ]
exclude:
- deps: hacking
python-version: "pypy3.7"
- deps: hacking
python-version: "3.14-dev"

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}

# use deadsnakes/action for development releases
- name: Set up development Python ${{ matrix.python-version }}
uses: deadsnakes/[email protected]
if: "endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip --version
pip install .[${{matrix.deps}}]
- name: Flake8 tests
id: ci_test
timeout-minutes: 10
run: |
python --version
flake8 --version
flake8 --color always --doctests
1 change: 1 addition & 0 deletions .github/workflows/oauth_tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

strategy:
fail-fast: false
max-parallel: 8

matrix:
python-version: [ "pypy3.7", "pypy3.10", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0", "3.14-dev" ]
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pywikibot-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Pywikibot CI
# Run Pywikibot tests with a variety of Python versions
# Run Pywikibot tests with a variety of Python versions

on:
push:
Expand All @@ -23,12 +23,11 @@ jobs:

strategy:
fail-fast: false
max-parallel: 17
max-parallel: 18

matrix:
python-version: [ "pypy3.7", "pypy3.10", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0", "3.14-dev" ]
site: [ "wikipedia:en", "wikisource:zh" ]
test_prod_only: [ true ]
include:
- python-version: "3.7"
site: wikipedia:test
Expand Down Expand Up @@ -122,7 +121,6 @@ jobs:
env:
PYWIKIBOT_TEST_NO_RC:
${{ (matrix.site == 'wikisource:zh' || matrix.test_no_rc) && 1 || 0 }}
PYWIKIBOT_TEST_PROD_ONLY: ${{ matrix.test_prod_only && 1 || 0 }}
run: |
python pwb.py version
if [ ${{matrix.site || 0}} != 'wikipedia:test' ]; then
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sysop_write_tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

strategy:
fail-fast: false
max-parallel: 2

matrix:
python-version: [ "3.7" ]
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/windows_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Windows Tests
# Successor for Appveyor Tests

on:
push:
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYWIKIBOT_TEST_RUNNING: 1
PYWIKIBOT_USERNAME: Pywikibot-test

jobs:
build:
runs-on: "windows-latest"
continue-on-error: ${{ matrix.experimental || false }}
timeout-minutes: 100

strategy:
fail-fast: false

matrix:
python-version: [ "3.7.1", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0" ]
python-arch: [ x64, x86 ]
site: [ "wikipedia:en" ]

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-arch }}

- name: Install dependencies
shell: powershell
run: |
git submodule update --init
python --version
python -c "import struct; print('PYTHON_ARCH:', struct.calcsize('P') << 3)"
python -m pip install --upgrade pip
pip --version
if ('${{ matrix.python-version }}' -eq '3.7.1') {
pip install -U setuptools;
pip install "urllib3<2.0";
}
if ('${{ matrix.python-version }}' -ge '3.12') {
pip install -U setuptools;
}
pip install -r dev-requirements.txt
pip install -r requirements.txt
pip install wikitextparser
- name: Generate user files
run: |
python -Werror::UserWarning -m pwb generate_user_files -site:${{matrix.site}} -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug;
echo "usernames['wikisource']['zh'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py
echo "usernames['wikipedia']['test'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py
echo "usernames['wikidata']['test'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py
echo "usernames['commons']['commons'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py
echo "usernames['meta']['meta'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py
echo "noisysleep = float('inf')" >> user-config.py
echo "maximum_GET_length = 5000" >> user-config.py
echo "transliteration_target = None" >> 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_USERPWD }}')" > passwordfile
- name: Test with unittest
id: ci_test
continue-on-error: true
timeout-minutes: 90
run: |
python pwb.py version
coverage run -m unittest discover -vv -p \"*_tests.py\";
- name: Show coverage statistics
run: |
coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Check on failure
if: steps.ci_test.outcome == 'failure'
run: exit 1
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release History
===============

9.2.1
-----
*13 July 2024*

* Add support for ``aewikimedia`` to Pywikibot (:phab:`T362529`)
* i18n updates


9.2.0
-----
*22 June 2024*
Expand Down
3 changes: 0 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.. image:: https://github.com/wikimedia/pywikibot/actions/workflows/pywikibot-ci.yml/badge.svg?branch=master
:alt: GitHub CI
:target: https://github.com/wikimedia/pywikibot/actions/workflows/pywikibot-ci.yml
.. image:: https://ci.appveyor.com/api/projects/status/xo2g4ctoom8k6yvw/branch/master?svg=true
:alt: AppVeyor Build Status
:target: https://ci.appveyor.com/project/pywikibot-core/pywikibot
.. image:: https://codecov.io/gh/wikimedia/pywikibot/branch/master/graph/badge.svg
:alt: Code coverage
:target: https://app.codecov.io/gh/wikimedia/pywikibot
Expand Down
23 changes: 20 additions & 3 deletions ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
Current Release Changes
=======================

* Add support for ``aewikimedia`` to Pywikibot (:phab:`T362529`)
* i18n updates
* Only add lang links from API response to a given page if present in family file (:phab:`T371107`)
* Add support for ``cswikivoyage`` to Pywikibot (:phab:`T370915`)
* :class:`pywikibot.FilePage` has a parameter *ignore_extension* to ignore file extension check :phab:`T352237`)
* Provide :attr:`cosmetic_changes.main_sortkey` to localize sort key in
:meth:`CosmeticChangesToolkit.standardizePageFooter<cosmetic_changes.CosmeticChangesToolkit.standardizePageFooter>`
* Add *ignore_section parameter* to :meth:`site.APISite.getredirtarget` and :meth:`page.BasePage.getRedirectTarget` to
ignore :exc:`exceptions.SectionError` (:phab:`T370295`)
* Avoid backslash in repr string of :class:`page.WikibaseEntity`
* *botflag* parameter of :meth:`page.BasePage.save`, :meth:`page.BasePage.put`, :meth:`page.BasePage.touch`,
:meth:`pywikibot.Page.set_redirect_target` and :meth:`pywikibot.ItemPage.set_redirect_target` was renamed to *bot* to
be in sync with :meth:`APISite.editpage<pywikibot.site._apisite.APISite.editpage>` and :api:`edit`.
* use :meth:`page.BasePage.templates` in :meth:`Page.templatesWithParams<page.Page.templatesWithParams>` to cache
templates
* Re-implement :meth:`Page.main_authors()<page._toolforge.WikiBlameMixin.main_authors>` as
:meth:`Page.authorship()<page._toolforge.WikiBlameMixin.authorship>` using ``xtools`` (:phab:`T366100`);
``wikitextparser`` packages is required for it.


Current Deprecations
====================

* 9.3.0: :meth:`page.BasePage.userName` and :meth:`page.BasePage.isIpEdit` are deprecated in favour of
``user`` or ``anon`` attributes of :attr:`page.BasePage.latest_revision` property
* 9.2.0: Imports of :mod:`logging` functions from :mod:`bot` module is deprecated and will be desupported
* 9.2.0: *total* argument in ``-logevents`` pagegenerators option is deprecated;
use ``-limit`` instead (:phab:`T128981`)
Expand Down Expand Up @@ -69,7 +86,7 @@ Pending removal in Pywikibot 10
* 7.3.0: Old color escape sequences like ``\03{color}`` is deprecated in favour of new color format like <<color>>
* 7.3.0: ``linktrail`` method of :class:`family.Family` is deprecated; use :meth:`APISite.linktrail()
<pywikibot.site._apisite.APISite.linktrail>` instead
* 7.2.0: Positional arguments *decoder*, *layer* and *newline* for :mod:`logging` functions where dropped; keyword
* 7.2.0: Positional arguments *decoder*, *layer* and *newline* for :mod:`logging` functions where dropped; keyword
arguments must be used instead.
* 7.2.0: ``tb`` parameter of :func:`exception()<pywikibot.logging.exception>` function was renamed to ``exc_info``
* 7.2.0: XMLDumpOldPageGenerator is deprecated in favour of a ``content`` parameter of
Expand Down
Loading

0 comments on commit e1692d2

Please sign in to comment.