Compare commits

...

5 Commits

Author SHA1 Message Date
Miss Islington (bot) ed4614386f
bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595)
(cherry picked from commit 1867b462de)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-01 07:54:54 -08:00
Benjamin Peterson 0955f6863d
[3.9] build(deps): bump actions/upload-artifact from v2.2.0 to v2.2.1 (GH-23597)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.0 to v2.2.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.0...726a6dcd0199f578459862705eed35cda05af50b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 8acd0e0d49)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 09:30:03 -06:00
Miss Islington (bot) d33f3347de
build(deps): bump actions/cache from v2.1.2 to v2.1.3 (23582)
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.2...0781355a23dac32fd3bac414512f4b903437991a)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit a43fea8857)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 07:24:20 -08:00
Miss Islington (bot) ae48dd4db5
Add GCC pragmas to silence compiler warning about ffi_prep_closure (GH-23327) (GH-23590)
(cherry picked from commit cce3f0b0c8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-12-01 15:07:50 +00:00
Miss Islington (bot) 4a44f53aa8
[3.9] bpo-17852: Doc: Fix the tutorial about closing files (GH-23135) (GH-23527)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit c8aaf71dde)


Co-authored-by: Volker-Weissmann <39418860+Volker-Weissmann@users.noreply.github.com>
2020-12-01 02:53:42 -08:00
6 changed files with 22 additions and 13 deletions

View File

@ -132,7 +132,7 @@ jobs:
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.2
uses: actions/cache@v2.1.3
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

View File

@ -32,7 +32,7 @@ jobs:
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.2
uses: actions/cache@v2.1.3
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

View File

@ -36,7 +36,7 @@ jobs:
- name: 'Build documentation'
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" doctest suspicious html
- name: 'Upload'
uses: actions/upload-artifact@v2.2.0
uses: actions/upload-artifact@v2.2.1
with:
name: doc-html
path: Doc/build/html

View File

@ -329,11 +329,16 @@ equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
If you're not using the :keyword:`with` keyword, then you should call
``f.close()`` to close the file and immediately free up any system
resources used by it. If you don't explicitly close a file, Python's
garbage collector will eventually destroy the object and close the
open file for you, but the file may stay open for a while. Another
risk is that different Python implementations will do this clean-up at
different times.
resources used by it.
.. warning::
Calling ``f.write()`` without using the :keyword:`!with` keyword or calling
``f.close()`` **might** result in the arguments
of ``f.write()`` not being completely written to the disk, even if the
program exits successfully.
..
See also https://bugs.python.org/issue17852
After a file object is closed, either by a :keyword:`with` statement
or by calling ``f.close()``, attempts to use the file object will

View File

@ -2113,9 +2113,6 @@ Changes in the C API
(Contributed by Antoine Pitrou in :issue:`32388`.)
* The :c:func:`PyCode_New` has a new parameter in the second position (*posonlyargcount*)
to support :pep:`570`, indicating the number of positional-only arguments.
* The functions :c:func:`PyNode_AddChild` and :c:func:`PyParser_AddToken` now accept
two additional ``int`` arguments *end_lineno* and *end_col_offset*.

View File

@ -426,15 +426,22 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing");
goto error;
#else
#ifdef MACOSX
#if defined(__clang__) || defined(MACOSX)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
#ifdef MACOSX
#if defined(__clang__) || defined(MACOSX)
#pragma clang diagnostic pop
#endif
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif
}