- Aug 25, 2024
-
-
Marc Troelitzsch authored
The setup.py test command and pytest-runner have been deprecated for several years and are no longer recommended. The pytest documentation no longer recommends pytest-runner and their own documentation recommends against it. - https://github.com/pypa/setuptools/issues/1684 - https://github.com/pytest-dev/pytest/issues/5534 - https://github.com/pytest-dev/pytest-runner/issues/50 Changes made: - Removed pytest-runner: Eliminated the use of pytest-runner from `setup.py`. - Moved test dependencies to the `extra-dependencies`, which can be used by tox as well as for manual installation. - Updated the documentation to recommend using tox as the default test runner. Alternatively, users can manually run tests with the `py.test` command. These changes will also make an eventual migration to `pyproject.toml` easier, as the `extras_require` can be copied to the `project.optional-dependencies` section.
-
- Aug 21, 2024
-
-
Marc Troelitzsch authored
This commit refactors the codebase to consistently use Python 3.6 f-strings for string concatenation and interpolation. BREAKING CHANGE: This update increases the minimum required Python version from 3.5 to 3.6. Python 3.5 reached end-of-life in September 2020 (~4 years ago) and has been dropped from most distributions, so the impact on users should be minimal.
-
Marc Troelitzsch authored
This commit updates some outdated syntax with the modern alternatives. The changes were applied automatically using pyupgrade (v2.0.1) with the following command: ``` pyupgrade --py3-plus **/*.py ``` These updates are purely syntactical and there should be no change in functionality.
-
- Aug 11, 2024
-
-
Adam Williamson authored
As discussed in #259, the `limit` parameter - to the low-level `listing.List` and its subclasses, and to various higher-level functions which ultimately return `List` or `GeneratorList` instances - is confusing and misleading. It is passed through to the API calls, and effectively specifies how many items a single API call will return. But because our `List` yields a single item at a time and will keep doing API calls until the API says there's no more data, it does not limit how many items our `List` will yield, nor specify its chunk size. It seems natural to expect that `List(limit=10)` or `page.revisions(limit=10)` will give you a generator that yields only 10 items, or yields 10 items at a time, but it does not; it gives you a generator which queries the API in chunks of 10 items at a time, but will yield every item the API gives it, one by one. This is probably not ever how we really intended mwclient to work (there's an old `# NOTE: Fix limit` comment which implies as much) but it has worked this way for 16 years, so we should probably not change it just in case someone really has a need to specify the API chunk size for some reason, or some code somehow happens to implicitly rely on it behaving the way it does. So, this keeps the behaviour of the `limit` param wherever it exists, but triggers a deprecation warning. Everything that had a `limit` param now also has an `api_chunk_size` param that does the same thing, but is more explicitly named and does not trigger a deprecation warning. And everything that had a `limit` param now also has a `max_items` param that does what it sounds like, and what people are more likely to want - sets an absolute limit on the number of items the generator will yield. For efficiency, if `max_items` is set, neither `limit` nor `api_chunk_size` is set, and `max_items` is below `site.api_limit`, we set the API chunk size to `max_items` so we only retrieve as many items as we actually need. Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
- Jul 17, 2024
-
-
Adam Williamson authored
As discussed in #197, this renames the `reqs` argument to `Site` to `connection_options`. The old name still works but triggers a DeprecationWarning. If you specify both we raise ValueError. Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
- May 18, 2024
-
-
Adam Williamson authored
Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
- May 06, 2024
-
-
Marc Troelitzsch authored
-
Adam Williamson authored
This is based on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#defining-a-workflow-job-environment . It's the sample config from there, with versions updated and our project name substituted in the appropriate places. I dropped the publish-to-testpypi bit because of https://github.com/pypa/packaging.python.org/issues/804 , and left the Github release part left out for now. We can add that later if we like, but we never published releases to Github before, so it doesn't seem required yet. I also tweaked the conditionals a bit to avoid running the build job on forks and publish only tags that start with 'v', as that's our convention for versions. Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
Adam Williamson authored
It's much nicer to have the main repo as origin and your fork as another remote you just push PR branches to. That way you don't have to deal with resyncing the master branch of your fork all the time. Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
- Jan 27, 2024
-
-
Alexandre Detiste authored
-
- Sep 05, 2023
-
-
Marc Troelitzsch authored
Read the Docs has started requiring a .readthedocs.yaml configuration file to be present in the repository in order to build the documentation. https://blog.readthedocs.com/migrate-configuration-v2/ According to the timeline we have until 2023-09-25 to migrate to the new configuration file, but we've already had some builds fail during their 48-hour brownout on 2023-09-04.
-
Marc Troelitzsch authored
-
- Feb 15, 2023
-
-
Marc Troelitzsch authored
-
- Sep 07, 2020
-
-
Martin Michlmayr authored
-
- May 28, 2020
-
-
Waldir Pimenta authored
-
Waldir Pimenta authored
- Move the auth anchor to be above the correct section - Add missing anchors so all sections have them - Add blank line above the old_login anchor and use hyphen instead of _.
-
- Oct 10, 2019
-
-
RheingoldRiver authored
-
- Sep 26, 2019
-
-
MarcoFalke authored
This fixes the warning: DeprecationWarning: Specifying host as a tuple is deprecated as of mwclient 0.10.0. Please use the new scheme argument instead.
-
- Aug 04, 2019
-
-
Dan Michael O. Heggø authored
-
- Aug 02, 2019
-
-
Dan Michael O. Heggø authored
Per #223
-
Marc Trölitzsch authored
-
Pyfisch authored
Use and recommend format from RFC 7231. Give examples for custom User-Agent strings. Closes #49
-
Dan Michael O. Heggø authored
Per #223
-
Adam Williamson authored
We switched to pycodestyle then flake8 recently, but one stray reference to pep8 was left in this doc file. Signed-off-by:
Adam Williamson <awilliam@redhat.com>
-
- Apr 11, 2019
-
-
Marc Trölitzsch authored
-
- Dec 12, 2018
-
-
Cody Logan authored
somtimes -> sometimes if do -> if you do
-
- Dec 09, 2018
-
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
-
- Nov 22, 2018
-
-
Dan Michael O. Heggø authored
-
cpettet authored
This is what is imported at the beginning of the examples. This could also be done by changing the import to 'import mwclient' rather than 'from mwclient import Site'. Neither seems more correct but I have tried to follow what seems most intended. >>> from mwclient import Site >>> site = mwclient.Site('en.wikipedia.org') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'mwclient' is not defined vs. >>> site = Site('en.wikipedia.org') >>> page = site.pages['Greater guinea pig'] >>> text = page.text() >>> page.exists True
-
- Feb 28, 2018
-
-
Jakub Wilk authored
-
- May 11, 2017
-
-
Dan Michael O. Heggø authored
-
- Sep 22, 2016
-
-
Nicolas Bareil authored
-
- Sep 20, 2016
-
-
Waldir Pimenta authored
PR #136 fixes #88
-
- Aug 21, 2016
-
-
Dan Michael O. Heggø authored
- https is standard now, so no need to explicitly declare that - wrap lines around 90 chars - minor rewriting
-
Dan Michael O. Heggø authored
to adher to 52b9d8b8
-
Lukas Juhrich authored
Remove python2.6 from - Travis - Tox - PyPi tags - documentation and readme Also, Simplify an import clause. This fixes #133
-
- Jul 03, 2016
-
-
Dan Michael O. Heggø authored
-
Dan Michael O. Heggø authored
- Adds link to the user guide from readme - Adds a new page to the user guide on "working with files"
-