Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
266a502
Post 3.8.16
ambv Dec 6, 2022
30afa75
[3.8] Update copyright years to 2023. (gh-100852)
benjaminp Jan 8, 2023
6924cba
[3.8] Update copyright year in README (GH-100863) (GH-100867)
miss-islington Jan 9, 2023
594ba19
[3.8] Correct CVE-2020-10735 documentation (GH-100306) (#100698)
gpshead Jan 20, 2023
e57a3c1
[3.8] Bump Azure Pipelines to ubuntu-22.04 (GH-101089) (#101215)
miss-islington Jan 21, 2023
be3b5f7
[3.8] gh-100180: Update Windows installer to OpenSSL 1.1.1s (GH-10090…
zooba Jan 23, 2023
db924a4
gh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH…
miss-islington Jan 30, 2023
41d301a
[3.8] gh-95778: add doc missing in some places (GH-100627) (#101630)
merwok Feb 8, 2023
32a1a61
[3.8] gh-101283: Improved fallback logic for subprocess with shell=Tr…
miss-islington Feb 9, 2023
7a3db0c
[3.8] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI i…
corona10 Feb 21, 2023
4812813
[3.8] GH-102306 Avoid GHA CI macOS test_posix failure by using the ap…
ned-deily Mar 4, 2023
ddd495e
[3.8] gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727) (GH…
zooba Mar 7, 2023
045b252
[3.8] gh-102627: Replace address pointing toward malicious web page (…
miss-islington Mar 13, 2023
3205d1f
[3.8] gh-101997: Update bundled pip version to 23.0.1 (GH-101998). (#…
pradyunsg Mar 28, 2023
79e63e5
[3.8] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (G…
encukou May 17, 2023
47ec96a
[3.8] gh-99889: Fix directory traversal security flaw in uu.decode() …
miss-islington May 22, 2023
2062fce
[3.8] gh-104049: do not expose on-disk location from SimpleHTTPReques…
miss-islington May 22, 2023
9f89c47
[3.8] gh-103935: Use `io.open_code()` when executing code in trace an…
zooba May 22, 2023
d958960
[3.8] gh-68966: fix versionchanged in docs (GH-105299)
ned-deily Jun 5, 2023
b28acfa
[3.8] Update GitHub CI workflow for macOS. (GH-105302)
ned-deily Jun 5, 2023
c43c50e
[3.8] gh-105184: document that marshal functions can fail and need to…
miss-islington Jun 5, 2023
9c2ff15
[3.8] gh-102153: Start stripping C0 control and space chars in `urlsp…
stratakis Jun 5, 2023
43eff24
[3.8] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-1…
ambv Jun 6, 2023
9a2d531
Python 3.8.17
ambv Jun 6, 2023
40ea37d
Post 3.8.17
ambv Jun 6, 2023
1d743c6
Merge remote-tracking branch 'upstream/3.8' into carlosroman/python-3…
carlosroman Jun 21, 2023
7a2b527
Updated CI to build 3.8.17
carlosroman Jun 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[3.8] pythongh-105184: document that marshal functions can fail and n…
…eed to be checked with PyErr_Occurred (pythonGH-105185) (python#105222)

(cherry picked from commit ee26ca1)

Co-authored-by: Irit Katriel <[email protected]>
  • Loading branch information
miss-islington and iritkatriel authored Jun 5, 2023
commit c43c50e07ec35e4f66b6893fd940b8e098a12eb2
4 changes: 4 additions & 0 deletions Doc/c-api/marshal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
the least-significant 32 bits of *value*; regardless of the size of the
native :c:type:`long` type. *version* indicates the file format.

This function can fail, in which case it sets the error indicator.
Use :c:func:`PyErr_Occurred` to check for that.

.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)

Marshal a Python object, *value*, to *file*.
*version* indicates the file format.

This function can fail, in which case it sets the error indicator.
Use :c:func:`PyErr_Occurred` to check for that.

.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)

Expand Down
4 changes: 4 additions & 0 deletions Python/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ w_clear_refs(WFILE *wf)
}

/* version currently has no effect for writing ints. */
/* Note that while the documentation states that this function
* can error, currently it never does. Setting an exception in
* this function should be regarded as an API-breaking change.
*/
void
PyMarshal_WriteLongToFile(long x, FILE *fp, int version)
{
Expand Down