1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-17 05:11:17 +03:00

137 Commits

Author SHA1 Message Date
Nick Wellnhofer
591f19ebe7 catalog: Deprecate low-level internal functions 2025-08-20 13:09:03 +02:00
Nick Wellnhofer
347c2b2ec7 valid: Deprecate a few functions and xmllint --insert 2025-06-02 23:54:28 +02:00
Dag-Erling Smørgrav
8ea253b895 Remove bogus casts.
* Casting a string literal to `char *` and then immediately passing or
  assigning the result to a `const char *` makes no sense.
* There is no need to cast `int` to `Py_ssize_t` as they have the same
  sign and the latter is at least as wide as the former.
2025-05-24 01:28:21 +02:00
Nick Wellnhofer
210f5a3746 chvalid: Mark functions as deprecated 2025-05-16 23:27:51 +02:00
Nick Wellnhofer
6f4b452742 parser: Stop using ctxt->linenumbers
I think this was used to avoid setting the `line` member before it was
added (20+ years ago).
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
258d870629 codegen: Consolidate tools for code generation
Move tools, source files and output tables into codegen directory.

Rename some files.

Adjust tools to match modified files. Remove generation date and source
files from output.

Distribute all tools and sources.
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
a40f36e7f2 include: Stop using *Ptr typedefs in public headers 2025-05-16 18:03:12 +02:00
Nick Wellnhofer
a449c5fde3 catalog: Deprecate some functions 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
05d0f59221 python: Skip __xml thread-local accessors
So we can remove conditional directives for Doxygen.
2025-05-06 19:51:26 +02:00
Nick Wellnhofer
1eca6e3476 parser: Deprecate xmlClearParserCtxt 2025-05-02 13:33:35 +02:00
Nick Wellnhofer
321aa35638 python: Make generator.py use Doxygen XML 2025-05-02 13:33:34 +02:00
Nick Wellnhofer
ed850ec1e6 python: Merge libxml2-python-api.xml into generator.py 2025-05-02 13:33:34 +02:00
Dan Yeaw
38cc2b53ed python: Stop generating libxml2class.txt 2025-04-12 17:08:54 +02:00
Dan Yeaw
e26478545f python: Fix file variable not defined during exception 2025-04-12 17:08:54 +02:00
Dan Yeaw
ffef921be3 python: Concat generated files in generator.py 2025-04-12 17:08:54 +02:00
Nick Wellnhofer
97ffa77d6d encoding: Deprecate non-thread-safe functions 2025-04-10 17:36:58 +02:00
Nick Wellnhofer
2ecc08f6dc html: Deprecate more functions 2025-04-10 16:36:03 +02:00
Nick Wellnhofer
696572248f globals: Remove unused globals
- xmlBufferAllocScheme
- xmlDefaultBufferSize
- xmlParserDebugEntities
2025-03-05 12:24:38 +01:00
Nick Wellnhofer
361f7bff92 parser: Make nodePush, nodePop, namePush, namePop private 2025-03-04 16:47:14 +01:00
Nick Wellnhofer
6fc260760a regexp: Hide debugging code behind DEBUG_REGEXP
xmlRegexpPrint is now a deprecated no-op.
2025-02-22 20:55:06 +01:00
Jan Alexander Steffens (heftig)
c2e2d76211 python: Pass destination dir to generator.py
Simplify usage across build systems.
2025-02-20 13:53:25 +01:00
Nick Wellnhofer
0dc26910c1 parser: Deprecate more internal functions 2024-11-21 22:31:20 +01:00
Nick Wellnhofer
e2ad249c23 parser: Deprecate more internal symbols
- xmlParseExternalSubset
- xmlPushInput
- xmlPopInput
- xmlCopyCharMultiByte
- xmlCreateEntityParserCtxt
- xmlStringComment
2024-11-19 00:25:23 +01:00
Nick Wellnhofer
c34d0ae9cc html: Deprecate htmlIsBooleanAttr 2024-10-06 20:04:00 +02:00
Nick Wellnhofer
6040785ac4 html: Deprecate AutoClose API 2024-10-06 20:04:00 +02:00
Nick Wellnhofer
c46b89e243 xpath: Deprecate xmlXPathEvalExpr
Also check the argument instead of crashing if there's no context.
2024-09-13 21:06:36 +02:00
Nick Wellnhofer
eb66d03ef7 io: Deprecate a few functions 2024-07-16 17:42:10 +02:00
Nick Wellnhofer
69f12d6d47 encoding: Deprecate xmlByteConsumed
This was only used by Chromium/WebKit to detect whether xmlParseContent
really succeeded. It's a horrible, overcomplicated hack.

See 8c5848bd and #767.
2024-07-13 15:42:02 +02:00
Nick Wellnhofer
30ef77554b parser: Don't use deprecated xmlCopyChar 2024-07-02 13:34:11 +02:00
Nick Wellnhofer
3ff8a2c4b8 parser: Deprecate xmlIsLetter 2024-06-27 14:43:10 +02:00
Nick Wellnhofer
1112699cfa legacy: Remove most legacy functions from public headers
Also remove warning messages.
2024-06-17 15:47:42 +02:00
Nick Wellnhofer
712a31abe4 parser: Deprecate most public struct members
This will probably cause many warnings in downstream code abusing
libxml2 internals, but we can always undeprecate some members later.
2024-06-13 18:04:34 +02:00
Nick Wellnhofer
669bd34993 xpointer: Remove support for XPointer locations
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:

    https://www.w3.org/TR/xptr-xpointer/

