Skip to content

Commit

Permalink
Merge branch 'master' into subtraction
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksbabieiev authored Dec 27, 2024
2 parents 2341ece + c1f6ef6 commit 69b062f
Show file tree
Hide file tree
Showing 25 changed files with 845 additions and 243 deletions.
7 changes: 6 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ codecov:

require_ci_to_pass: false

token: 26f4a393-24a9-48d9-8fa4-f1344d930846 # repo-scoped
token: >- # notsecret # repo-scoped, upload-only, stability in fork PRs
26f4a393-24a9-48d9-8fa4-f1344d930846
comment:
require_changes: true
Expand All @@ -29,6 +30,10 @@ coverage:
paths:
- yarl/
target: 97.91%
packaging:
paths:
- packaging/
target: 75.24%
tests:
flags:
- pytest
Expand Down
10 changes: 5 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ show_contexts = true
skip_covered = false

[paths]
source =
yarl
*/lib/pypy*/site-packages/yarl
*/lib/python*/site-packages/yarl
*/Lib/site-packages/yarl
_site-packages-to-src-mapping =
.
*/lib/pypy*/site-packages
*/lib/python*/site-packages
*\Lib\site-packages

[report]
fail_under = 98.95
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/aiohttp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---

name: Aiohttp


on:
merge_group:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master


env:
COLOR: "yes"
FORCE_COLOR: 1
PY_COLORS: 1


jobs:

