Staging
v0.5.1
https://github.com/python/cpython
Revision 070ba85a8f45819d9197bce4541cd594d79d247c authored by Mariatta on 20 June 2017, 06:31:11 UTC, committed by Victor Stinner on 20 June 2017, 06:31:11 UTC
* [3.5] bpo-29887: Test normalization now fails if download fails (GH-905)

* test_normalization fails if download fails

bpo-29887. The test is still skipped if "-u urlfetch" option is not
passed to regrtest (python3 -m test -u urlfetch test_normalization).

* Fix ResourceWarning in test_normalization

bpo-29887: Fix ResourceWarning in test_normalization if tests are
interrupted by CTRL+c.
(cherry picked from commit 722a3af092b94983aa26f5e591fb1b45e2c2a0ff)

* bpo-29887: test_normalization handles PermissionError (#1196)

Skip test_normalization.test_main() if download raises a permission
error.
(cherry picked from commit d13d54748d3a7db023d9db37223ea7d40bb8f8e3)

* no f-strings :(
1 parent 2c899cc
Raw File
Tip revision: 070ba85a8f45819d9197bce4541cd594d79d247c authored by Mariatta on 20 June 2017, 06:31:11 UTC
[3.5] bpo-29887: Test normalization now fails if download fails (GH-905) (#2272)
Tip revision: 070ba85
pystrtod.h
#ifndef Py_STRTOD_H
#define Py_STRTOD_H

#ifdef __cplusplus
extern "C" {
#endif


PyAPI_FUNC(double) PyOS_string_to_double(const char *str,
                                         char **endptr,
                                         PyObject *overflow_exception);

/* The caller is responsible for calling PyMem_Free to free the buffer
   that's is returned. */
PyAPI_FUNC(char *) PyOS_double_to_string(double val,
                                         char format_code,
                                         int precision,
                                         int flags,
                                         int *type);

#ifndef Py_LIMITED_API
PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr);
#endif


/* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */
#define Py_DTSF_SIGN      0x01 /* always add the sign */
#define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */
#define Py_DTSF_ALT       0x04 /* "alternate" formatting. it's format_code
                                  specific */

/* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */
#define Py_DTST_FINITE 0
#define Py_DTST_INFINITE 1
#define Py_DTST_NAN 2

#ifdef __cplusplus
}
#endif

#endif /* !Py_STRTOD_H */
back to top