The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.

If you configure --with-legacy, old symbols are retained for ABI
compatibility.
2024-06-12 18:20:01 +02:00
Nick Wellnhofer
592546267f threads: Deprecate remaining ThrDef functions 2024-05-14 15:44:50 +02:00
Nick Wellnhofer
ae23a4ce56 unicode: Deprecate most xmlUCSIs* functions
These don't seem to be used by downstream code.
2024-04-30 17:42:59 +02:00
Nick Wellnhofer
88169bfda6 tree: Deprecate xmlSetCompressMode 2024-04-28 19:30:39 +02:00
Nick Wellnhofer
05654cfe00 html: Deprecate htmlHandleOmittedElem 2024-04-28 18:58:27 +02:00
Nick Wellnhofer
dc2a03d482 valid: Deprecate internal validation functions 2024-03-16 15:20:08 +01:00
Nick Wellnhofer
229e5ff7f9 io: Remove support for HTTP POST
This feature is unlikely to be used these days.
2023-12-24 22:11:49 +01:00
Nick Wellnhofer
1ef3566362 io: Always use unbuffered input
Before, we often used unbuffered input via the lzma or gzip handlers,
more or less inadvertently.

Change the default file handlers from buffered (stdc FILE) to unbuffered
(POSIX fds).
2023-12-21 15:02:24 +01:00
Nick Wellnhofer
b2dbcc432b io: Rework default callbacks
Register a dummy callback struct for default callbacks. Handle them in a
separate function which will later allow to return meaningful error
codes.
2023-12-21 15:02:24 +01:00
Nick Wellnhofer
1c7f4c70fe nanohttp: Deprecate public API
The long-term plan is to remove the built-in HTTP client. There are
still a few downstream projects that use libxml2's client for other
purposes. These users should get deprecation warnings now.
2023-11-27 13:43:06 +01:00
Nick Wellnhofer
45470611b0 error: Make xmlGetLastError return a const error
This is a slight break of the API, but users really shouldn't modify the
global error struct. The goal is to make xmlLastError use static buffers
for its strings eventually. This should warn people if they're abusing
the struct.
2023-09-22 13:29:07 +02:00
Nick Wellnhofer
db8b9722cb parser: Deprecate global parser options
Note that setting global options has no effect anyway when using any of
the modern parser API functions which take an option argument like
xmlReadMemory or when using xmlCtxtUseOptions.

Global options only have an effect when using old API functions
xmlParse* or xmlSAXParse* or when using an xmlParserCtxt without calling
xmlCtxtUseOptions.

Unfortunately, many downstream projects still modify global parser
options often without realizing that it has no effect. If necessary,
switch to the modern API. Then you can safely remove all code that
changes global options.

Here's a list of deprecated functions and global variables together with
the corresponding parser options.

- xmlSubstituteEntitiesDefault, xmlSubstituteEntitiesDefaultValue
  Parser option XML_PARSE_NOENT

- xmlKeepBlanksDefault, xmlKeepBlanksDefaultValue
  Inverse of parser option XML_PARSE_NOBLANKS

- xmlPedanticParserDefault, xmlPedanticParserDefaultValue
  Parser option XML_PARSE_PEDANTIC

- xmlLineNumbersDefault, xmlLineNumbersDefaultValue
  Always enabled by new API

- xmlDoValidityCheckingDefaultValue
  Parser option XML_PARSE_DTDVALID

- xmlGetWarningsDefaultValue
  Inverse of parser option XML_PARSE_NOWARNING

- xmlLoadExtDtdDefaultValue
  Parser options XML_PARSE_DTDLOAD and XML_PARSE_DTDATTR
2023-09-20 22:06:49 +02:00
Nick Wellnhofer
3ffcc03b16 parser: Deprecate more internal functions 2023-04-26 20:23:23 +02:00
Nick Wellnhofer
b47ebf047e parser: Deprecate xmlString*DecodeEntities
These are internal functions.
2022-12-21 21:06:03 +01:00
Ross Burton
4762c85668 Use python3 not python
As per https://peps.python.org/pep-0394/, the python binary can be one
of the following options:
- Python 2
- Python 3
- Not exist

All of the scripts in libxml2 use 'python', which may not exist.

As Python 2 reached EOL on the 1st January 2020, it's safe to move the
scripts to use python3 explicitly.
2022-12-07 13:21:12 +00:00
Nick Wellnhofer
9d19c169bb python: Don't output missing generators during build 2022-09-06 01:07:24 +02:00
Nick Wellnhofer
58fc89e8a9 Deprecate internal parser functions 2022-08-25 21:04:57 +02:00
Nick Wellnhofer
51035c539e Generate deprecation warnings for old SAX API 2022-08-25 20:17:03 +02:00