test-aiohttp:
name: Aiohttp tests
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
branch: ['master', '3.10', '3.11', '3.12']
steps:
- name: Checkout aiohttp
uses: actions/checkout@v4
with:
repository: aio-libs/aiohttp
ref: ${{ matrix.branch }}
submodules: true
- name: Checkout yarl
uses: actions/checkout@v4
with:
path: vendor/yarl
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
cache-dependency-path: requirements/*.txt
- name: Provision the dev env
run: make .develop
- name: Cythonize yarl
working-directory: vendor/yarl
run: make cythonize
- name: Install yarl
working-directory: vendor/yarl
run: >-
python -m pip install -e .
- name: Run tests
run: python -m pytest
shell: bash

...
18 changes: 8 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
lint:
uses: ./.github/workflows/reusable-linters.yml
secrets:
codecov-token: 26f4a393-24a9-48d9-8fa4-f1344d930846
codecov-token: ${{ secrets.CODECOV_TOKEN }}

build-wheels-for-tested-arches:
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
Expand Down Expand Up @@ -345,17 +345,17 @@ jobs:
- name: Send coverage data to Codecov
if: >-
!cancelled()
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: 26f4a393-24a9-48d9-8fa4-f1344d930846
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: >-
CI-GHA,
pytest,
OS-${{ runner.os }},
VM-${{ matrix.os }},
Py-${{ steps.python-install.outputs.python-version }}
fail_ci_if_error: false
fail_ci_if_error: true

benchmark:
name: Benchmark
Expand All @@ -382,11 +382,11 @@ jobs:
pattern: ${{ needs.pre-setup.outputs.dists-artifact-name }}*
merge-multiple: true

- name: Setup Python 3.12
- name: Setup Python 3.13
id: python-install
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: pip
cache-dependency-path: requirements/*.txt
- name: Install dependencies
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
- build-wheels-for-tested-arches
- pre-setup # transitive, for accessing settings
runs-on: ubuntu-latest
timeout-minutes: 14
timeout-minutes: 30

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
Expand Down Expand Up @@ -552,8 +552,6 @@ jobs:
- name: >-
Publish 🐍📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
shell: bash

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_CONFIG_SETTINGS: >- # Cython line tracing for coverage collection
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
make lint
- name: Send coverage data to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.codecov-token }}
files: >-
Expand All @@ -70,7 +70,7 @@ jobs:
flags: >-
CI-GHA,
MyPy
fail_ci_if_error: false
fail_ci_if_error: true
- name: Install spell checker
run: |
sudo apt install libenchant-2-dev
Expand Down
177 changes: 177 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,183 @@ Changelog

.. towncrier release notes start
1.18.3
======

*(2024-12-01)*


Bug fixes
---------

- Fixed uppercase ASCII hosts being rejected by :meth:`URL.build() <yarl.URL.build>` and :py:meth:`~yarl.URL.with_host` -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`954`, :issue:`1442`.


Miscellaneous internal changes
------------------------------

- Improved performances of multiple path properties on cache miss -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1443`.


----


1.18.2
======

*(2024-11-29)*


No significant changes.


----


1.18.1
======

*(2024-11-29)*


Miscellaneous internal changes
------------------------------

- Improved cache performance when :class:`~yarl.URL` objects are constructed from :py:meth:`~yarl.URL.build` with ``encoded=True`` -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1432`.

- Improved cache performance for operations that produce a new :class:`~yarl.URL` object -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1434`, :issue:`1436`.


----


1.18.0
======

*(2024-11-21)*


Features
--------

- Added ``keep_query`` and ``keep_fragment`` flags in the :py:meth:`yarl.URL.with_path`, :py:meth:`yarl.URL.with_name` and :py:meth:`yarl.URL.with_suffix` methods, allowing users to optionally retain the query string and fragment in the resulting URL when replacing the path -- by :user:`paul-nameless`.

*Related issues and pull requests on GitHub:*
:issue:`111`, :issue:`1421`.


Contributor-facing changes
--------------------------

- Started running downstream ``aiohttp`` tests in CI -- by :user:`Cycloctane`.

*Related issues and pull requests on GitHub:*
:issue:`1415`.


Miscellaneous internal changes
------------------------------

- Improved performance of converting :class:`~yarl.URL` to a string -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1422`.


----


1.17.2
======

*(2024-11-17)*


Bug fixes
---------

- Stopped implicitly allowing the use of Cython pre-release versions when
building the distribution package -- by :user:`ajsanchezsanz` and
:user:`markgreene74`.

*Related issues and pull requests on GitHub:*
:issue:`1411`, :issue:`1412`.

- Fixed a bug causing :attr:`~yarl.URL.port` to return the default port when the given port was zero
-- by :user:`gmacon`.

*Related issues and pull requests on GitHub:*
:issue:`1413`.


Features
--------

- Make error messages include details of incorrect type when ``port`` is not int in :py:meth:`~yarl.URL.build`.
-- by :user:`Cycloctane`.

*Related issues and pull requests on GitHub:*
:issue:`1414`.


Packaging updates and notes for downstreams
-------------------------------------------

- Stopped implicitly allowing the use of Cython pre-release versions when
building the distribution package -- by :user:`ajsanchezsanz` and
:user:`markgreene74`.

*Related issues and pull requests on GitHub:*
:issue:`1411`, :issue:`1412`.


Miscellaneous internal changes
------------------------------

- Improved performance of the :py:meth:`~yarl.URL.joinpath` method -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1418`.


----


1.17.1
======

*(2024-10-30)*


Miscellaneous internal changes
------------------------------

- Improved performance of many :class:`~yarl.URL` methods -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1396`, :issue:`1397`, :issue:`1398`.

- Improved performance of passing a `dict` or `str` to :py:meth:`~yarl.URL.extend_query` -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1401`.


----


1.17.0
======

Expand Down
1 change: 0 additions & 1 deletion CHANGES/1396.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/1397.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/1398.misc.rst

This file was deleted.

5 changes: 4 additions & 1 deletion CHANGES/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ for the users to understand what it means.
combined with others, it will be a part of the "news digest"
telling the readers **what changed** in a specific version of
the library *since the previous version*. You should also use
reStructuredText syntax for highlighting code (inline or block),
*reStructuredText* syntax for highlighting code (inline or block),
linking parts of the docs or external sites.
However, you do not need to reference the issue or PR numbers here
as *towncrier* will automatically add a reference to all of the
affected issues when rendering the news file.
If you wish to sign your change, feel free to add ``-- by
:user:`github-username``` at the end (replace ``github-username``
with your own!).
Expand Down
Loading

0 comments on commit 69b062f

Please sign in to comment.