Skip to content

Sync Zeep from upstream - #3

Open
abhinand-c wants to merge 46 commits into
strollby:masterfrom
mvantellingen:main
Open

Sync Zeep from upstream#3
abhinand-c wants to merge 46 commits into
strollby:masterfrom
mvantellingen:main

Conversation

@abhinand-c

Copy link
Copy Markdown
Member

Review of changes needed

whalesalad and others added 30 commits October 13, 2024 07:33
According to https://endoflife.date/python python 3.7 has been
EOSed 27 Jun 2023.
Filter all code over `pyupgracde --py38-plus`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
The latest release of the isodate package (0.7.2) doesn’t handle
timezone information for dates. While this is indeed not valid according
to the ISO specs we want to handle it anway.

At a workaround by stripping the timezone data ourselves
I bumped into this when opening several wsdl which in turn opened lots
of xsd, with 'file://' scheme.

The issue was that the `resp.raw.close` nor `resp.raw.release_conn` set
in the `FileAdapter` were ever called.

It's unclear to me whether this should be fixed in requests. It doesn't
do that great a job at resource management for the naive user aka
Human™. It makes sense to me that exhaustively reading `Response.raw`
should close it unless the caller explicitly set `stream` on the
request. Probably by using this `closing` pattern in the generator in
`Response.iter_content`.

Workarounds without this fix:
 - using a scheme-less url as zeep will assume it's a local path and
   open the file as a context manager.
 - use one of the caches from `zeep.cache` to hide duplicate open resources.
This seems to result in a conflict with xmlsec/libxml
This also moves the README from rST to markdown
Thanks again to Kraken Tech for making Zeep part of their OSS funding program by issuing a one-time grant in 2023
iksteen and others added 16 commits September 15, 2025 11:54
pytz dependency is removed. isodate is still needed for ISO durations
and missing features in Python's ISO datetime parser.
Also bumps the pytest-asyncio pin in tox.ini from 0.11.0 to the 0.24
series, since the old pin doesn't support Python 3.14.
The forbid_external setting was defined but unused since the move off
defusedxml in 4.0. When enabled it now refuses to transitively fetch
http/https resources via xsd:import, xsd:include, wsdl:import or lxml
entity resolution, raising ExternalReferenceForbidden. The user-supplied
entry-point WSDL/schema URL is still loaded.

The default is changed to False to preserve existing behaviour; enable
when loading WSDLs from untrusted sources to mitigate SSRF via
attacker-controlled import targets.
- Manage env and deps with uv; add committed uv.lock
- Move test deps into PEP 735 [dependency-groups] dev group
- Replace isort/flake8/black with ruff (lint + format)
- Remove tox.ini; CI matrix + uv run --python replaces it
- Add `make test-all` sweep using isolated per-version .venv-py* envs
- Update GitHub workflows: setup-uv with caching, uv sync/run for
  test+coverage, uv build for release (OIDC publishing unchanged)
The old CI only checked black/isort formatting, never flake8, so these
pre-existing issues were never enforced. Now that the format job runs
`ruff check`, fix them:

- loader: drop redundant lxml XMLSyntaxError import (zeep's is used)
- proxy/signature: use `is`/`is not` for type and None comparisons
- complex: `type(element) is list` (NOT isinstance -- Sequence subclasses
  list and would be double-wrapped)
- builtins: remove unused `math` import
- xsd/__init__: explicit re-export aliases for Nil/SkipValue
- tests: drop unused vars, fix `== True`, detab XSD fixtures, strip
  trailing whitespace
uv installs the project editable, so coverage records src/zeep/... paths
instead of the site-packages paths tox produced. The per-OS absolute
prefixes (/home/runner, /Users/runner, D:\a) then failed to unify on the
coverage job ("No source for code"). Set relative_files = true so paths
are stored relative to the repo root and combine cleanly across runners.
Derive __version__ (and the docs version) from installed package
metadata via importlib.metadata, so pyproject.toml is the single source
of truth. Removes the need to keep four files in sync and lets releases
use `uv version --bump`. Delete .bumpversion.cfg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.