summaryrefslogtreecommitdiffstats
path: root/Modules/errnomodule.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-031-2/+3
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-108494: Fix Argument Clinic LIMITED_CAPI_REGEX (#116610)Victor Stinner2024-03-111-3/+2
| | | Accept spaces in "# define Py_LIMITED_API 0x030d0000".
* gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)Steve Dower2023-12-131-2/+0
|
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-201-2/+2
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 (#111584)Victor Stinner2023-11-011-2/+2
|
* gh-110481: Implement biased reference counting (gh-110764)Sam Gross2023-10-301-0/+6
|
* gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)Victor Stinner2023-10-171-2/+3
| | | | | | | | | | * Only add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED to limited C API version 3.13. * errno, xxlimited and _ctypes_test extensions now need the limited C API version 3.13 to get Py_MOD_PER_INTERPRETER_GIL_SUPPORTED. They now include standard header files explicitly: <errno.h>, <string.h> and <stdio.h>. * xxlimited_35: Remove Py_mod_multiple_interpreters slot, incompatible with limited C API version 3.5.
* gh-85283: Build errno and _ctypes_test with limited C API (#110955)Victor Stinner2023-10-171-32/+35
| | | _testimportmultiple is now built with limited C API version 3.2.
* gh-105375: Improve errnomodule error handling (#105590)Erlend E. Aasland2023-06-091-3/+5
| | | | Bail immediately if an exception is set, to prevent exceptions from being overwritten.
* Fix missing/incomplete NULL checks in multiple source files (#104564)chgnrdv2023-05-231-0/+1
| | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-051-0/+1
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-102255: Improve build support for Windows API partitions (GH-102256)Max Bachmann2023-03-091-0/+2
| | | | | Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs). CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes. `MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
* gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)Christian Heimes2022-08-161-0/+4
| | | | | | - On WASI `ENOTCAPABLE` is now mapped to `PermissionError`. - The `errno` modules exposes the new error number. - `getpath.py` now ignores `PermissionError` when it cannot open landmark files `pybuilddir.txt` and `pyenv.cfg`.
* gh-95174: Handle missing dup() and constants in WASI (GH-95229)Christian Heimes2022-07-261-0/+4
| | | | | | | - check for ``dup()`` libc function - handle missing ``F_DUPFD`` in ``dup2()`` replacement function - add workaround for WASI libc bug in MSG_TRUNC - ESHUTDOWN is missing, use EPIPE instead - POLLPRI is missing, define as 0 (no-op)
* bpo-42971: Add errno.EQFULL (macOS) (GH-24419)Ronald Oussoren2021-08-061-0/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-1635741: Port errno module to multiphase initialization (GH-19923)Dong-hee Na2020-05-071-310/+335
|
* Fix #13210. Port the Windows build from VS2008 to VS2010.Brian Curtin2012-05-131-0/+27
|
* Closes Issue 11916: Add a number of MacOSX specific definitions to the errno ↵Ronald Oussoren2011-05-071-0/+55
| | | | | | module. Patch by Pierre Carrier.
* Issue 9916: Add some missing errno symbols.Barry Warsaw2010-09-221-0/+30
|
* Issue #5737: Add Solaris-specific mnemonics in the errno module. Patch byAntoine Pitrou2010-08-181-1/+22
| | | | Matthew Ahrens.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-262/+262
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 64214 via svnmerge fromAmaury Forgeot d'Arc2008-06-131-1/+1
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64214 | amaury.forgeotdarc | 2008-06-13 02:42:22 +0200 (ven., 13 juin 2008) | 6 lines Restore support for Microsoft VC6 compiler. Some functions in the msvcrt module are skipped, and socket.ioctl is enabled only when using a more recent Platform SDK. (and yes, there are still companies that use a 10-years old compiler) ........
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-4/+17
|
* Some VS 6.0 compatibility fixes from Hirokazu Yamamoto which are also useful ↵Christian Heimes2008-01-041-0/+1
| | | | for later versions of MSVC. VS6 claims that fortran is a reserved word
* Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases ↵Christian Heimes2007-12-021-1/+1
| | | | in intobject.h
* Use unicode for the errno.errorcode namesNeal Norwitz2007-08-241-2/+2
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Getting rid of code dependent on GUSI or the MetroWerks compiler.Jack Jansen2003-11-191-5/+0
|
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-2/+2
|
* Removed an XXX question (the answer is "yes" <wink>).Tim Peters2002-01-261-1/+1
|
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Do the absolute minimal amount of modifications to eradicateBarry Warsaw2000-09-011-12/+9
| | | | | | | | | | | | | | | Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-1/+1
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* - ANSI-ficationFredrik Lundh2000-07-091-5/+1
| | | | (patch #100784 by Peter Schneider-Kamp)
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-21/+6
|
* initerrno(): Nailed a not-so-tiny memory leak. The de dictionary isBarry Warsaw1999-01-271-1/+2
| | | | | put into the module dict, but is never DECREF'd in this function, so it and all its contents leak.
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Added a module docstring (that's all this module needs).Guido van Rossum1998-08-111-1/+15
|
* Got rid of the errorstr dictionary, which is redundant now thatGuido van Rossum1997-11-041-21/+9
| | | | there's os.strerror() -- also, it would form a locale liability.
* Changes submitted by Marc-Andre Lemburg to add two tables: errorcodeGuido van Rossum1997-09-281-368/+622
| | | | | | maps errno numbers to errno names (e.g. EINTR), and errorcode maps them to message strings. (The latter is redundant because the new call posix.strerror() now does the same, but alla...)
* (Jack:) Mac only: get GUSI errno.h values too.Guido van Rossum1997-04-111-0/+5
|
* Removed a #inlclude <errno.h> since it's implied with "Python.h"Roger E. Masse1996-12-131-2/+0
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-12/+19
|
* Added Sam Rushing's errno moduleGuido van Rossum1996-07-241-0/+561