+++ /dev/null
-## CPython Mirror
-
-https://github.com/python/cpython is a cpython mirror repository. Pull requests
-are not accepted on this repo and will be automatically closed.
-
-### Submit patches at https://bugs.python.org
-
-For additional information about contributing to CPython, see the
-[developer's guide](https://docs.python.org/devguide/#contributing).
+++ /dev/null
-# Two-trick pony for OSX and other case insensitive file systems:
-# Ignore ./python binary on Unix but still look into ./Python/ directory.
-/python
-!/Python/
-*.cover
-*.o
-*.orig
-*.pyc
-*.pyd
-*.pyo
-*.rej
-*.swp
-*~
-*.gc??
-*.profclang?
-*.profraw
-*.dyn
-.gdb_history
-Doc/build/
-Doc/venv/
-Lib/distutils/command/*.pdb
-Lib/lib2to3/*.pickle
-Lib/test/data/*
-Makefile
-Makefile.pre
-Misc/python.pc
-Misc/python-config.sh
-Modules/Setup
-Modules/Setup.config
-Modules/Setup.local
-Modules/config.c
-Modules/ld_so_aix
-Programs/_freeze_importlib
-Programs/_testembed
-PC/python_nt*.h
-PC/pythonnt_rc*.h
-PC/*/*.exe
-PC/*/*.exp
-PC/*/*.lib
-PC/*/*.bsc
-PC/*/*.dll
-PC/*/*.pdb
-PC/*/*.user
-PC/*/*.ncb
-PC/*/*.suo
-PC/*/Win32-temp-*
-PC/*/x64-temp-*
-PC/*/amd64
-PCbuild/*.user
-PCbuild/*.suo
-PCbuild/*.*sdf
-PCbuild/*-pgi
-PCbuild/*-pgo
-PCbuild/.vs/
-PCbuild/amd64/
-PCbuild/obj/
-PCBuild/win32/
-.purify
-Parser/pgen
-__pycache__
-autom4te.cache
-build/
-buildno
-config.cache
-config.log
-config.status
-config.status.lineno
-core
-db_home
-.hg/
-ipch/
-libpython*.a
-libpython*.so*
-libpython*.dylib
-platform
-pybuilddir.txt
-pyconfig.h
-python-config
-python-config.py
-python.bat
-python.exe
-python-gdb.py
-python.exe-gdb.py
-reflog.txt
-.svn/
-tags
-TAGS
-.coverage
-coverage/
-externals/
-htmlcov/
-Tools/msi/obj
-Tools/ssl/amd64
-Tools/ssl/win32
-.vs/
-.vscode/
../Tools/scripts/serve.py build/html
# Targets for daily automated doc build
+# By default, Sphinx only rebuilds pages where the page content has changed.
+# This means it doesn't always pick up changes to preferred link targets, etc
+# To ensure such changes are picked up, we build the published docs with
+# `-E` (to ignore the cached environment) and `-a` (to ignore already existing
+# output files)
# for development releases: always build
autobuild-dev:
- make dist SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1'
+ make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
-make suspicious
# for quick rebuilds (HTML only)
autobuild-dev-html:
- make html SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1'
+ make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
# for stable releases: only build if not in pre-release stage (alpha, beta)
# release candidate downloads are okay, since the stable tree can be in that stage
is the function calling :c:func:`PyErr_WarnEx`, 2 is the function above that,
and so forth.
- Warning categories must be subclasses of :c:data:`Warning`; the default warning
- category is :c:data:`RuntimeWarning`. The standard Python warning categories are
- available as global variables whose names are ``PyExc_`` followed by the Python
- exception name. These have the type :c:type:`PyObject\*`; they are all class
- objects. Their names are :c:data:`PyExc_Warning`, :c:data:`PyExc_UserWarning`,
- :c:data:`PyExc_UnicodeWarning`, :c:data:`PyExc_DeprecationWarning`,
- :c:data:`PyExc_SyntaxWarning`, :c:data:`PyExc_RuntimeWarning`, and
- :c:data:`PyExc_FutureWarning`. :c:data:`PyExc_Warning` is a subclass of
- :c:data:`PyExc_Exception`; the other warning categories are subclasses of
- :c:data:`PyExc_Warning`.
+ Warning categories must be subclasses of :c:data:`PyExc_Warning`;
+ :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`;
+ the default warning category is :c:data:`PyExc_RuntimeWarning`. The standard
+ Python warning categories are available as global variables whose names are
+ enumerated at :ref:`standardwarningcategories`.
For information about warning control, see the documentation for the
:mod:`warnings` module and the :option:`-W` option in the command line
:c:type:`PyObject\*`; they are all class objects. For completeness, here are all
the variables:
+.. index::
+ single: PyExc_BaseException
+ single: PyExc_Exception
+ single: PyExc_ArithmeticError
+ single: PyExc_AssertionError
+ single: PyExc_AttributeError
+ single: PyExc_BlockingIOError
+ single: PyExc_BrokenPipeError
+ single: PyExc_BufferError
+ single: PyExc_ChildProcessError
+ single: PyExc_ConnectionAbortedError
+ single: PyExc_ConnectionError
+ single: PyExc_ConnectionRefusedError
+ single: PyExc_ConnectionResetError
+ single: PyExc_EOFError
+ single: PyExc_FileExistsError
+ single: PyExc_FileNotFoundError
+ single: PyExc_FloatingPointError
+ single: PyExc_GeneratorExit
+ single: PyExc_ImportError
+ single: PyExc_IndentationError
+ single: PyExc_IndexError
+ single: PyExc_InterruptedError
+ single: PyExc_IsADirectoryError
+ single: PyExc_KeyError
+ single: PyExc_KeyboardInterrupt
+ single: PyExc_LookupError
+ single: PyExc_MemoryError
+ single: PyExc_ModuleNotFoundError
+ single: PyExc_NameError
+ single: PyExc_NotADirectoryError
+ single: PyExc_NotImplementedError
+ single: PyExc_OSError
+ single: PyExc_OverflowError
+ single: PyExc_PermissionError
+ single: PyExc_ProcessLookupError
+ single: PyExc_RecursionError
+ single: PyExc_ReferenceError
+ single: PyExc_RuntimeError
+ single: PyExc_StopAsyncIteration
+ single: PyExc_StopIteration
+ single: PyExc_SyntaxError
+ single: PyExc_SystemError
+ single: PyExc_SystemExit
+ single: PyExc_TabError
+ single: PyExc_TimeoutError
+ single: PyExc_TypeError
+ single: PyExc_UnboundLocalError
+ single: PyExc_UnicodeDecodeError
+ single: PyExc_UnicodeEncodeError
+ single: PyExc_UnicodeError
+ single: PyExc_UnicodeTranslateError
+ single: PyExc_ValueError
+ single: PyExc_ZeroDivisionError
+
+-----------------------------------------+---------------------------------+----------+
| C Name | Python Name | Notes |
+=========================================+=================================+==========+
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | \(1) |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_LookupError` | :exc:`LookupError` | \(1) |
-+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_AssertionError` | :exc:`AssertionError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_AttributeError` | :exc:`AttributeError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_BrokenPipeError` | :exc:`BrokenPipeError` | |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_ChildProcessError` | :exc:`ChildProcessError` | |
+| :c:data:`PyExc_BufferError` | :exc:`BufferError` | |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_ConnectionError` | :exc:`ConnectionError` | |
+| :c:data:`PyExc_ChildProcessError` | :exc:`ChildProcessError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ConnectionAbortedError` | :exc:`ConnectionAbortedError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_ConnectionError` | :exc:`ConnectionError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ConnectionRefusedError` | :exc:`ConnectionRefusedError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ConnectionResetError` | :exc:`ConnectionResetError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_EOFError` | :exc:`EOFError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_FileExistsError` | :exc:`FileExistsError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_FileNotFoundError` | :exc:`FileNotFoundError` | |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_EOFError` | :exc:`EOFError` | |
-+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_FloatingPointError` | :exc:`FloatingPointError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_GeneratorExit` | :exc:`GeneratorExit` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ImportError` | :exc:`ImportError` | |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_ModuleNotFoundError` | :exc:`ModuleNotFoundError` | |
+| :c:data:`PyExc_IndentationError` | :exc:`IndentationError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_IndexError` | :exc:`IndexError` | |
+-----------------------------------------+---------------------------------+----------+
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_KeyboardInterrupt` | :exc:`KeyboardInterrupt` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_LookupError` | :exc:`LookupError` | \(1) |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_MemoryError` | :exc:`MemoryError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_ModuleNotFoundError` | :exc:`ModuleNotFoundError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_NameError` | :exc:`NameError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_NotADirectoryError` | :exc:`NotADirectoryError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_StopAsyncIteration` | :exc:`StopAsyncIteration` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_StopIteration` | :exc:`StopIteration` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_SyntaxError` | :exc:`SyntaxError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_SystemError` | :exc:`SystemError` | |
+-----------------------------------------+---------------------------------+----------+
-| :c:data:`PyExc_TimeoutError` | :exc:`TimeoutError` | |
-+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_SystemExit` | :exc:`SystemExit` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_TabError` | :exc:`TabError` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_TimeoutError` | :exc:`TimeoutError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_TypeError` | :exc:`TypeError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnboundLocalError` | :exc:`UnboundLocalError` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnicodeDecodeError` | :exc:`UnicodeDecodeError` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnicodeEncodeError` | :exc:`UnicodeEncodeError` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnicodeError` | :exc:`UnicodeError` | |
++-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnicodeTranslateError` | :exc:`UnicodeTranslateError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ValueError` | :exc:`ValueError` | |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ZeroDivisionError` | :exc:`ZeroDivisionError` | |
and :c:data:`PyExc_TimeoutError` were introduced following :pep:`3151`.
.. versionadded:: 3.5
- :c:data:`PyExc_RecursionError`.
+ :c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`.
+.. versionadded:: 3.6
+ :c:data:`PyExc_ModuleNotFoundError`.
These are compatibility aliases to :c:data:`PyExc_OSError`:
+.. index::
+ single: PyExc_EnvironmentError
+ single: PyExc_IOError
+ single: PyExc_WindowsError
+
+-------------------------------------+----------+
| C Name | Notes |
+=====================================+==========+
.. versionchanged:: 3.3
These aliases used to be separate exception types.
-
-.. index::
- single: PyExc_BaseException
- single: PyExc_Exception
- single: PyExc_ArithmeticError
- single: PyExc_LookupError
- single: PyExc_AssertionError
- single: PyExc_AttributeError
- single: PyExc_BlockingIOError
- single: PyExc_BrokenPipeError
- single: PyExc_ConnectionError
- single: PyExc_ConnectionAbortedError
- single: PyExc_ConnectionRefusedError
- single: PyExc_ConnectionResetError
- single: PyExc_EOFError
- single: PyExc_FileExistsError
- single: PyExc_FileNotFoundError
- single: PyExc_FloatingPointError
- single: PyExc_ImportError
- single: PyExc_IndexError
- single: PyExc_InterruptedError
- single: PyExc_IsADirectoryError
- single: PyExc_KeyError
- single: PyExc_KeyboardInterrupt
- single: PyExc_MemoryError
- single: PyExc_NameError
- single: PyExc_NotADirectoryError
- single: PyExc_NotImplementedError
- single: PyExc_OSError
- single: PyExc_OverflowError
- single: PyExc_PermissionError
- single: PyExc_ProcessLookupError
- single: PyExc_RecursionError
- single: PyExc_ReferenceError
- single: PyExc_RuntimeError
- single: PyExc_SyntaxError
- single: PyExc_SystemError
- single: PyExc_SystemExit
- single: PyExc_TimeoutError
- single: PyExc_TypeError
- single: PyExc_ValueError
- single: PyExc_ZeroDivisionError
- single: PyExc_EnvironmentError
- single: PyExc_IOError
- single: PyExc_WindowsError
-
Notes:
(1)
(3)
Only defined on Windows; protect code that uses this by testing that the
preprocessor macro ``MS_WINDOWS`` is defined.
+
+.. _standardwarningcategories:
+
+Standard Warning Categories
+===========================
+
+All standard Python warning categories are available as global variables whose
+names are ``PyExc_`` followed by the Python exception name. These have the type
+:c:type:`PyObject\*`; they are all class objects. For completeness, here are all
+the variables:
+
+.. index::
+ single: PyExc_Warning
+ single: PyExc_BytesWarning
+ single: PyExc_DeprecationWarning
+ single: PyExc_FutureWarning
+ single: PyExc_ImportWarning
+ single: PyExc_PendingDeprecationWarning
+ single: PyExc_ResourceWarning
+ single: PyExc_RuntimeWarning
+ single: PyExc_SyntaxWarning
+ single: PyExc_UnicodeWarning
+ single: PyExc_UserWarning
+
++------------------------------------------+---------------------------------+----------+
+| C Name | Python Name | Notes |
++==========================================+=================================+==========+
+| :c:data:`PyExc_Warning` | :exc:`Warning` | \(1) |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_BytesWarning` | :exc:`BytesWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_DeprecationWarning` | :exc:`DeprecationWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_FutureWarning` | :exc:`FutureWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_ImportWarning` | :exc:`ImportWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_PendingDeprecationWarning`| :exc:`PendingDeprecationWarning`| |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_ResourceWarning` | :exc:`ResourceWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_RuntimeWarning` | :exc:`RuntimeWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_SyntaxWarning` | :exc:`SyntaxWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UnicodeWarning` | :exc:`UnicodeWarning` | |
++------------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_UserWarning` | :exc:`UserWarning` | |
++------------------------------------------+---------------------------------+----------+
+
+.. versionadded:: 3.2
+ :c:data:`PyExc_ResourceWarning`.
+
+Notes:
+
+(1)
+ This is a base class for other standard warning categories.
Return a new :c:type:`PyLongObject` based on the string value in *str*, which
is interpreted according to the radix in *base*. If *pend* is non-*NULL*,
*\*pend* will point to the first character in *str* which follows the
- representation of the number. If *base* is ``0``, the radix will be
- determined based on the leading characters of *str*: if *str* starts with
- ``'0x'`` or ``'0X'``, radix 16 will be used; if *str* starts with ``'0o'`` or
- ``'0O'``, radix 8 will be used; if *str* starts with ``'0b'`` or ``'0B'``,
- radix 2 will be used; otherwise radix 10 will be used. If *base* is not
- ``0``, it must be between ``2`` and ``36``, inclusive. Leading spaces are
- ignored. If there are no digits, :exc:`ValueError` will be raised.
+ representation of the number. If *base* is ``0``, *str* is interpreted using
+ the :ref:`integers` definition; in this case, leading zeros in a
+ non-zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``,
+ it must be between ``2`` and ``36``, inclusive. Leading spaces and single
+ underscores after a base specifier and between digits are ignored. If there
+ are no digits, :exc:`ValueError` will be raised.
.. c:function:: PyObject* PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
- Return a string object containing the marshalled representation of *value*.
+ Return a bytes object containing the marshalled representation of *value*.
*version* indicates the file format.
:exc:`TypeError`) and returns *NULL*.
-.. c:function:: PyObject* PyMarshal_ReadObjectFromString(const char *string, Py_ssize_t len)
+.. c:function:: PyObject* PyMarshal_ReadObjectFromString(const char *data, Py_ssize_t len)
- Return a Python object from the data stream in a character buffer
- containing *len* bytes pointed to by *string*.
+ Return a Python object from the data stream in a byte buffer
+ containing *len* bytes pointed to by *data*.
On error, sets the appropriate exception (:exc:`EOFError` or
:exc:`TypeError`) and returns *NULL*.
:c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes.
*pymalloc* is the default allocator of the :c:data:`PYMEM_DOMAIN_MEM` (ex:
-:c:func:`PyObject_Malloc`) and :c:data:`PYMEM_DOMAIN_OBJ` (ex:
+:c:func:`PyMem_Malloc`) and :c:data:`PYMEM_DOMAIN_OBJ` (ex:
:c:func:`PyObject_Malloc`) domains.
The arena allocator uses the following functions:
.. c:function:: PyObject* PyModule_New(const char *name)
- Similar to :c:func:`PyImport_NewObject`, but the name is a UTF-8 encoded
+ Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded
string instead of a Unicode object.
.. versionchanged:: 3.2
The parameter type for the *slice* parameter was ``PySliceObject*``
before.
+
+
+Ellipsis Object
+---------------
+
+
+.. c:var:: PyObject *Py_Ellipsis
+
+ The Python ``Ellipsis`` object. This object has no methods. It needs to be
+ treated just like any other object with respect to reference counts. Like
+ :c:data:`Py_None` it is a singleton object.
+==================+=============+===============================+
| :attr:`name` | char \* | name of the member |
+------------------+-------------+-------------------------------+
- | :attr:`type` | int | the type of the member in the |
+ | :attr:`!type` | int | the type of the member in the |
| | | C struct |
+------------------+-------------+-------------------------------+
| :attr:`offset` | Py_ssize_t | the offset in bytes that the |
| | | docstring |
+------------------+-------------+-------------------------------+
- :attr:`type` can be one of many ``T_`` macros corresponding to various C
+ :attr:`!type` can be one of many ``T_`` macros corresponding to various C
types. When the member is accessed in Python, it will be converted to the
equivalent Python type.
This codec is special in that it can be used to implement many different codecs
(and this is in fact what was done to obtain most of the standard codecs
included in the :mod:`encodings` package). The codec uses mapping to encode and
-decode characters.
-
-Decoding mappings must map single string characters to single Unicode
-characters, integers (which are then interpreted as Unicode ordinals) or ``None``
-(meaning "undefined mapping" and causing an error).
-
-Encoding mappings must map single Unicode characters to single string
-characters, integers (which are then interpreted as Latin-1 ordinals) or ``None``
-(meaning "undefined mapping" and causing an error).
-
-The mapping objects provided must only support the __getitem__ mapping
-interface.
-
-If a character lookup fails with a LookupError, the character is copied as-is
-meaning that its ordinal value will be interpreted as Unicode or Latin-1 ordinal
-resp. Because of this, mappings only need to contain those mappings which map
-characters to different code points.
+decode characters. The mapping objects provided must support the
+:meth:`__getitem__` mapping interface; dictionaries and sequences work well.
These are the mapping codec APIs:
-.. c:function:: PyObject* PyUnicode_DecodeCharmap(const char *s, Py_ssize_t size, \
+.. c:function:: PyObject* PyUnicode_DecodeCharmap(const char *data, Py_ssize_t size, \
PyObject *mapping, const char *errors)
- Create a Unicode object by decoding *size* bytes of the encoded string *s* using
- the given *mapping* object. Return *NULL* if an exception was raised by the
- codec. If *mapping* is *NULL* latin-1 decoding will be done. Else it can be a
- dictionary mapping byte or a unicode string, which is treated as a lookup table.
- Byte values greater that the length of the string and U+FFFE "characters" are
- treated as "undefined mapping".
+ Create a Unicode object by decoding *size* bytes of the encoded string *s*
+ using the given *mapping* object. Return *NULL* if an exception was raised
+ by the codec.
+
+ If *mapping* is *NULL*, Latin-1 decoding will be applied. Else
+ *mapping* must map bytes ordinals (integers in the range from 0 to 255)
+ to Unicode strings, integers (which are then interpreted as Unicode
+ ordinals) or ``None``. Unmapped data bytes -- ones which cause a
+ :exc:`LookupError`, as well as ones which get mapped to ``None``,
+ ``0xFFFE`` or ``'\ufffe'``, are treated as undefined mappings and cause
+ an error.
.. c:function:: PyObject* PyUnicode_AsCharmapString(PyObject *unicode, PyObject *mapping)
- Encode a Unicode object using the given *mapping* object and return the result
- as Python string object. Error handling is "strict". Return *NULL* if an
+ Encode a Unicode object using the given *mapping* object and return the
+ result as a bytes object. Error handling is "strict". Return *NULL* if an
exception was raised by the codec.
-The following codec API is special in that maps Unicode to Unicode.
-
+ The *mapping* object must map Unicode ordinal integers to bytes objects,
+ integers in the range from 0 to 255 or ``None``. Unmapped character
+ ordinals (ones which cause a :exc:`LookupError`) as well as mapped to
+ ``None`` are treated as "undefined mapping" and cause an error.
-.. c:function:: PyObject* PyUnicode_TranslateCharmap(const Py_UNICODE *s, Py_ssize_t size, \
- PyObject *table, const char *errors)
-
- Translate a :c:type:`Py_UNICODE` buffer of the given *size* by applying a
- character mapping *table* to it and return the resulting Unicode object. Return
- *NULL* when an exception was raised by the codec.
- The *mapping* table must map Unicode ordinal integers to Unicode ordinal
- integers or ``None`` (causing deletion of the character).
+.. c:function:: PyObject* PyUnicode_EncodeCharmap(const Py_UNICODE *s, Py_ssize_t size, \
+ PyObject *mapping, const char *errors)
- Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries
- and sequences work well. Unmapped character ordinals (ones which cause a
- :exc:`LookupError`) are left untouched and are copied as-is.
+ Encode the :c:type:`Py_UNICODE` buffer of the given *size* using the given
+ *mapping* object and return the result as a bytes object. Return *NULL* if
+ an exception was raised by the codec.
.. deprecated-removed:: 3.3 4.0
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
- :c:func:`PyUnicode_Translate`. or :ref:`generic codec based API
- <codec-registry>`
+ :c:func:`PyUnicode_AsCharmapString` or
+ :c:func:`PyUnicode_AsEncodedString`.
-.. c:function:: PyObject* PyUnicode_EncodeCharmap(const Py_UNICODE *s, Py_ssize_t size, \
+The following codec API is special in that maps Unicode to Unicode.
+
+.. c:function:: PyObject* PyUnicode_Translate(PyObject *unicode, \
PyObject *mapping, const char *errors)
- Encode the :c:type:`Py_UNICODE` buffer of the given *size* using the given
- *mapping* object and return a Python string object. Return *NULL* if an
- exception was raised by the codec.
+ Translate a Unicode object using the given *mapping* object and return the
+ resulting Unicode object. Return *NULL* if an exception was raised by the
+ codec.
+
+ The *mapping* object must map Unicode ordinal integers to Unicode strings,
+ integers (which are then interpreted as Unicode ordinals) or ``None``
+ (causing deletion of the character). Unmapped character ordinals (ones
+ which cause a :exc:`LookupError`) are left untouched and are copied as-is.
+
+
+.. c:function:: PyObject* PyUnicode_TranslateCharmap(const Py_UNICODE *s, Py_ssize_t size, \
+ PyObject *mapping, const char *errors)
+
+ Translate a :c:type:`Py_UNICODE` buffer of the given *size* by applying a
+ character *mapping* table to it and return the resulting Unicode object.
+ Return *NULL* when an exception was raised by the codec.
.. deprecated-removed:: 3.3 4.0
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
- :c:func:`PyUnicode_AsCharmapString` or
- :c:func:`PyUnicode_AsEncodedString`.
+ :c:func:`PyUnicode_Translate`. or :ref:`generic codec based API
+ <codec-registry>`
MBCS codecs for Windows
>>> metadata.description
'Easily download, build, install, upgrade, and uninstall Python packages'
-Notice that the class can also be instanciated with a metadata file path to
+Notice that the class can also be instantiated with a metadata file path to
loads its values::
>>> pkg_info_path = 'distribute-0.6.8-py2.7.egg-info'
>>> "" + noddy.new_noddy()
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: cannot add type "noddy.Noddy" to string
Note that the name is a dotted name that includes both the module name and the
binary file
A :term:`file object` able to read and write
:term:`bytes-like objects <bytes-like object>`.
+ Examples of binary files are files opened in binary mode (``'rb'``,
+ ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer`,
+ :data:`sys.stdout.buffer`, and instances of :class:`io.BytesIO` and
+ :class:`gzip.GzipFile`.
.. seealso::
A :term:`text file` reads and writes :class:`str` objects.
bytecode
Python source code is compiled into bytecode, the internal representation
of a Python program in the CPython interpreter. The bytecode is also
- cached in ``.pyc`` and ``.pyo`` files so that executing the same file is
+ cached in ``.pyc`` files so that executing the same file is
faster the second time (recompilation from source to bytecode can be
avoided). This "intermediate language" is said to run on a
:term:`virtual machine` that executes the machine code corresponding to
A module written in C or C++, using Python's C API to interact with the
core and with user code.
+ f-string
+ String literals prefixed with ``'f'`` or ``'F'`` are commonly called
+ "f-strings" which is short for
+ :ref:`formatted string literals <f-strings>`. See also :pep:`498`.
+
file object
An object exposing a file-oriented API (with methods such as
:meth:`read()` or :meth:`write()`) to an underlying resource. Depending
Hashability makes an object usable as a dictionary key and a set member,
because these data structures use the hash value internally.
- All of Python's immutable built-in objects are hashable, while no mutable
- containers (such as lists or dictionaries) are. Objects which are
- instances of user-defined classes are hashable by default; they all
+ All of Python's immutable built-in objects are hashable; mutable
+ containers (such as lists or dictionaries) are not. Objects which are
+ instances of user-defined classes are hashable by default. They all
compare unequal (except with themselves), and their hash value is derived
from their :func:`id`.
A :term:`file object` able to read and write :class:`str` objects.
Often, a text file actually accesses a byte-oriented datastream
and handles the :term:`text encoding` automatically.
+ Examples of text files are files opened in text mode (``'r'`` or ``'w'``),
+ :data:`sys.stdin`, :data:`sys.stdout`, and instances of
+ :class:`io.StringIO`.
.. seealso::
A :term:`binary file` reads and write :class:`bytes` objects.
Introducing Optional arguments
==============================
-So far we, have been playing with positional arguments. Let us
+So far we have been playing with positional arguments. Let us
have a look on how to add optional ones::
import argparse
``two-pass``
A buffer like ``buffer``. However, a two-pass buffer can only
- be written once, and it prints out all text sent to it during
- all of processing, even from Clinic blocks *after* the
+ be dumped once, and it prints out all text sent to it during
+ all processing, even from Clinic blocks *after* the dumping point.
``suppress``
The text is suppressed—thrown away.
The default filename is ``"{dirname}/clinic/{basename}.h"``.
``buffer``
- Save up all most of the output from Clinic, to be written into
+ Save up most of the output from Clinic, to be written into
your file near the end. For Python files implementing modules
or builtin types, it's recommended that you dump the buffer
just above the static structures for your module or
. . .
def __get__(self, obj, objtype=None):
"Simulate func_descr_get() in Objects/funcobject.c"
- return types.MethodType(self, obj, objtype)
+ return types.MethodType(self, obj)
Running the interpreter shows how the function descriptor works in practice::
3
>>> next(it)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
StopIteration
>>>
2
>>> next(gen)
Traceback (most recent call last):
- File "stdin", line 1, in ?
+ File "stdin", line 1, in <module>
File "stdin", line 2, in generate_ints
StopIteration
9
>>> next(it) #doctest: +SKIP
Traceback (most recent call last):
- File "t.py", line 15, in ?
+ File "t.py", line 15, in <module>
it.next()
StopIteration
[0, 2, 4, 6, 8]
-:func:`enumerate(iter) <enumerate>` counts off the elements in the iterable,
-returning 2-tuples containing the count and each element. ::
+:func:`enumerate(iter, start=0) <enumerate>` counts off the elements in the
+iterable returning 2-tuples containing the count (from *start*) and
+each element. ::
>>> for item in enumerate(['subject', 'verb', 'object']):
... print(item)
Creating new iterators
----------------------
-:func:`itertools.count(n) <itertools.count>` returns an infinite stream of
-integers, increasing by 1 each time. You can optionally supply the starting
-number, which defaults to 0::
+:func:`itertools.count(start, step) <itertools.count>` returns an infinite
+stream of evenly spaced values. You can optionally supply the starting number,
+which defaults to 0, and the interval between numbers, which defaults to 1::
itertools.count() =>
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
itertools.count(10) =>
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...
+ itertools.count(10, 5) =>
+ 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, ...
:func:`itertools.cycle(iter) <itertools.cycle>` saves a copy of the contents of
a provided iterable and returns a new iterator that returns its elements from
for i in [1,2,3]:
product *= i
-A related function is `itertools.accumulate(iterable, func=operator.add) <itertools.accumulate`.
-It performs the same calculation, but instead of returning only the
-final result, :func:`accumulate` returns an iterator that also yields
-each partial result::
+A related function is :func:`itertools.accumulate(iterable, func=operator.add)
+<itertools.accumulate>`. It performs the same calculation, but instead of
+returning only the final result, :func:`accumulate` returns an iterator that
+also yields each partial result::
itertools.accumulate([1,2,3,4,5]) =>
1, 3, 6, 10, 15
Documentation for the :mod:`itertools` module.
+Documentation for the :mod:`functools` module.
+
Documentation for the :mod:`operator` module.
:pep:`289`: "Generator Expressions"
-------------------------------
Although most logging messages are intended for reading by humans, and thus not
-readily machine-parseable, there might be cirumstances where you want to output
+readily machine-parseable, there might be circumstances where you want to output
messages in a structured format which *is* capable of being parsed by a program
(without needing complex regular expressions to parse the log message). This is
straightforward to achieve using the logging package. There are a number of
machines assigned values between 128 and 255 to accented characters. Different
machines had different codes, however, which led to problems exchanging files.
Eventually various commonly used sets of values for the 128--255 range emerged.
-Some were true standards, defined by the International Standards Organization,
-and some were *de facto* conventions that were invented by one company or
-another and managed to catch on.
+Some were true standards, defined by the International Organization for
+Standardization, and some were *de facto* conventions that were invented by one
+company or another and managed to catch on.
255 characters aren't very many. For example, you can't fit both the accented
characters used in Western Europe and the Cyrillic alphabet used for Russian
on. These are provided by objects called handlers and openers.
urllib.request supports fetching URLs for many "URL schemes" (identified by the string
-before the ":" in URL - for example "ftp" is the URL scheme of
-"ftp://python.org/") using their associated network protocols (e.g. FTP, HTTP).
+before the ``":"`` in URL - for example ``"ftp"`` is the URL scheme of
+``"ftp://python.org/"``) using their associated network protocols (e.g. FTP, HTTP).
This tutorial focuses on the most common case, HTTP.
For straightforward situations *urlopen* is very easy to use. But as soon as you
``top_level_url`` is in fact *either* a full URL (including the 'http:' scheme
component and the hostname and optionally the port number)
-e.g. "http://example.com/" *or* an "authority" (i.e. the hostname,
-optionally including the port number) e.g. "example.com" or "example.com:8080"
+e.g. ``"http://example.com/"`` *or* an "authority" (i.e. the hostname,
+optionally including the port number) e.g. ``"example.com"`` or ``"example.com:8080"``
(the latter example includes a port number). The authority, if present, must
-NOT contain the "userinfo" component - for example "joe:password@example.com" is
+NOT contain the "userinfo" component - for example ``"joe:password@example.com"`` is
not correct.
because the :class:`memoryview` API is similar but not exactly the same as
that of :class:`buffer`.
-.. 2to3fixer:: callable
-
- Converts ``callable(x)`` to ``isinstance(x, collections.Callable)``, adding
- an import to :mod:`collections` if needed. Note ``callable(x)`` has returned
- in Python 3.2, so if you do not intend to support Python 3.1, you can disable
- this fixer.
-
.. 2to3fixer:: dict
Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to
.. method:: Protocol.eof_received()
- Calls when the other end signals it won't send any more data
+ Called when the other end signals it won't send any more data
(for example by calling :meth:`write_eof`, if the other end also uses
asyncio).
however, where :class:`~subprocess.Popen` takes a single argument which is
list of strings, :func:`subprocess_exec` takes multiple string arguments.
- The *protocol_factory* must instanciate a subclass of the
+ The *protocol_factory* must instantiate a subclass of the
:class:`asyncio.SubprocessProtocol` class.
Other parameters:
using the platform's "shell" syntax. This is similar to the standard library
:class:`subprocess.Popen` class called with ``shell=True``.
- The *protocol_factory* must instanciate a subclass of the
+ The *protocol_factory* must instantiate a subclass of the
:class:`asyncio.SubprocessProtocol` class.
See :meth:`~AbstractEventLoop.subprocess_exec` for more details about
.. deprecated:: 3.4.4
+.. function:: wrap_future(future, \*, loop=None)
+
+ Wrap a :class:`concurrent.futures.Future` object in a :class:`Future`
+ object.
+
.. function:: gather(\*coros_or_futures, loop=None, return_exceptions=False)
Return a future aggregating results from the given coroutine objects or
If you code or decode textfiles on non-Macintosh platforms they will still use
the old Macintosh newline convention (carriage-return as end of line).
-As of this writing, :func:`hexbin` appears to not work in all cases.
-
'Draw circle with given radius an options extent and steps: CIRCLE 50'
circle(*parse(arg))
def do_position(self, arg):
- 'Print the current turle position: POSITION'
+ 'Print the current turtle position: POSITION'
print('Current position is %d %d\n' % position())
def do_heading(self, arg):
- 'Print the current turle heading in degrees: HEADING'
+ 'Print the current turtle heading in degrees: HEADING'
print('Current heading is %d\n' % (heading(),))
def do_color(self, arg):
'Set the color: COLOR BLUE'
helpful docstring (with typename and field_names) and a helpful :meth:`__repr__`
method which lists the tuple contents in a ``name=value`` format.
- The *field_names* are a single string with each fieldname separated by whitespace
- and/or commas, for example ``'x y'`` or ``'x, y'``. Alternatively, *field_names*
- can be a sequence of strings such as ``['x', 'y']``.
+ The *field_names* are a sequence of strings such as ``['x', 'y']``.
+ Alternatively, *field_names* can be a single string with each fieldname
+ separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``.
Any valid Python identifier may be used for a fieldname except for names
starting with an underscore. Valid identifiers consist of letters, digits,
.. versionchanged:: 3.1
Returns an :class:`OrderedDict` instead of a regular :class:`dict`.
-.. method:: somenamedtuple._replace(kwargs)
+.. method:: somenamedtuple._replace(**kwargs)
Return a new instance of the named tuple replacing specified fields with new
values::
.. seealso::
Module :mod:`shlex`
- Support for a creating Unix shell-like mini-languages which can be used
- as an alternate format for application configuration files.
+ Support for creating Unix shell-like mini-languages which can be used as
+ an alternate format for application configuration files.
Module :mod:`json`
The json module implements a subset of JavaScript syntax which can also
.. note::
- ``NotImplentedError`` and ``NotImplemented`` are not interchangeable,
+ ``NotImplementedError`` and ``NotImplemented`` are not interchangeable,
even though they have similar names and purposes.
See :exc:`NotImplementedError` for details on when to use it.
* Recursive objects (compound objects that, directly or indirectly, contain a
reference to themselves) may cause a recursive loop.
-* Because deep copy copies *everything* it may copy too much, e.g.,
- even administrative data structures that should be shared even between copies.
+* Because deep copy copies everything it may copy too much, such as data
+ which is intended to be shared between copies.
The :func:`deepcopy` function avoids these problems by:
.. method:: csvreader.__next__()
- Return the next row of the reader's iterable object as a list, parsed according
- to the current dialect. Usually you should call this as ``next(reader)``.
+ Return the next row of the reader's iterable object as a list (if the object
+ was returned from :func:`reader`) or a dict (if it is a :class:`DictReader`
+ instance), parsed according to the current dialect. Usually you should call
+ this as ``next(reader)``.
Reader objects have the following public attributes:
<_FuncPtr object at 0x...>
>>> print(windll.kernel32.MyOwnFunction) # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
File "ctypes.py", line 239, in __getattr__
func = _StdcallFuncPtr(name, self)
AttributeError: function 'MyOwnFunction' not found
<_FuncPtr object at 0x...>
>>> cdll.kernel32[0] # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
File "ctypes.py", line 310, in __getitem__
func = _StdcallFuncPtr(name, self)
AttributeError: function ordinal 0 not found
0x1d000000
>>>
-:mod:`ctypes` tries to protect you from calling functions with the wrong number
-of arguments or the wrong calling convention. Unfortunately this only works on
-Windows. It does this by examining the stack after the function returns, so
-although an error is raised the function *has* been called::
+.. note::
- >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- ValueError: Procedure probably called with not enough arguments (4 bytes missing)
- >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- ValueError: Procedure probably called with too many arguments (4 bytes in excess)
- >>>
+ :mod:`ctypes` may raise a :exc:`ValueError` after calling the function, if
+ it detects that an invalid number of arguments were passed. This behavior
+ should not be relied upon. It is deprecated in 3.6.2, and will be removed
+ in 3.7.
-The same exception is raised when you call an ``stdcall`` function with the
+:exc:`ValueError` is raised when you call an ``stdcall`` function with the
``cdecl`` calling convention, or vice versa::
>>> cdll.kernel32.GetModuleHandleA(None) # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: Procedure probably called with not enough arguments (4 bytes missing)
>>>
>>> windll.msvcrt.printf(b"spam") # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: Procedure probably called with too many arguments (4 bytes in excess)
>>>
>>> windll.kernel32.GetModuleHandleA(32) # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
OSError: exception: access violation reading 0x00000020
>>>
>>> c_int()
c_long(0)
>>> c_wchar_p("Hello, World")
- c_wchar_p('Hello, World')
+ c_wchar_p(140018365411392)
>>> c_ushort(-3)
c_ushort(65533)
>>>
>>> s = "Hello, World"
>>> c_s = c_wchar_p(s)
>>> print(c_s)
- c_wchar_p('Hello, World')
+ c_wchar_p(139966785747344)
+ >>> print(c_s.value)
+ Hello World
>>> c_s.value = "Hi, there"
- >>> print(c_s)
- c_wchar_p('Hi, there')
- >>> print(s) # first object is unchanged
+ >>> print(c_s) # the memory location has changed
+ c_wchar_p(139966783348904)
+ >>> print(c_s.value)
+ Hi, there
+ >>> print(s) # first object is unchanged
Hello, World
>>>
19
>>> printf(b"%f bottles of beer\n", 42.5)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ArgumentError: argument 2: exceptions.TypeError: Don't know how to convert parameter 2
>>>
>>> printf(b"%d %d %d", 1, 2, 3)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ArgumentError: argument 2: exceptions.TypeError: wrong type
>>> printf(b"%s %d %f\n", b"X", 2, 3)
X 2 3.000000
'def'
>>> strchr(b"abcdef", b"def")
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ArgumentError: argument 2: exceptions.TypeError: one character string expected
>>> print(strchr(b"abcdef", b"x"))
None
486539264
>>> GetModuleHandle("something silly") # doctest: +WINDOWS
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in ValidHandle
OSError: [Errno 126] The specified module could not be found.
>>>
0 5
>>> POINT(1, 2, 3)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: too many initializers
>>>
<class 'ctypes.LP_c_long'>
>>> PI(42)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: expected c_long instead of int
>>> PI(c_int(42))
<ctypes.LP_c_long object at 0x...>
>>> bar.values = (c_byte * 4)()
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: incompatible types, c_byte_Array_4 instance instead of LP_c_long instance
>>>
... ("next", POINTER(cell))]
...
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in cell
NameError: name 'cell' is not defined
>>>
.. function:: initscr()
- Initialize the library. Return a :class:`WindowObject` which represents the
- whole screen.
+ Initialize the library. Return a :ref:`window <curses-window-objects>` object
+ which represents the whole screen.
.. note::
.. function:: newwin(nlines, ncols)
newwin(nlines, ncols, begin_y, begin_x)
- Return a new window, whose left-upper corner is at ``(begin_y, begin_x)``, and
- whose height/width is *nlines*/*ncols*.
+ Return a new :ref:`window <curses-window-objects>`, whose left-upper corner
+ is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*.
By default, the window will extend from the specified position to the lower
right corner of the screen.
A string representing the current version of the module. Also available as
:const:`__version__`.
-Several constants are available to specify character cell attributes:
+Some constants are available to specify character cell attributes.
+The exact constants available are system dependent.
+------------------+-------------------------------+
| Attribute | Meaning |
+==================+===============================+
-| ``A_ALTCHARSET`` | Alternate character set mode. |
+| ``A_ALTCHARSET`` | Alternate character set mode |
+------------------+-------------------------------+
-| ``A_BLINK`` | Blink mode. |
+| ``A_BLINK`` | Blink mode |
+------------------+-------------------------------+
-| ``A_BOLD`` | Bold mode. |
+| ``A_BOLD`` | Bold mode |
+------------------+-------------------------------+
-| ``A_DIM`` | Dim mode. |
+| ``A_DIM`` | Dim mode |
+------------------+-------------------------------+
-| ``A_NORMAL`` | Normal attribute. |
+| ``A_INVIS`` | Invisible or blank mode |
++------------------+-------------------------------+
+| ``A_NORMAL`` | Normal attribute |
++------------------+-------------------------------+
+| ``A_PROTECT`` | Protected mode |
+------------------+-------------------------------+
| ``A_REVERSE`` | Reverse background and |
-| | foreground colors. |
+| | foreground colors |
++------------------+-------------------------------+
+| ``A_STANDOUT`` | Standout mode |
++------------------+-------------------------------+
+| ``A_UNDERLINE`` | Underline mode |
++------------------+-------------------------------+
+| ``A_HORIZONTAL`` | Horizontal highlight |
++------------------+-------------------------------+
+| ``A_LEFT`` | Left highlight |
++------------------+-------------------------------+
+| ``A_LOW`` | Low highlight |
++------------------+-------------------------------+
+| ``A_RIGHT`` | Right highlight |
++------------------+-------------------------------+
+| ``A_TOP`` | Top highlight |
++------------------+-------------------------------+
+| ``A_VERTICAL`` | Vertical highlight |
++------------------+-------------------------------+
+| ``A_CHARTEXT`` | Bit-mask to extract a |
+| | character |
++------------------+-------------------------------+
+
+Several constants are available to extract corresponding attributes returned
+by some methods.
+
++------------------+-------------------------------+
+| Bit-mask | Meaning |
++==================+===============================+
+| ``A_ATTRIBUTES`` | Bit-mask to extract |
+| | attributes |
+------------------+-------------------------------+
-| ``A_STANDOUT`` | Standout mode. |
+| ``A_CHARTEXT`` | Bit-mask to extract a |
+| | character |
+------------------+-------------------------------+
-| ``A_UNDERLINE`` | Underline mode. |
+| ``A_COLOR`` | Bit-mask to extract |
+| | color-pair field information |
+------------------+-------------------------------+
Keys are referred to by integer constants with names starting with ``KEY_``.
+-------------------+--------------------------------------------+
| ``KEY_SEOL`` | Shifted Clear line |
+-------------------+--------------------------------------------+
-| ``KEY_SEXIT`` | Shifted Dxit |
+| ``KEY_SEXIT`` | Shifted Exit |
+-------------------+--------------------------------------------+
| ``KEY_SFIND`` | Shifted Find |
+-------------------+--------------------------------------------+
.. class:: Textbox(win)
Return a textbox widget object. The *win* argument should be a curses
- :class:`WindowObject` in which the textbox is to be contained. The edit cursor
- of the textbox is initially located at the upper left hand corner of the
- containing window, with coordinates ``(0, 0)``. The instance's
- :attr:`stripspaces` flag is initially on.
+ :ref:`window <curses-window-objects>` object in which the textbox is to
+ be contained. The edit cursor of the textbox is initially located at the
+ upper left hand corner of the containing window, with coordinates ``(0, 0)``.
+ The instance's :attr:`stripspaces` flag is initially on.
:class:`Textbox` objects have the following methods:
.. seealso::
- `datetuil.tz <https://dateutil.readthedocs.io/en/stable/tz.html>`_
+ `dateutil.tz <https://dateutil.readthedocs.io/en/stable/tz.html>`_
The standard library has :class:`timezone` class for handling arbitrary
fixed offsets from UTC and :attr:`timezone.utc` as UTC timezone instance.
- *datetuil.tz* library brings the *IANA timezone database* (also known as the
+ *dateutil.tz* library brings the *IANA timezone database* (also known as the
Olson database) to Python and its usage is recommended.
`IANA timezone database <https://www.iana.org/time-zones>`_
between versions of Python. Use of this module should not be considered to
work across Python VMs or Python releases.
+ .. versionchanged:: 3.6
+ Use 2 bytes for each instruction. Previously the number of bytes varied
+ by instruction.
+
Example: Given the function :func:`myfunc`::
This generator function uses the ``co_firstlineno`` and ``co_lnotab``
attributes of the code object *code* to find the offsets which are starts of
lines in the source code. They are generated as ``(offset, lineno)`` pairs.
+ See :source:`Objects/lnotab_notes.txt` for the ``co_lnotab`` format and
+ how to decode it.
+
+ .. versionchanged:: 3.6
+ Line numbers can be decreasing. Before, they were always increasing.
.. function:: findlabels(code)
.. versionadded:: 3.5
+.. opcode:: BUILD_TUPLE_UNPACK_WITH_CALL (count)
+
+ This is similar to :opcode:`BUILD_TUPLE_UNPACK`,
+ but is used for ``f(*x, *y, *z)`` call syntax. The stack item at position
+ ``count + 1`` should be the corresponding callable ``f``.
+
+ .. versionadded:: 3.6
+
+
.. opcode:: BUILD_LIST_UNPACK (count)
This is similar to :opcode:`BUILD_TUPLE_UNPACK`, but pushes a list
.. versionadded:: 3.5
-.. opcode:: BUILD_MAP_UNPACK_WITH_CALL (oparg)
+.. opcode:: BUILD_MAP_UNPACK_WITH_CALL (count)
This is similar to :opcode:`BUILD_MAP_UNPACK`,
- but is used for ``f(**x, **y, **z)`` call syntax. The lowest byte of
- *oparg* is the count of mappings, the relative position of the
- corresponding callable ``f`` is encoded in the second byte of *oparg*.
+ but is used for ``f(**x, **y, **z)`` call syntax. The stack item at
+ position ``count + 2`` should be the corresponding callable ``f``.
.. versionadded:: 3.5
+ .. versionchanged:: 3.6
+ The position of the callable is determined by adding 2 to the opcode
+ argument instead of encoding it in the second byte of the argument.
.. opcode:: LOAD_ATTR (namei)
.. opcode:: CALL_FUNCTION (argc)
- Calls a function. The low byte of *argc* indicates the number of positional
- parameters, the high byte the number of keyword parameters. On the stack, the
- opcode finds the keyword parameters first. For each keyword argument, the
- value is on top of the key. Below the keyword parameters, the positional
- parameters are on the stack, with the right-most parameter on top. Below the
- parameters, the function object to call is on the stack. Pops all function
- arguments, and the function itself off the stack, and pushes the return
- value.
+ Calls a function. *argc* indicates the number of positional arguments.
+ The positional arguments are on the stack, with the right-most argument
+ on top. Below the arguments, the function object to call is on the stack.
+ Pops all function arguments, and the function itself off the stack, and
+ pushes the return value.
+
+ .. versionchanged:: 3.6
+ This opcode is used only for calls with positional arguments.
+
+
+.. opcode:: CALL_FUNCTION_KW (argc)
+
+ Calls a function. *argc* indicates the number of arguments (positional
+ and keyword). The top element on the stack contains a tuple of keyword
+ argument names. Below the tuple, keyword arguments are on the stack, in
+ the order corresponding to the tuple. Below the keyword arguments, the
+ positional arguments are on the stack, with the right-most parameter on
+ top. Below the arguments, the function object to call is on the stack.
+ Pops all function arguments, and the function itself off the stack, and
+ pushes the return value.
+
+ .. versionchanged:: 3.6
+ Keyword arguments are packed in a tuple instead of a dictionary,
+ *argc* indicates the total number of arguments
+
+
+.. opcode:: CALL_FUNCTION_EX (flags)
+
+ Calls a function. The lowest bit of *flags* indicates whether the
+ var-keyword argument is placed at the top of the stack. Below the
+ var-keyword argument, the var-positional argument is on the stack.
+ Below the arguments, the function object to call is placed.
+ Pops all function arguments, and the function itself off the stack, and
+ pushes the return value. Note that this opcode pops at most three items
+ from the stack. Var-positional and var-keyword arguments are packed
+ by :opcode:`BUILD_MAP_UNPACK_WITH_CALL` and
+ :opcode:`BUILD_MAP_UNPACK_WITH_CALL`.
+
+ .. versionadded:: 3.6
.. opcode:: MAKE_FUNCTION (argc)
two most-significant bytes.
-.. opcode:: CALL_FUNCTION_VAR (argc)
-
- Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
- top element on the stack contains the variable argument list, followed by
- keyword and positional arguments.
-
-
-.. opcode:: CALL_FUNCTION_KW (argc)
-
- Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
- top element on the stack contains the keyword arguments dictionary, followed
- by explicit keyword and positional arguments.
-
-
-.. opcode:: CALL_FUNCTION_VAR_KW (argc)
-
- Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
- top element on the stack contains the keyword arguments dictionary, followed
- by the variable-arguments tuple, followed by explicit keyword and positional
- arguments.
-
-
.. opcode:: FORMAT_VALUE (flags)
Used for implementing formatted literal strings (f-strings). Pops
.. opcode:: HAVE_ARGUMENT
This is not really an opcode. It identifies the dividing line between
- opcodes which don't take arguments ``< HAVE_ARGUMENT`` and those which do
- ``>= HAVE_ARGUMENT``.
+ opcodes which don't use their argument and those that do
+ (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively).
+
+ .. versionchanged:: 3.6
+ Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT``
+ ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument.
+
.. _opcode_collections:
>>> [1, 2, 3].remove(42)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list
That doctest succeeds if :exc:`ValueError` is raised, with the ``list.remove(x):
>>> raise ValueError('multi\n line\ndetail')
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: multi
line
detail
>>> (1, 2)[3] = 'moo'
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: object doesn't support item assignment
passes under Python 2.3 and later Python versions with the flag specified,
Return the entire message flattened as a string. When optional *unixfrom*
is true, the envelope header is included in the returned string.
- *unixfrom* defaults to ``False``. For backward compabitility reasons,
+ *unixfrom* defaults to ``False``. For backward compatibility reasons,
*maxheaderlen* defaults to ``0``, so if you want a different value you
must override it explicitly (the value specified for *max_line_length* in
the policy will be ignored by this method). The *policy* argument may be
MIME charset name, use the standard charset instead.
If *cte* is set, encode the payload using the specified content transfer
- encoding, and set the :mailheader:`Content-Transfer-Endcoding` header to
+ encoding, and set the :mailheader:`Content-Transfer-Encoding` header to
that value. Possible values for *cte* are ``quoted-printable``,
``base64``, ``7bit``, ``8bit``, and ``binary``. If the input cannot be
encoded in the specified encoding (for example, specifying a *cte* of
.. rubric:: Footnotes
-.. [1] Oringally added in 3.4 as a :term:`provisional module <provisional
+.. [1] Originally added in 3.4 as a :term:`provisional module <provisional
package>`
return false even though its content type claims to be :mimetype:`multipart`.
* :class:`InvalidBase64PaddingDefect` -- When decoding a block of base64
- enocded bytes, the padding was not correct. Enough padding is added to
+ encoded bytes, the padding was not correct. Enough padding is added to
perform the decode, but the resulting decoded bytes may be invalid.
* :class:`InvalidBase64CharactersDefect` -- When decoding a block of base64
- enocded bytes, characters outside the base64 alphebet were encountered.
+ encoded bytes, characters outside the base64 alphabet were encountered.
The characters are ignored, but the resulting decoded bytes may be invalid.
If ``cte_type`` is ``7bit``, convert the bytes with the high bit set as
needed using an ASCII-compatible :mailheader:`Content-Transfer-Encoding`.
That is, transform parts with non-ASCII
- :mailheader:`Cotnent-Transfer-Encoding`
- (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatibile
+ :mailheader:`Content-Transfer-Encoding`
+ (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible
:mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII
bytes in headers using the MIME ``unknown-8bit`` character set, thus
rendering them RFC-compliant.
.. rubric:: Footnotes
-.. [1] Oringally added in 3.3 as a :term:`provisional module <provisional
+.. [1] Originally added in 3.3 as a :term:`provisional module <provisional
package>`
.. class:: EmailMessage(policy=default)
- If *policy* is specified use the rules it specifies to udpate and serialize
+ If *policy* is specified use the rules it specifies to update and serialize
the representation of the message. If *policy* is not set, use the
:class:`~email.policy.default` policy, which follows the rules of the email
RFCs except for line endings (instead of the RFC mandated ``\r\n``, it uses
Return the entire message flattened as a string. When optional
*unixfrom* is true, the envelope header is included in the returned
- string. *unixfrom* defaults to ``False``. For backward compabitility
+ string. *unixfrom* defaults to ``False``. For backward compatibility
with the base :class:`~email.message.Message` class *maxheaderlen* is
accepted, but defaults to ``None``, which means that by default the line
length is controlled by the
del msg['subject']
msg['subject'] = 'Python roolz!'
- If the :mod:`policy` defines certain haders to be unique (as the standard
+ If the :mod:`policy` defines certain headers to be unique (as the standard
policies do), this method may raise a :exc:`ValueError` when an attempt
is made to assign a value to such a header when one already exists. This
behavior is intentional for consistency's sake, but do not depend on it
the part a candidate match if the value of the header is ``inline``.
If none of the candidates matches any of the preferences in
- *preferneclist*, return ``None``.
+ *preferencelist*, return ``None``.
Notes: (1) For most applications the only *preferencelist* combinations
that really make sense are ``('plain',)``, ``('html', 'plain')``, and the
.. rubric:: Footnotes
-.. [1] Oringally added in 3.4 as a :term:`provisional module <provisional
+.. [1] Originally added in 3.4 as a :term:`provisional module <provisional
package>`. Docs for legacy message class moved to
:ref:`compat32_message`.
Unless the *_charset* argument is explicitly set to ``None``, the
MIMEText object created will have both a :mailheader:`Content-Type` header
- with a ``charset`` parameter, and a :mailheader:`Content-Transfer-Endcoding`
+ with a ``charset`` parameter, and a :mailheader:`Content-Transfer-Encoding`
header. This means that a subsequent ``set_payload`` call will not result
in an encoded payload, even if a charset is passed in the ``set_payload``
command. You can "reset" this behavior by deleting the
.. class:: BytesParser(_class=None, *, policy=policy.compat32)
Create a :class:`BytesParser` instance. The *_class* and *policy*
- arguments have the same meaning and sematnics as the *_factory*
+ arguments have the same meaning and semantics as the *_factory*
and *policy* arguments of :class:`BytesFeedParser`.
Note: **The policy keyword should always be specified**; The default will
Called when a header is added to an :class:`~email.message.EmailMessage`
or :class:`~email.message.Message` object. If the returned value is not
``0`` or ``None``, and there are already a number of headers with the
- name *name* greather than or equal to the value returned, a
+ name *name* greater than or equal to the value returned, a
:exc:`ValueError` is raised.
Because the default behavior of ``Message.__setitem__`` is to append the
The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``.
Useful for serializing messages to a message store without using encoded
- words in the headers. Should only be used for SMTP trasmission if the
+ words in the headers. Should only be used for SMTP transmission if the
sender or recipient addresses have non-ASCII characters (the
:meth:`smtplib.SMTP.send_message` method handles this automatically).
.. rubric:: Footnotes
-.. [1] Oringally added in 3.3 as a :term:`provisional feature <provisional
+.. [1] Originally added in 3.3 as a :term:`provisional feature <provisional
package>`.
.. note::
- It should not be used to indicate that an operater or method is not
+ It should not be used to indicate that an operator or method is not
meant to be supported at all -- in that case either leave the operator /
method undefined or, if a subclass, set it to :data:`None`.
.. function:: fnmatch(filename, pattern)
Test whether the *filename* string matches the *pattern* string, returning
- :const:`True` or :const:`False`. If the operating system is case-insensitive,
- then both parameters will be normalized to all lower- or upper-case before
- the comparison is performed. :func:`fnmatchcase` can be used to perform a
+ :const:`True` or :const:`False`. Both parameters are case-normalized
+ using :func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a
case-sensitive comparison, regardless of whether that's standard for the
operating system.
.. function:: fnmatchcase(filename, pattern)
Test whether *filename* matches *pattern*, returning :const:`True` or
- :const:`False`; the comparison is case-sensitive.
+ :const:`False`; the comparison is case-sensitive and does not apply
+ :func:`os.path.normcase`.
.. function:: filter(names, pattern)
>>> import math
>>> math.exp(1000)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
FloatingPointError: in math_1
Retrieve a file in binary transfer mode. *cmd* should be an appropriate
``RETR`` command: ``'RETR filename'``. The *callback* function is called for
- each block of data received, with a single string argument giving the data
+ each block of data received, with a single bytes argument giving the data
block. The optional *blocksize* argument specifies the maximum chunk size to
read on the low-level socket object created to do the actual transfer (which
will also be the largest size of the data blocks passed to *callback*). A
prints the line to ``sys.stdout``.
-.. method:: FTP.set_pasv(boolean)
+.. method:: FTP.set_pasv(val)
- Enable "passive" mode if *boolean* is true, other disable passive mode.
+ Enable "passive" mode if *val* is true, otherwise disable passive mode.
Passive mode is on by default.
:func:`ascii` :func:`enumerate` :func:`input` :func:`oct` :func:`staticmethod`
:func:`bin` :func:`eval` :func:`int` :func:`open` |func-str|_
:func:`bool` :func:`exec` :func:`isinstance` :func:`ord` :func:`sum`
-:func:`bytearray` :func:`filter` :func:`issubclass` :func:`pow` :func:`super`
-:func:`bytes` :func:`float` :func:`iter` :func:`print` |func-tuple|_
+|func-bytearray|_ :func:`filter` :func:`issubclass` :func:`pow` :func:`super`
+|func-bytes|_ :func:`float` :func:`iter` :func:`print` |func-tuple|_
:func:`callable` :func:`format` :func:`len` :func:`property` :func:`type`
:func:`chr` |func-frozenset|_ |func-list|_ |func-range|_ :func:`vars`
:func:`classmethod` :func:`getattr` :func:`locals` :func:`repr` :func:`zip`
.. |func-str| replace:: ``str()``
.. |func-tuple| replace:: ``tuple()``
.. |func-range| replace:: ``range()``
-
+.. |func-bytearray| replace:: ``bytearray()``
+.. |func-bytes| replace:: ``bytes()``
.. function:: abs(x)
.. _func-bytearray:
.. class:: bytearray([source[, encoding[, errors]]])
+ :noindex:
Return a new array of bytes. The :class:`bytearray` class is a mutable
sequence of integers in the range 0 <= x < 256. It has most of the usual
.. _func-bytes:
.. class:: bytes([source[, encoding[, errors]]])
+ :noindex:
Return a new "bytes" object, which is an immutable sequence of integers in
the range ``0 <= x < 256``. :class:`bytes` is an immutable version of
.. note::
- For object's with custom :meth:`__hash__` methods, note that :func:`hash`
+ For objects with custom :meth:`__hash__` methods, note that :func:`hash`
truncates the return value based on the bit width of the host machine.
See :meth:`__hash__` for details.
* The ``'x'`` mode was added.
* :exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`.
* :exc:`FileExistsError` is now raised if the file opened in exclusive
- * creation mode (``'x'``) already exists.
+ creation mode (``'x'``) already exists.
.. versionchanged::
3.4
.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False)
Print *objects* to the text stream *file*, separated by *sep* and followed
- by *end*. *sep*, *end* and *file*, if present, must be given as keyword
+ by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as keyword
arguments.
All non-keyword arguments are converted to strings like :func:`str` does and
.. function:: round(number[, ndigits])
- Return the floating point value *number* rounded to *ndigits* digits after
- the decimal point. If *ndigits* is omitted or is ``None``, it returns the
- nearest integer to its input. Delegates to ``number.__round__(ndigits)``.
+ Return *number* rounded to *ndigits* precision after the decimal
+ point. If *ndigits* is omitted or is ``None``, it returns the
+ nearest integer to its input.
For the built-in types supporting :func:`round`, values are rounded to the
closest multiple of 10 to the power minus *ndigits*; if two multiples are
equally close, rounding is done toward the even choice (so, for example,
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
- ``2``). The return value is an integer if called with one argument,
+ ``2``). Any integer value is valid for *ndigits* (positive, zero, or
+ negative). The return value is an integer if called with one argument,
otherwise of the same type as *number*.
+ For a general Python object ``number``, ``round(number, ndigits)`` delegates to
+ ``number.__round__(ndigits)``.
+
.. note::
The behavior of :func:`round` for floats can be surprising: for example,
Contains the output stream for writing a response back to the
client. Proper adherence to the HTTP protocol must be used when writing to
- this stream.
+ this stream in order to achieve successful interoperation with HTTP
+ clients.
.. versionchanged:: 3.6
This is an :class:`io.BufferedIOBase` stream.
single: stack viewer
Debugger (toggle)
- When actived, code entered in the Shell or run from an Editor will run
+ When activated, code entered in the Shell or run from an Editor will run
under the debugger. In the Editor, breakpoints can be set with the context
menu. This feature is still incomplete and somewhat experimental.
* :kbd:`C-l` center window around the insertion point
- * :kbd:`C-b` go backwards one character without deleting (usually you can
+ * :kbd:`C-b` go backward one character without deleting (usually you can
also use the cursor key for this)
* :kbd:`C-f` go forward one character without deleting (usually you can
Python Shell window by one tab). After certain keywords (break, return etc.)
the next line is dedented. In leading indentation, :kbd:`Backspace` deletes up
to 4 spaces if they are there. :kbd:`Tab` inserts spaces (in the Python
-Shell window one tab), number depends on Indent width. Currently tabs
+Shell window one tab), number depends on Indent width. Currently, tabs
are restricted to four spaces due to Tcl/Tk limitations.
See also the indent/dedent region commands in the edit menu.
:kbd:`C-space` will open a completions window. In an empty
string, this will contain the files in the current directory. On a
blank line, it will contain the built-in and user-defined functions and
-classes in the current name spaces, plus any modules imported. If some
+classes in the current namespaces, plus any modules imported. If some
characters have been entered, the ACW will attempt to be more specific.
If a string of characters is typed, the ACW selection will jump to the
``sys.argv`` reflects the arguments passed to IDLE itself.
+Startup failure
+^^^^^^^^^^^^^^^
+
+IDLE uses a socket to communicate between the IDLE GUI process and the user
+code execution process. A connection must be established whenever the Shell
+starts or restarts. (The latter is indicated by a divider line that says
+'RESTART'). If the user process fails to connect to the GUI process, it
+displays a ``Tk`` error box with a 'cannot connect' message that directs the
+user here. It then exits.
+
+A common cause of failure is a user-written file with the same name as a
+standard library module, such as *random.py* and *tkinter.py*. When such a
+file is located in the same directory as a file that is about to be run,
+IDLE cannot import the stdlib file. The current fix is to rename the
+user file.
+
+Though less common than in the past, an antivirus or firewall program may
+stop the connection. If the program cannot be taught to allow the
+connection, then it must be turned off for IDLE to work. It is safe to
+allow this internal connection because no data is visible on external
+ports. A similar problem is a network mis-configuration that blocks
+connections.
+
+Python installation issues occasionally stop IDLE: multiple versions can
+clash, or a single installation might need admin access. If one undo the
+clash, or cannot or does not want to run as admin, it might be easiest to
+completely remove Python and start over.
+
+A zombie pythonw.exe process could be a problem. On Windows, use Task
+Manager to detect and stop one. Sometimes a restart initiated by a program
+crash or Keyboard Interrupt (control-C) may fail to connect. Dismissing
+the error box or Restart Shell on the Shell menu may fix a temporary problem.
+
+When IDLE first starts, it attempts to read user configuration files in
+~/.idlerc/ (~ is one's home directory). If there is a problem, an error
+message should be displayed. Leaving aside random disk glitches, this can
+be prevented by never editing the files by hand, using the configuration
+dialog, under Options, instead Options. Once it happens, the solution may
+be to delete one or more of the configuration files.
+
+If IDLE quits with no message, and it was not started from a console, try
+starting from a console (``python -m idlelib)`` and see if a message appears.
+
+
IDLE-console differences
^^^^^^^^^^^^^^^^^^^^^^^^
As much as possible, the result of executing Python code with IDLE is the
same as executing the same code in a console window. However, the different
-interface and operation occasionally affects visible results. For instance,
+interface and operation occasionally affect visible results. For instance,
``sys.modules`` starts with more entries.
IDLE also replaces ``sys.stdin``, ``sys.stdout``, and ``sys.stderr`` with
If the attempt to make the socket connection fails, Idle will notify you.
Such failures are sometimes transient, but if persistent, the problem
-may be either a firewall blocking the connecton or misconfiguration of
+may be either a firewall blocking the connection or misconfiguration of
a particular system. Until the problem is fixed, one can run Idle with
the -n command line switch.
The font preferences, highlighting, keys, and general preferences can be
changed via Configure IDLE on the Option menu. Keys can be user defined;
-IDLE ships with four built in key sets. In addition a user can create a
+IDLE ships with four built-in key sets. In addition, a user can create a
custom key set in the Configure IDLE dialog under the keys tab.
Extensions
^^^^^^^^^^
-IDLE contains an extension facility. Peferences for extensions can be
+IDLE contains an extension facility. Preferences for extensions can be
changed with Configure Extensions. See the beginning of config-extensions.def
in the idlelib directory for further information. The default extensions
are currently:
They also help you determine when you can expect to find the following special
attributes:
-+-----------+-----------------+---------------------------+
-| Type | Attribute | Description |
-+===========+=================+===========================+
-| module | __doc__ | documentation string |
-+-----------+-----------------+---------------------------+
-| | __file__ | filename (missing for |
-| | | built-in modules) |
-+-----------+-----------------+---------------------------+
-| class | __doc__ | documentation string |
-+-----------+-----------------+---------------------------+
-| | __name__ | name with which this |
-| | | class was defined |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | __module__ | name of module in which |
-| | | this class was defined |
-+-----------+-----------------+---------------------------+
-| method | __doc__ | documentation string |
-+-----------+-----------------+---------------------------+
-| | __name__ | name with which this |
-| | | method was defined |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | __func__ | function object |
-| | | containing implementation |
-| | | of method |
-+-----------+-----------------+---------------------------+
-| | __self__ | instance to which this |
-| | | method is bound, or |
-| | | ``None`` |
-+-----------+-----------------+---------------------------+
-| function | __doc__ | documentation string |
-+-----------+-----------------+---------------------------+
-| | __name__ | name with which this |
-| | | function was defined |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | __code__ | code object containing |
-| | | compiled function |
-| | | :term:`bytecode` |
-+-----------+-----------------+---------------------------+
-| | __defaults__ | tuple of any default |
-| | | values for positional or |
-| | | keyword parameters |
-+-----------+-----------------+---------------------------+
-| | __kwdefaults__ | mapping of any default |
-| | | values for keyword-only |
-| | | parameters |
-+-----------+-----------------+---------------------------+
-| | __globals__ | global namespace in which |
-| | | this function was defined |
-+-----------+-----------------+---------------------------+
-| | __annotations__ | mapping of parameters |
-| | | names to annotations; |
-| | | ``"return"`` key is |
-| | | reserved for return |
-| | | annotations. |
-+-----------+-----------------+---------------------------+
-| traceback | tb_frame | frame object at this |
-| | | level |
-+-----------+-----------------+---------------------------+
-| | tb_lasti | index of last attempted |
-| | | instruction in bytecode |
-+-----------+-----------------+---------------------------+
-| | tb_lineno | current line number in |
-| | | Python source code |
-+-----------+-----------------+---------------------------+
-| | tb_next | next inner traceback |
-| | | object (called by this |
-| | | level) |
-+-----------+-----------------+---------------------------+
-| frame | f_back | next outer frame object |
-| | | (this frame's caller) |
-+-----------+-----------------+---------------------------+
-| | f_builtins | builtins namespace seen |
-| | | by this frame |
-+-----------+-----------------+---------------------------+
-| | f_code | code object being |
-| | | executed in this frame |
-+-----------+-----------------+---------------------------+
-| | f_globals | global namespace seen by |
-| | | this frame |
-+-----------+-----------------+---------------------------+
-| | f_lasti | index of last attempted |
-| | | instruction in bytecode |
-+-----------+-----------------+---------------------------+
-| | f_lineno | current line number in |
-| | | Python source code |
-+-----------+-----------------+---------------------------+
-| | f_locals | local namespace seen by |
-| | | this frame |
-+-----------+-----------------+---------------------------+
-| | f_restricted | 0 or 1 if frame is in |
-| | | restricted execution mode |
-+-----------+-----------------+---------------------------+
-| | f_trace | tracing function for this |
-| | | frame, or ``None`` |
-+-----------+-----------------+---------------------------+
-| code | co_argcount | number of arguments (not |
-| | | including \* or \*\* |
-| | | args) |
-+-----------+-----------------+---------------------------+
-| | co_code | string of raw compiled |
-| | | bytecode |
-+-----------+-----------------+---------------------------+
-| | co_consts | tuple of constants used |
-| | | in the bytecode |
-+-----------+-----------------+---------------------------+
-| | co_filename | name of file in which |
-| | | this code object was |
-| | | created |
-+-----------+-----------------+---------------------------+
-| | co_firstlineno | number of first line in |
-| | | Python source code |
-+-----------+-----------------+---------------------------+
-| | co_flags | bitmap of ``CO_*`` flags, |
-| | | read more :ref:`here |
-| | | <inspect-module-co-flags>`|
-+-----------+-----------------+---------------------------+
-| | co_lnotab | encoded mapping of line |
-| | | numbers to bytecode |
-| | | indices |
-+-----------+-----------------+---------------------------+
-| | co_name | name with which this code |
-| | | object was defined |
-+-----------+-----------------+---------------------------+
-| | co_names | tuple of names of local |
-| | | variables |
-+-----------+-----------------+---------------------------+
-| | co_nlocals | number of local variables |
-+-----------+-----------------+---------------------------+
-| | co_stacksize | virtual machine stack |
-| | | space required |
-+-----------+-----------------+---------------------------+
-| | co_varnames | tuple of names of |
-| | | arguments and local |
-| | | variables |
-+-----------+-----------------+---------------------------+
-| generator | __name__ | name |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | gi_frame | frame |
-+-----------+-----------------+---------------------------+
-| | gi_running | is the generator running? |
-+-----------+-----------------+---------------------------+
-| | gi_code | code |
-+-----------+-----------------+---------------------------+
-| | gi_yieldfrom | object being iterated by |
-| | | ``yield from``, or |
-| | | ``None`` |
-+-----------+-----------------+---------------------------+
-| coroutine | __name__ | name |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | cr_await | object being awaited on, |
-| | | or ``None`` |
-+-----------+-----------------+---------------------------+
-| | cr_frame | frame |
-+-----------+-----------------+---------------------------+
-| | cr_running | is the coroutine running? |
-+-----------+-----------------+---------------------------+
-| | cr_code | code |
-+-----------+-----------------+---------------------------+
-| builtin | __doc__ | documentation string |
-+-----------+-----------------+---------------------------+
-| | __name__ | original name of this |
-| | | function or method |
-+-----------+-----------------+---------------------------+
-| | __qualname__ | qualified name |
-+-----------+-----------------+---------------------------+
-| | __self__ | instance to which a |
-| | | method is bound, or |
-| | | ``None`` |
-+-----------+-----------------+---------------------------+
++-----------+-------------------+---------------------------+
+| Type | Attribute | Description |
++===========+===================+===========================+
+| module | __doc__ | documentation string |
++-----------+-------------------+---------------------------+
+| | __file__ | filename (missing for |
+| | | built-in modules) |
++-----------+-------------------+---------------------------+
+| class | __doc__ | documentation string |
++-----------+-------------------+---------------------------+
+| | __name__ | name with which this |
+| | | class was defined |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | __module__ | name of module in which |
+| | | this class was defined |
++-----------+-------------------+---------------------------+
+| method | __doc__ | documentation string |
++-----------+-------------------+---------------------------+
+| | __name__ | name with which this |
+| | | method was defined |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | __func__ | function object |
+| | | containing implementation |
+| | | of method |
++-----------+-------------------+---------------------------+
+| | __self__ | instance to which this |
+| | | method is bound, or |
+| | | ``None`` |
++-----------+-------------------+---------------------------+
+| function | __doc__ | documentation string |
++-----------+-------------------+---------------------------+
+| | __name__ | name with which this |
+| | | function was defined |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | __code__ | code object containing |
+| | | compiled function |
+| | | :term:`bytecode` |
++-----------+-------------------+---------------------------+
+| | __defaults__ | tuple of any default |
+| | | values for positional or |
+| | | keyword parameters |
++-----------+-------------------+---------------------------+
+| | __kwdefaults__ | mapping of any default |
+| | | values for keyword-only |
+| | | parameters |
++-----------+-------------------+---------------------------+
+| | __globals__ | global namespace in which |
+| | | this function was defined |
++-----------+-------------------+---------------------------+
+| | __annotations__ | mapping of parameters |
+| | | names to annotations; |
+| | | ``"return"`` key is |
+| | | reserved for return |
+| | | annotations. |
++-----------+-------------------+---------------------------+
+| traceback | tb_frame | frame object at this |
+| | | level |
++-----------+-------------------+---------------------------+
+| | tb_lasti | index of last attempted |
+| | | instruction in bytecode |
++-----------+-------------------+---------------------------+
+| | tb_lineno | current line number in |
+| | | Python source code |
++-----------+-------------------+---------------------------+
+| | tb_next | next inner traceback |
+| | | object (called by this |
+| | | level) |
++-----------+-------------------+---------------------------+
+| frame | f_back | next outer frame object |
+| | | (this frame's caller) |
++-----------+-------------------+---------------------------+
+| | f_builtins | builtins namespace seen |
+| | | by this frame |
++-----------+-------------------+---------------------------+
+| | f_code | code object being |
+| | | executed in this frame |
++-----------+-------------------+---------------------------+
+| | f_globals | global namespace seen by |
+| | | this frame |
++-----------+-------------------+---------------------------+
+| | f_lasti | index of last attempted |
+| | | instruction in bytecode |
++-----------+-------------------+---------------------------+
+| | f_lineno | current line number in |
+| | | Python source code |
++-----------+-------------------+---------------------------+
+| | f_locals | local namespace seen by |
+| | | this frame |
++-----------+-------------------+---------------------------+
+| | f_restricted | 0 or 1 if frame is in |
+| | | restricted execution mode |
++-----------+-------------------+---------------------------+
+| | f_trace | tracing function for this |
+| | | frame, or ``None`` |
++-----------+-------------------+---------------------------+
+| code | co_argcount | number of arguments (not |
+| | | including keyword only |
+| | | arguments, \* or \*\* |
+| | | args) |
++-----------+-------------------+---------------------------+
+| | co_code | string of raw compiled |
+| | | bytecode |
++-----------+-------------------+---------------------------+
+| | co_cellvars | tuple of names of cell |
+| | | variables (referenced by |
+| | | containing scopes) |
++-----------+-------------------+---------------------------+
+| | co_consts | tuple of constants used |
+| | | in the bytecode |
++-----------+-------------------+---------------------------+
+| | co_filename | name of file in which |
+| | | this code object was |
+| | | created |
++-----------+-------------------+---------------------------+
+| | co_firstlineno | number of first line in |
+| | | Python source code |
++-----------+-------------------+---------------------------+
+| | co_flags | bitmap of ``CO_*`` flags, |
+| | | read more :ref:`here |
+| | | <inspect-module-co-flags>`|
++-----------+-------------------+---------------------------+
+| | co_lnotab | encoded mapping of line |
+| | | numbers to bytecode |
+| | | indices |
++-----------+-------------------+---------------------------+
+| | co_freevars | tuple of names of free |
+| | | variables (referenced via |
+| | | a function's closure) |
++-----------+-------------------+---------------------------+
+| | co_kwonlyargcount | number of keyword only |
+| | | arguments (not including |
+| | | \*\* arg) |
++-----------+-------------------+---------------------------+
+| | co_name | name with which this code |
+| | | object was defined |
++-----------+-------------------+---------------------------+
+| | co_names | tuple of names of local |
+| | | variables |
++-----------+-------------------+---------------------------+
+| | co_nlocals | number of local variables |
++-----------+-------------------+---------------------------+
+| | co_stacksize | virtual machine stack |
+| | | space required |
++-----------+-------------------+---------------------------+
+| | co_varnames | tuple of names of |
+| | | arguments and local |
+| | | variables |
++-----------+-------------------+---------------------------+
+| generator | __name__ | name |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | gi_frame | frame |
++-----------+-------------------+---------------------------+
+| | gi_running | is the generator running? |
++-----------+-------------------+---------------------------+
+| | gi_code | code |
++-----------+-------------------+---------------------------+
+| | gi_yieldfrom | object being iterated by |
+| | | ``yield from``, or |
+| | | ``None`` |
++-----------+-------------------+---------------------------+
+| coroutine | __name__ | name |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | cr_await | object being awaited on, |
+| | | or ``None`` |
++-----------+-------------------+---------------------------+
+| | cr_frame | frame |
++-----------+-------------------+---------------------------+
+| | cr_running | is the coroutine running? |
++-----------+-------------------+---------------------------+
+| | cr_code | code |
++-----------+-------------------+---------------------------+
+| builtin | __doc__ | documentation string |
++-----------+-------------------+---------------------------+
+| | __name__ | original name of this |
+| | | function or method |
++-----------+-------------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-------------------+---------------------------+
+| | __self__ | instance to which a |
+| | | method is bound, or |
+| | | ``None`` |
++-----------+-------------------+---------------------------+
.. versionchanged:: 3.5
Return in a single string any lines of comments immediately preceding the
object's source code (for a class, function, or method), or at the top of the
- Python source file (if the object is a module).
+ Python source file (if the object is a module). If the object's source code
+ is unavailable, return ``None``. This could happen if the object has been
+ defined in C or the interactive shell.
.. function:: getfile(object)
Python code objects have a ``co_flags`` attribute, which is a bitmap of
the following flags:
+.. data:: CO_OPTIMIZED
+
+ The code object is optimized, using fast locals.
+
.. data:: CO_NEWLOCALS
If set, a new dict will be created for the frame's ``f_locals`` when
The code object has a variable keyword parameter (``**kwargs``-like).
+.. data:: CO_NESTED
+
+ The flag is set when the code object is a nested function.
+
.. data:: CO_GENERATOR
The flag is set when the code object is a generator function, i.e.
Exceptions
----------
-.. exception:: JSONDecodeError(msg, doc, pos, end=None)
+.. exception:: JSONDecodeError(msg, doc, pos)
Subclass of :exc:`ValueError` with the following additional attributes:
be written (see below).
There are functions that read/write files as well as functions operating on
-strings.
+bytes-like objects.
The module defines these functions:
.. function:: dump(value, file[, version])
Write the value on the open file. The value must be a supported type. The
- file must be an open file object such as ``sys.stdout`` or returned by
- :func:`open` or :func:`os.popen`. It must be opened in binary mode (``'wb'``
- or ``'w+b'``).
+ file must be a writeable :term:`binary file`.
If the value has (or contains an object that has) an unsupported type, a
:exc:`ValueError` exception is raised --- but garbage data will also be written
Read one value from the open file and return it. If no valid value is read
(e.g. because the data has a different Python version's incompatible marshal
format), raise :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. The
- file must be an open file object opened in binary mode (``'rb'`` or
- ``'r+b'``).
+ file must be a readable :term:`binary file`.
.. note::
.. function:: dumps(value[, version])
- Return the string that would be written to a file by ``dump(value, file)``. The
+ Return the bytes object that would be written to a file by ``dump(value, file)``. The
value must be a supported type. Raise a :exc:`ValueError` exception if value
has (or contains an object that has) an unsupported type.
(see below).
-.. function:: loads(string)
+.. function:: loads(bytes)
- Convert the string to a value. If no valid value is found, raise
- :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. Extra characters in the
- string are ignored.
+ Convert the :term:`bytes-like object` to a value. If no valid value is found, raise
+ :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. Extra bytes in the
+ input are ignored.
In addition, the following constants are defined:
loaded "on top" of the default database.
-.. attribute:: MimeTypes.suffix_map
+ .. attribute:: MimeTypes.suffix_map
- Dictionary mapping suffixes to suffixes. This is used to allow recognition of
- encoded files for which the encoding and the type are indicated by the same
- extension. For example, the :file:`.tgz` extension is mapped to :file:`.tar.gz`
- to allow the encoding and type to be recognized separately. This is initially a
- copy of the global :data:`suffix_map` defined in the module.
+ Dictionary mapping suffixes to suffixes. This is used to allow recognition of
+ encoded files for which the encoding and the type are indicated by the same
+ extension. For example, the :file:`.tgz` extension is mapped to :file:`.tar.gz`
+ to allow the encoding and type to be recognized separately. This is initially a
+ copy of the global :data:`suffix_map` defined in the module.
-.. attribute:: MimeTypes.encodings_map
+ .. attribute:: MimeTypes.encodings_map
- Dictionary mapping filename extensions to encoding types. This is initially a
- copy of the global :data:`encodings_map` defined in the module.
+ Dictionary mapping filename extensions to encoding types. This is initially a
+ copy of the global :data:`encodings_map` defined in the module.
-.. attribute:: MimeTypes.types_map
+ .. attribute:: MimeTypes.types_map
- Tuple containing two dictionaries, mapping filename extensions to MIME types:
- the first dictionary is for the non-standards types and the second one is for
- the standard types. They are initialized by :data:`common_types` and
- :data:`types_map`.
+ Tuple containing two dictionaries, mapping filename extensions to MIME types:
+ the first dictionary is for the non-standards types and the second one is for
+ the standard types. They are initialized by :data:`common_types` and
+ :data:`types_map`.
-.. attribute:: MimeTypes.types_map_inv
+ .. attribute:: MimeTypes.types_map_inv
- Tuple containing two dictionaries, mapping MIME types to a list of filename
- extensions: the first dictionary is for the non-standards types and the
- second one is for the standard types. They are initialized by
- :data:`common_types` and :data:`types_map`.
+ Tuple containing two dictionaries, mapping MIME types to a list of filename
+ extensions: the first dictionary is for the non-standards types and the
+ second one is for the standard types. They are initialized by
+ :data:`common_types` and :data:`types_map`.
-.. method:: MimeTypes.guess_extension(type, strict=True)
+ .. method:: MimeTypes.guess_extension(type, strict=True)
- Similar to the :func:`guess_extension` function, using the tables stored as part
- of the object.
+ Similar to the :func:`guess_extension` function, using the tables stored as part
+ of the object.
-.. method:: MimeTypes.guess_type(url, strict=True)
+ .. method:: MimeTypes.guess_type(url, strict=True)
- Similar to the :func:`guess_type` function, using the tables stored as part of
- the object.
+ Similar to the :func:`guess_type` function, using the tables stored as part of
+ the object.
-.. method:: MimeTypes.guess_all_extensions(type, strict=True)
+ .. method:: MimeTypes.guess_all_extensions(type, strict=True)
- Similar to the :func:`guess_all_extensions` function, using the tables stored
- as part of the object.
+ Similar to the :func:`guess_all_extensions` function, using the tables stored
+ as part of the object.
-.. method:: MimeTypes.read(filename, strict=True)
+ .. method:: MimeTypes.read(filename, strict=True)
- Load MIME information from a file named *filename*. This uses :meth:`readfp` to
- parse the file.
+ Load MIME information from a file named *filename*. This uses :meth:`readfp` to
+ parse the file.
- If *strict* is ``True``, information will be added to list of standard types,
- else to the list of non-standard types.
+ If *strict* is ``True``, information will be added to list of standard types,
+ else to the list of non-standard types.
-.. method:: MimeTypes.readfp(fp, strict=True)
+ .. method:: MimeTypes.readfp(fp, strict=True)
- Load MIME type information from an open file *fp*. The file must have the format of
- the standard :file:`mime.types` files.
+ Load MIME type information from an open file *fp*. The file must have the format of
+ the standard :file:`mime.types` files.
- If *strict* is ``True``, information will be added to the list of standard
- types, else to the list of non-standard types.
+ If *strict* is ``True``, information will be added to the list of standard
+ types, else to the list of non-standard types.
-.. method:: MimeTypes.read_windows_registry(strict=True)
+ .. method:: MimeTypes.read_windows_registry(strict=True)
- Load MIME type information from the Windows registry. Availability: Windows.
+ Load MIME type information from the Windows registry. Availability: Windows.
- If *strict* is ``True``, information will be added to the list of standard
- types, else to the list of non-standard types.
+ If *strict* is ``True``, information will be added to the list of standard
+ types, else to the list of non-standard types.
- .. versionadded:: 3.2
+ .. versionadded:: 3.2
.. seealso::
`PyGObject <https://wiki.gnome.org/Projects/PyGObject>`_
- provides introspection bindings for C libraries using
+ PyGObject provides introspection bindings for C libraries using
`GObject <https://developer.gnome.org/gobject/stable/>`_. One of
these libraries is the `GTK+ 3 <http://www.gtk.org/>`_ widget set.
GTK+ comes with many more widgets than Tkinter provides. An online
`Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_
is available.
- `PyGTK <http://www.pygtk.org/>`_ provides bindings for an older version
+ `PyGTK <http://www.pygtk.org/>`_
+ PyGTK provides bindings for an older version
of the library, GTK+ 2. It provides an object oriented interface that
is slightly higher level than the C one. There are also bindings to
`GNOME <https://www.gnome.org/>`_. An online `tutorial
extensive C++ GUI application development framework that is
available for Unix, Windows and Mac OS X. :program:`sip` is a tool
for generating bindings for C++ libraries as Python classes, and
- is specifically designed for Python. The *PyQt3* bindings have a
- book, `GUI Programming with Python: QT Edition
- <https://www.commandprompt.com/community/pyqt/>`_ by Boudewijn
- Rempt. The *PyQt4* bindings also have a book, `Rapid GUI Programming
- with Python and Qt <https://www.qtrac.eu/pyqtbook.html>`_, by Mark
- Summerfield.
+ is specifically designed for Python.
`PySide <https://wiki.qt.io/PySide>`_
- is a newer binding to the Qt toolkit, provided by Nokia.
+ PySide is a newer binding to the Qt toolkit, provided by Nokia.
Compared to PyQt, its licensing scheme is friendlier to non-open source
applications.
documentation and context sensitive help, printing, HTML viewing,
low-level device context drawing, drag and drop, system clipboard access,
an XML-based resource format and more, including an ever growing library
- of user-contributed modules. wxPython has a book, `wxPython in Action
- <https://www.manning.com/books/wxpython-in-action>`_, by Noel Rappin and
- Robin Dunn.
+ of user-contributed modules.
PyGTK, PyQt, and wxPython, all have a modern look and feel and more
widgets than Tkinter. In addition, there are many other GUI toolkits for
>>> import mymodule
>>> mymodule.test()
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
File "./mymodule.py", line 4, in test
test2()
File "./mymodule.py", line 3, in test2
far right column was used to sort the output. The column headings include:
ncalls
- for the number of calls,
+ for the number of calls.
tottime
- for the total time spent in the given function (and excluding time made in
- calls to sub-functions)
+ for the total time spent in the given function (and excluding time made in
+ calls to sub-functions)
percall
is the quotient of ``tottime`` divided by ``ncalls``
and gathers profiling statistics from the execution. If no file name is
present, then this function automatically creates a :class:`~pstats.Stats`
- instance and prints a simple profiling report. If the sort value is specified
+ instance and prints a simple profiling report. If the sort value is specified,
it is passed to this :class:`~pstats.Stats` instance to control how the
results are sorted.
-.. function:: runctx(command, globals, locals, filename=None)
+.. function:: runctx(command, globals, locals, filename=None, sort=-1)
This function is similar to :func:`run`, with added arguments to supply the
globals and locals dictionaries for the *command* string. This routine
.. rubric:: Footnotes
-.. [#] The encoding string included in XML output should conform to the
+.. [1] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
not. See https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
and https://www.iana.org/assignments/character-sets/character-sets.xhtml.
Unmatched groups are replaced with an empty string.
-.. function:: escape(string)
+.. function:: escape(pattern)
- Escape all the characters in pattern except ASCII letters, numbers and ``'_'``.
+ Escape all the characters in *pattern* except ASCII letters, numbers and ``'_'``.
This is useful if you want to match an arbitrary literal string that may
- have regular expression metacharacters in it.
+ have regular expression metacharacters in it. For example::
+
+ >>> print(re.escape('python.exe'))
+ python\.exe
+
+ >>> legal_chars = string.ascii_lowercase + string.digits + "!#$%&'*+-.^_`|~:"
+ >>> print('[%s]+' % re.escape(legal_chars))
+ [abcdefghijklmnopqrstuvwxyz0123456789\!\#\$\%\&\'\*\+\-\.\^_\`\|\~\:]+
+
+ >>> operators = ['+', '-', '*', '/', '**']
+ >>> print('|'.join(map(re.escape, sorted(operators, reverse=True))))
+ \/|\-|\+|\*\*|\*
.. versionchanged:: 3.3
The ``'_'`` character is no longer escaped.
.. attribute:: pos
- The index of *pattern* where compilation failed.
+ The index in *pattern* where compilation failed (may be ``None``).
.. attribute:: lineno
- The line corresponding to *pos*.
+ The line corresponding to *pos* (may be ``None``).
.. attribute:: colno
- The column corresponding to *pos*.
+ The column corresponding to *pos* (may be ``None``).
.. versionchanged:: 3.5
Added additional attributes.
| :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the |
| | associated fd has an event. The default (if |
| | this flag is not set) is to wake all epoll |
- | | objects polling on on a fd. |
+ | | objects polling on a fd. |
+-------------------------+-----------------------------------------------+
| :const:`EPOLLRDHUP` | Stream socket peer closed connection or shut |
| | down writing half of connection. |
.. class:: SelectorKey
A :class:`SelectorKey` is a :class:`~collections.namedtuple` used to
- associate a file object to its underlying file decriptor, selected event
+ associate a file object to its underlying file descriptor, selected event
mask and attached data. It is returned by several :class:`BaseSelector`
methods.
is true and *src* is a symbolic link, *dst* will be a copy of
the file *src* refers to.
- :func:`copy` copies the file data and the file's permission
+ :func:`~shutil.copy` copies the file data and the file's permission
mode (see :func:`os.chmod`). Other metadata, like the
file's creation and modification times, is not preserved.
To preserve all file metadata from the original, use
*src* and *dst*, and will be used to copy *src* to *dest* if
:func:`os.rename` cannot be used. If the source is a directory,
:func:`copytree` is called, passing it the :func:`copy_function`. The
- default *copy_function* is :func:`copy2`. Using :func:`copy` as the
+ default *copy_function* is :func:`copy2`. Using :func:`~shutil.copy` as the
*copy_function* allows the move to succeed when it is not possible to also
copy the metadata, at the expense of not copying any of the metadata.
a library to wakeup a poll or select call, allowing the signal to be fully
processed.
- The old wakeup fd is returned. *fd* must be non-blocking. It is up to the
- library to remove any bytes before calling poll or select again.
+ The old wakeup fd is returned (or -1 if file descriptor wakeup was not
+ enabled). If *fd* is -1, file descriptor wakeup is disabled.
+ If not -1, *fd* must be non-blocking. It is up to the library to remove
+ any bytes from *fd* before calling poll or select again.
Use for example ``struct.unpack('%uB' % len(data), data)`` to decode the
signal numbers list.
.. versionchanged:: 3.6
Added support for the ``REPLACE`` statement.
+ .. attribute:: arraysize
+
+ Read/write attribute that controls the number of rows returned by :meth:`fetchmany`.
+ The default value is 1 which means a single row would be fetched per call.
+
.. attribute:: description
This read-only attribute provides the column names of the last query. To
Verify that *cert* (in decoded format as returned by
:meth:`SSLSocket.getpeercert`) matches the given *hostname*. The rules
applied are those for checking the identity of HTTPS servers as outlined
- in :rfc:`2818` and :rfc:`6125`. In addition to HTTPS, this function
- should be suitable for checking the identity of servers in various
- SSL-based protocols such as FTPS, IMAPS, POPS and others.
+ in :rfc:`2818`, :rfc:`5280` and :rfc:`6125`. In addition to HTTPS, this
+ function should be suitable for checking the identity of servers in
+ various SSL-based protocols such as FTPS, IMAPS, POPS and others.
:exc:`CertificateError` is raised on failure. On success, the function
returns nothing::
.. data:: PROTOCOL_TLS
Selects the highest protocol version that both the client and server support.
- Despite the name, this option can select "TLS" protocols as well as "SSL".
+ Despite the name, this option can select both "SSL" and "TLS" protocols.
.. versionadded:: 3.6
.. data:: PROTOCOL_TLS_CLIENT
- Auto-negotiate the highest protocol version like :data:`PROTOCOL_SSLv23`,
+ Auto-negotiate the highest protocol version like :data:`PROTOCOL_TLS`,
but only support client-side :class:`SSLSocket` connections. The protocol
enables :data:`CERT_REQUIRED` and :attr:`~SSLContext.check_hostname` by
default.
.. data:: PROTOCOL_TLS_SERVER
- Auto-negotiate the highest protocol version like :data:`PROTOCOL_SSLv23`,
+ Auto-negotiate the highest protocol version like :data:`PROTOCOL_TLS`,
but only support server-side :class:`SSLSocket` connections.
.. versionadded:: 3.6
.. data:: HAS_SNI
Whether the OpenSSL library has built-in support for the *Server Name
- Indication* extension (as defined in :rfc:`4366`).
+ Indication* extension (as defined in :rfc:`6066`).
.. versionadded:: 3.2
When compared to :class:`SSLSocket`, this object lacks the following
features:
- - Any form of network IO incluging methods such as ``recv()`` and
- ``send()``.
+ - Any form of network IO; ``recv()`` and ``send()`` read and write only to
+ the underlying :class:`MemoryBIO` buffers.
- There is no *do_handshake_on_connect* machinery. You must always manually
call :meth:`~SSLSocket.do_handshake` to start the handshake.
`RFC 1422: Privacy Enhancement for Internet Electronic Mail: Part II: Certificate-Based Key Management <https://www.ietf.org/rfc/rfc1422>`_
Steve Kent
- `RFC 1750: Randomness Recommendations for Security <https://www.ietf.org/rfc/rfc1750>`_
- D. Eastlake et. al.
+ `RFC 4086: Randomness Requirements for Security <http://datatracker.ietf.org/doc/rfc4086/>`_
+ Donald E., Jeffrey I. Schiller
- `RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile <https://www.ietf.org/rfc/rfc3280>`_
- Housley et. al.
-
- `RFC 4366: Transport Layer Security (TLS) Extensions <https://www.ietf.org/rfc/rfc4366>`_
- Blake-Wilson et. al.
+ `RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile <http://datatracker.ietf.org/doc/rfc5280/>`_
+ D. Cooper
`RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <https://tools.ietf.org/html/rfc5246>`_
T. Dierks et. al.
pair: bitwise; operations
pair: shifting; operations
pair: masking; operations
+ operator: |
operator: ^
operator: &
operator: <<
operator: >>
+ operator: ~
Bitwise operations only make sense for integers. Negative numbers are treated
as their 2's complement value (this assumes that there are enough bits so that
The ``in`` and ``not in`` operations have the same priorities as the
comparison operations. The ``+`` (concatenation) and ``*`` (repetition)
-operations have the same priority as the corresponding numeric operations.
+operations have the same priority as the corresponding numeric operations. [3]_
.. index::
triple: operations on; sequence; types
.. method:: str.join(iterable)
- Return a string which is the concatenation of the strings in the
- :term:`iterable` *iterable*. A :exc:`TypeError` will be raised if there are
- any non-string values in *iterable*, including :class:`bytes` objects. The
- separator between elements is the string providing this method.
+ Return a string which is the concatenation of the strings in *iterable*.
+ A :exc:`TypeError` will be raised if there are any non-string values in
+ *iterable*, including :class:`bytes` objects. The separator between
+ elements is the string providing this method.
.. method:: str.ljust(width[, fillchar])
.. _typebytes:
-Bytes
------
+Bytes Objects
+-------------
.. index:: object: bytes
several methods that are only valid when working with ASCII compatible
data and are closely related to string objects in a variety of other ways.
-Firstly, the syntax for bytes literals is largely the same as that for string
-literals, except that a ``b`` prefix is added:
+.. class:: bytes([source[, encoding[, errors]]])
-* Single quotes: ``b'still allows embedded "double" quotes'``
-* Double quotes: ``b"still allows embedded 'single' quotes"``.
-* Triple quoted: ``b'''3 single quotes'''``, ``b"""3 double quotes"""``
+ Firstly, the syntax for bytes literals is largely the same as that for string
+ literals, except that a ``b`` prefix is added:
-Only ASCII characters are permitted in bytes literals (regardless of the
-declared source code encoding). Any binary values over 127 must be entered
-into bytes literals using the appropriate escape sequence.
+ * Single quotes: ``b'still allows embedded "double" quotes'``
+ * Double quotes: ``b"still allows embedded 'single' quotes"``.
+ * Triple quoted: ``b'''3 single quotes'''``, ``b"""3 double quotes"""``
-As with string literals, bytes literals may also use a ``r`` prefix to disable
-processing of escape sequences. See :ref:`strings` for more about the various
-forms of bytes literal, including supported escape sequences.
+ Only ASCII characters are permitted in bytes literals (regardless of the
+ declared source code encoding). Any binary values over 127 must be entered
+ into bytes literals using the appropriate escape sequence.
-While bytes literals and representations are based on ASCII text, bytes
-objects actually behave like immutable sequences of integers, with each
-value in the sequence restricted such that ``0 <= x < 256`` (attempts to
-violate this restriction will trigger :exc:`ValueError`. This is done
-deliberately to emphasise that while many binary formats include ASCII based
-elements and can be usefully manipulated with some text-oriented algorithms,
-this is not generally the case for arbitrary binary data (blindly applying
-text processing algorithms to binary data formats that are not ASCII
-compatible will usually lead to data corruption).
+ As with string literals, bytes literals may also use a ``r`` prefix to disable
+ processing of escape sequences. See :ref:`strings` for more about the various
+ forms of bytes literal, including supported escape sequences.
-In addition to the literal forms, bytes objects can be created in a number of
-other ways:
+ While bytes literals and representations are based on ASCII text, bytes
+ objects actually behave like immutable sequences of integers, with each
+ value in the sequence restricted such that ``0 <= x < 256`` (attempts to
+ violate this restriction will trigger :exc:`ValueError`. This is done
+ deliberately to emphasise that while many binary formats include ASCII based
+ elements and can be usefully manipulated with some text-oriented algorithms,
+ this is not generally the case for arbitrary binary data (blindly applying
+ text processing algorithms to binary data formats that are not ASCII
+ compatible will usually lead to data corruption).
-* A zero-filled bytes object of a specified length: ``bytes(10)``
-* From an iterable of integers: ``bytes(range(20))``
-* Copying existing binary data via the buffer protocol: ``bytes(obj)``
+ In addition to the literal forms, bytes objects can be created in a number of
+ other ways:
-Also see the :ref:`bytes <func-bytes>` built-in.
+ * A zero-filled bytes object of a specified length: ``bytes(10)``
+ * From an iterable of integers: ``bytes(range(20))``
+ * Copying existing binary data via the buffer protocol: ``bytes(obj)``
-Since 2 hexadecimal digits correspond precisely to a single byte, hexadecimal
-numbers are a commonly used format for describing binary data. Accordingly,
-the bytes type has an additional class method to read data in that format:
+ Also see the :ref:`bytes <func-bytes>` built-in.
-.. classmethod:: bytes.fromhex(string)
+ Since 2 hexadecimal digits correspond precisely to a single byte, hexadecimal
+ numbers are a commonly used format for describing binary data. Accordingly,
+ the bytes type has an additional class method to read data in that format:
- This :class:`bytes` class method returns a bytes object, decoding the
- given string object. The string must contain two hexadecimal digits per
- byte, with ASCII spaces being ignored.
+ .. classmethod:: fromhex(string)
- >>> bytes.fromhex('2Ef0 F1f2 ')
- b'.\xf0\xf1\xf2'
+ This :class:`bytes` class method returns a bytes object, decoding the
+ given string object. The string must contain two hexadecimal digits per
+ byte, with ASCII whitespace being ignored.
-A reverse conversion function exists to transform a bytes object into its
-hexadecimal representation.
+ >>> bytes.fromhex('2Ef0 F1f2 ')
+ b'.\xf0\xf1\xf2'
-.. method:: bytes.hex()
+ A reverse conversion function exists to transform a bytes object into its
+ hexadecimal representation.
- Return a string object containing two hexadecimal digits for each
- byte in the instance.
+ .. method:: hex()
- >>> b'\xf0\xf1\xf2'.hex()
- 'f0f1f2'
+ Return a string object containing two hexadecimal digits for each
+ byte in the instance.
- .. versionadded:: 3.5
+ >>> b'\xf0\xf1\xf2'.hex()
+ 'f0f1f2'
+
+ .. versionadded:: 3.5
Since bytes objects are sequences of integers (akin to a tuple), for a bytes
object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes
.. index:: object: bytearray
:class:`bytearray` objects are a mutable counterpart to :class:`bytes`
-objects. There is no dedicated literal syntax for bytearray objects, instead
-they are always created by calling the constructor:
+objects.
-* Creating an empty instance: ``bytearray()``
-* Creating a zero-filled instance with a given length: ``bytearray(10)``
-* From an iterable of integers: ``bytearray(range(20))``
-* Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``
+.. class:: bytearray([source[, encoding[, errors]]])
-As bytearray objects are mutable, they support the
-:ref:`mutable <typesseq-mutable>` sequence operations in addition to the
-common bytes and bytearray operations described in :ref:`bytes-methods`.
+ There is no dedicated literal syntax for bytearray objects, instead
+ they are always created by calling the constructor:
-Also see the :ref:`bytearray <func-bytearray>` built-in.
+ * Creating an empty instance: ``bytearray()``
+ * Creating a zero-filled instance with a given length: ``bytearray(10)``
+ * From an iterable of integers: ``bytearray(range(20))``
+ * Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``
-Since 2 hexadecimal digits correspond precisely to a single byte, hexadecimal
-numbers are a commonly used format for describing binary data. Accordingly,
-the bytearray type has an additional class method to read data in that format:
+ As bytearray objects are mutable, they support the
+ :ref:`mutable <typesseq-mutable>` sequence operations in addition to the
+ common bytes and bytearray operations described in :ref:`bytes-methods`.
-.. classmethod:: bytearray.fromhex(string)
+ Also see the :ref:`bytearray <func-bytearray>` built-in.
- This :class:`bytearray` class method returns bytearray object, decoding
- the given string object. The string must contain two hexadecimal digits
- per byte, with ASCII spaces being ignored.
+ Since 2 hexadecimal digits correspond precisely to a single byte, hexadecimal
+ numbers are a commonly used format for describing binary data. Accordingly,
+ the bytearray type has an additional class method to read data in that format:
- >>> bytearray.fromhex('2Ef0 F1f2 ')
- bytearray(b'.\xf0\xf1\xf2')
+ .. classmethod:: fromhex(string)
-A reverse conversion function exists to transform a bytearray object into its
-hexadecimal representation.
+ This :class:`bytearray` class method returns bytearray object, decoding
+ the given string object. The string must contain two hexadecimal digits
+ per byte, with ASCII whitespace being ignored.
-.. method:: bytearray.hex()
+ >>> bytearray.fromhex('2Ef0 F1f2 ')
+ bytearray(b'.\xf0\xf1\xf2')
- Return a string object containing two hexadecimal digits for each
- byte in the instance.
+ A reverse conversion function exists to transform a bytearray object into its
+ hexadecimal representation.
- >>> bytearray(b'\xf0\xf1\xf2').hex()
- 'f0f1f2'
+ .. method:: hex()
+
+ Return a string object containing two hexadecimal digits for each
+ byte in the instance.
- .. versionadded:: 3.5
+ >>> bytearray(b'\xf0\xf1\xf2').hex()
+ 'f0f1f2'
+
+ .. versionadded:: 3.5
Since bytearray objects are sequences of integers (akin to a list), for a
bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be
bytearray.join(iterable)
Return a bytes or bytearray object which is the concatenation of the
- binary data sequences in the :term:`iterable` *iterable*. A
- :exc:`TypeError` will be raised if there are any values in *iterable*
- that are not :term:`bytes-like objects <bytes-like object>`, including
- :class:`str` objects. The separator between elements is the contents
- of the bytes or bytearray object providing this method.
+ binary data sequences in *iterable*. A :exc:`TypeError` will be raised
+ if there are any values in *iterable* that are not :term:`bytes-like
+ objects <bytes-like object>`, including :class:`str` objects. The
+ separator between elements is the contents of the bytes or
+ bytearray object providing this method.
.. staticmethod:: bytes.maketrans(from, to)
Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and
:meth:`discard` methods may be a set. To support searching for an equivalent
- frozenset, the *elem* set is temporarily mutated during the search and then
- restored. During the search, the *elem* set should not be read or mutated
- since it does not have a meaningful value.
+ frozenset, a temporary one is created from *elem*.
.. _typesmapping:
.. method:: AU_read.getnchannels()
- Returns number of audio channels (1 for mone, 2 for stereo).
+ Returns number of audio channels (1 for mono, 2 for stereo).
.. method:: AU_read.getsampwidth()
AIX_GENUINE_CPLUSPLUS = "0"
AR = "ar"
ARFLAGS = "rc"
- ASDLGEN = "./Parser/asdl_c.py"
...
This call will print in the standard output the information returned by
.. exception:: NannyNag
- Raised by :func:`tokeneater` if detecting an ambiguous indent. Captured and
+ Raised by :func:`process_tokens` if detecting an ambiguous indent. Captured and
handled in :func:`check`.
-.. function:: tokeneater(type, token, start, end, line)
+.. function:: process_tokens(tokens)
- This function is used by :func:`check` as a callback parameter to the function
- :func:`tokenize.tokenize`.
+ This function is used by :func:`check` to process tokens generated by the
+ :mod:`tokenize` module.
.. XXX document errprint, format_witnesses, Whitespace, check_equal, indents,
reset_globals
.. versionchanged:: 3.5
The ``'x'`` (exclusive creation) mode was added.
+ .. versionchanged:: 3.6
+ The *name* parameter accepts a :term:`path-like object`.
+
+
.. class:: TarFile
Class for reading and writing tar archives. Do not use this class directly:
All following arguments are optional and can be accessed as instance attributes
as well.
- *name* is the pathname of the archive. It can be omitted if *fileobj* is given.
+ *name* is the pathname of the archive. *name* may be a :term:`path-like object`.
+ It can be omitted if *fileobj* is given.
In this case, the file object's :attr:`name` attribute is used if it exists.
*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append
.. versionchanged:: 3.5
The ``'x'`` (exclusive creation) mode was added.
+ .. versionchanged:: 3.6
+ The *name* parameter accepts a :term:`path-like object`.
+
+
.. classmethod:: TarFile.open(...)
Alternative constructor. The :func:`tarfile.open` function is actually a
.. versionchanged:: 3.5
Added the *numeric_owner* parameter.
+ .. versionchanged:: 3.6
+ The *path* parameter accepts a :term:`path-like object`.
+
.. method:: TarFile.extract(member, path="", set_attrs=True, *, numeric_owner=False)
Extract a member from the archive to the current working directory, using its
full name. Its file information is extracted as accurately as possible. *member*
may be a filename or a :class:`TarInfo` object. You can specify a different
- directory using *path*. File attributes (owner, mtime, mode) are set unless
- *set_attrs* is false.
+ directory using *path*. *path* may be a :term:`path-like object`.
+ File attributes (owner, mtime, mode) are set unless *set_attrs* is false.
If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile
are used to set the owner/group for the extracted files. Otherwise, the named
.. versionchanged:: 3.5
Added the *numeric_owner* parameter.
+ .. versionchanged:: 3.6
+ The *path* parameter accepts a :term:`path-like object`.
+
+
.. method:: TarFile.extractfile(member)
Extract a member from the archive as a file object. *member* may be a filename
Create a :class:`TarInfo` object from the result of :func:`os.stat` or
equivalent on an existing file. The file is either named by *name*, or
- specified as a :term:`file object` *fileobj* with a file descriptor. If
+ specified as a :term:`file object` *fileobj* with a file descriptor.
+ *name* may be a :term:`path-like object`. If
given, *arcname* specifies an alternative name for the file in the
archive, otherwise, the name is taken from *fileobj*’s
:attr:`~io.FileIO.name` attribute, or the *name* argument. The name
The :attr:`~TarInfo.name` may also be modified, in which case *arcname*
could be a dummy string.
+ .. versionchanged:: 3.6
+ The *name* parameter accepts a :term:`path-like object`.
+
.. method:: TarFile.close()
used for temporary files returned by :func:`gettempdir`. It can be
set directly to override the selection process, but this is discouraged.
All functions in this module take a *dir* argument which can be used
-to specify the directory and this is the recommend approach.
+to specify the directory and this is the recommended approach.
.. data:: tempdir
When set to a value other than ``None``, this variable defines the
- default value for the *dir* argument to all the functions defined in this
+ default value for the *dir* argument to the functions defined in this
module.
If ``tempdir`` is unset or ``None`` at any call to any of the above
def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)
-.. function:: detect_api_mismatch(ref_api, other_api, *, ignore=()):
+
+.. function:: detect_api_mismatch(ref_api, other_api, *, ignore=())
Returns the set of attributes, functions or methods of *ref_api* not
found on *other_api*, except for a defined list of items to be
lock, subsequent attempts to acquire it block, until it is released; any
thread may release it.
- .. versionchanged:: 3.3
- Changed from a factory function to a class.
+ Note that ``Lock`` is actually a factory function which returns an instance
+ of the most efficient version of the concrete Lock class that is supported
+ by the platform.
.. method:: acquire(blocking=True, timeout=-1)
* if *tb* is not ``None``, it prints a header ``Traceback (most recent
call last):``
* it prints the exception *etype* and *value* after the stack trace
- * if *etype* is :exc:`SyntaxError` and *value* has the appropriate format, it
- prints the line where the syntax error occurred with a caret indicating the
- approximate position of the error.
+ * if *type(value)* is :exc:`SyntaxError` and *value* has the appropriate
+ format, it prints the line where the syntax error occurred with a caret
+ indicating the approximate position of the error.
The optional *limit* argument has the same meaning as for :func:`print_tb`.
If *chain* is true (the default), then chained exceptions (the
printed as well, like the interpreter itself does when printing an unhandled
exception.
+ .. versionchanged:: 3.5
+ The *etype* argument is ignored and inferred from the type of *value*.
+
.. function:: print_exc(limit=None, file=None, chain=True)
containing internal newlines. When these lines are concatenated and printed,
exactly the same text is printed as does :func:`print_exception`.
+ .. versionchanged:: 3.5
+ The *etype* argument is ignored and inferred from the type of *value*.
+
.. function:: format_exc(limit=None, chain=True)
print("*** print_tb:")
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
print("*** print_exception:")
+ # exc_type below is ignored on 3.5 and later
traceback.print_exception(exc_type, exc_value, exc_traceback,
limit=2, file=sys.stdout)
print("*** print_exc:")
print(formatted_lines[0])
print(formatted_lines[-1])
print("*** format_exception:")
+ # exc_type below is ignored on 3.5 and later
print(repr(traceback.format_exception(exc_type, exc_value,
exc_traceback)))
print("*** extract_tb:")
:param prompt: string
Pop up a dialog window for input of a string. Parameter title is
- the title of the dialog window, propmt is a text mostly describing
+ the title of the dialog window, prompt is a text mostly describing
what information to input.
Return the string input. If the dialog is canceled, return ``None``. ::
An ABC with one abstract method ``__float__``.
+.. class:: SupportsComplex
+
+ An ABC with one abstract method ``__complex__``.
+
+.. class:: SupportsBytes
+
+ An ABC with one abstract method ``__bytes__``.
+
.. class:: SupportsAbs
An ABC with one abstract method ``__abs__`` that is covariant
.. class:: DefaultDict(collections.defaultdict, MutableMapping[KT, VT])
- A generic version of :class:`collections.defaultdict`
+ A generic version of :class:`collections.defaultdict`.
+
+.. class:: Counter(collections.Counter, Dict[T, int])
+
+ A generic version of :class:`collections.Counter`.
+
+ .. versionadded:: 3.6.1
+
+.. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT])
+
+ A generic version of :class:`collections.ChainMap`.
+
+ .. versionadded:: 3.6.1
.. class:: Generator(Iterator[T_co], Generic[T_co, T_contra, V_co])
This defines the generic type ``IO[AnyStr]`` and aliases ``TextIO``
and ``BinaryIO`` for respectively ``IO[str]`` and ``IO[bytes]``.
- These representing the types of I/O streams such as returned by
+ These represent the types of I/O streams such as returned by
:func:`open`.
+ These types are also accessible directly as ``typing.IO``,
+ ``typing.TextIO``, and ``typing.BinaryIO``.
+
.. class:: re
Wrapper namespace for regular expression matching types.
``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
``Match[bytes]``.
+ These types are also accessible directly as ``typing.Pattern``
+ and ``typing.Match``.
+
.. class:: NamedTuple
Typed version of namedtuple.
Fields with a default value must come after any fields without a default.
The resulting class has two extra attributes: ``_field_types``,
- giving a dict mapping field names to types, and ``field_defaults``, a dict
+ giving a dict mapping field names to types, and ``_field_defaults``, a dict
mapping field names to default values. (The field names are in the
``_fields`` attribute, which is part of the namedtuple API.)
+ ``NamedTuple`` subclasses can also have docstrings and methods::
+
+ class Employee(NamedTuple):
+ """Represents an employee."""
+ name: str
+ id: int = 3
+
+ def __repr__(self) -> str:
+ return f'<Employee {self.name}, id={self.id}>'
+
Backward-compatible usage::
Employee = NamedTuple('Employee', [('name', str), ('id', int)])
Added support for :pep:`526` variable annotation syntax.
.. versionchanged:: 3.6.1
- Added support for default values.
+ Added support for default values, methods, and docstrings.
.. function:: NewType(typ)
:data:`ClassVar` is not a class itself, and should not
be used with :func:`isinstance` or :func:`issubclass`.
- Note that :data:`ClassVar` does not change Python runtime behavior;
- it can be used by 3rd party type checkers, so that the following
- code might flagged as an error by those::
+ :data:`ClassVar` does not change Python runtime behavior, but
+ it can be used by third-party type checkers. For example, a type checker
+ might flag the following code as an error::
enterprise_d = Starship(3000)
enterprise_d.stats = {} # Error, setting class variable on instance
if TYPE_CHECKING:
import expensive_mod
- def fun():
- local_var: expensive_mod.some_type = other_fun()
+ def fun(arg: 'expensive_mod.SomeType') -> None:
+ local_var: expensive_mod.AnotherType = other_fun()
+
+ Note that the first type annotation must be enclosed in quotes, making it a
+ "forward reference", to hide the ``expensive_mod`` reference from the
+ interpreter runtime. Type annotations for local variables are not
+ evaluated, so the second annotation does not need to be enclosed in quotes.
9
>>> unicodedata.decimal('a')
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
ValueError: not a decimal
>>> unicodedata.category('A') # 'L'etter, 'u'ppercase
'Lu'
:meth:`.assertRegex`.
.. versionadded:: 3.2
:meth:`.assertNotRegex`.
+ .. versionadded:: 3.5
+ The name ``assertNotRegexpMatches`` is a deprecated alias
+ for :meth:`.assertNotRegex`.
.. method:: assertCountEqual(first, second, msg=None)
aliases that are now deprecated. The following table lists the correct names
along with their deprecated aliases:
- ============================== ====================== ======================
+ ============================== ====================== =======================
Method Name Deprecated alias Deprecated alias
- ============================== ====================== ======================
+ ============================== ====================== =======================
:meth:`.assertEqual` failUnlessEqual assertEquals
:meth:`.assertNotEqual` failIfEqual assertNotEquals
:meth:`.assertTrue` failUnless assert\_
:meth:`.assertAlmostEqual` failUnlessAlmostEqual assertAlmostEquals
:meth:`.assertNotAlmostEqual` failIfAlmostEqual assertNotAlmostEquals
:meth:`.assertRegex` assertRegexpMatches
+ :meth:`.assertNotRegex` assertNotRegexpMatches
:meth:`.assertRaisesRegex` assertRaisesRegexp
- ============================== ====================== ======================
+ ============================== ====================== =======================
.. deprecated:: 3.1
the fail* aliases listed in the second column.
the assert* aliases listed in the third column.
.. deprecated:: 3.2
``assertRegexpMatches`` and ``assertRaisesRegexp`` have been renamed to
- :meth:`.assertRegex` and :meth:`.assertRaisesRegex`
-
+ :meth:`.assertRegex` and :meth:`.assertRaisesRegex`.
+ .. deprecated:: 3.5
+ the ``assertNotRegexpMatches`` name in favor of :meth:`.assertNotRegex`.
.. _testsuite-objects:
an invalid port is specified in the URL. See section
:ref:`urlparse-result-object` for more information on the result object.
+ Unmatched square brackets in the :attr:`netloc` attribute will raise a
+ :exc:`ValueError`.
+
.. versionchanged:: 3.2
Added IPv6 URL parsing capabilities.
an invalid port is specified in the URL. See section
:ref:`urlparse-result-object` for more information on the result object.
+ Unmatched square brackets in the :attr:`netloc` attribute will raise a
+ :exc:`ValueError`.
+
.. versionchanged:: 3.6
Out-of-range port numbers now raise :exc:`ValueError`, instead of
returning :const:`None`.
.. rubric:: Footnotes
-.. [#] The encoding name included in the XML output should conform to
+.. [1] The encoding name included in the XML output should conform to
the appropriate standards. For example, "UTF-8" is valid, but
"UTF8" is not valid in an XML document's declaration, even though
Python accepts it as an encoding name.
:class:`xml.dom.minidom.Element` if event equals :data:`START_ELEMENT` or
:data:`END_ELEMENT` or :class:`xml.dom.minidom.Text` if event equals
:data:`CHARACTERS`.
- The current node does not contain informations about its children, unless
+ The current node does not contain information about its children, unless
:func:`expandNode` is called.
.. method:: expandNode(node)
.. rubric:: Footnotes
-.. [#] The encoding string included in XML output should conform to the
+.. [1] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
not. See https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
and https://www.iana.org/assignments/character-sets/character-sets.xhtml.
.. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True)
- Open a ZIP file, where *file* can be either a path to a file (a string) or a
- file-like object. The *mode* parameter should be ``'r'`` to read an existing
+ Open a ZIP file, where *file* can be a path to a file (a string), a
+ file-like object or a :term:`path-like object`.
+ The *mode* parameter should be ``'r'`` to read an existing
file, ``'w'`` to truncate and write a new file, ``'a'`` to append to an
existing file, or ``'x'`` to exclusively create and write a new file.
If *mode* is ``'x'`` and *file* refers to an existing file,
Previously, a plain :exc:`RuntimeError` was raised for unrecognized
compression values.
+ .. versionchanged:: 3.6.2
+ The *file* parameter accepts a :term:`path-like object`.
+
.. method:: ZipFile.close()
Calling :meth:`extract` on a closed ZipFile will raise a
:exc:`ValueError`. Previously, a :exc:`RuntimeError` was raised.
+ .. versionchanged:: 3.6.2
+ The *path* parameter accepts a :term:`path-like object`.
+
.. method:: ZipFile.extractall(path=None, members=None, pwd=None)
Calling :meth:`extractall` on a closed ZipFile will raise a
:exc:`ValueError`. Previously, a :exc:`RuntimeError` was raised.
+ .. versionchanged:: 3.6.2
+ The *path* parameter accepts a :term:`path-like object`.
+
.. method:: ZipFile.printdir()
The following data attributes are also available:
+.. attribute:: ZipFile.filename
+
+ Name of the ZIP file.
.. attribute:: ZipFile.debug
added to the archive, compiling if necessary.
If *pathname* is a file, the filename must end with :file:`.py`, and
- just the (corresponding :file:`\*.py[co]`) file is added at the top level
+ just the (corresponding :file:`\*.pyc`) file is added at the top level
(no path information). If *pathname* is a file that does not end with
:file:`.py`, a :exc:`RuntimeError` will be raised. If it is a directory,
and the directory is not a package directory, then all the files
- :file:`\*.py[co]` are added at the top level. If the directory is a
- package directory, then all :file:`\*.py[co]` are added under the package
+ :file:`\*.pyc` are added at the top level. If the directory is a
+ package directory, then all :file:`\*.pyc` are added under the package
name as a file path, and if any subdirectories are package directories,
all of these are added recursively.
.. versionadded:: 3.4
The *filterfunc* parameter.
+ .. versionchanged:: 3.6.2
+ The *pathname* parameter accepts a :term:`path-like object`.
+
.. _zipinfo-objects:
.. versionadded:: 3.6
+ .. versionchanged:: 3.6.2
+ The *filename* parameter accepts a :term:`path-like object`.
+
+
Instances have the following methods and attributes:
.. method:: ZipInfo.is_dir()
--------------
This module adds the ability to import Python modules (:file:`\*.py`,
-:file:`\*.py[co]`) and packages from ZIP-format archives. It is usually not
+:file:`\*.pyc`) and packages from ZIP-format archives. It is usually not
needed to use the :mod:`zipimport` module explicitly; it is automatically used
by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are paths
to ZIP archives.
A bytes object is an immutable array. The items are 8-bit bytes,
represented by integers in the range 0 <= x < 256. Bytes literals
- (like ``b'abc'``) and the built-in function :func:`bytes` can be used to
- construct bytes objects. Also, bytes objects can be decoded to strings
- via the :meth:`~bytes.decode` method.
+ (like ``b'abc'``) and the built-in :func:`bytes()` constructor
+ can be used to create bytes objects. Also, bytes objects can be
+ decoded to strings via the :meth:`~bytes.decode` method.
Mutable sequences
.. index::
.. index:: bytearray
A bytearray object is a mutable array. They are created by the built-in
- :func:`bytearray` constructor. Aside from being mutable (and hence
- unhashable), byte arrays otherwise provide the same interface and
- functionality as immutable bytes objects.
+ :func:`bytearray` constructor. Aside from being mutable
+ (and hence unhashable), byte arrays otherwise provide the same interface
+ and functionality as immutable :class:`bytes` objects.
.. index:: module: array
(usually an instance of *cls*).
Typical implementations create a new instance of the class by invoking the
- superclass's :meth:`__new__` method using ``super(currentclass,
- cls).__new__(cls[, ...])`` with appropriate arguments and then modifying the
- newly-created instance as necessary before returning it.
+ superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])``
+ with appropriate arguments and then modifying the newly-created instance
+ as necessary before returning it.
If :meth:`__new__` returns an instance of *cls*, then the new instance's
:meth:`__init__` method will be invoked like ``__init__(self[, ...])``, where
class constructor expression. If a base class has an :meth:`__init__`
method, the derived class's :meth:`__init__` method, if any, must explicitly
call it to ensure proper initialization of the base class part of the
- instance; for example: ``BaseClass.__init__(self, [args...])``.
+ instance; for example: ``super().__init__([args...])``.
Because :meth:`__new__` and :meth:`__init__` work together in constructing
objects (:meth:`__new__` to create it, and :meth:`__init__` to customize it),
.. index:: builtin: bytes
- Called by :func:`bytes` to compute a byte-string representation of an
- object. This should return a ``bytes`` object.
+ Called by :ref:`bytes <func-bytes>` to compute a byte-string representation
+ of an object. This should return a :class:`bytes` object.
.. index::
single: string; __format__() (object method)
``A.__dict__['x'].__get__(None, A)``.
Super Binding
- If ``a`` is an instance of :class:`super`, then the binding ``super(B,
- obj).m()`` searches ``obj.__class__.__mro__`` for the base class ``A``
+ If ``a`` is an instance of :class:`super`, then the binding ``super(B, obj).m()``
+ searches ``obj.__class__.__mro__`` for the base class ``A``
immediately preceding ``B`` and then invokes the descriptor with the call:
``A.__dict__['m'].__get__(obj, obj.__class__)``.
:meth:`__bool__` method and whose :meth:`__len__` method returns zero is
considered to be false in a Boolean context.
+ .. impl-detail::
+
+ In CPython, the length is required to be at most :attr:`sys.maxsize`.
+ If the length is larger than :attr:`!sys.maxsize` some features (such as
+ :func:`len`) may raise :exc:`OverflowError`. To prevent raising
+ :exc:`!OverflowError` by truth value testing, an object must define a
+ :meth:`__bool__` method.
+
.. method:: object.__length_hint__(self)
.. versionadded:: 3.4
+
.. note::
Slicing is done exclusively with the following three methods. A call like ::
.. index:: pair: restricted; execution
-The builtins namespace associated with the execution of a code block is actually
-found by looking up the name ``__builtins__`` in its global namespace; this
-should be a dictionary or a module (in the latter case the module's dictionary
-is used). By default, when in the :mod:`__main__` module, ``__builtins__`` is
-the built-in module :mod:`builtins`; when in any other module,
-``__builtins__`` is an alias for the dictionary of the :mod:`builtins` module
-itself. ``__builtins__`` can be set to a user-created dictionary to create a
-weak form of restricted execution.
-
.. impl-detail::
Users should not touch ``__builtins__``; it is strictly an implementation
:keyword:`import` the :mod:`builtins` module and modify its
attributes appropriately.
+The builtins namespace associated with the execution of a code block
+is actually found by looking up the name ``__builtins__`` in its
+global namespace; this should be a dictionary or a module (in the
+latter case the module's dictionary is used). By default, when in the
+:mod:`__main__` module, ``__builtins__`` is the built-in module
+:mod:`builtins`; when in any other module, ``__builtins__`` is an
+alias for the dictionary of the :mod:`builtins` module itself.
+
+
.. _dynamic-features:
Interaction with dynamic features
i = 42
f()
-There are several cases where Python statements are illegal when used in
-conjunction with nested scopes that contain free variables.
-
-If a variable is referenced in an enclosing scope, it is illegal to delete the
-name. An error will be reported at compile time.
-
.. XXX from * also invalid with relative imports (at least currently)
The :func:`eval` and :func:`exec` functions do not have access to the full
without yielding another value, an :exc:`StopAsyncIteration` exception is
raised by the awaitable.
If the generator function does not catch the passed-in exception, or
- raises a different exception, then when the awaitalbe is run that exception
+ raises a different exception, then when the awaitable is run that exception
propagates to the caller of the awaitable.
.. index:: exception: GeneratorExit
2 1
>>> f(a=1, *(2,))
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: f() got multiple values for keyword argument 'a'
>>> f(1, *(2,))
1 2
true).
* Mappings (instances of :class:`dict`) compare equal if and only if they have
- equal `(key, value)` pairs. Equality comparison of the keys and elements
+ equal `(key, value)` pairs. Equality comparison of the keys and values
enforces reflexivity.
Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`.
--------------------------
The operators :keyword:`in` and :keyword:`not in` test for membership. ``x in
-s`` evaluates to true if *x* is a member of *s*, and false otherwise. ``x not
-in s`` returns the negation of ``x in s``. All built-in sequences and set types
-support this as well as dictionary, for which :keyword:`in` tests whether the
-dictionary has a given key. For container types such as list, tuple, set,
-frozenset, dict, or collections.deque, the expression ``x in y`` is equivalent
+s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` otherwise.
+``x not in s`` returns the negation of ``x in s``. All built-in sequences and
+set types support this as well as dictionary, for which :keyword:`in` tests
+whether the dictionary has a given key. For container types such as list, tuple,
+set, frozenset, dict, or collections.deque, the expression ``x in y`` is equivalent
to ``any(x is e or x == e for e in y)``.
-For the string and bytes types, ``x in y`` is true if and only if *x* is a
+For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is a
substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty strings are
always considered to be a substring of any other string, so ``"" in "abc"`` will
return ``True``.
For user-defined classes which define the :meth:`__contains__` method, ``x in
-y`` is true if and only if ``y.__contains__(x)`` is true.
+y`` returns ``True`` if ``y.__contains__(x)`` returns a true value, and
+``False`` otherwise.
For user-defined classes which do not define :meth:`__contains__` but do define
-:meth:`__iter__`, ``x in y`` is true if some value ``z`` with ``x == z`` is
+:meth:`__iter__`, ``x in y`` is ``True`` if some value ``z`` with ``x == z`` is
produced while iterating over ``y``. If an exception is raised during the
iteration, it is as if :keyword:`in` raised that exception.
Lastly, the old-style iteration protocol is tried: if a class defines
-:meth:`__getitem__`, ``x in y`` is true if and only if there is a non-negative
+:meth:`__getitem__`, ``x in y`` is ``True`` if and only if there is a non-negative
integer index *i* such that ``x == y[i]``, and all lower integer indices do not
raise :exc:`IndexError` exception. (If any other exception is raised, it is as
if :keyword:`in` raised that exception).
When a module is first imported, Python searches for the module and if found,
it creates a module object [#fnmo]_, initializing it. If the named module
-cannot be found, an :exc:`ModuleNotFoundError` is raised. Python implements various
+cannot be found, a :exc:`ModuleNotFoundError` is raised. Python implements various
strategies to search for the named module when the import machinery is
invoked. These strategies can be modified and extended by using various hooks
described in the sections below.
This name will be used in various phases of the import search, and it may be
the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python
first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar.baz``.
-If any of the intermediate imports fail, an :exc:`ModuleNotFoundError` is raised.
+If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` is raised.
The module cache
During import, the module name is looked up in :data:`sys.modules` and if
present, the associated value is the module satisfying the import, and the
-process completes. However, if the value is ``None``, then an
+process completes. However, if the value is ``None``, then a
:exc:`ModuleNotFoundError` is raised. If the module name is missing, Python will
continue searching for the module.
but it will invalidate the cache entry for the named module, causing
Python to search anew for the named module upon its next
import. The key can also be assigned to ``None``, forcing the next import
-of the module to result in an :exc:`ModuleNotFoundError`.
+of the module to result in a :exc:`ModuleNotFoundError`.
Beware though, as if you keep a reference to the module object,
invalidate its cache entry in :data:`sys.modules`, and then re-import the
top-level modules, the second argument is ``None``, but for submodules or
subpackages, the second argument is the value of the parent package's
``__path__`` attribute. If the appropriate ``__path__`` attribute cannot
-be accessed, an :exc:`ModuleNotFoundError` is raised. The third argument
+be accessed, a :exc:`ModuleNotFoundError` is raised. The third argument
is an existing module object that will be the target of loading later.
The import system passes in a target module only during reload.
module.__path__
---------------
-By definition, if a module has an ``__path__`` attribute, it is a package,
+By definition, if a module has a ``__path__`` attribute, it is a package,
regardless of its value.
A package's ``__path__`` attribute is used during imports of its subpackages.
To selectively prevent import of some modules from a hook early on the
meta path (rather than disabling the standard import system entirely),
-it is sufficient to raise :exc:`ModuleNoFoundError` directly from
+it is sufficient to raise :exc:`ModuleNotFoundError` directly from
:meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning
``None``. The latter indicates that the meta path search should continue,
while raising an exception terminates it immediately.
>>> f"newline: {newline}"
'newline: 10'
+Formatted string literals cannot be used as docstrings, even if they do not
+include expressions.
+
+::
+
+ >>> def foo():
+ ... f"Not a docstring"
+ ...
+ >>> foo.__doc__ is None
+ True
+
See also :pep:`498` for the proposal that added formatted string literals,
and :meth:`str.format`, which uses a related format string mechanism.
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
- ZeroDivisionError: int division or modulo by zero
+ ZeroDivisionError: division by zero
The above exception was the direct cause of the following exception:
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
- ZeroDivisionError: int division or modulo by zero
+ ZeroDivisionError: division by zero
During handling of the above exception, another exception occurred:
File "<stdin>", line 4, in <module>
RuntimeError: Something bad happened
+Exception chaining can be explicitly suppressed by specifying :const:`None` in
+the ``from`` clause::
+
+ >>> try:
+ ... print(1 / 0)
+ ... except:
+ ... raise RuntimeError("Something bad happened") from None
+ ...
+ Traceback (most recent call last):
+ File "<stdin>", line 4, in <module>
+ RuntimeError: Something bad happened
+
Additional information on exceptions can be found in section :ref:`exceptions`,
and information about handling exceptions is in section :ref:`try`.
+.. versionchanged:: 3.3
+ :const:`None` is now permitted as ``Y`` in ``raise X from Y``.
+
+.. versionadded:: 3.3
+ The ``__suppress_context__`` attribute to suppress automatic display of the
+ exception context.
.. _break:
builtin: eval
builtin: compile
-**Programmer's note:** the :keyword:`global` is a directive to the parser. It
+**Programmer's note:** :keyword:`global` is a directive to the parser. It
applies only to code parsed at the same time as the :keyword:`global` statement.
In particular, a :keyword:`global` statement contained in a string or code
object supplied to the built-in :func:`exec` function does not affect the code
from sphinx import addnodes
from sphinx.builders import Builder
+from sphinx.locale import translators
from sphinx.util.nodes import split_explicit_title
from sphinx.util.compat import Directive
from sphinx.writers.html import HTMLTranslator
optional_arguments = 1
final_argument_whitespace = True
+ # This text is copied to templates/dummy.html
+ label_text = 'CPython implementation detail:'
+
def run(self):
pnode = nodes.compound(classes=['impl-detail'])
+ label = translators['sphinx'].gettext(self.label_text)
content = self.content
- add_text = nodes.strong('CPython implementation detail:',
- 'CPython implementation detail:')
+ add_text = nodes.strong(label, label)
if self.arguments:
n, m = self.state.inline_text(self.arguments[0], self.lineno)
pnode.append(nodes.paragraph('', '', *(n + m)))
self.state.nested_parse(content, self.content_offset, pnode)
if pnode.children and isinstance(pnode[0], nodes.paragraph):
+ content = nodes.inline(pnode[0].rawsource, translatable=True)
+ content.source = pnode[0].source
+ content.line = pnode[0].line
+ content += pnode[0].children
+ pnode[0].replace_self(nodes.paragraph('', '', content,
+ translatable=False))
pnode[0].insert(0, add_text)
pnode[0].insert(1, nodes.Text(' '))
else:
howto/pyporting,,::,Programming Language :: Python :: 3
howto/regex,,::,
howto/regex,,:foo,(?:foo)
-howto/urllib2,,:password,"for example ""joe:password@example.com"""
+howto/urllib2,,:password,"""joe:password@example.com"""
library/audioop,,:ipos,"# factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],"
library/bisect,32,:hi,all(val >= x for val in a[i:hi])
library/bisect,42,:hi,all(val > x for val in a[i:hi])
whatsnew/3.2,,:gz,">>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:"
whatsnew/3.2,,:location,zope9-location = ${zope9:location}
whatsnew/3.2,,:prefix,zope-conf = ${custom:prefix}/etc/zope.conf
+library/re,,`,!#$%&'*+-.^_`|~:
+library/re,,`,\!\#\$\%\&\'\*\+\-\.\^_\`\|\~\:
library/tarfile,,:xz,'x:xz'
library/xml.etree.elementtree,,:sometag,prefix:sometag
library/xml.etree.elementtree,,:fictional,"<actors xmlns:fictional=""http://characters.example.com"""
library/xml.etree.elementtree,,:name,"name = actor.find('real_person:name', ns)"
library/xml.etree.elementtree,,:character,"for char in actor.findall('role:character', ns):"
library/zipapp,,:main,"$ python -m zipapp myapp -m ""myapp:main"""
-library/zipapp,,:fn,"argument should have the form ""pkg.mod:fn"", where ""pkg.mod"" is a"
-library/zipapp,,:callable,"""pkg.module:callable"" and the archive will be run by importing"
+library/zipapp,,:fn,"pkg.mod:fn"
+library/zipapp,,:callable,"pkg.module:callable"
library/stdtypes,,::,>>> m[::2].tolist()
library/sys,,`,# ``wrapper`` creates a ``wrap(coro)`` coroutine:
whatsnew/3.5,,:root,'WARNING:root:warning\n'
whatsnew/3.5,,:root,ERROR:root:exception
whatsnew/3.5,,:exception,ERROR:root:exception
whatsnew/changelog,,:version,import sys; I = version[:version.index(' ')]
-whatsnew/changelog,,:gz,": TarFile opened with external fileobj and ""w:gz"" mode didn't"
-whatsnew/changelog,,::,": Use ""127.0.0.1"" or ""::1"" instead of ""localhost"" as much as"
-whatsnew/changelog,,`,"for readability (was ""`"")."
<p>These archives contain all the content in the documentation.</p>
<p>HTML Help (<tt>.chm</tt>) files are made available in the "Windows" section
-on the <a href="https://www.python.org/download/releases/{{ release[:5] }}/">Python
+on the <a href="https://www.python.org/downloads/release/python-{{ release.replace('.', '') }}/">Python
download page</a>.</p>
--- /dev/null
+This file is not an actual template, but used to add some
+texts in extensions to sphinx.pot file.
+
+In extensions/pyspecific.py:
+
+{% trans %}CPython implementation detail:{% endtrans %}
'c'
>>> next(it)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
next(it)
StopIteration
...
>>> function(0, a=0)
Traceback (most recent call last):
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
TypeError: function() got multiple values for keyword argument 'a'
When a final formal parameter of the form ``**name`` is present, it receives a
[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]
>>> # the tuple must be parenthesized, otherwise an error is raised
>>> [x, x**2 for x in range(6)]
- File "<stdin>", line 1, in ?
+ File "<stdin>", line 1, in <module>
[x, x**2 for x in range(6)]
^
SyntaxError: invalid syntax
{'a', 'r', 'b', 'c', 'd'}
>>> a - b # letters in a but not in b
{'r', 'd', 'b'}
- >>> a | b # letters in either a or b
+ >>> a | b # letters in a or b or both
{'a', 'c', 'r', 'd', 'b', 'm', 'z', 'l'}
>>> a & b # letters in both a and b
{'a', 'c'}
:file:`JPEG` or :file:`EXE` files. Be very careful to use binary mode when
reading and writing such files.
+It is good practice to use the :keyword:`with` keyword when dealing
+with file objects. The advantage is that the file is properly closed
+after its suite finishes, even if an exception is raised at some
+point. Using :keyword:`with` is also much shorter than writing
+equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
+
+ >>> with open('workfile') as f:
+ ... read_data = f.read()
+ >>> f.closed
+ True
+
+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.
+
+After a file object is closed, either by a :keyword:`with` statement
+or by calling ``f.close()``, attempts to use the file object will
+automatically fail. ::
+
+ >>> f.close()
+ >>> f.read()
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ ValueError: I/O operation on closed file
+
.. _tut-filemethods:
those returned from the ``f.tell()``, or zero. Any other *offset* value produces
undefined behaviour.
-
-When you're done with a file, call ``f.close()`` to close it and free up any
-system resources taken up by the open file. After calling ``f.close()``,
-attempts to use the file object will automatically fail. ::
-
- >>> f.close()
- >>> f.read()
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- ValueError: I/O operation on closed file
-
-It is good practice to use the :keyword:`with` keyword when dealing with file
-objects. This has the advantage that the file is properly closed after its
-suite finishes, even if an exception is raised on the way. It is also much
-shorter than writing equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
-
- >>> with open('workfile', 'r') as f:
- ... read_data = f.read()
- >>> f.closed
- True
-
File objects have some additional methods, such as :meth:`~file.isatty` and
:meth:`~file.truncate` which are less frequently used; consult the Library
Reference for a complete guide to file objects.
If you have an object ``x``, you can view its JSON string representation with a
simple line of code::
+ >>> import json
>>> json.dumps([1, 'simple', 'list'])
'[1, "simple", "list"]'
There is full support for floating point; operators with mixed type operands
convert the integer operand to floating point::
- >>> 3 * 3.75 / 1.5
- 7.5
- >>> 7.0 / 2
- 3.5
+ >>> 4 * 3.75 - 1
+ 14.0
In interactive mode, the last printed expression is assigned to the variable
``_``. This means that when you are using Python as a desk calculator, it is
.. envvar:: PYTHONDONTWRITEBYTECODE
- If this is set to a non-empty string, Python won't try to write ``.pyc`` or
- ``.pyo`` files on the import of source modules. This is equivalent to
+ If this is set to a non-empty string, Python won't try to write ``.pyc``
+ files on the import of source modules. This is equivalent to
specifying the :option:`-B` option.
.. versionchanged:: 3.6
On Windows, the encoding specified by this variable is ignored for interactive
- console buffers unless :envvar:`PYTHONLEGACYWINDOWSIOENCODING` is also specified.
+ console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also specified.
Files and pipes redirected through the standard streams are not affected.
.. envvar:: PYTHONNOUSERSITE
.. versionadded:: 3.6
See :pep:`529` for more details.
-.. envvar:: PYTHONLEGACYWINDOWSIOENCODING
+.. envvar:: PYTHONLEGACYWINDOWSSTDIO
If set to a non-empty string, does not use the new console reader and
writer. This means that Unicode characters will be encoded according to
This part of the documentation is devoted to general information on the setup
-of the Python environment on different platform, the invocation of the
+of the Python environment on different platforms, the invocation of the
interpreter and things that make working with Python easier.
make install
invocations. Configuration options and caveats for specific Unix platforms are
-extensively documented in the :source:`README` file in the root of the Python
+extensively documented in the :source:`README.rst` file in the root of the Python
source tree.
.. warning::
If the first line of a script file starts with ``#!``, it is known as a
"shebang" line. Linux and other Unix like operating systems have native
-support for such lines and are commonly used on such systems to indicate how
-a script should be executed. This launcher allows the same facilities to be
-using with Python scripts on Windows and the examples above demonstrate their
+support for such lines and they are commonly used on such systems to indicate
+how a script should be executed. This launcher allows the same facilities to
+be used with Python scripts on Windows and the examples above demonstrate their
use.
To allow shebang lines in Python scripts to be portable between Unix and
This change only applies when using an interactive console, and not when
redirecting files or pipes. To revert to the previous behaviour for interactive
-console use, set :envvar:`PYTHONLEGACYWINDOWSIOENCODING`.
+console use, set :envvar:`PYTHONLEGACYWINDOWSSTDIO`.
.. seealso::
* The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes
have been added to support the new :term:`variable annotation` syntax.
(Contributed by Ivan Levkivskyi in :issue:`27985`.)
+
+
+Notable changes in Python 3.6.2
+===============================
+
+New ``make regen-all`` build target
+-----------------------------------
+
+To simplify cross-compilation, and to ensure that CPython can reliably be
+compiled without requiring an existing version of Python to already be
+available, the autotools-based build system no longer attempts to implicitly
+recompile generated files based on file modification times.
+
+Instead, a new ``make regen-all`` command has been added to force regeneration
+of these files when desired (e.g. after an initial version of Python has
+already been built based on the pregenerated versions).
+
+More selective regeneration targets are also defined - see
+:source:`Makefile.pre.in` for details.
+
+(Contributed by Victor Stinner in :issue:`23404`.)
+
+.. versionadded:: 3.6.2
+
+
+Removal of ``make touch`` build target
+--------------------------------------
+
+The ``make touch`` build target previously used to request implicit regeneration
+of generated files by updating their modification times has been removed.
+
+It has been replaced by the new ``make regen-all`` target.
+
+(Contributed by Victor Stinner in :issue:`23404`.)
+
+.. versionchanged:: 3.6.2
PyObject **values,
PyObject *kwnames);
- /* Convert (args, nargs, kwargs) into a (stack, nargs, kwnames).
+ /* Convert (args, nargs, kwargs: dict) into (stack, nargs, kwnames: tuple).
- Return a new stack which should be released by PyMem_Free(), or return
- args unchanged if kwargs is NULL or an empty dictionary.
+ Return 0 on success, raise an exception and return -1 on error.
+
+ Write the new stack into *p_stack. If *p_stack is differen than args, it
+ must be released by PyMem_Free().
The stack uses borrowed references.
The type of keyword keys is not checked, these checks should be done
- later (ex: _PyArg_ParseStack). */
- PyAPI_FUNC(PyObject **) _PyStack_UnpackDict(
+ later (ex: _PyArg_ParseStackAndKeywords). */
+ PyAPI_FUNC(int) _PyStack_UnpackDict(
PyObject **args,
Py_ssize_t nargs,
PyObject *kwargs,
- PyObject **kwnames,
- PyObject *func);
+ PyObject ***p_stack,
+ PyObject **p_kwnames);
/* Call the callable object func with the "fast call" calling convention:
args is a C array for positional arguments (nargs is the number of
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
+PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(void);
#endif
#ifdef MS_WINDOWS
struct _Py_stat_struct {
unsigned long st_dev;
- __int64 st_ino;
+ uint64_t st_ino;
unsigned short st_mode;
int st_nlink;
int st_uid;
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 6
-#define PY_MICRO_VERSION 1
+#define PY_MICRO_VERSION 2
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
-#define PY_VERSION "3.6.1"
+#define PY_VERSION "3.6.2"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
} PyInterpreterState;
#endif
+typedef struct _co_extra_state {
+ struct _co_extra_state *next;
+ PyInterpreterState* interp;
+
+ Py_ssize_t co_extra_user_count;
+ freefunc co_extra_freefuncs[MAX_CO_EXTRA_USERS];
+} __PyCodeExtraState;
+
+/* This is temporary for backwards compat in 3.6 and will be removed in 3.7 */
+__PyCodeExtraState* __PyCodeExtraState_Get(void);
/* State unique per thread */
PyObject *coroutine_wrapper;
int in_coroutine_wrapper;
- Py_ssize_t co_extra_user_count;
- freefunc co_extra_freefuncs[MAX_CO_EXTRA_USERS];
+ /* Now used from PyInterpreterState, kept here for ABI
+ compatibility with PyThreadState */
+ Py_ssize_t _preserve_36_ABI_1;
+ freefunc _preserve_36_ABI_2[MAX_CO_EXTRA_USERS];
PyObject *async_gen_firstiter;
PyObject *async_gen_finalizer;
Py_ssize_t *step, Py_ssize_t *slicelength);
#if !defined(Py_LIMITED_API) || (Py_LIMITED_API+0 >= 0x03050400 && Py_LIMITED_API+0 < 0x03060000) || Py_LIMITED_API+0 >= 0x03060100
+#ifdef Py_LIMITED_API
#define PySlice_GetIndicesEx(slice, length, start, stop, step, slicelen) ( \
PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? \
((*(slicelen) = 0), -1) : \
((*(slicelen) = PySlice_AdjustIndices((length), (start), (stop), *(step))), \
0))
+#endif
PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice,
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
PyAPI_FUNC(Py_ssize_t) PySlice_AdjustIndices(Py_ssize_t length,
This codec uses mappings to encode and decode characters.
- Decoding mappings must map single string characters to single
- Unicode characters, integers (which are then interpreted as Unicode
- ordinals) or None (meaning "undefined mapping" and causing an
- error).
-
- Encoding mappings must map single Unicode characters to single
- string characters, integers (which are then interpreted as Latin-1
- ordinals) or None (meaning "undefined mapping" and causing an
- error).
-
- If a character lookup fails with a LookupError, the character is
- copied as-is meaning that its ordinal value will be interpreted as
- Unicode or Latin-1 ordinal resp. Because of this mappings only need
- to contain those mappings which map characters to different code
- points.
+ Decoding mappings must map byte ordinals (integers in the range from 0 to
+ 255) to Unicode strings, integers (which are then interpreted as Unicode
+ ordinals) or None. Unmapped data bytes (ones which cause a LookupError)
+ as well as mapped to None, 0xFFFE or '\ufffe' are treated as "undefined
+ mapping" and cause an error.
+
+ Encoding mappings must map Unicode ordinal integers to bytes objects,
+ integers in the range from 0 to 255 or None. Unmapped character
+ ordinals (ones which cause a LookupError) as well as mapped to
+ None are treated as "undefined mapping" and cause an error.
*/
PyAPI_FUNC(PyObject*) PyUnicode_DecodeCharmap(
const char *string, /* Encoded string */
Py_ssize_t length, /* size of string */
- PyObject *mapping, /* character mapping
- (char ordinal -> unicode ordinal) */
+ PyObject *mapping, /* decoding mapping */
const char *errors /* error handling */
);
PyAPI_FUNC(PyObject*) PyUnicode_AsCharmapString(
PyObject *unicode, /* Unicode object */
- PyObject *mapping /* character mapping
- (unicode ordinal -> char ordinal) */
+ PyObject *mapping /* encoding mapping */
);
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject*) PyUnicode_EncodeCharmap(
const Py_UNICODE *data, /* Unicode char buffer */
Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
- PyObject *mapping, /* character mapping
- (unicode ordinal -> char ordinal) */
+ PyObject *mapping, /* encoding mapping */
const char *errors /* error handling */
);
PyAPI_FUNC(PyObject*) _PyUnicode_EncodeCharmap(
PyObject *unicode, /* Unicode object */
- PyObject *mapping, /* character mapping
- (unicode ordinal -> char ordinal) */
+ PyObject *mapping, /* encoding mapping */
const char *errors /* error handling */
);
#endif
character mapping table to it and return the resulting Unicode
object.
- The mapping table must map Unicode ordinal integers to Unicode
- ordinal integers or None (causing deletion of the character).
+ The mapping table must map Unicode ordinal integers to Unicode strings,
+ Unicode ordinal integers or None (causing deletion of the character).
Mapping tables may be dictionaries or sequences. Unmapped character
ordinals (ones which cause a LookupError) are left untouched and
/* Translate a string by applying a character mapping table to it and
return the resulting Unicode object.
- The mapping table must map Unicode ordinal integers to Unicode
- ordinal integers or None (causing deletion of the character).
+ The mapping table must map Unicode ordinal integers to Unicode strings,
+ Unicode ordinal integers or None (causing deletion of the character).
Mapping tables may be dictionaries or sequences. Unmapped character
ordinals (ones which cause a LookupError) are left untouched and
PyAPI_FUNC(int) _PyUnicode_CheckConsistency(
PyObject *op,
int check_content);
+#elif !defined(NDEBUG)
+/* For asserts that call _PyUnicode_CheckConsistency(), which would
+ * otherwise be a problem when building with asserts but without Py_DEBUG. */
+#define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op)
#endif
#ifndef Py_LIMITED_API
i = start
while stop is None or i < stop:
try:
- if self[i] == value:
+ v = self[i]
+ if v is value or v == value:
return i
except IndexError:
break
def count(self, value):
'S.count(value) -> integer -- return number of occurrences of value'
- return sum(1 for v in self if v == value)
+ return sum(1 for v in self if v is value or v == value)
Sequence.register(tuple)
Sequence.register(str)
# Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
- flags = re.sub(r'-arch\s+\w+\s', ' ', flags, re.ASCII)
+ flags = re.sub(r'-arch\s+\w+\s', ' ', flags, flags=re.ASCII)
flags = re.sub('-isysroot [^ \t]*', ' ', flags)
_save_modified_value(_config_vars, cv, flags)
# external code.
_abc_invalidation_counter = 0
- def __new__(mcls, name, bases, namespace):
- cls = super().__new__(mcls, name, bases, namespace)
+ def __new__(mcls, name, bases, namespace, **kwargs):
+ cls = super().__new__(mcls, name, bases, namespace, **kwargs)
# Compute set of abstract method names
abstracts = {name
for name, value in namespace.items()
# local task.
future.exception()
raise
- future.remove_done_callback(_run_until_complete_cb)
+ finally:
+ future.remove_done_callback(_run_until_complete_cb)
if not future.done():
raise RuntimeError('Event loop stopped before Future completed.')
change the future's state to cancelled, schedule the callbacks and
return True.
"""
+ self._log_traceback = False
if self._state != _PENDING:
return False
self._state = _CANCELLED
yield from fut
self._locked = True
return True
+ except futures.CancelledError:
+ if not self._locked:
+ self._wake_up_first()
+ raise
finally:
self._waiters.remove(fut)
"""
if self._locked:
self._locked = False
- # Wake up the first waiter who isn't cancelled.
- for fut in self._waiters:
- if not fut.done():
- fut.set_result(True)
- break
+ self._wake_up_first()
else:
raise RuntimeError('Lock is not acquired.')
+ def _wake_up_first(self):
+ """Wake up the first waiter who isn't cancelled."""
+ for fut in self._waiters:
+ if not fut.done():
+ fut.set_result(True)
+ break
+
class Event:
"""Asynchronous equivalent to threading.Event.
def write(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
- raise TypeError('data argument must be byte-ish (%r)',
- type(data))
+ msg = ("data argument must be a bytes-like object, not '%s'" %
+ type(data).__name__)
+ raise TypeError(msg)
if self._eof_written:
raise RuntimeError('write_eof() already called')
def _get_extra_info(self, name, default=None):
if name in self._extra:
return self._extra[name]
- else:
+ elif self._transport is not None:
return self._transport.get_extra_info(name, default)
+ else:
+ return default
def _start_shutdown(self):
if self._in_shutdown:
return
- self._in_shutdown = True
- self._write_appdata(b'')
+ if self._in_handshake:
+ self._abort()
+ else:
+ self._in_shutdown = True
+ self._write_appdata(b'')
def _write_appdata(self, data):
self._write_backlog.append((data, 0))
self._transport._force_close(exc)
def _finalize(self):
+ self._sslpipe = None
+
if self._transport is not None:
self._transport.close()
def _abort(self):
- if self._transport is not None:
- try:
+ try:
+ if self._transport is not None:
self._transport.abort()
- finally:
- self._finalize()
+ finally:
+ self._finalize()
terminates with a CancelledError exception (even if cancel()
was not called).
"""
+ self._log_traceback = False
if self.done():
return False
if self._fut_waiter is not None:
else:
result = coro.throw(exc)
except StopIteration as exc:
- self.set_result(exc.value)
+ if self._must_cancel:
+ # Task is cancelled right before coro stops.
+ self._must_cancel = False
+ self.set_exception(futures.CancelledError())
+ else:
+ self.set_result(exc.value)
except futures.CancelledError:
super().cancel() # I.e., Future.cancel(self).
except Exception as exc:
elif compat.PY35 and inspect.isawaitable(coro_or_future):
return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
else:
- raise TypeError('A Future, a coroutine or an awaitable is required')
+ raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
+ 'required')
@coroutine
"""Utilities for with-statement contexts. See PEP 343."""
import abc
import sys
+import _collections_abc
from collections import deque
from functools import wraps
@classmethod
def __subclasshook__(cls, C):
if cls is AbstractContextManager:
- if (any("__enter__" in B.__dict__ for B in C.__mro__) and
- any("__exit__" in B.__dict__ for B in C.__mro__)):
- return True
+ return _collections_abc._check_methods(C, "__enter__", "__exit__")
return NotImplemented
try:
next(self.gen)
except StopIteration:
- return
+ return False
else:
raise RuntimeError("generator didn't stop")
else:
value = type()
try:
self.gen.throw(type, value, traceback)
- raise RuntimeError("generator didn't stop after throw()")
except StopIteration as exc:
# Suppress StopIteration *unless* it's the same exception that
# was passed to throw(). This prevents a StopIteration
# Likewise, avoid suppressing if a StopIteration exception
# was passed to throw() and later wrapped into a RuntimeError
# (see PEP 479).
- if exc.__cause__ is value:
+ if type is StopIteration and exc.__cause__ is value:
return False
raise
except:
# fixes the impedance mismatch between the throw() protocol
# and the __exit__() protocol.
#
- if sys.exc_info()[1] is not value:
- raise
+ if sys.exc_info()[1] is value:
+ return False
+ raise
+ raise RuntimeError("generator didn't stop after throw()")
def contextmanager(func):
from ctypes import *
from ctypes.test import need_symbol
from struct import calcsize
-import _testcapi
import _ctypes_test
+import test.support
class SubclassesTest(unittest.TestCase):
def test_subclass(self):
"_pack_": -1}
self.assertRaises(ValueError, type(Structure), "X", (Structure,), d)
+ @test.support.cpython_only
+ def test_packed_c_limits(self):
# Issue 15989
+ import _testcapi
d = {"_fields_": [("a", c_byte)],
"_pack_": _testcapi.INT_MAX + 1}
self.assertRaises(ValueError, type(Structure), "X", (Structure,), d)
@unittest.skipIf(sys.executable.lower().endswith('_d.exe'),
"SEH not enabled in debug builds")
def test_SEH(self):
- # Call functions with invalid arguments, and make sure
- # that access violations are trapped and raise an
- # exception.
- self.assertRaises(OSError, windll.kernel32.GetModuleHandleA, 32)
+ # Disable faulthandler to prevent logging the warning:
+ # "Windows fatal exception: access violation"
+ with support.disable_faulthandler():
+ # Call functions with invalid arguments, and make sure
+ # that access violations are trapped and raise an
+ # exception.
+ self.assertRaises(OSError, windll.kernel32.GetModuleHandleA, 32)
def test_noargs(self):
# This is a special case on win32 x64
windll.user32.GetDesktopWindow()
+
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
class TestWintypes(unittest.TestCase):
def test_HWND(self):
# the build directory may not be the source directory, we
# must use "srcdir" from the makefile to find the "Include"
# directory.
- base = _sys_home or project_base
if plat_specific:
- return base
- if _sys_home:
- incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR'))
+ return _sys_home or project_base
else:
incdir = os.path.join(get_config_var('srcdir'), 'Include')
- return os.path.normpath(incdir)
+ return os.path.normpath(incdir)
python_dir = 'python' + get_python_version() + build_flags
return os.path.join(prefix, "include", python_dir)
elif os.name == "nt":
from distutils.command import build_ext
build_ext.USER_BASE = site.USER_BASE
+ # bpo-30132: On Windows, a .pdb file may be created in the current
+ # working directory. Create a temporary working directory to cleanup
+ # everything at the end of the test.
+ self.temp_cwd = support.temp_cwd()
+ self.temp_cwd.__enter__()
+ self.addCleanup(self.temp_cwd.__exit__, None, None, None)
+
def build_ext(self, *args, **kwargs):
return build_ext(*args, **kwargs)
# Assume it is a Header-like object.
h = value
if h is not None:
- parts.append(h.encode(linesep=self.linesep,
- maxlinelen=self.max_line_length))
+ # The Header class interprets a value of None for maxlinelen as the
+ # default value of 78, as recommended by RFC 2822.
+ maxlinelen = 0
+ if self.max_line_length is not None:
+ maxlinelen = self.max_line_length
+ parts.append(h.encode(linesep=self.linesep, maxlinelen=maxlinelen))
parts.append(self.linesep)
return ''.join(parts)
Message Lifecycle
-----------------
-The general lifecyle of a message is:
+The general lifecycle of a message is:
Creation
A `Message` object can be created by a Parser, or it can be
-What's New in IDLE 3.6.0?
-===========================
-*Release date: 2016-12-16?*
+What's New in IDLE 3.6.2
+Released on 2017-06-30?
+========================
+
+bpo-15786: Fix several problems with IDLE's autocompletion box.
+The following should now work: clicking on selection box items;
+using the scrollbar; selecting an item by hitting Return.
+Hangs on MacOSX should no longer happen. Patch by Louie Lu.
+
+bpo-25514: Add doc subsubsection about IDLE failure to start.
+Popup no-connection message directs users to this section.
+
+bpo-30642: Fix reference leaks in IDLE tests.
+Patches by Louie Lu and Terry Jan Reedy.
+
+bpo-30495: Add docstrings for textview.py and use PEP8 names.
+Patches by Cheryl Sabella and Terry Jan Reedy.
+
+bpo-30290: Help-about: use pep8 names and add tests.
+Increase coverage to 100%.
+Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy.
+
+bpo-30303: Add _utest option to textview; add new tests.
+Increase coverage to 100%.
+Patches by Louie Lu and Terry Jan Reedy.
+
+
+What's New in IDLE 3.6.1
+Released on 2017-03-21
+========================
+
+Issue #29071: IDLE colors f-string prefixes (but not invalid ur prefixes).
+
+Issue #28572: Add 10% to coverage of IDLE's test_configdialog.
+Update and augment description of the configuration system.
+
+
+What's New in IDLE 3.6.0
+Released on 2016-12-23
+========================
- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
Patch by Roger Serwy, updated by Bayard Randel.
"""
An auto-completion window for IDLE, used by the autocomplete extension
"""
+import platform
+
from tkinter import *
from tkinter.ttk import Scrollbar
from idlelib.multicall import MC_SHIFT
HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>"
-HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>")
+HIDE_FOCUS_OUT_SEQUENCE = "<FocusOut>"
+HIDE_SEQUENCES = (HIDE_FOCUS_OUT_SEQUENCE, "<ButtonPress>")
KEYPRESS_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keypress>>"
# We need to bind event beyond <Key> so that the function will be called
# before the default specific IDLE function
self._selection_changed()
# bind events
- self.hideid = self.widget.bind(HIDE_VIRTUAL_EVENT_NAME,
- self.hide_event)
+ self.hideaid = acw.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
+ self.hidewid = self.widget.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
+ acw.event_add(HIDE_VIRTUAL_EVENT_NAME, HIDE_FOCUS_OUT_SEQUENCE)
for seq in HIDE_SEQUENCES:
self.widget.event_add(HIDE_VIRTUAL_EVENT_NAME, seq)
+
self.keypressid = self.widget.bind(KEYPRESS_VIRTUAL_EVENT_NAME,
self.keypress_event)
for seq in KEYPRESS_SEQUENCES:
new_y -= acw_height
acw.wm_geometry("+%d+%d" % (new_x, new_y))
+ if platform.system().startswith('Windows'):
+ # See issue 15786. When on windows platform, Tk will misbehaive
+ # to call winconfig_event multiple times, we need to prevent this,
+ # otherwise mouse button double click will not be able to used.
+ acw.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
+ self.winconfigid = None
+
+ def _hide_event_check(self):
+ if not self.autocompletewindow:
+ return
+
+ try:
+ if not self.autocompletewindow.focus_get():
+ self.hide_window()
+ except KeyError:
+ # See issue 734176, when user click on menu, acw.focus_get()
+ # will get KeyError.
+ self.hide_window()
+
def hide_event(self, event):
+ # Hide autocomplete list if it exists and does not have focus or
+ # mouse click on widget / text area.
if self.is_active():
- self.hide_window()
+ if event.type == EventType.FocusOut:
+ # On windows platform, it will need to delay the check for
+ # acw.focus_get() when click on acw, otherwise it will return
+ # None and close the window
+ self.widget.after(1, self._hide_event_check)
+ elif event.type == EventType.ButtonPress:
+ # ButtonPress event only bind to self.widget
+ self.hide_window()
def listselect_event(self, event):
if self.is_active():
return "break"
elif keysym == "Return":
+ self.complete()
self.hide_window()
- return None
+ return 'break'
elif (self.mode == COMPLETE_ATTRIBUTES and keysym in
("period", "space", "parenleft", "parenright", "bracketleft",
return
# unbind events
+ self.autocompletewindow.event_delete(HIDE_VIRTUAL_EVENT_NAME,
+ HIDE_FOCUS_OUT_SEQUENCE)
for seq in HIDE_SEQUENCES:
self.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq)
- self.widget.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hideid)
- self.hideid = None
+
+ self.autocompletewindow.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hideaid)
+ self.widget.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hidewid)
+ self.hideaid = None
+ self.hidewid = None
for seq in KEYPRESS_SEQUENCES:
self.widget.event_delete(KEYPRESS_VIRTUAL_EVENT_NAME, seq)
self.widget.unbind(KEYPRESS_VIRTUAL_EVENT_NAME, self.keypressid)
self.keyreleaseid = None
self.listbox.unbind(LISTUPDATE_SEQUENCE, self.listupdateid)
self.listupdateid = None
- self.autocompletewindow.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
- self.winconfigid = None
+ if self.winconfigid:
+ self.autocompletewindow.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
+ self.winconfigid = None
+
+ # Re-focusOn frame.text (See issue #15786)
+ self.widget.focus_set()
# destroy widgets
self.scrollbar.destroy()
import os
import sys
-from tkinter.font import Font, nametofont
+from tkinter.font import Font
class InvalidConfigType(Exception): pass
class InvalidConfigSet(Exception): pass
from idlelib import query
from idlelib import replace
from idlelib import search
-from idlelib import textview
from idlelib import windows
# The default tab setting for a Text widget, in average-width characters.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>25.5. IDLE — Python 3.5.2 documentation</title>
+ <title>25.5. IDLE — Python 3.7.0a0 documentation</title>
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '3.5.2',
+ VERSION: '3.7.0a0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
- title="Search within Python 3.5.2 documentation"
+ title="Search within Python 3.7.0a0 documentation"
href="../_static/opensearch.xml"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
- <link rel="top" title="Python 3.5.2 documentation" href="../contents.html" />
+ <link rel="top" title="Python 3.7.0a0 documentation" href="../contents.html" />
<link rel="up" title="25. Graphical User Interfaces with Tk" href="tk.html" />
<link rel="next" title="25.6. Other Graphical User Interface Packages" href="othergui.html" />
<link rel="prev" title="25.4. tkinter.scrolledtext — Scrolled Text Widget" href="tkinter.scrolledtext.html" />
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
+ <link rel="canonical" href="https://docs.python.org/3/library/idle.html" />
+
<script type="text/javascript" src="../_static/copybutton.js"></script>
+
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> »</li>
<li>
- <a href="../index.html">3.5.2 Documentation</a> »
+ <a href="../index.html">3.7.0a0 Documentation</a> »
</li>
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
<div class="section" id="idle">
<span id="id1"></span><h1>25.5. IDLE<a class="headerlink" href="#idle" title="Permalink to this headline">¶</a></h1>
-<p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.5/Lib/idlelib">Lib/idlelib/</a></p>
+<p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/master/Lib/idlelib/">Lib/idlelib/</a></p>
<hr class="docutils" id="index-0" />
<p>IDLE is Python’s Integrated Development and Learning Environment.</p>
<p>IDLE has the following features:</p>
</dl>
<dl class="docutils" id="index-3">
<dt>Debugger (toggle)</dt>
-<dd>When actived, code entered in the Shell or run from an Editor will run
+<dd>When activated, code entered in the Shell or run from an Editor will run
under the debugger. In the Editor, breakpoints can be set with the context
menu. This feature is still incomplete and somewhat experimental.</dd>
<dt>Stack Viewer</dt>
<li><code class="kbd docutils literal"><span class="pre">C-e</span></code> end of line</li>
<li><code class="kbd docutils literal"><span class="pre">C-k</span></code> kill line (but doesn’t put it in clipboard)</li>
<li><code class="kbd docutils literal"><span class="pre">C-l</span></code> center window around the insertion point</li>
-<li><code class="kbd docutils literal"><span class="pre">C-b</span></code> go backwards one character without deleting (usually you can
+<li><code class="kbd docutils literal"><span class="pre">C-b</span></code> go backward one character without deleting (usually you can
also use the cursor key for this)</li>
<li><code class="kbd docutils literal"><span class="pre">C-f</span></code> go forward one character without deleting (usually you can
also use the cursor key for this)</li>
Python Shell window by one tab). After certain keywords (break, return etc.)
the next line is dedented. In leading indentation, <code class="kbd docutils literal"><span class="pre">Backspace</span></code> deletes up
to 4 spaces if they are there. <code class="kbd docutils literal"><span class="pre">Tab</span></code> inserts spaces (in the Python
-Shell window one tab), number depends on Indent width. Currently tabs
+Shell window one tab), number depends on Indent width. Currently, tabs
are restricted to four spaces due to Tcl/Tk limitations.</p>
<p>See also the indent/dedent region commands in the edit menu.</p>
</div>
<code class="kbd docutils literal"><span class="pre">C-space</span></code> will open a completions window. In an empty
string, this will contain the files in the current directory. On a
blank line, it will contain the built-in and user-defined functions and
-classes in the current name spaces, plus any modules imported. If some
+classes in the current namespaces, plus any modules imported. If some
characters have been entered, the ACW will attempt to be more specific.</p>
<p>If a string of characters is typed, the ACW selection will jump to the
entry most closely matching those characters. Entering a <code class="kbd docutils literal"><span class="pre">tab</span></code> will
</div>
<div class="section" id="calltips">
<h3>25.5.2.3. Calltips<a class="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
-<p>A calltip is shown when one types <code class="kbd docutils literal"><span class="pre">(</span></code> after the name of an <em>acccessible</em>
+<p>A calltip is shown when one types <code class="kbd docutils literal"><span class="pre">(</span></code> after the name of an <em>accessible</em>
function. A name expression may include dots and subscripts. A calltip
remains until it is clicked, the cursor is moved out of the argument area,
or <code class="kbd docutils literal"><span class="pre">)</span></code> is typed. When the cursor is in the argument part of a definition,
<code class="docutils literal"><span class="pre">sys.argv</span></code> reflects the arguments passed to IDLE itself.</li>
</ul>
</div>
+<div class="section" id="startup-failure">
+<h3>25.5.3.2. Startup failure<a class="headerlink" href="#startup-failure" title="Permalink to this headline">¶</a></h3>
+<p>IDLE uses a socket to communicate between the IDLE GUI process and the user
+code execution process. A connection must be established whenever the Shell
+starts or restarts. (The latter is indicated by a divider line that says
+‘RESTART’). If the user process fails to connect to the GUI process, it
+displays a <code class="docutils literal"><span class="pre">Tk</span></code> error box with a ‘cannot connect’ message that directs the
+user here. It then exits.</p>
+<p>A common cause of failure is a user-written file with the same name as a
+standard library module, such as <em>random.py</em> and <em>tkinter.py</em>. When such a
+file is located in the same directory as a file that is about to be run,
+IDLE cannot import the stdlib file. The current fix is to rename the
+user file.</p>
+<p>Though less common than in the past, an antivirus or firewall program may
+stop the connection. If the program cannot be taught to allow the
+connection, then it must be turned off for IDLE to work. It is safe to
+allow this internal connection because no data is visible on external
+ports. A similar problem is a network mis-configuration that blocks
+connections.</p>
+<p>Python installation issues occasionally stop IDLE: multiple versions can
+clash, or a single installation might need admin access. If one undo the
+clash, or cannot or does not want to run as admin, it might be easiest to
+completely remove Python and start over.</p>
+<p>A zombie pythonw.exe process could be a problem. On Windows, use Task
+Manager to detect and stop one. Sometimes a restart initiated by a program
+crash or Keyboard Interrupt (control-C) may fail to connect. Dismissing
+the error box or Restart Shell on the Shell menu may fix a temporary problem.</p>
+<p>When IDLE first starts, it attempts to read user configuration files in
+~/.idlerc/ (~ is one’s home directory). If there is a problem, an error
+message should be displayed. Leaving aside random disk glitches, this can
+be prevented by never editing the files by hand, using the configuration
+dialog, under Options, instead Options. Once it happens, the solution may
+be to delete one or more of the configuration files.</p>
+<p>If IDLE quits with no message, and it was not started from a console, try
+starting from a console (<code class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">idlelib)</span></code> and see if a message appears.</p>
+</div>
<div class="section" id="idle-console-differences">
-<h3>25.5.3.2. IDLE-console differences<a class="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
+<h3>25.5.3.3. IDLE-console differences<a class="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
<p>As much as possible, the result of executing Python code with IDLE is the
same as executing the same code in a console window. However, the different
-interface and operation occasionally affects visible results. For instance,
+interface and operation occasionally affect visible results. For instance,
<code class="docutils literal"><span class="pre">sys.modules</span></code> starts with more entries.</p>
<p>IDLE also replaces <code class="docutils literal"><span class="pre">sys.stdin</span></code>, <code class="docutils literal"><span class="pre">sys.stdout</span></code>, and <code class="docutils literal"><span class="pre">sys.stderr</span></code> with
objects that get input from and send output to the Shell window.
defined for each statement.</p>
</div>
<div class="section" id="running-without-a-subprocess">
-<h3>25.5.3.3. Running without a subprocess<a class="headerlink" href="#running-without-a-subprocess" title="Permalink to this headline">¶</a></h3>
+<h3>25.5.3.4. Running without a subprocess<a class="headerlink" href="#running-without-a-subprocess" title="Permalink to this headline">¶</a></h3>
<p>By default, IDLE executes user code in a separate subprocess via a socket,
which uses the internal loopback interface. This connection is not
externally visible and no data is sent to or received from the Internet.
If firewall software complains anyway, you can ignore it.</p>
<p>If the attempt to make the socket connection fails, Idle will notify you.
Such failures are sometimes transient, but if persistent, the problem
-may be either a firewall blocking the connecton or misconfiguration of
+may be either a firewall blocking the connection or misconfiguration of
a particular system. Until the problem is fixed, one can run Idle with
the -n command line switch.</p>
<p>If IDLE is started with the -n command line switch it will run in a
<h3>25.5.4.2. Setting preferences<a class="headerlink" href="#setting-preferences" title="Permalink to this headline">¶</a></h3>
<p>The font preferences, highlighting, keys, and general preferences can be
changed via Configure IDLE on the Option menu. Keys can be user defined;
-IDLE ships with four built in key sets. In addition a user can create a
+IDLE ships with four built-in key sets. In addition, a user can create a
custom key set in the Configure IDLE dialog under the keys tab.</p>
</div>
<div class="section" id="extensions">
<h3>25.5.4.3. Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h3>
-<p>IDLE contains an extension facility. Peferences for extensions can be
+<p>IDLE contains an extension facility. Preferences for extensions can be
changed with Configure Extensions. See the beginning of config-extensions.def
in the idlelib directory for further information. The default extensions
are currently:</p>
</li>
<li><a class="reference internal" href="#startup-and-code-execution">25.5.3. Startup and code execution</a><ul>
<li><a class="reference internal" href="#command-line-usage">25.5.3.1. Command line usage</a></li>
-<li><a class="reference internal" href="#idle-console-differences">25.5.3.2. IDLE-console differences</a></li>
-<li><a class="reference internal" href="#running-without-a-subprocess">25.5.3.3. Running without a subprocess</a></li>
+<li><a class="reference internal" href="#startup-failure">25.5.3.2. Startup failure</a></li>
+<li><a class="reference internal" href="#idle-console-differences">25.5.3.3. IDLE-console differences</a></li>
+<li><a class="reference internal" href="#running-without-a-subprocess">25.5.3.4. Running without a subprocess</a></li>
</ul>
</li>
<li><a class="reference internal" href="#help-and-preferences">25.5.4. Help and preferences</a><ul>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">Report a Bug</a></li>
- <li><a href="../_sources/library/idle.txt"
- rel="nofollow">Show Source</a></li>
+ <li>
+ <a href="https://github.com/python/cpython/blob/master/Doc/library/idle.rst"
+ rel="nofollow">Show Source
+ </a>
+ </li>
</ul>
</div>
</div>
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> »</li>
<li>
- <a href="../index.html">3.5.2 Documentation</a> »
+ <a href="../index.html">3.7.0a0 Documentation</a> »
</li>
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
</ul>
</div>
<div class="footer">
- © <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
+ © <a href="../copyright.html">Copyright</a> 2001-2017, Python Software Foundation.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
- Last updated on Sep 12, 2016.
+ Last updated on Jun 13, 2017.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.6.
open(dst, 'wb') as out:
for line in inn:
out.write(line.rstrip() + b'\n')
- print('idle.html copied to help.html')
+ print(f'{src} copied to {dst}')
def show_idlehelp(parent):
"Create HelpWindow; called from Idle Help event handler."
import os
from sys import version
-from tkinter import *
+from tkinter import Toplevel, Frame, Label, Button
+from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW
from idlelib import textview
"""Modal about dialog for idle
"""
- def __init__(self, parent, title, _htest=False):
- """
+ def __init__(self, parent, title, _htest=False, _utest=False):
+ """Create popup, do not return until tk widget destroyed.
+
+ parent - parent of this dialog
+ title - string which is title of popup dialog
_htest - bool, change box location when running htest
+ _utest - bool, don't wait_window when running unittest
"""
Toplevel.__init__(self, parent)
self.configure(borderwidth=5)
parent.winfo_rooty()+(30 if not _htest else 100)))
self.bg = "#707070"
self.fg = "#ffffff"
- self.CreateWidgets()
- self.resizable(height=FALSE, width=FALSE)
+ self.create_widgets()
+ self.resizable(height=False, width=False)
self.title(title)
self.transient(parent)
self.grab_set()
- self.protocol("WM_DELETE_WINDOW", self.Ok)
+ self.protocol("WM_DELETE_WINDOW", self.ok)
self.parent = parent
- self.buttonOk.focus_set()
- self.bind('<Return>',self.Ok) #dismiss dialog
- self.bind('<Escape>',self.Ok) #dismiss dialog
- self.wait_window()
+ self.button_ok.focus_set()
+ self.bind('<Return>', self.ok) # dismiss dialog
+ self.bind('<Escape>', self.ok) # dismiss dialog
+ self._current_textview = None
+ self._utest = _utest
- def CreateWidgets(self):
+ if not _utest:
+ self.deiconify()
+ self.wait_window()
+
+ def create_widgets(self):
release = version[:version.index(' ')]
- frameMain = Frame(self, borderwidth=2, relief=SUNKEN)
- frameButtons = Frame(self)
- frameButtons.pack(side=BOTTOM, fill=X)
- frameMain.pack(side=TOP, expand=TRUE, fill=BOTH)
- self.buttonOk = Button(frameButtons, text='Close',
- command=self.Ok)
- self.buttonOk.pack(padx=5, pady=5)
- #self.picture = Image('photo', data=self.pictureData)
- frameBg = Frame(frameMain, bg=self.bg)
- frameBg.pack(expand=TRUE, fill=BOTH)
- labelTitle = Label(frameBg, text='IDLE', fg=self.fg, bg=self.bg,
- font=('courier', 24, 'bold'))
- labelTitle.grid(row=0, column=0, sticky=W, padx=10, pady=10)
- #labelPicture = Label(frameBg, text='[picture]')
- #image=self.picture, bg=self.bg)
- #labelPicture.grid(row=1, column=1, sticky=W, rowspan=2,
- # padx=0, pady=3)
- byline = "Python's Integrated DeveLopment Environment" + 5*'\n'
- labelDesc = Label(frameBg, text=byline, justify=LEFT,
- fg=self.fg, bg=self.bg)
- labelDesc.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
- labelEmail = Label(frameBg, text='email: idle-dev@python.org',
- justify=LEFT, fg=self.fg, bg=self.bg)
- labelEmail.grid(row=6, column=0, columnspan=2,
- sticky=W, padx=10, pady=0)
- labelWWW = Label(frameBg, text='https://docs.python.org/' +
- version[:3] + '/library/idle.html',
- justify=LEFT, fg=self.fg, bg=self.bg)
- labelWWW.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
- Frame(frameBg, borderwidth=1, relief=SUNKEN,
+ frame = Frame(self, borderwidth=2, relief=SUNKEN)
+ frame_buttons = Frame(self)
+ frame_buttons.pack(side=BOTTOM, fill=X)
+ frame.pack(side=TOP, expand=True, fill=BOTH)
+ self.button_ok = Button(frame_buttons, text='Close',
+ command=self.ok)
+ self.button_ok.pack(padx=5, pady=5)
+
+ frame_background = Frame(frame, bg=self.bg)
+ frame_background.pack(expand=True, fill=BOTH)
+
+ header = Label(frame_background, text='IDLE', fg=self.fg,
+ bg=self.bg, font=('courier', 24, 'bold'))
+ header.grid(row=0, column=0, sticky=W, padx=10, pady=10)
+ byline_text = "Python's Integrated DeveLopment Environment" + 5*'\n'
+ byline = Label(frame_background, text=byline_text, justify=LEFT,
+ fg=self.fg, bg=self.bg)
+ byline.grid(row=2, column=0, sticky=W, columnspan=3, padx=10, pady=5)
+ email = Label(frame_background, text='email: idle-dev@python.org',
+ justify=LEFT, fg=self.fg, bg=self.bg)
+ email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
+ docs = Label(frame_background, text='https://docs.python.org/' +
+ version[:3] + '/library/idle.html',
+ justify=LEFT, fg=self.fg, bg=self.bg)
+ docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
+
+ Frame(frame_background, borderwidth=1, relief=SUNKEN,
height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
columnspan=3, padx=5, pady=5)
- labelPythonVer = Label(frameBg, text='Python version: ' +
- release, fg=self.fg, bg=self.bg)
- labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0)
- tkVer = self.tk.call('info', 'patchlevel')
- labelTkVer = Label(frameBg, text='Tk version: '+
- tkVer, fg=self.fg, bg=self.bg)
- labelTkVer.grid(row=9, column=1, sticky=W, padx=2, pady=0)
- py_button_f = Frame(frameBg, bg=self.bg)
- py_button_f.grid(row=10, column=0, columnspan=2, sticky=NSEW)
- buttonLicense = Button(py_button_f, text='License', width=8,
- highlightbackground=self.bg,
- command=self.ShowLicense)
- buttonLicense.pack(side=LEFT, padx=10, pady=10)
- buttonCopyright = Button(py_button_f, text='Copyright', width=8,
+
+ pyver = Label(frame_background, text='Python version: ' + release,
+ fg=self.fg, bg=self.bg)
+ pyver.grid(row=9, column=0, sticky=W, padx=10, pady=0)
+ tk_patchlevel = self.tk.call('info', 'patchlevel')
+ tkver = Label(frame_background, text='Tk version: ' + tk_patchlevel,
+ fg=self.fg, bg=self.bg)
+ tkver.grid(row=9, column=1, sticky=W, padx=2, pady=0)
+ py_buttons = Frame(frame_background, bg=self.bg)
+ py_buttons.grid(row=10, column=0, columnspan=2, sticky=NSEW)
+ self.py_license = Button(py_buttons, text='License', width=8,
+ highlightbackground=self.bg,
+ command=self.show_py_license)
+ self.py_license.pack(side=LEFT, padx=10, pady=10)
+ self.py_copyright = Button(py_buttons, text='Copyright', width=8,
+ highlightbackground=self.bg,
+ command=self.show_py_copyright)
+ self.py_copyright.pack(side=LEFT, padx=10, pady=10)
+ self.py_credits = Button(py_buttons, text='Credits', width=8,
highlightbackground=self.bg,
- command=self.ShowCopyright)
- buttonCopyright.pack(side=LEFT, padx=10, pady=10)
- buttonCredits = Button(py_button_f, text='Credits', width=8,
- highlightbackground=self.bg,
- command=self.ShowPythonCredits)
- buttonCredits.pack(side=LEFT, padx=10, pady=10)
- Frame(frameBg, borderwidth=1, relief=SUNKEN,
+ command=self.show_py_credits)
+ self.py_credits.pack(side=LEFT, padx=10, pady=10)
+
+ Frame(frame_background, borderwidth=1, relief=SUNKEN,
height=2, bg=self.bg).grid(row=11, column=0, sticky=EW,
columnspan=3, padx=5, pady=5)
- idle_v = Label(frameBg, text='IDLE version: ' + release,
- fg=self.fg, bg=self.bg)
- idle_v.grid(row=12, column=0, sticky=W, padx=10, pady=0)
- idle_button_f = Frame(frameBg, bg=self.bg)
- idle_button_f.grid(row=13, column=0, columnspan=3, sticky=NSEW)
- idle_about_b = Button(idle_button_f, text='README', width=8,
- highlightbackground=self.bg,
- command=self.ShowIDLEAbout)
- idle_about_b.pack(side=LEFT, padx=10, pady=10)
- idle_news_b = Button(idle_button_f, text='NEWS', width=8,
- highlightbackground=self.bg,
- command=self.ShowIDLENEWS)
- idle_news_b.pack(side=LEFT, padx=10, pady=10)
- idle_credits_b = Button(idle_button_f, text='Credits', width=8,
- highlightbackground=self.bg,
- command=self.ShowIDLECredits)
- idle_credits_b.pack(side=LEFT, padx=10, pady=10)
- # License, et all, are of type _sitebuiltins._Printer
- def ShowLicense(self):
+ idlever = Label(frame_background, text='IDLE version: ' + release,
+ fg=self.fg, bg=self.bg)
+ idlever.grid(row=12, column=0, sticky=W, padx=10, pady=0)
+ idle_buttons = Frame(frame_background, bg=self.bg)
+ idle_buttons.grid(row=13, column=0, columnspan=3, sticky=NSEW)
+ self.readme = Button(idle_buttons, text='README', width=8,
+ highlightbackground=self.bg,
+ command=self.show_readme)
+ self.readme.pack(side=LEFT, padx=10, pady=10)
+ self.idle_news = Button(idle_buttons, text='NEWS', width=8,
+ highlightbackground=self.bg,
+ command=self.show_idle_news)
+ self.idle_news.pack(side=LEFT, padx=10, pady=10)
+ self.idle_credits = Button(idle_buttons, text='Credits', width=8,
+ highlightbackground=self.bg,
+ command=self.show_idle_credits)
+ self.idle_credits.pack(side=LEFT, padx=10, pady=10)
+
+ # License, copyright, and credits are of type _sitebuiltins._Printer
+ def show_py_license(self):
+ "Handle License button event."
self.display_printer_text('About - License', license)
- def ShowCopyright(self):
+ def show_py_copyright(self):
+ "Handle Copyright button event."
self.display_printer_text('About - Copyright', copyright)
- def ShowPythonCredits(self):
+ def show_py_credits(self):
+ "Handle Python Credits button event."
self.display_printer_text('About - Python Credits', credits)
# Encode CREDITS.txt to utf-8 for proper version of Loewis.
# Specify others as ascii until need utf-8, so catch errors.
- def ShowIDLECredits(self):
+ def show_idle_credits(self):
+ "Handle Idle Credits button event."
self.display_file_text('About - Credits', 'CREDITS.txt', 'utf-8')
- def ShowIDLEAbout(self):
+ def show_readme(self):
+ "Handle Readme button event."
self.display_file_text('About - Readme', 'README.txt', 'ascii')
- def ShowIDLENEWS(self):
+ def show_idle_news(self):
+ "Handle News button event."
self.display_file_text('About - NEWS', 'NEWS.txt', 'utf-8')
def display_printer_text(self, title, printer):
+ """Create textview for built-in constants.
+
+ Built-in constants have type _sitebuiltins._Printer. The
+ text is extracted from the built-in and then sent to a text
+ viewer with self as the parent and title as the title of
+ the popup.
+ """
printer._Printer__setup()
text = '\n'.join(printer._Printer__lines)
- textview.view_text(self, title, text)
+ self._current_textview = textview.view_text(
+ self, title, text, _utest=self._utest)
def display_file_text(self, title, filename, encoding=None):
+ """Create textview for filename.
+
+ The filename needs to be in the current directory. The path
+ is sent to a text viewer with self as the parent, title as
+ the title of the popup, and the file encoding.
+ """
fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), filename)
- textview.view_file(self, title, fn, encoding)
+ self._current_textview = textview.view_file(
+ self, title, fn, encoding, _utest=self._utest)
- def Ok(self, event=None):
+ def ok(self, event=None):
+ "Dismiss help_about dialog."
self.destroy()
'Create and return a new object. See help(type) for accurate signature.')
gtest(list.__init__,
'Initialize self. See help(type(self)) for accurate signature.')
- append_doc = "L.append(object) -> None -- append object to end"
+ append_doc = "L.append(object) -> None -- append object to end" #see3.7
gtest(list.append, append_doc)
gtest([].append, append_doc)
gtest(List.append, append_doc)
def test_multiline_docstring(self):
# Test fewer lines than max.
- self.assertEqual(signature(list),
- "list() -> new empty list\n"
- "list(iterable) -> new list initialized from iterable's items")
+ self.assertEqual(signature(range),
+ "range(stop) -> range object\n"
+ "range(start, stop[, step]) -> range object")
# Test max lines
self.assertEqual(signature(bytes), '''\
Much is tested by opening config dialog live or in test_configdialog.
Coverage: 27%
'''
-from sys import modules
from test.support import captured_stderr
-from tkinter import Tk
import unittest
from idlelib import config
from test.support import requires
requires('gui')
import unittest
-from tkinter import Tk, Text
+from tkinter import Tk
class GetKeysTest(unittest.TestCase):
import unittest
-from tkinter import Tk, Text
from idlelib.editor import EditorWindow
-from test.support import requires
class Editor_func_test(unittest.TestCase):
def test_filename_to_unicode(self):
'''Test idlelib.help_about.
-Coverage:
+Coverage: 100%
'''
-from idlelib import help_about
-from idlelib import textview
+from test.support import requires, findfile
+from tkinter import Tk, TclError
+import unittest
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Mbox_func
-import unittest
+from idlelib.help_about import AboutDialog as About
+from idlelib import textview
+
+class LiveDialogTest(unittest.TestCase):
+ """Simulate user clicking buttons other than [Close].
+
+ Test that invoked textview has text from source.
+ """
+ @classmethod
+ def setUpClass(cls):
+ requires('gui')
+ cls.root = Tk()
+ cls.root.withdraw()
+ cls.dialog = About(cls.root, 'About IDLE', _utest=True)
+
+ @classmethod
+ def tearDownClass(cls):
+ del cls.dialog
+ cls.root.update_idletasks()
+ cls.root.destroy()
+ del cls.root
+
+ def test_dialog_title(self):
+ """Test about dialog title"""
+ self.assertEqual(self.dialog.title(), 'About IDLE')
+
+ def test_printer_buttons(self):
+ """Test buttons whose commands use printer function."""
+ dialog = self.dialog
+ button_sources = [(self.dialog.py_license, license),
+ (self.dialog.py_copyright, copyright),
+ (self.dialog.py_credits, credits)]
+
+ for button, printer in button_sources:
+ printer._Printer__setup()
+ button.invoke()
+ self.assertEqual(
+ printer._Printer__lines[0],
+ dialog._current_textview.text.get('1.0', '1.end'))
+ self.assertEqual(
+ printer._Printer__lines[1],
+ dialog._current_textview.text.get('2.0', '2.end'))
+ dialog._current_textview.destroy()
+
+ def test_file_buttons(self):
+ """Test buttons that display files."""
+ dialog = self.dialog
+ button_sources = [(self.dialog.readme, 'README.txt'),
+ (self.dialog.idle_news, 'NEWS.txt'),
+ (self.dialog.idle_credits, 'CREDITS.txt')]
+
+ for button, filename in button_sources:
+ button.invoke()
+ fn = findfile(filename, subdir='idlelib')
+ with open(fn) as f:
+ self.assertEqual(
+ f.readline().strip(),
+ dialog._current_textview.text.get('1.0', '1.end'))
+ f.readline()
+ self.assertEqual(
+ f.readline().strip(),
+ dialog._current_textview.text.get('3.0', '3.end'))
+ dialog._current_textview.destroy()
+
+
+class CloseTest(unittest.TestCase):
+ """Simulate user clicking [Close] button"""
+
+ @classmethod
+ def setUpClass(cls):
+ requires('gui')
+ cls.root = Tk()
+ cls.root.withdraw()
+ cls.dialog = About(cls.root, 'About IDLE', _utest=True)
+
+ @classmethod
+ def tearDownClass(cls):
+ del cls.dialog
+ cls.root.update_idletasks()
+ cls.root.destroy()
+ del cls.root
+
+ def test_close(self):
+ self.assertEqual(self.dialog.winfo_class(), 'Toplevel')
+ self.dialog.button_ok.invoke()
+ with self.assertRaises(TclError):
+ self.dialog.winfo_class()
+
-About = help_about.AboutDialog
class Dummy_about_dialog():
# Dummy class for testing file display functions.
- idle_credits = About.ShowIDLECredits
- idle_readme = About.ShowIDLEAbout
- idle_news = About.ShowIDLENEWS
+ idle_credits = About.show_idle_credits
+ idle_readme = About.show_readme
+ idle_news = About.show_idle_news
# Called by the above
display_file_text = About.display_file_text
+ _utest = True
class DisplayFileTest(unittest.TestCase):
+ """Test functions that display files.
+
+ While somewhat redundant with gui-based test_file_dialog,
+ these unit tests run on all buildbots, not just a few.
+ """
dialog = Dummy_about_dialog()
@classmethod
cls.view = Func()
textview.showerror = cls.error
textview.view_text = cls.view
- cls.About = Dummy_about_dialog()
@classmethod
def tearDownClass(cls):
textview.showerror = cls.orig_error
textview.view_text = cls.orig_view
- def test_file_isplay(self):
+ def test_file_display(self):
for handler in (self.dialog.idle_credits,
self.dialog.idle_readme,
self.dialog.idle_news):
'''
from idlelib import macosx
from test.support import requires
-import sys
import tkinter as tk
import unittest
import unittest.mock as mock
requires('gui')
cls.root = tk.Tk()
cls.root.withdraw()
+ def cmd(tkpath, func):
+ assert isinstance(tkpath, str)
+ assert isinstance(func, type(cmd))
+ cls.root.createcommand = cmd
@classmethod
def tearDownClass(cls):
@classmethod
def setUpClass(cls):
cls.root = Tk()
+ cls.root.withdraw()
cls.text = Text(cls.root)
cls.editwin = DummyEditwin(cls.text)
cls.editwin.text_frame = Mock()
@classmethod
def tearDownClass(cls):
+ del cls.dialog.destroy
del cls.dialog
cls.root.destroy()
del cls.root
self.assertIn('Invalid Replace Expression', showerror.message)
# test access method
- self.engine.setcookedpat("\'")
- equal(pv.get(), "\\'")
+ self.engine.setcookedpat("?")
+ equal(pv.get(), "\\?")
def test_replace_backwards(self):
equal = self.assertEqual
'''
import unittest
from test.support import requires
-from tkinter import Tk, Toplevel, Frame ##, BooleanVar, StringVar
+from tkinter import Tk, Frame ##, BooleanVar, StringVar
from idlelib import searchengine as se
from idlelib import searchbase as sdb
from idlelib.idle_test.mock_idle import Func
Using mock Text would not change this. Other mocks are used to retrieve
information about calls.
-Coverage: 94%.
+Coverage: 100%.
'''
from idlelib import textview as tv
from test.support import requires
import unittest
import os
-from tkinter import Tk
+from tkinter import Tk, Button
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Mbox_func
root.destroy() # Pyflakes falsely sees root as undefined.
del root
+# If we call TextViewer or wrapper functions with defaults
+# modal=True, _utest=False, test hangs on call to wait_window.
+# Have also gotten tk error 'can't invoke "event" command'.
+
class TV(tv.TextViewer): # Used in TextViewTest.
transient = Func()
grab_set = Func()
wait_window = Func()
+
+# Call wrapper class with mock wait_window.
class TextViewTest(unittest.TestCase):
def setUp(self):
self.assertTrue(TV.transient.called)
self.assertTrue(TV.grab_set.called)
self.assertTrue(TV.wait_window.called)
- view.Ok()
+ view.ok()
def test_init_nonmodal(self):
view = TV(root, 'Title', 'test text', modal=False)
self.assertFalse(TV.transient.called)
self.assertFalse(TV.grab_set.called)
self.assertFalse(TV.wait_window.called)
- view.Ok()
+ view.ok()
def test_ok(self):
view = TV(root, 'Title', 'test text', modal=False)
view.destroy = Func()
- view.Ok()
+ view.ok()
self.assertTrue(view.destroy.called)
del view.destroy # Unmask real function.
view.destroy()
+# Call TextViewer with modal=False.
class ViewFunctionTest(unittest.TestCase):
@classmethod
del cls.orig_error
def test_view_text(self):
- # If modal True, get tk error 'can't invoke "event" command'.
view = tv.view_text(root, 'Title', 'test text', modal=False)
self.assertIsInstance(view, tv.TextViewer)
- view.Ok()
+ view.ok()
def test_view_file(self):
- test_dir = os.path.dirname(__file__)
- testfile = os.path.join(test_dir, 'test_textview.py')
- view = tv.view_file(root, 'Title', testfile, modal=False)
+ view = tv.view_file(root, 'Title', __file__, modal=False)
self.assertIsInstance(view, tv.TextViewer)
- self.assertIn('Test', view.textView.get('1.0', '1.end'))
- view.Ok()
+ self.assertIn('Test', view.text.get('1.0', '1.end'))
+ view.ok()
+ def test_bad_file(self):
# Mock showerror will be used; view_file will return None.
- testfile = os.path.join(test_dir, '../notthere.py')
- view = tv.view_file(root, 'Title', testfile, modal=False)
+ view = tv.view_file(root, 'Title', 'abc.xyz', modal=False)
self.assertIsNone(view)
+ self.assertEqual(tv.showerror.title, 'File Load Error')
+
+ def test_bad_encoding(self):
+ p = os.path
+ fn = p.abspath(p.join(p.dirname(__file__), '..', 'CREDITS.txt'))
+ tv.showerror.title = None
+ view = tv.view_file(root, 'Title', fn, 'ascii', modal=False)
+ self.assertIsNone(view)
+ self.assertEqual(tv.showerror.title, 'Unicode Decode Error')
+
+
+
+# Call TextViewer with _utest=True.
+class ButtonClickTest(unittest.TestCase):
+
+ def setUp(self):
+ self.view = None
+ self.called = False
+
+ def tearDown(self):
+ if self.view:
+ self.view.destroy()
+
+ def test_view_text_bind_with_button(self):
+ def _command():
+ self.called = True
+ self.view = tv.view_text(root, 'TITLE_TEXT', 'COMMAND', _utest=True)
+ button = Button(root, text='BUTTON', command=_command)
+ button.invoke()
+ self.addCleanup(button.destroy)
+
+ self.assertEqual(self.called, True)
+ self.assertEqual(self.view.title(), 'TITLE_TEXT')
+ self.assertEqual(self.view.text.get('1.0', '1.end'), 'COMMAND')
+
+ def test_view_file_bind_with_button(self):
+ def _command():
+ self.called = True
+ self.view = tv.view_file(root, 'TITLE_FILE', __file__, _utest=True)
+ button = Button(root, text='BUTTON', command=_command)
+ button.invoke()
+ self.addCleanup(button.destroy)
+
+ self.assertEqual(self.called, True)
+ self.assertEqual(self.view.title(), 'TITLE_FILE')
+ with open(__file__) as f:
+ self.assertEqual(self.view.text.get('1.0', '1.end'),
+ f.readline().strip())
+ f.readline()
+ self.assertEqual(self.view.text.get('3.0', '3.end'),
+ f.readline().strip())
if __name__ == '__main__':
from idlelib import tree
from test.support import requires
requires('gui')
-import os
import unittest
from tkinter import Tk
A number of functions that enhance IDLE on Mac OSX.
"""
from sys import platform # Used in _init_tk_type, changed by test.
-import warnings
import tkinter
-from collections import Mapping
+from collections.abc import Mapping
import re
import sys
#! /usr/bin/env python3
+import sys
+
try:
from tkinter import *
except ImportError:
raise SystemExit(1)
from code import InteractiveInterpreter
-import getopt
-import io
import linecache
import os
import os.path
-from platform import python_version, system
+from platform import python_version
import re
import socket
import subprocess
-import sys
import threading
import time
import tokenize
import warnings
-from idlelib import testing # bool value
from idlelib.colorizer import ColorDelegator
from idlelib.config import idleConf
from idlelib import debugger
from idlelib import debugger_r
from idlelib.editor import EditorWindow, fixwordbreaks
from idlelib.filelist import FileList
-from idlelib import macosx
from idlelib.outwin import OutputWindow
from idlelib import rpc
from idlelib.run import idle_formatwarning, PseudoInputFile, PseudoOutputFile
"""
def main():
+ import getopt
+ from platform import system
+ from idlelib import testing # bool value
+ from idlelib import macosx
+
global flist, root, use_subprocess
capture_warnings(True)
import os
from sys import executable, platform # Platform is set for one test.
-from tkinter import Toplevel, StringVar, W, E, N, S
+from tkinter import Toplevel, StringVar, W, E, S
from tkinter.ttk import Frame, Button, Entry, Label
from tkinter import filedialog
from tkinter.font import Font
try:
file.write(idle_formatwarning(
message, category, filename, lineno, line))
- except IOError:
+ except OSError:
pass # the file (probably stderr) is invalid - this warning gets lost.
_warnings_showwarning = None
server.handle_request() # A single request only
def show_socket_error(err, address):
+ "Display socket error from manage_socket."
import tkinter
- import tkinter.messagebox as tkMessageBox
+ from tkinter.messagebox import showerror
root = tkinter.Tk()
root.withdraw()
- if err.args[0] == 61: # connection refused
- msg = "IDLE's subprocess can't connect to %s:%d. This may be due "\
- "to your personal firewall configuration. It is safe to "\
- "allow this internal connection because no data is visible on "\
- "external ports." % address
- tkMessageBox.showerror("IDLE Subprocess Error", msg, parent=root)
- else:
- tkMessageBox.showerror("IDLE Subprocess Error",
- "Socket Error: %s" % err.args[1], parent=root)
+ msg = f"IDLE's subprocess can't connect to {address[0]}:{address[1]}.\n"\
+ f"Fatal OSError #{err.errno}: {err.strerror}.\n"\
+ f"See the 'Startup failure' section of the IDLE doc, online at\n"\
+ f"https://docs.python.org/3/library/idle.html#startup-failure"
+ showerror("IDLE Subprocess Error", msg, parent=root)
root.destroy()
def print_exception():
import linecache
import os
-import re
import sys
import tkinter as tk
"""Simple text browser for IDLE
"""
-from tkinter import *
+from tkinter import Toplevel, Frame, Button, Text
+from tkinter import DISABLED, SUNKEN, VERTICAL, WORD
+from tkinter import RIGHT, LEFT, TOP, BOTTOM, BOTH, X, Y
from tkinter.ttk import Scrollbar
from tkinter.messagebox import showerror
class TextViewer(Toplevel):
"A simple text viewer dialog for IDLE."
- def __init__(self, parent, title, text, modal=True, _htest=False):
- """Show the given text in a scrollable window with a 'close' button
+ def __init__(self, parent, title, text, modal=True,
+ _htest=False, _utest=False):
+ """Show the given text in a scrollable window with a 'close' button.
- If modal option set to False, user can interact with other windows,
- otherwise they will be unable to interact with other windows until
- the textview window is closed.
+ If modal is left True, users cannot interact with other windows
+ until the textview window is closed.
+ parent - parent of this dialog
+ title - string which is title of popup dialog
+ text - text to display in dialog
_htest - bool; change box location when running htest.
+ _utest - bool; don't wait_window when running unittest.
"""
Toplevel.__init__(self, parent)
self.configure(borderwidth=5)
self.bg = '#ffffff'
self.fg = '#000000'
- self.CreateWidgets()
+ self.create_widgets()
self.title(title)
- self.protocol("WM_DELETE_WINDOW", self.Ok)
+ self.protocol("WM_DELETE_WINDOW", self.ok)
self.parent = parent
- self.textView.focus_set()
+ self.text.focus_set()
# Bind keys for closing this dialog.
- self.bind('<Return>',self.Ok)
- self.bind('<Escape>',self.Ok)
- self.textView.insert(0.0, text)
- self.textView.config(state=DISABLED)
+ self.bind('<Return>', self.ok)
+ self.bind('<Escape>', self.ok)
+ self.text.insert(0.0, text)
+ self.text.config(state=DISABLED)
if modal:
self.transient(parent)
self.grab_set()
- self.wait_window()
-
- def CreateWidgets(self):
- frameText = Frame(self, relief=SUNKEN, height=700)
- frameButtons = Frame(self)
- self.buttonOk = Button(frameButtons, text='Close',
- command=self.Ok, takefocus=FALSE)
- self.scrollbarView = Scrollbar(frameText, orient=VERTICAL,
- takefocus=FALSE)
- self.textView = Text(frameText, wrap=WORD, highlightthickness=0,
+ if not _utest:
+ self.wait_window()
+
+ def create_widgets(self):
+ "Create Frame with Text (with vertical Scrollbar) and Button."
+ frame = Frame(self, relief=SUNKEN, height=700)
+ frame_buttons = Frame(self)
+ self.button_ok = Button(frame_buttons, text='Close',
+ command=self.ok, takefocus=False)
+ self.scrollbar = Scrollbar(frame, orient=VERTICAL, takefocus=False)
+ self.text = Text(frame, wrap=WORD, highlightthickness=0,
fg=self.fg, bg=self.bg)
- self.scrollbarView.config(command=self.textView.yview)
- self.textView.config(yscrollcommand=self.scrollbarView.set)
- self.buttonOk.pack()
- self.scrollbarView.pack(side=RIGHT,fill=Y)
- self.textView.pack(side=LEFT,expand=TRUE,fill=BOTH)
- frameButtons.pack(side=BOTTOM,fill=X)
- frameText.pack(side=TOP,expand=TRUE,fill=BOTH)
-
- def Ok(self, event=None):
+ self.scrollbar.config(command=self.text.yview)
+ self.text.config(yscrollcommand=self.scrollbar.set)
+
+ self.button_ok.pack()
+ self.scrollbar.pack(side=RIGHT, fill=Y)
+ self.text.pack(side=LEFT, expand=True, fill=BOTH)
+ frame_buttons.pack(side=BOTTOM, fill=X)
+ frame.pack(side=TOP, expand=True, fill=BOTH)
+
+ def ok(self, event=None):
+ """Dismiss text viewer dialog."""
self.destroy()
-def view_text(parent, title, text, modal=True):
- return TextViewer(parent, title, text, modal)
+def view_text(parent, title, text, modal=True, _utest=False):
+ """Create TextViewer for given text.
+
+ parent - parent of this dialog
+ title - string which is the title of popup dialog
+ text - text to display in this dialog
+ modal - controls if users can interact with other windows while this
+ dialog is displayed
+ _utest - bool; controls wait_window on unittest
+ """
+ return TextViewer(parent, title, text, modal, _utest=_utest)
-def view_file(parent, title, filename, encoding=None, modal=True):
+
+def view_file(parent, title, filename, encoding=None, modal=True, _utest=False):
+ """Create TextViewer for text in filename.
+
+ Return error message if file cannot be read. Otherwise calls view_text
+ with contents of the file.
+ """
try:
with open(filename, 'r', encoding=encoding) as file:
contents = file.read()
message=str(err),
parent=parent)
else:
- return view_text(parent, title, contents, modal)
+ return view_text(parent, title, contents, modal, _utest=_utest)
+ return None
+
if __name__ == '__main__':
import unittest
self.file.close()
try:
self.sock.shutdown(socket.SHUT_RDWR)
- except OSError as e:
- # The server might already have closed the connection
- if e.errno != errno.ENOTCONN:
+ except OSError as exc:
+ # The server might already have closed the connection.
+ # On Windows, this may result in WSAEINVAL (error 10022):
+ # An invalid operation was attempted.
+ if (exc.errno != errno.ENOTCONN
+ and getattr(exc, 'winerror', 0) != 10022):
raise
finally:
self.sock.close()
"""
if not module or not isinstance(module, types.ModuleType):
- raise TypeError("reload() argument must be module")
+ raise TypeError("reload() argument must be a module")
try:
name = module.__spec__.name
except AttributeError:
__author__ = ('Ka-Ping Yee <ping@lfw.org>',
'Yury Selivanov <yselivanov@sprymix.com>')
+import abc
import ast
import dis
import collections.abc
"""Return true if the object is a code object.
Code objects provide these attributes:
- co_argcount number of arguments (not including * or ** args)
- co_code string of raw compiled bytecode
- co_consts tuple of constants used in the bytecode
- co_filename name of file in which this code object was created
- co_firstlineno number of first line in Python source code
- co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
- co_lnotab encoded mapping of line numbers to bytecode indices
- co_name name with which this code object was defined
- co_names tuple of names of local variables
- co_nlocals number of local variables
- co_stacksize virtual machine stack space required
- co_varnames tuple of names of arguments and local variables"""
+ co_argcount number of arguments (not including *, ** args
+ or keyword only arguments)
+ co_code string of raw compiled bytecode
+ co_cellvars tuple of names of cell variables
+ co_consts tuple of constants used in the bytecode
+ co_filename name of file in which this code object was created
+ co_firstlineno number of first line in Python source code
+ co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
+ | 16=nested | 32=generator | 64=nofree | 128=coroutine
+ | 256=iterable_coroutine | 512=async_generator
+ co_freevars tuple of names of free variables
+ co_kwonlyargcount number of keyword only arguments (not including ** arg)
+ co_lnotab encoded mapping of line numbers to bytecode indices
+ co_name name with which this code object was defined
+ co_names tuple of names of local variables
+ co_nlocals number of local variables
+ co_stacksize virtual machine stack space required
+ co_varnames tuple of names of arguments and local variables"""
return isinstance(object, types.CodeType)
def isbuiltin(object):
def isabstract(object):
"""Return true if the object is an abstract base class (ABC)."""
- return bool(isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT)
+ if not isinstance(object, type):
+ return False
+ if object.__flags__ & TPFLAGS_IS_ABSTRACT:
+ return True
+ if not issubclass(type(object), abc.ABCMeta):
+ return False
+ if hasattr(object, '__abstractmethods__'):
+ # It looks like ABCMeta.__new__ has finished running;
+ # TPFLAGS_IS_ABSTRACT should have been accurate.
+ return False
+ # It looks like ABCMeta.__new__ has not finished running yet; we're
+ # probably in __init_subclass__. We'll look for abstractmethods manually.
+ for name, value in object.__dict__.items():
+ if getattr(value, "__isabstractmethod__", False):
+ return True
+ for base in object.__bases__:
+ for name in getattr(base, "__abstractmethods__", ()):
+ value = getattr(object, name, None)
+ if getattr(value, "__isabstractmethod__", False):
+ return True
+ return False
def getmembers(object, predicate=None):
"""Return all members of an object as (name, value) pairs sorted by name.
sigcls=sigcls)
sig = _signature_get_partial(wrapped_sig, partialmethod, (None,))
-
first_wrapped_param = tuple(wrapped_sig.parameters.values())[0]
- new_params = (first_wrapped_param,) + tuple(sig.parameters.values())
-
- return sig.replace(parameters=new_params)
+ if first_wrapped_param.kind is Parameter.VAR_POSITIONAL:
+ # First argument of the wrapped callable is `*args`, as in
+ # `partialmethod(lambda *args)`.
+ return sig
+ else:
+ sig_params = tuple(sig.parameters.values())
+ assert first_wrapped_param is not sig_params[0]
+ new_params = (first_wrapped_param,) + sig_params
+ return sig.replace(parameters=new_params)
if isfunction(obj) or _signature_is_functionlike(obj):
# If it's a pure Python function, or an object that is duck type
if address_less is NotImplemented:
return NotImplemented
try:
- return self.network < other.network
+ return (self.network < other.network or
+ self.network == other.network and address_less)
except AttributeError:
# We *do* allow addresses and interfaces to be sorted. The
# unassociated address is considered less than all interfaces.
if address_less is NotImplemented:
return NotImplemented
try:
- return self.network < other.network
+ return (self.network < other.network or
+ self.network == other.network and address_less)
except AttributeError:
# We *do* allow addresses and interfaces to be sorted. The
# unassociated address is considered less than all interfaces.
# Local imports
from .. import fixer_base
-from ..fixer_util import Name, Call, ListComp, in_special_context
+from ..pytree import Node
+from ..pygram import python_symbols as syms
+from ..fixer_util import Name, ArgList, ListComp, in_special_context
+
class FixFilter(fixer_base.ConditionalFix):
BM_compatible = True
>
')'
>
+ [extra_trailers=trailer*]
>
|
power<
'filter'
trailer< '(' arglist< none='None' ',' seq=any > ')' >
+ [extra_trailers=trailer*]
>
|
power<
'filter'
args=trailer< '(' [any] ')' >
+ [extra_trailers=trailer*]
>
"""
if self.should_skip(node):
return
+ trailers = []
+ if 'extra_trailers' in results:
+ for t in results['extra_trailers']:
+ trailers.append(t.clone())
+
if "filter_lambda" in results:
new = ListComp(results.get("fp").clone(),
results.get("fp").clone(),
results.get("it").clone(),
results.get("xp").clone())
+ new = Node(syms.power, [new] + trailers, prefix="")
elif "none" in results:
new = ListComp(Name("_f"),
Name("_f"),
results["seq"].clone(),
Name("_f"))
+ new = Node(syms.power, [new] + trailers, prefix="")
else:
if in_special_context(node):
return None
- new = node.clone()
+
+ args = results['args'].clone()
+ new = Node(syms.power, [Name("filter"), args], prefix="")
+ new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
new.prefix = ""
- new = Call(Name("list"), [new])
new.prefix = node.prefix
return new
# Local imports
from ..pgen2 import token
from .. import fixer_base
-from ..fixer_util import Name, Call, ListComp, in_special_context
+from ..fixer_util import Name, ArgList, Call, ListComp, in_special_context
from ..pygram import python_symbols as syms
+from ..pytree import Node
+
class FixMap(fixer_base.ConditionalFix):
BM_compatible = True
map_none=power<
'map'
trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
+ [extra_trailers=trailer*]
>
|
map_lambda=power<
>
')'
>
+ [extra_trailers=trailer*]
>
|
power<
- 'map' trailer< '(' [arglist=any] ')' >
+ 'map' args=trailer< '(' [any] ')' >
+ [extra_trailers=trailer*]
>
"""
if self.should_skip(node):
return
+ trailers = []
+ if 'extra_trailers' in results:
+ for t in results['extra_trailers']:
+ trailers.append(t.clone())
+
if node.parent.type == syms.simple_stmt:
self.warning(node, "You should use a for loop here")
new = node.clone()
new = ListComp(results["xp"].clone(),
results["fp"].clone(),
results["it"].clone())
+ new = Node(syms.power, [new] + trailers, prefix="")
+
else:
if "map_none" in results:
new = results["arg"].clone()
+ new.prefix = ""
else:
- if "arglist" in results:
- args = results["arglist"]
- if args.type == syms.arglist and \
- args.children[0].type == token.NAME and \
- args.children[0].value == "None":
+ if "args" in results:
+ args = results["args"]
+ if args.type == syms.trailer and \
+ args.children[1].type == syms.arglist and \
+ args.children[1].children[0].type == token.NAME and \
+ args.children[1].children[0].value == "None":
self.warning(node, "cannot convert map(None, ...) "
"with multiple arguments because map() "
"now truncates to the shortest sequence")
return
+
+ new = Node(syms.power, [Name("map"), args.clone()])
+ new.prefix = ""
+
if in_special_context(node):
return None
- new = node.clone()
+
+ new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
new.prefix = ""
- new = Call(Name("list"), [new])
+
new.prefix = node.prefix
return new
# Local imports
from .. import fixer_base
-from ..fixer_util import Name, Call, in_special_context
+from ..pytree import Node
+from ..pygram import python_symbols as syms
+from ..fixer_util import Name, ArgList, in_special_context
+
class FixZip(fixer_base.ConditionalFix):
BM_compatible = True
PATTERN = """
- power< 'zip' args=trailer< '(' [any] ')' >
+ power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
>
"""
if in_special_context(node):
return None
- new = node.clone()
- new.prefix = ""
- new = Call(Name("list"), [new])
+ args = results['args'].clone()
+ args.prefix = ""
+
+ trailers = []
+ if 'trailers' in results:
+ trailers = [n.clone() for n in results['trailers']]
+ for n in trailers:
+ n.prefix = ""
+
+ new = Node(syms.power, [Name("zip"), args], prefix="")
+ new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
new.prefix = node.prefix
return new
Ignore = Whitespace + any(r'\\\r?\n' + Whitespace) + maybe(Comment)
Name = r'[a-zA-Z_]\w*'
-Binnumber = r'0[bB][01]*'
-Hexnumber = r'0[xX][\da-fA-F]*[lL]?'
-Octnumber = r'0[oO]?[0-7]*[lL]?'
-Decnumber = r'[1-9]\d*[lL]?'
+Binnumber = r'0[bB]_?[01]+(?:_[01]+)*'
+Hexnumber = r'0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?'
+Octnumber = r'0[oO]?_?[0-7]+(?:_[0-7]+)*[lL]?'
+Decnumber = group(r'[1-9]\d*(?:_\d+)*[lL]?', '0[lL]?')
Intnumber = group(Binnumber, Hexnumber, Octnumber, Decnumber)
-Exponent = r'[eE][-+]?\d+'
-Pointfloat = group(r'\d+\.\d*', r'\.\d+') + maybe(Exponent)
-Expfloat = r'\d+' + Exponent
+Exponent = r'[eE][-+]?\d+(?:_\d+)*'
+Pointfloat = group(r'\d+(?:_\d+)*\.(?:\d+(?:_\d+)*)?', r'\.\d+(?:_\d+)*') + maybe(Exponent)
+Expfloat = r'\d+(?:_\d+)*' + Exponent
Floatnumber = group(Pointfloat, Expfloat)
-Imagnumber = group(r'\d+[jJ]', Floatnumber + r'[jJ]')
+Imagnumber = group(r'\d+(?:_\d+)*[jJ]', Floatnumber + r'[jJ]')
Number = group(Imagnumber, Floatnumber, Intnumber)
# Tail end of ' string.
Single3 = r"[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''"
# Tail end of """ string.
Double3 = r'[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""'
-Triple = group("[ubUB]?[rR]?'''", '[ubUB]?[rR]?"""')
+_litprefix = r"(?:[uUrRbBfF]|[rR][bB]|[bBuU][rR])?"
+Triple = group(_litprefix + "'''", _litprefix + '"""')
# Single-line ' or " string.
-String = group(r"[uU]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*'",
- r'[uU]?[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*"')
+String = group(_litprefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*'",
+ _litprefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*"')
# Because of leftmost-then-longest match semantics, be sure to put the
# longest operators first (e.g., if = came before ==, == would get
Token = Ignore + PlainToken
# First (or only) line of ' or " string.
-ContStr = group(r"[uUbB]?[rR]?'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
+ContStr = group(_litprefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
group("'", r'\\\r?\n'),
- r'[uUbB]?[rR]?"[^\n"\\]*(?:\\.[^\n"\\]*)*' +
+ _litprefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*' +
group('"', r'\\\r?\n'))
PseudoExtras = group(r'\\\r?\n', Comment, Triple)
PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name)
"r'''": single3prog, 'r"""': double3prog,
"u'''": single3prog, 'u"""': double3prog,
"b'''": single3prog, 'b"""': double3prog,
+ "f'''": single3prog, 'f"""': double3prog,
"ur'''": single3prog, 'ur"""': double3prog,
"br'''": single3prog, 'br"""': double3prog,
+ "rb'''": single3prog, 'rb"""': double3prog,
"R'''": single3prog, 'R"""': double3prog,
"U'''": single3prog, 'U"""': double3prog,
"B'''": single3prog, 'B"""': double3prog,
+ "F'''": single3prog, 'F"""': double3prog,
"uR'''": single3prog, 'uR"""': double3prog,
"Ur'''": single3prog, 'Ur"""': double3prog,
"UR'''": single3prog, 'UR"""': double3prog,
"bR'''": single3prog, 'bR"""': double3prog,
"Br'''": single3prog, 'Br"""': double3prog,
"BR'''": single3prog, 'BR"""': double3prog,
+ "rB'''": single3prog, 'rB"""': double3prog,
+ "Rb'''": single3prog, 'Rb"""': double3prog,
+ "RB'''": single3prog, 'RB"""': double3prog,
'r': None, 'R': None,
'u': None, 'U': None,
+ 'f': None, 'F': None,
'b': None, 'B': None}
triple_quoted = {}
"r'''", 'r"""', "R'''", 'R"""',
"u'''", 'u"""', "U'''", 'U"""',
"b'''", 'b"""', "B'''", 'B"""',
+ "f'''", 'f"""', "F'''", 'F"""',
"ur'''", 'ur"""', "Ur'''", 'Ur"""',
"uR'''", 'uR"""', "UR'''", 'UR"""',
"br'''", 'br"""', "Br'''", 'Br"""',
- "bR'''", 'bR"""', "BR'''", 'BR"""',):
+ "bR'''", 'bR"""', "BR'''", 'BR"""',
+ "rb'''", 'rb"""', "Rb'''", 'Rb"""',
+ "rB'''", 'rB"""', "RB'''", 'RB"""',):
triple_quoted[t] = t
single_quoted = {}
for t in ("'", '"',
"r'", 'r"', "R'", 'R"',
"u'", 'u"', "U'", 'U"',
"b'", 'b"', "B'", 'B"',
+ "f'", 'f"', "F'", 'F"',
"ur'", 'ur"', "Ur'", 'Ur"',
"uR'", 'uR"', "UR'", 'UR"',
"br'", 'br"', "Br'", 'Br"',
- "bR'", 'bR"', "BR'", 'BR"', ):
+ "bR'", 'bR"', "BR'", 'BR"',
+ "rb'", 'rb"', "Rb'", 'Rb"',
+ "rB'", 'rB"', "RB'", 'RB"',):
single_quoted[t] = t
tabsize = 8
x = 0b100000000000000000000000000000000000000000000000000000000000000000000
x = 0B111111111111111111111111111111111111111111111111111111111111111111111
+ def testUnderscoresInNumbers(self):
+ # Integers
+ x = 1_0
+ x = 123_456_7_89
+ x = 0xabc_123_4_5
+ x = 0X_abc_123
+ x = 0B11_01
+ x = 0b_11_01
+ x = 0o45_67
+ x = 0O_45_67
+
+ # Floats
+ x = 3_1.4
+ x = 03_1.4
+ x = 3_1.
+ x = .3_1
+ x = 3.1_4
+ x = 0_3.1_4
+ x = 3e1_4
+ x = 3_1e+4_1
+ x = 3_1E-4_1
+
def testFloats(self):
x = 3.14
x = 314.
a = """x = [x for x in range(10) if x%2 == 0]"""
self.check(b, a)
- # XXX This (rare) case is not supported
-## b = """x = filter(f, 'abc')[0]"""
-## a = """x = list(filter(f, 'abc'))[0]"""
-## self.check(b, a)
+ def test_filter_trailers(self):
+ b = """x = filter(None, 'abc')[0]"""
+ a = """x = [_f for _f in 'abc' if _f][0]"""
+ self.check(b, a)
+
+ b = """x = len(filter(f, 'abc')[0])"""
+ a = """x = len(list(filter(f, 'abc'))[0])"""
+ self.check(b, a)
+
+ b = """x = filter(lambda x: x%2 == 0, range(10))[0]"""
+ a = """x = [x for x in range(10) if x%2 == 0][0]"""
+ self.check(b, a)
+
+ # Note the parens around x
+ b = """x = filter(lambda (x): x%2 == 0, range(10))[0]"""
+ a = """x = [x for x in range(10) if x%2 == 0][0]"""
+ self.check(b, a)
def test_filter_nochange(self):
a = """b.join(filter(f, 'abc'))"""
a = """x = list(map( f, 'abc' ))"""
self.check(b, a)
+ def test_map_trailers(self):
+ b = """x = map(f, 'abc')[0]"""
+ a = """x = list(map(f, 'abc'))[0]"""
+ self.check(b, a)
+
+ b = """x = map(None, l)[0]"""
+ a = """x = list(l)[0]"""
+ self.check(b, a)
+
+ b = """x = map(lambda x:x, l)[0]"""
+ a = """x = [x for x in l][0]"""
+ self.check(b, a)
+
+ b = """x = map(f, 'abc')[0][1]"""
+ a = """x = list(map(f, 'abc'))[0][1]"""
+ self.check(b, a)
+
def test_trailing_comment(self):
b = """x = map(f, 'abc') # foo"""
a = """x = list(map(f, 'abc')) # foo"""
"""
self.warns(b, a, "You should use a for loop here")
- # XXX This (rare) case is not supported
-## b = """x = map(f, 'abc')[0]"""
-## a = """x = list(map(f, 'abc'))[0]"""
-## self.check(b, a)
-
def test_map_nochange(self):
a = """b.join(map(f, 'abc'))"""
self.unchanged(a)
super(Test_zip, self).check(b, a)
def test_zip_basic(self):
+ b = """x = zip()"""
+ a = """x = list(zip())"""
+ self.check(b, a)
+
b = """x = zip(a, b, c)"""
a = """x = list(zip(a, b, c))"""
self.check(b, a)
a = """x = len(list(zip(a, b)))"""
self.check(b, a)
+ def test_zip_trailers(self):
+ b = """x = zip(a, b, c)[0]"""
+ a = """x = list(zip(a, b, c))[0]"""
+ self.check(b, a)
+
+ b = """x = zip(a, b, c)[0][1]"""
+ a = """x = list(zip(a, b, c))[0][1]"""
+ self.check(b, a)
+
def test_zip_nochange(self):
a = """b.join(zip(a, b))"""
self.unchanged(a)
def test_6(self):
self.validate("lst: List[int] = []")
+
class TestExcept(GrammarTest):
def test_new(self):
s = """
self.validate(s)
+class TestStringLiterals(GrammarTest):
+ prefixes = ("'", '"',
+ "r'", 'r"', "R'", 'R"',
+ "u'", 'u"', "U'", 'U"',
+ "b'", 'b"', "B'", 'B"',
+ "f'", 'f"', "F'", 'F"',
+ "ur'", 'ur"', "Ur'", 'Ur"',
+ "uR'", 'uR"', "UR'", 'UR"',
+ "br'", 'br"', "Br'", 'Br"',
+ "bR'", 'bR"', "BR'", 'BR"',
+ "rb'", 'rb"', "Rb'", 'Rb"',
+ "rB'", 'rB"', "RB'", 'RB"',)
+
+ def test_lit(self):
+ for pre in self.prefixes:
+ single = "{p}spamspamspam{s}".format(p=pre, s=pre[-1])
+ self.validate(single)
+ triple = "{p}{s}{s}eggs{s}{s}{s}".format(p=pre, s=pre[-1])
+ self.validate(triple)
+
+
# Adapted from Python 3's Lib/test/test_grammar.py:GrammarTests.testAtoms
class TestSetLiteral(GrammarTest):
def test_1(self):
if isinstance(address, str):
self.unixsocket = True
- self._connect_unixsocket(address)
+ # Syslog server may be unavailable during handler initialisation.
+ # C's openlog() function also ignores connection errors.
+ # Moreover, we ignore these errors while logging, so it not worse
+ # to ignore it also here.
+ try:
+ self._connect_unixsocket(address)
+ except OSError:
+ pass
else:
self.unixsocket = False
if socktype is None:
socktype = socket.SOCK_DGRAM
- self.socket = socket.socket(socket.AF_INET, socktype)
- if socktype == socket.SOCK_STREAM:
- self.socket.connect(address)
+ host, port = address
+ ress = socket.getaddrinfo(host, port, 0, socktype)
+ if not ress:
+ raise OSError("getaddrinfo returns an empty list")
+ for res in ress:
+ af, socktype, proto, _, sa = res
+ err = sock = None
+ try:
+ sock = socket.socket(af, socktype, proto)
+ if socktype == socket.SOCK_STREAM:
+ sock.connect(sa)
+ break
+ except OSError as exc:
+ err = exc
+ if sock is not None:
+ sock.close()
+ if err is not None:
+ raise err
+ self.socket = sock
self.socktype = socktype
- self.formatter = None
def _connect_unixsocket(self, address):
use_socktype = self.socktype
priority = self.priority_names[priority]
return (facility << 3) | priority
- def close (self):
+ def close(self):
"""
Closes the socket.
"""
util._close_stdin()
- # ignoring SIGCHLD means no need to reap zombie processes
- handler = signal.signal(signal.SIGCHLD, signal.SIG_IGN)
+ # ignoring SIGCHLD means no need to reap zombie processes;
+ # letting SIGINT through avoids KeyboardInterrupt tracebacks
+ handlers = {
+ signal.SIGCHLD: signal.SIG_IGN,
+ signal.SIGINT: signal.SIG_DFL,
+ }
+ old_handlers = {sig: signal.signal(sig, val)
+ for (sig, val) in handlers.items()}
+
with socket.socket(socket.AF_UNIX, fileno=listener_fd) as listener, \
selectors.DefaultSelector() as selector:
_forkserver._forkserver_address = listener.getsockname()
code = 1
if os.fork() == 0:
try:
- _serve_one(s, listener, alive_r, handler)
+ _serve_one(s, listener, alive_r, old_handlers)
except Exception:
sys.excepthook(*sys.exc_info())
sys.stderr.flush()
if e.errno != errno.ECONNABORTED:
raise
-def _serve_one(s, listener, alive_r, handler):
- # close unnecessary stuff and reset SIGCHLD handler
+def _serve_one(s, listener, alive_r, handlers):
+ # close unnecessary stuff and reset signal handlers
listener.close()
os.close(alive_r)
- signal.signal(signal.SIGCHLD, handler)
+ for sig, val in handlers.items():
+ signal.signal(sig, val)
# receive fds from parent process
fds = reduction.recvfds(s, MAXFDS_TO_SEND + 1)
try:
result = (True, func(*args, **kwds))
except Exception as e:
- if wrap_exception:
+ if wrap_exception and func is not _helper_reraises_exception:
e = ExceptionWithTraceback(e, e.__traceback__)
result = (False, e)
try:
util.debug("Possible encoding error while sending result: %s" % (
wrapped))
put((job, i, (False, wrapped)))
+
+ task = job = result = func = args = kwds = None
completed += 1
util.debug('worker exiting after %d tasks' % completed)
+def _helper_reraises_exception(ex):
+ 'Pickle-able helper function for use by _guarded_task_generation.'
+ raise ex
+
#
# Class representing a process pool
#
return self._map_async(func, iterable, starmapstar, chunksize,
callback, error_callback)
+ def _guarded_task_generation(self, result_job, func, iterable):
+ '''Provides a generator of tasks for imap and imap_unordered with
+ appropriate handling for iterables which throw exceptions during
+ iteration.'''
+ try:
+ i = -1
+ for i, x in enumerate(iterable):
+ yield (result_job, i, func, (x,), {})
+ except Exception as e:
+ yield (result_job, i+1, _helper_reraises_exception, (e,), {})
+
def imap(self, func, iterable, chunksize=1):
'''
Equivalent of `map()` -- can be MUCH slower than `Pool.map()`.
raise ValueError("Pool not running")
if chunksize == 1:
result = IMapIterator(self._cache)
- self._taskqueue.put((((result._job, i, func, (x,), {})
- for i, x in enumerate(iterable)), result._set_length))
+ self._taskqueue.put(
+ (
+ self._guarded_task_generation(result._job, func, iterable),
+ result._set_length
+ ))
return result
else:
assert chunksize > 1
task_batches = Pool._get_tasks(func, iterable, chunksize)
result = IMapIterator(self._cache)
- self._taskqueue.put((((result._job, i, mapstar, (x,), {})
- for i, x in enumerate(task_batches)), result._set_length))
+ self._taskqueue.put(
+ (
+ self._guarded_task_generation(result._job,
+ mapstar,
+ task_batches),
+ result._set_length
+ ))
return (item for chunk in result for item in chunk)
def imap_unordered(self, func, iterable, chunksize=1):
raise ValueError("Pool not running")
if chunksize == 1:
result = IMapUnorderedIterator(self._cache)
- self._taskqueue.put((((result._job, i, func, (x,), {})
- for i, x in enumerate(iterable)), result._set_length))
+ self._taskqueue.put(
+ (
+ self._guarded_task_generation(result._job, func, iterable),
+ result._set_length
+ ))
return result
else:
assert chunksize > 1
task_batches = Pool._get_tasks(func, iterable, chunksize)
result = IMapUnorderedIterator(self._cache)
- self._taskqueue.put((((result._job, i, mapstar, (x,), {})
- for i, x in enumerate(task_batches)), result._set_length))
+ self._taskqueue.put(
+ (
+ self._guarded_task_generation(result._job,
+ mapstar,
+ task_batches),
+ result._set_length
+ ))
return (item for chunk in result for item in chunk)
def apply_async(self, func, args=(), kwds={}, callback=None,
if self._state != RUN:
raise ValueError("Pool not running")
result = ApplyResult(self._cache, callback, error_callback)
- self._taskqueue.put(([(result._job, None, func, args, kwds)], None))
+ self._taskqueue.put(([(result._job, 0, func, args, kwds)], None))
return result
def map_async(self, func, iterable, chunksize=None, callback=None,
task_batches = Pool._get_tasks(func, iterable, chunksize)
result = MapResult(self._cache, chunksize, len(iterable), callback,
error_callback=error_callback)
- self._taskqueue.put((((result._job, i, mapper, (x,), {})
- for i, x in enumerate(task_batches)), None))
+ self._taskqueue.put(
+ (
+ self._guarded_task_generation(result._job,
+ mapper,
+ task_batches),
+ None
+ )
+ )
return result
@staticmethod
for taskseq, set_length in iter(taskqueue.get, None):
task = None
- i = -1
try:
- for i, task in enumerate(taskseq):
+ # iterating taskseq cannot fail
+ for task in taskseq:
if thread._state:
util.debug('task handler found thread._state != RUN')
break
try:
put(task)
except Exception as e:
- job, ind = task[:2]
+ job, idx = task[:2]
try:
- cache[job]._set(ind, (False, e))
+ cache[job]._set(idx, (False, e))
except KeyError:
pass
else:
if set_length:
util.debug('doing set_length()')
- set_length(i+1)
+ idx = task[1] if task else -1
+ set_length(idx + 1)
continue
break
- except Exception as ex:
- job, ind = task[:2] if task else (0, 0)
- if job in cache:
- cache[job]._set(ind + 1, (False, ex))
- if set_length:
- util.debug('doing set_length()')
- set_length(i+1)
+ finally:
+ task = taskseq = job = None
else:
util.debug('task handler got sentinel')
-
try:
# tell result handler to finish when cache is empty
util.debug('task handler sending sentinel to result handler')
cache[job]._set(i, obj)
except KeyError:
pass
+ task = job = obj = None
while cache and thread._state != TERMINATE:
try:
cache[job]._set(i, obj)
except KeyError:
pass
+ task = job = obj = None
if hasattr(outqueue, '_reader'):
util.debug('ensuring that outqueue is not full')
else:
wacquire = None
- try:
- while 1:
+ while 1:
+ try:
nacquire()
try:
if not buffer:
wrelease()
except IndexError:
pass
- except Exception as e:
- if ignore_epipe and getattr(e, 'errno', 0) == errno.EPIPE:
- return
- # Since this runs in a daemon thread the resources it uses
- # may be become unusable while the process is cleaning up.
- # We ignore errors which happen after the process has
- # started to cleanup.
- try:
+ except Exception as e:
+ if ignore_epipe and getattr(e, 'errno', 0) == errno.EPIPE:
+ return
+ # Since this runs in a daemon thread the resources it uses
+ # may be become unusable while the process is cleaning up.
+ # We ignore errors which happen after the process has
+ # started to cleanup.
if is_exiting():
info('error in queue thread: %s', e)
+ return
else:
import traceback
traceback.print_exc()
- except Exception:
- pass
_sentinel = object()
def __setstate__(self, state):
(self._reader, self._writer, self._rlock, self._wlock) = state
+ self._poll = self._reader.poll
def get(self):
with self._rlock:
return
if minpriority is None:
- f = lambda p : p[0][0] is not None
+ f = lambda p : p[0] is not None
else:
- f = lambda p : p[0][0] is not None and p[0][0] >= minpriority
-
- items = [x for x in list(_finalizer_registry.items()) if f(x)]
- items.sort(reverse=True)
-
- for key, finalizer in items:
- sub_debug('calling %s', finalizer)
- try:
- finalizer()
- except Exception:
- import traceback
- traceback.print_exc()
+ f = lambda p : p[0] is not None and p[0] >= minpriority
+
+ # Careful: _finalizer_registry may be mutated while this function
+ # is running (either by a GC run or by another thread).
+
+ # list(_finalizer_registry) should be atomic, while
+ # list(_finalizer_registry.items()) is not.
+ keys = [key for key in list(_finalizer_registry) if f(key)]
+ keys.sort(reverse=True)
+
+ for key in keys:
+ finalizer = _finalizer_registry.get(key)
+ # key may have been removed from the registry
+ if finalizer is not None:
+ sub_debug('calling %s', finalizer)
+ try:
+ finalizer()
+ except Exception:
+ import traceback
+ traceback.print_exc()
if minpriority is None:
_finalizer_registry.clear()
def spawnv_passfds(path, args, passfds):
import _posixsubprocess
- passfds = sorted(passfds)
+ passfds = tuple(sorted(map(int, passfds)))
errpipe_read, errpipe_write = os.pipe()
try:
return _posixsubprocess.fork_exec(
if strict:
return self._ext_to_normal(_getfinalpathname(s))
else:
+ tail_parts = [] # End of the path after the first one not found
while True:
try:
s = self._ext_to_normal(_getfinalpathname(s))
except FileNotFoundError:
previous_s = s
- s = os.path.dirname(s)
+ s, tail = os.path.split(s)
+ tail_parts.append(tail)
if previous_s == s:
return path
else:
- if previous_s is None:
- return s
- else:
- return s + os.path.sep + os.path.basename(previous_s)
+ return os.path.join(s, *reversed(tail_parts))
# Means fallback on absolute
return None
try:
target = accessor.readlink(newpath)
except OSError as e:
- if e.errno != EINVAL:
- if strict:
- raise
- else:
- return newpath
- # Not a symlink
+ if e.errno != EINVAL and strict:
+ raise
+ # Not a symlink, or non-strict mode. We just leave the path
+ # untouched.
path = newpath
else:
seen[newpath] = None # not resolved symlink
os.close(fd)
def mkdir(self, mode=0o777, parents=False, exist_ok=False):
+ """
+ Create a new directory at this given path.
+ """
if self._closed:
self._raise_closed()
- if not parents:
- try:
- self._accessor.mkdir(self, mode)
- except FileExistsError:
- if not exist_ok or not self.is_dir():
- raise
- else:
- try:
- self._accessor.mkdir(self, mode)
- except FileExistsError:
- if not exist_ok or not self.is_dir():
- raise
- except OSError as e:
- if e.errno != ENOENT or self.parent == self:
- raise
- self.parent.mkdir(parents=True)
- self._accessor.mkdir(self, mode)
+ try:
+ self._accessor.mkdir(self, mode)
+ except FileNotFoundError:
+ if not parents or self.parent == self:
+ raise
+ self.parent.mkdir(parents=True, exist_ok=True)
+ self.mkdir(mode, parents=False, exist_ok=exist_ok)
+ except OSError:
+ # Cannot rely on checking for EEXIST, since the operating system
+ # could give priority to other errors like EACCES or EROFS
+ if not exist_ok or not self.is_dir():
+ raise
def chmod(self, mode):
"""
if sock is not None:
try:
sock.shutdown(socket.SHUT_RDWR)
- except OSError as e:
- # The server might already have closed the connection
- if e.errno != errno.ENOTCONN:
+ except OSError as exc:
+ # The server might already have closed the connection.
+ # On Windows, this may result in WSAEINVAL (error 10022):
+ # An invalid operation was attempted.
+ if (exc.errno != errno.ENOTCONN
+ and getattr(exc, 'winerror', 0) != 10022):
raise
finally:
sock.close()
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Sat Mar 4 12:14:44 2017
+# Autogenerated by Sphinx on Sat Jun 17 04:32:54 2017
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
' 2 1\n'
' >>> f(a=1, *(2,))\n'
' Traceback (most recent call last):\n'
- ' File "<stdin>", line 1, in ?\n'
+ ' File "<stdin>", line 1, in <module>\n'
" TypeError: f() got multiple values for keyword argument 'a'\n"
' >>> f(1, *(2,))\n'
' 1 2\n'
'they\n'
' have equal *(key, value)* pairs. Equality comparison of the '
'keys and\n'
- ' elements enforces reflexivity.\n'
+ ' values enforces reflexivity.\n'
'\n'
' Order comparisons ("<", ">", "<=", and ">=") raise '
'"TypeError".\n'
'\n'
'The operators "in" and "not in" test for membership. "x in '
's"\n'
- 'evaluates to true if *x* is a member of *s*, and false '
- 'otherwise. "x\n'
- 'not in s" returns the negation of "x in s". All built-in '
+ 'evaluates to "True" if *x* is a member of *s*, and "False" '
+ 'otherwise.\n'
+ '"x not in s" returns the negation of "x in s". All built-in '
'sequences\n'
'and set types support this as well as dictionary, for which '
'"in" tests\n'
'for e in\n'
'y)".\n'
'\n'
- 'For the string and bytes types, "x in y" is true if and only '
- 'if *x* is\n'
- 'a substring of *y*. An equivalent test is "y.find(x) != '
- '-1". Empty\n'
- 'strings are always considered to be a substring of any other '
- 'string,\n'
- 'so """ in "abc"" will return "True".\n'
+ 'For the string and bytes types, "x in y" is "True" if and '
+ 'only if *x*\n'
+ 'is a substring of *y*. An equivalent test is "y.find(x) != '
+ '-1".\n'
+ 'Empty strings are always considered to be a substring of any '
+ 'other\n'
+ 'string, so """ in "abc"" will return "True".\n'
'\n'
'For user-defined classes which define the "__contains__()" '
'method, "x\n'
- 'in y" is true if and only if "y.__contains__(x)" is true.\n'
+ 'in y" returns "True" if "y.__contains__(x)" returns a true '
+ 'value, and\n'
+ '"False" otherwise.\n'
'\n'
'For user-defined classes which do not define "__contains__()" '
'but do\n'
- 'define "__iter__()", "x in y" is true if some value "z" with '
- '"x == z"\n'
- 'is produced while iterating over "y". If an exception is '
+ 'define "__iter__()", "x in y" is "True" if some value "z" '
+ 'with "x ==\n'
+ 'z" is produced while iterating over "y". If an exception is '
'raised\n'
'during the iteration, it is as if "in" raised that '
'exception.\n'
'\n'
'Lastly, the old-style iteration protocol is tried: if a class '
'defines\n'
- '"__getitem__()", "x in y" is true if and only if there is a '
+ '"__getitem__()", "x in y" is "True" if and only if there is a '
'non-\n'
'negative integer index *i* such that "x == y[i]", and all '
'lower\n'
' Typical implementations create a new instance of the '
'class by\n'
' invoking the superclass\'s "__new__()" method using\n'
- ' "super(currentclass, cls).__new__(cls[, ...])" with '
- 'appropriate\n'
- ' arguments and then modifying the newly-created instance '
- 'as\n'
- ' necessary before returning it.\n'
+ ' "super().__new__(cls[, ...])" with appropriate arguments '
+ 'and then\n'
+ ' modifying the newly-created instance as necessary before '
+ 'returning\n'
+ ' it.\n'
'\n'
' If "__new__()" returns an instance of *cls*, then the '
'new\n'
' any, must explicitly call it to ensure proper '
'initialization of the\n'
' base class part of the instance; for example:\n'
- ' "BaseClass.__init__(self, [args...])".\n'
+ ' "super().__init__([args...])".\n'
'\n'
' Because "__new__()" and "__init__()" work together in '
'constructing\n'
'\n'
'object.__bytes__(self)\n'
'\n'
- ' Called by "bytes()" to compute a byte-string '
- 'representation of an\n'
+ ' Called by bytes to compute a byte-string representation '
+ 'of an\n'
' object. This should return a "bytes" object.\n'
'\n'
'object.__format__(self, format_spec)\n'
' >>> import mymodule\n'
' >>> mymodule.test()\n'
' Traceback (most recent call last):\n'
- ' File "<stdin>", line 1, in ?\n'
+ ' File "<stdin>", line 1, in <module>\n'
' File "./mymodule.py", line 4, in test\n'
' test2()\n'
' File "./mymodule.py", line 3, in test2\n'
' i = 42\n'
' f()\n'
'\n'
- 'There are several cases where Python statements are '
- 'illegal when used\n'
- 'in conjunction with nested scopes that contain free '
- 'variables.\n'
- '\n'
- 'If a variable is referenced in an enclosing scope, it is '
- 'illegal to\n'
- 'delete the name. An error will be reported at compile '
- 'time.\n'
- '\n'
'The "eval()" and "exec()" functions do not have access '
'to the full\n'
'environment for resolving names. Names may be resolved '
'Builtins and restricted execution\n'
'---------------------------------\n'
'\n'
+ '**CPython implementation detail:** Users should not touch\n'
+ '"__builtins__"; it is strictly an implementation detail. '
+ 'Users\n'
+ 'wanting to override values in the builtins namespace should '
+ '"import"\n'
+ 'the "builtins" module and modify its attributes appropriately.\n'
+ '\n'
'The builtins namespace associated with the execution of a code '
'block\n'
'is actually found by looking up the name "__builtins__" in its '
'in any\n'
'other module, "__builtins__" is an alias for the dictionary of '
'the\n'
- '"builtins" module itself. "__builtins__" can be set to a '
- 'user-created\n'
- 'dictionary to create a weak form of restricted execution.\n'
- '\n'
- '**CPython implementation detail:** Users should not touch\n'
- '"__builtins__"; it is strictly an implementation detail. '
- 'Users\n'
- 'wanting to override values in the builtins namespace should '
- '"import"\n'
- 'the "builtins" module and modify its attributes appropriately.\n'
+ '"builtins" module itself.\n'
'\n'
'\n'
'Interaction with dynamic features\n'
' i = 42\n'
' f()\n'
'\n'
- 'There are several cases where Python statements are illegal '
- 'when used\n'
- 'in conjunction with nested scopes that contain free variables.\n'
- '\n'
- 'If a variable is referenced in an enclosing scope, it is '
- 'illegal to\n'
- 'delete the name. An error will be reported at compile time.\n'
- '\n'
'The "eval()" and "exec()" functions do not have access to the '
'full\n'
'environment for resolving names. Names may be resolved in the '
'change\n'
'the meaning of the program.\n'
'\n'
- '**Programmer\'s note:** the "global" is a directive to the '
- 'parser. It\n'
+ '**Programmer\'s note:** "global" is a directive to the parser. '
+ 'It\n'
'applies only to code parsed at the same time as the "global"\n'
'statement. In particular, a "global" statement contained in a '
'string\n'
'**************************\n'
'\n'
'The operators "in" and "not in" test for membership. "x in s"\n'
- 'evaluates to true if *x* is a member of *s*, and false otherwise. "x\n'
- 'not in s" returns the negation of "x in s". All built-in sequences\n'
+ 'evaluates to "True" if *x* is a member of *s*, and "False" otherwise.\n'
+ '"x not in s" returns the negation of "x in s". All built-in '
+ 'sequences\n'
'and set types support this as well as dictionary, for which "in" '
'tests\n'
'whether the dictionary has a given key. For container types such as\n'
'expression "x in y" is equivalent to "any(x is e or x == e for e in\n'
'y)".\n'
'\n'
- 'For the string and bytes types, "x in y" is true if and only if *x* '
- 'is\n'
- 'a substring of *y*. An equivalent test is "y.find(x) != -1". Empty\n'
- 'strings are always considered to be a substring of any other string,\n'
- 'so """ in "abc"" will return "True".\n'
+ 'For the string and bytes types, "x in y" is "True" if and only if *x*\n'
+ 'is a substring of *y*. An equivalent test is "y.find(x) != -1".\n'
+ 'Empty strings are always considered to be a substring of any other\n'
+ 'string, so """ in "abc"" will return "True".\n'
'\n'
'For user-defined classes which define the "__contains__()" method, "x\n'
- 'in y" is true if and only if "y.__contains__(x)" is true.\n'
+ 'in y" returns "True" if "y.__contains__(x)" returns a true value, and\n'
+ '"False" otherwise.\n'
'\n'
'For user-defined classes which do not define "__contains__()" but do\n'
- 'define "__iter__()", "x in y" is true if some value "z" with "x == z"\n'
- 'is produced while iterating over "y". If an exception is raised\n'
+ 'define "__iter__()", "x in y" is "True" if some value "z" with "x ==\n'
+ 'z" is produced while iterating over "y". If an exception is raised\n'
'during the iteration, it is as if "in" raised that exception.\n'
'\n'
'Lastly, the old-style iteration protocol is tried: if a class defines\n'
- '"__getitem__()", "x in y" is true if and only if there is a non-\n'
+ '"__getitem__()", "x in y" is "True" if and only if there is a non-\n'
'negative integer index *i* such that "x == y[i]", and all lower\n'
'integer indices do not raise "IndexError" exception. (If any other\n'
'exception is raised, it is as if "in" raised that exception).\n'
'Builtins and restricted execution\n'
'=================================\n'
'\n'
+ '**CPython implementation detail:** Users should not touch\n'
+ '"__builtins__"; it is strictly an implementation detail. Users\n'
+ 'wanting to override values in the builtins namespace should '
+ '"import"\n'
+ 'the "builtins" module and modify its attributes appropriately.\n'
+ '\n'
'The builtins namespace associated with the execution of a code '
'block\n'
'is actually found by looking up the name "__builtins__" in its '
'any\n'
'other module, "__builtins__" is an alias for the dictionary of '
'the\n'
- '"builtins" module itself. "__builtins__" can be set to a '
- 'user-created\n'
- 'dictionary to create a weak form of restricted execution.\n'
- '\n'
- '**CPython implementation detail:** Users should not touch\n'
- '"__builtins__"; it is strictly an implementation detail. Users\n'
- 'wanting to override values in the builtins namespace should '
- '"import"\n'
- 'the "builtins" module and modify its attributes appropriately.\n'
+ '"builtins" module itself.\n'
'\n'
'\n'
'Interaction with dynamic features\n'
' i = 42\n'
' f()\n'
'\n'
- 'There are several cases where Python statements are illegal when '
- 'used\n'
- 'in conjunction with nested scopes that contain free variables.\n'
- '\n'
- 'If a variable is referenced in an enclosing scope, it is illegal '
- 'to\n'
- 'delete the name. An error will be reported at compile time.\n'
- '\n'
'The "eval()" and "exec()" functions do not have access to the '
'full\n'
'environment for resolving names. Names may be resolved in the '
' ...\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 2, in <module>\n'
- ' ZeroDivisionError: int division or modulo by zero\n'
+ ' ZeroDivisionError: division by zero\n'
'\n'
' The above exception was the direct cause of the following '
'exception:\n'
' ...\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 2, in <module>\n'
- ' ZeroDivisionError: int division or modulo by zero\n'
+ ' ZeroDivisionError: division by zero\n'
'\n'
' During handling of the above exception, another exception '
'occurred:\n'
' File "<stdin>", line 4, in <module>\n'
' RuntimeError: Something bad happened\n'
'\n'
+ 'Exception chaining can be explicitly suppressed by specifying '
+ '"None"\n'
+ 'in the "from" clause:\n'
+ '\n'
+ ' >>> try:\n'
+ ' ... print(1 / 0)\n'
+ ' ... except:\n'
+ ' ... raise RuntimeError("Something bad happened") from None\n'
+ ' ...\n'
+ ' Traceback (most recent call last):\n'
+ ' File "<stdin>", line 4, in <module>\n'
+ ' RuntimeError: Something bad happened\n'
+ '\n'
'Additional information on exceptions can be found in section\n'
'Exceptions, and information about handling exceptions is in '
'section\n'
- 'The try statement.\n',
+ 'The try statement.\n'
+ '\n'
+ 'Changed in version 3.3: "None" is now permitted as "Y" in "raise X\n'
+ 'from Y".\n'
+ '\n'
+ 'New in version 3.3: The "__suppress_context__" attribute to '
+ 'suppress\n'
+ 'automatic display of the exception context.\n',
'return': 'The "return" statement\n'
'**********************\n'
'\n'
' returns zero is considered to be false in a Boolean '
'context.\n'
'\n'
+ ' **CPython implementation detail:** In CPython, the '
+ 'length is\n'
+ ' required to be at most "sys.maxsize". If the length is '
+ 'larger than\n'
+ ' "sys.maxsize" some features (such as "len()") may '
+ 'raise\n'
+ ' "OverflowError". To prevent raising "OverflowError" by '
+ 'truth value\n'
+ ' testing, an object must define a "__bool__()" method.\n'
+ '\n'
'object.__length_hint__(self)\n'
'\n'
' Called to implement "operator.length_hint()". Should '
' Typical implementations create a new instance of the '
'class by\n'
' invoking the superclass\'s "__new__()" method using\n'
- ' "super(currentclass, cls).__new__(cls[, ...])" with '
- 'appropriate\n'
- ' arguments and then modifying the newly-created instance '
- 'as\n'
- ' necessary before returning it.\n'
+ ' "super().__new__(cls[, ...])" with appropriate arguments '
+ 'and then\n'
+ ' modifying the newly-created instance as necessary before '
+ 'returning\n'
+ ' it.\n'
'\n'
' If "__new__()" returns an instance of *cls*, then the '
'new\n'
' any, must explicitly call it to ensure proper '
'initialization of the\n'
' base class part of the instance; for example:\n'
- ' "BaseClass.__init__(self, [args...])".\n'
+ ' "super().__init__([args...])".\n'
'\n'
' Because "__new__()" and "__init__()" work together in '
'constructing\n'
'\n'
'object.__bytes__(self)\n'
'\n'
- ' Called by "bytes()" to compute a byte-string '
- 'representation of an\n'
+ ' Called by bytes to compute a byte-string representation '
+ 'of an\n'
' object. This should return a "bytes" object.\n'
'\n'
'object.__format__(self, format_spec)\n'
' returns zero is considered to be false in a Boolean '
'context.\n'
'\n'
+ ' **CPython implementation detail:** In CPython, the length '
+ 'is\n'
+ ' required to be at most "sys.maxsize". If the length is '
+ 'larger than\n'
+ ' "sys.maxsize" some features (such as "len()") may raise\n'
+ ' "OverflowError". To prevent raising "OverflowError" by '
+ 'truth value\n'
+ ' testing, an object must define a "__bool__()" method.\n'
+ '\n'
'object.__length_hint__(self)\n'
'\n'
' Called to implement "operator.length_hint()". Should '
'str.join(iterable)\n'
'\n'
' Return a string which is the concatenation of the '
- 'strings in the\n'
- ' *iterable* *iterable*. A "TypeError" will be raised if '
- 'there are\n'
- ' any non-string values in *iterable*, including "bytes" '
- 'objects.\n'
- ' The separator between elements is the string providing '
- 'this method.\n'
+ 'strings in\n'
+ ' *iterable*. A "TypeError" will be raised if there are '
+ 'any non-\n'
+ ' string values in *iterable*, including "bytes" '
+ 'objects. The\n'
+ ' separator between elements is the string providing this '
+ 'method.\n'
'\n'
'str.ljust(width[, fillchar])\n'
'\n'
'8-bit\n'
' bytes, represented by integers in the range 0 <= x < 256.\n'
' Bytes literals (like "b\'abc\'") and the built-in '
- 'function\n'
- ' "bytes()" can be used to construct bytes objects. Also,\n'
- ' bytes objects can be decoded to strings via the '
- '"decode()"\n'
- ' method.\n'
+ '"bytes()"\n'
+ ' constructor can be used to create bytes objects. Also, '
+ 'bytes\n'
+ ' objects can be decoded to strings via the "decode()" '
+ 'method.\n'
'\n'
' Mutable sequences\n'
' Mutable sequences can be changed after they are created. '
' the built-in "bytearray()" constructor. Aside from being\n'
' mutable (and hence unhashable), byte arrays otherwise '
'provide\n'
- ' the same interface and functionality as immutable bytes\n'
+ ' the same interface and functionality as immutable "bytes"\n'
' objects.\n'
'\n'
' The extension module "array" provides an additional example '
'comparison operations. The "+" (concatenation) and "*" '
'(repetition)\n'
'operations have the same priority as the corresponding numeric\n'
- 'operations.\n'
+ 'operations. [3]\n'
'\n'
'+----------------------------+----------------------------------+------------+\n'
'| Operation | Result '
if host:
(code, msg) = self.connect(host, port)
if code != 220:
+ self.close()
raise SMTPConnectError(code, msg)
if local_hostname is not None:
self.local_hostname = local_hostname
# should this really be here?
class error(Exception):
+ """Exception raised for invalid regular expressions.
+
+ Attributes:
+
+ msg: The unformatted error message
+ pattern: The regular expression pattern
+ pos: The index in the pattern where compilation failed (may be None)
+ lineno: The line corresponding to pos (may be None)
+ colno: The column corresponding to pos (may be None)
+ """
+
def __init__(self, msg, pattern=None, pos=None):
self.msg = msg
self.pattern = pattern
pass
raise source.error("bad escape %s" % escape, len(escape))
-def _parse_sub(source, state, verbose, nested=True):
+def _parse_sub(source, state, verbose, nested):
# parse an alternation: a|b|c
items = []
sourcematch = source.match
start = source.tell()
while True:
- itemsappend(_parse(source, state, verbose))
+ itemsappend(_parse(source, state, verbose, nested + 1,
+ not nested and not items))
if not sourcematch("|"):
break
subpattern.append((BRANCH, (None, items)))
return subpattern
-def _parse_sub_cond(source, state, condgroup, verbose):
- item_yes = _parse(source, state, verbose)
+def _parse_sub_cond(source, state, condgroup, verbose, nested):
+ item_yes = _parse(source, state, verbose, nested + 1)
if source.match("|"):
- item_no = _parse(source, state, verbose)
+ item_no = _parse(source, state, verbose, nested + 1)
if source.next == "|":
raise source.error("conditional backref with more than two branches")
else:
subpattern.append((GROUPREF_EXISTS, (condgroup, item_yes, item_no)))
return subpattern
-def _parse(source, state, verbose):
+def _parse(source, state, verbose, nested, first=False):
# parse a simple pattern
subpattern = SubPattern(state)
lookbehindgroups = state.lookbehindgroups
if lookbehindgroups is None:
state.lookbehindgroups = state.groups
- p = _parse_sub(source, state, verbose)
+ p = _parse_sub(source, state, verbose, nested + 1)
if dir < 0:
if lookbehindgroups is None:
state.lookbehindgroups = None
state.checklookbehindgroup(condgroup, source)
elif char in FLAGS or char == "-":
# flags
- pos = source.pos
flags = _parse_flags(source, state, char)
if flags is None: # global flags
- if pos != 3: # "(?x"
+ if not first or subpattern:
import warnings
warnings.warn(
- 'Flags not at the start of the expression %s%s' % (
+ 'Flags not at the start of the expression %r%s' % (
source.string[:20], # truncate long regexes
' (truncated)' if len(source.string) > 20 else '',
),
- DeprecationWarning, stacklevel=7
+ DeprecationWarning, stacklevel=nested + 6
)
+ if (state.flags & SRE_FLAG_VERBOSE) and not verbose:
+ raise Verbose
continue
add_flags, del_flags = flags
group = None
except error as err:
raise source.error(err.msg, len(name) + 1) from None
if condgroup:
- p = _parse_sub_cond(source, state, condgroup, verbose)
+ p = _parse_sub_cond(source, state, condgroup, verbose, nested + 1)
else:
sub_verbose = ((verbose or (add_flags & SRE_FLAG_VERBOSE)) and
not (del_flags & SRE_FLAG_VERBOSE))
- p = _parse_sub(source, state, sub_verbose)
+ p = _parse_sub(source, state, sub_verbose, nested + 1)
if not source.match(")"):
raise source.error("missing ), unterminated subpattern",
source.tell() - start)
msg = "unknown flag" if char.isalpha() else "missing -, : or )"
raise source.error(msg, len(char))
if char == ")":
- if ((add_flags & SRE_FLAG_VERBOSE) and
- not (state.flags & SRE_FLAG_VERBOSE)):
- raise Verbose
state.flags |= add_flags
return None
if add_flags & GLOBAL_FLAGS:
pattern.str = str
try:
- p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False)
+ p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
except Verbose:
# the VERBOSE flag was switched on inside the pattern. to be
# on the safe side, we'll parse the whole thing again...
pattern.flags = flags | SRE_FLAG_VERBOSE
pattern.str = str
source.seek(0)
- p = _parse_sub(source, pattern, True, False)
+ p = _parse_sub(source, pattern, True, 0)
p.pattern.flags = fix_flags(str, p.pattern.flags)
self.stdin.write(input)
except BrokenPipeError:
pass # communicate() must ignore broken pipe errors.
- except OSError as e:
- if e.errno == errno.EINVAL and self.poll() is not None:
- # Issue #19612: On Windows, stdin.write() fails with EINVAL
- # if the process already exited before the write
+ except OSError as exc:
+ if exc.errno == errno.EINVAL:
+ # bpo-19612, bpo-30418: On Windows, stdin.write() fails
+ # with EINVAL if the child process exited or if the child
+ # process is still running but closed the pipe.
pass
else:
raise
+
try:
self.stdin.close()
except BrokenPipeError:
pass # communicate() must ignore broken pipe errors.
- except OSError as e:
- if e.errno == errno.EINVAL and self.poll() is not None:
+ except OSError as exc:
+ if exc.errno == errno.EINVAL:
pass
else:
raise
int(not close_fds),
creationflags,
env,
- cwd,
+ os.fspath(cwd) if cwd is not None else None,
startupinfo)
finally:
# Child is launched. Close the parent's copy of those pipe
# and pass it to fork_exec()
if env is not None:
- env_list = [os.fsencode(k) + b'=' + os.fsencode(v)
- for k, v in env.items()]
+ env_list = []
+ for k, v in env.items():
+ k = os.fsencode(k)
+ if b'=' in k:
+ raise ValueError("illegal environment variable name")
+ env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
- close_fds, sorted(fds_to_keep), cwd, env_list,
+ close_fds, tuple(sorted(map(int, fds_to_keep))),
+ cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
class NannyNag(Exception):
"""
- Raised by tokeneater() if detecting an ambiguous indent.
+ Raised by process_tokens() if detecting an ambiguous indent.
Captured and handled in check().
"""
def __init__(self, lineno, msg, line):
import logging
import struct
import operator
+import weakref
import test.support
import test.support.script_helper
# Windows (usually 15.6 ms)
self.assertGreaterEqual(delta, 0.170)
+ def test_queue_feeder_donot_stop_onexc(self):
+ # bpo-30414: verify feeder handles exceptions correctly
+ if self.TYPE != 'processes':
+ self.skipTest('test not appropriate for {}'.format(self.TYPE))
+
+ class NotSerializable(object):
+ def __reduce__(self):
+ raise AttributeError
+ with test.support.captured_stderr():
+ q = self.Queue()
+ q.put(NotSerializable())
+ q.put(True)
+ self.assertTrue(q.get(timeout=0.1))
+
#
#
#
time.sleep(wait)
raise ValueError("x" * 1024**2)
+def identity(x):
+ return x
+
+class CountedObject(object):
+ n_instances = 0
+
+ def __new__(cls):
+ cls.n_instances += 1
+ return object.__new__(cls)
+
+ def __del__(self):
+ type(self).n_instances -= 1
+
class SayWhenError(ValueError): pass
def exception_throwing_generator(total, when):
+ if when == -1:
+ raise SayWhenError("Somebody said when")
for i in range(total):
if i == when:
raise SayWhenError("Somebody said when")
yield i
+
class _TestPool(BaseTestCase):
@classmethod
except multiprocessing.TimeoutError:
self.fail("pool.map_async with chunksize stalled on null list")
+ def test_map_handle_iterable_exception(self):
+ if self.TYPE == 'manager':
+ self.skipTest('test not appropriate for {}'.format(self.TYPE))
+
+ # SayWhenError seen at the very first of the iterable
+ with self.assertRaises(SayWhenError):
+ self.pool.map(sqr, exception_throwing_generator(1, -1), 1)
+ # again, make sure it's reentrant
+ with self.assertRaises(SayWhenError):
+ self.pool.map(sqr, exception_throwing_generator(1, -1), 1)
+
+ with self.assertRaises(SayWhenError):
+ self.pool.map(sqr, exception_throwing_generator(10, 3), 1)
+
+ class SpecialIterable:
+ def __iter__(self):
+ return self
+ def __next__(self):
+ raise SayWhenError
+ def __len__(self):
+ return 1
+ with self.assertRaises(SayWhenError):
+ self.pool.map(sqr, SpecialIterable(), 1)
+ with self.assertRaises(SayWhenError):
+ self.pool.map(sqr, SpecialIterable(), 1)
+
def test_async(self):
res = self.pool.apply_async(sqr, (7, TIMEOUT1,))
get = TimingWrapper(res.get)
if self.TYPE == 'manager':
self.skipTest('test not appropriate for {}'.format(self.TYPE))
+ # SayWhenError seen at the very first of the iterable
+ it = self.pool.imap(sqr, exception_throwing_generator(1, -1), 1)
+ self.assertRaises(SayWhenError, it.__next__)
+ # again, make sure it's reentrant
+ it = self.pool.imap(sqr, exception_throwing_generator(1, -1), 1)
+ self.assertRaises(SayWhenError, it.__next__)
+
it = self.pool.imap(sqr, exception_throwing_generator(10, 3), 1)
for i in range(3):
self.assertEqual(next(it), i*i)
if self.TYPE == 'manager':
self.skipTest('test not appropriate for {}'.format(self.TYPE))
+ # SayWhenError seen at the very first of the iterable
+ it = self.pool.imap_unordered(sqr,
+ exception_throwing_generator(1, -1),
+ 1)
+ self.assertRaises(SayWhenError, it.__next__)
+ # again, make sure it's reentrant
+ it = self.pool.imap_unordered(sqr,
+ exception_throwing_generator(1, -1),
+ 1)
+ self.assertRaises(SayWhenError, it.__next__)
+
it = self.pool.imap_unordered(sqr,
exception_throwing_generator(10, 3),
1)
except Exception as e:
exc = e
else:
- raise AssertionError('expected RuntimeError')
+ self.fail('expected RuntimeError')
self.assertIs(type(exc), RuntimeError)
self.assertEqual(exc.args, (123,))
cause = exc.__cause__
sys.excepthook(*sys.exc_info())
self.assertIn('raise RuntimeError(123) # some comment',
f1.getvalue())
+ # _helper_reraises_exception should not make the error
+ # a remote exception
+ with self.Pool(1) as p:
+ try:
+ p.map(sqr, exception_throwing_generator(1, -1), 1)
+ except Exception as e:
+ exc = e
+ else:
+ self.fail('expected SayWhenError')
+ self.assertIs(type(exc), SayWhenError)
+ self.assertIs(exc.__cause__, None)
@classmethod
def _test_wrapped_exception(cls):
# check that we indeed waited for all jobs
self.assertGreater(time.time() - t_start, 0.9)
+ def test_release_task_refs(self):
+ # Issue #29861: task arguments and results should not be kept
+ # alive after we are done with them.
+ objs = [CountedObject() for i in range(10)]
+ refs = [weakref.ref(o) for o in objs]
+ self.pool.map(identity, objs)
+
+ del objs
+ time.sleep(DELTA) # let threaded cleanup code run
+ self.assertEqual(set(wr() for wr in refs), {None})
+ # With a process pool, copies of the objects are returned, check
+ # they were released too.
+ self.assertEqual(CountedObject.n_instances, 0)
+
def raising():
raise KeyError("key")
ALLOWED_TYPES = ('processes',)
+ def setUp(self):
+ self.registry_backup = util._finalizer_registry.copy()
+ util._finalizer_registry.clear()
+
+ def tearDown(self):
+ self.assertFalse(util._finalizer_registry)
+ util._finalizer_registry.update(self.registry_backup)
+
@classmethod
def _test_finalize(cls, conn):
class Foo(object):
result = [obj for obj in iter(conn.recv, 'STOP')]
self.assertEqual(result, ['a', 'b', 'd10', 'd03', 'd02', 'd01', 'e'])
+ def test_thread_safety(self):
+ # bpo-24484: _run_finalizers() should be thread-safe
+ def cb():
+ pass
+
+ class Foo(object):
+ def __init__(self):
+ self.ref = self # create reference cycle
+ # insert finalizer at random key
+ util.Finalize(self, cb, exitpriority=random.randint(1, 100))
+
+ finish = False
+ exc = None
+
+ def run_finalizers():
+ nonlocal exc
+ while not finish:
+ time.sleep(random.random() * 1e-1)
+ try:
+ # A GC run will eventually happen during this,
+ # collecting stale Foo's and mutating the registry
+ util._run_finalizers()
+ except Exception as e:
+ exc = e
+
+ def make_finalizers():
+ nonlocal exc
+ d = {}
+ while not finish:
+ try:
+ # Old Foo's get gradually replaced and later
+ # collected by the GC (because of the cyclic ref)
+ d[random.getrandbits(5)] = {Foo() for i in range(10)}
+ except Exception as e:
+ exc = e
+ d.clear()
+
+ old_interval = sys.getswitchinterval()
+ old_threshold = gc.get_threshold()
+ try:
+ sys.setswitchinterval(1e-6)
+ gc.set_threshold(5, 5, 5)
+ threads = [threading.Thread(target=run_finalizers),
+ threading.Thread(target=make_finalizers)]
+ with test.support.start_threads(threads):
+ time.sleep(4.0) # Wait a bit to trigger race condition
+ finish = True
+ if exc is not None:
+ raise exc
+ finally:
+ sys.setswitchinterval(old_interval)
+ gc.set_threshold(*old_threshold)
+ gc.collect() # Collect remaining Foo's
+
+
#
# Test that from ... import * works for each module
#
self.assertRegex(err, expected)
self.assertRegex(err, r'semaphore_tracker: %r: \[Errno' % name1)
+class TestSimpleQueue(unittest.TestCase):
+
+ @classmethod
+ def _test_empty(cls, queue, child_can_start, parent_can_continue):
+ child_can_start.wait()
+ # issue 30301, could fail under spawn and forkserver
+ try:
+ queue.put(queue.empty())
+ queue.put(queue.empty())
+ finally:
+ parent_can_continue.set()
+
+ def test_empty(self):
+ queue = multiprocessing.SimpleQueue()
+ child_can_start = multiprocessing.Event()
+ parent_can_continue = multiprocessing.Event()
+
+ proc = multiprocessing.Process(
+ target=self._test_empty,
+ args=(queue, child_can_start, parent_can_continue)
+ )
+ proc.daemon = True
+ proc.start()
+
+ self.assertTrue(queue.empty())
+
+ child_can_start.set()
+ parent_can_continue.wait()
+
+ self.assertFalse(queue.empty())
+ self.assertEqual(queue.get(), True)
+ self.assertEqual(queue.get(), False)
+ self.assertTrue(queue.empty())
+
+ proc.join()
+
#
# Mixins
#
dt = dt.replace(fold=1, tzinfo=Eastern)
self.assertEqual(t.replace(tzinfo=None).fold, 1)
self.assertEqual(dt.replace(tzinfo=None).fold, 1)
+ # Out of bounds.
+ with self.assertRaises(ValueError):
+ t.replace(fold=2)
+ with self.assertRaises(ValueError):
+ dt.replace(fold=2)
# Check that fold is a keyword-only argument
with self.assertRaises(TypeError):
t.replace(1, 1, 1, None, 1)
@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+# bpo-30320: Need pthread_sigmask() to block the signal, otherwise the test
+# is vulnerable to a race condition between the child and the parent processes.
+@unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
+ 'need signal.pthread_sigmask()')
class SignalEINTRTest(EINTRBaseTest):
""" EINTR tests for the signal module. """
- @unittest.skipUnless(hasattr(signal, 'sigtimedwait'),
- 'need signal.sigtimedwait()')
- def test_sigtimedwait(self):
- t0 = time.monotonic()
- signal.sigtimedwait([signal.SIGUSR1], self.sleep_time)
- dt = time.monotonic() - t0
- self.assertGreaterEqual(dt, self.sleep_time)
-
- @unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
- 'need signal.sigwaitinfo()')
- def test_sigwaitinfo(self):
- # Issue #25277, #25868: give a few milliseconds to the parent process
- # between os.write() and signal.sigwaitinfo() to works around a race
- # condition
- self.sleep_time = 0.100
-
+ def check_sigwait(self, wait_func):
signum = signal.SIGUSR1
pid = os.getpid()
old_handler = signal.signal(signum, lambda *args: None)
self.addCleanup(signal.signal, signum, old_handler)
- rpipe, wpipe = os.pipe()
-
code = '\n'.join((
'import os, time',
'pid = %s' % os.getpid(),
'signum = %s' % int(signum),
'sleep_time = %r' % self.sleep_time,
- 'rpipe = %r' % rpipe,
- 'os.read(rpipe, 1)',
- 'os.close(rpipe)',
'time.sleep(sleep_time)',
'os.kill(pid, signum)',
))
+ old_mask = signal.pthread_sigmask(signal.SIG_BLOCK, [signum])
+ self.addCleanup(signal.pthread_sigmask, signal.SIG_UNBLOCK, [signum])
+
t0 = time.monotonic()
- proc = self.subprocess(code, pass_fds=(rpipe,))
- os.close(rpipe)
+ proc = self.subprocess(code)
with kill_on_error(proc):
- # sync child-parent
- os.write(wpipe, b'x')
- os.close(wpipe)
+ wait_func(signum)
+ dt = time.monotonic() - t0
+
+ self.assertEqual(proc.wait(), 0)
- # parent
+ @unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
+ 'need signal.sigwaitinfo()')
+ def test_sigwaitinfo(self):
+ def wait_func(signum):
signal.sigwaitinfo([signum])
- dt = time.monotonic() - t0
- self.assertEqual(proc.wait(), 0)
- self.assertGreaterEqual(dt, self.sleep_time)
+ self.check_sigwait(wait_func)
+
+ @unittest.skipUnless(hasattr(signal, 'sigtimedwait'),
+ 'need signal.sigwaitinfo()')
+ def test_sigtimedwait(self):
+ def wait_func(signum):
+ signal.sigtimedwait([signum], 120.0)
+
+ self.check_sigwait(wait_func)
@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
To enable all resources except one, use '-uall,-<resource>'. For
example, to run all the tests except for the gui tests, give the
option '-uall,-gui'.
+
+--matchfile filters tests using a text file, one pattern per line.
+Pattern examples:
+
+- test method: test_stat_attributes
+- test class: FileTests
+- test identifier: test_os.FileTests.test_stat_attributes
"""
help='single step through a set of tests.' +
more_details)
group.add_argument('-m', '--match', metavar='PAT',
- dest='match_tests',
+ dest='match_tests', action='append',
help='match test cases and methods with glob pattern PAT')
+ group.add_argument('--matchfile', metavar='FILENAME',
+ dest='match_filename',
+ help='similar to --match but get patterns from a '
+ 'text file, one pattern per line')
group.add_argument('-G', '--failfast', action='store_true',
help='fail as soon as a test fails (only with -v or -W)')
group.add_argument('-u', '--use', metavar='RES1,RES2,...',
group.add_argument('--list-tests', action='store_true',
help="only write the name of tests that will be run, "
"don't execute them")
+ group.add_argument('--list-cases', action='store_true',
+ help='only write the name of test cases that will be run'
+ ' , don\'t execute them')
group.add_argument('-P', '--pgo', dest='pgo', action='store_true',
help='enable Profile Guided Optimization training')
ns.use_resources.append(r)
if ns.random_seed is not None:
ns.randomize = True
+ if ns.verbose:
+ ns.header = True
+ if ns.huntrleaks and ns.verbose3:
+ ns.verbose3 = False
+ print("WARNING: Disable --verbose3 because it's incompatible with "
+ "--huntrleaks: see http://bugs.python.org/issue27103",
+ file=sys.stderr)
+ if ns.match_filename:
+ if ns.match_tests is None:
+ ns.match_tests = []
+ filename = os.path.join(support.SAVEDCWD, ns.match_filename)
+ with open(filename) as fp:
+ for line in fp:
+ ns.match_tests.append(line.strip())
return ns
import tempfile
import textwrap
import time
+import unittest
from test.libregrtest.cmdline import _parse_args
from test.libregrtest.runtest import (
- findtests, runtest,
+ findtests, runtest, get_abs_module,
STDTESTS, NOTTESTS, PASSED, FAILED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED,
INTERRUPTED, CHILD_ERROR,
PROGRESS_MIN_TIME, format_test_result)
# to keep the test files in a subfolder. This eases the cleanup of leftover
# files using the "make distclean" command.
if sysconfig.is_python_build():
- TEMPDIR = os.path.join(sysconfig.get_config_var('srcdir'), 'build')
+ TEMPDIR = sysconfig.get_config_var('abs_builddir')
+ if TEMPDIR is None:
+ # bpo-30284: On Windows, only srcdir is available. Using abs_builddir
+ # mostly matters on UNIX when building Python out of the source tree,
+ # especially when the source tree is read only.
+ TEMPDIR = sysconfig.get_config_var('srcdir')
+ TEMPDIR = os.path.join(TEMPDIR, 'build')
else:
TEMPDIR = tempfile.gettempdir()
TEMPDIR = os.path.abspath(TEMPDIR)
self.test_times.append((test_time, test))
if ok == PASSED:
self.good.append(test)
- elif ok == FAILED:
+ elif ok in (FAILED, CHILD_ERROR):
self.bad.append(test)
elif ok == ENV_CHANGED:
self.environment_changed.append(test)
elif ok == RESOURCE_DENIED:
self.skipped.append(test)
self.resource_denieds.append(test)
+ elif ok != INTERRUPTED:
+ raise ValueError("invalid test result: %r" % ok)
def display_progress(self, test_index, test):
if self.ns.quiet:
return
+
+ # "[ 51/405/1] test_tcl passed"
+ line = f"{test_index:{self.test_count_width}}{self.test_count}"
if self.bad and not self.ns.pgo:
- fmt = "{time} [{test_index:{count_width}}{test_count}/{nbad}] {test_name}"
- else:
- fmt = "{time} [{test_index:{count_width}}{test_count}] {test_name}"
+ line = f"{line}/{len(self.bad)}"
+ line = f"[{line}] {test}"
+
+ # add the system load prefix: "load avg: 1.80 "
+ if hasattr(os, 'getloadavg'):
+ load_avg_1min = os.getloadavg()[0]
+ line = f"load avg: {load_avg_1min:.2f} {line}"
+
+ # add the timestamp prefix: "0:01:05 "
test_time = time.monotonic() - self.start_time
test_time = datetime.timedelta(seconds=int(test_time))
- line = fmt.format(count_width=self.test_count_width,
- test_index=test_index,
- test_count=self.test_count,
- nbad=len(self.bad),
- test_name=test,
- time=test_time)
+ line = f"{test_time} {line}"
print(line, flush=True)
def parse_args(self, kwargs):
self.tests = []
# regex to match 'test_builtin' in line:
# '0:00:00 [ 4/400] test_builtin -- test_dict took 1 sec'
- regex = (r'^(?:[0-9]+:[0-9]+:[0-9]+ *)?'
- r'(?:\[[0-9/ ]+\] *)?'
- r'(test_[a-zA-Z0-9_]+)')
- regex = re.compile(regex)
+ regex = re.compile(r'\btest_[a-zA-Z0-9_]+\b')
with open(os.path.join(support.SAVEDCWD, self.ns.fromfile)) as fp:
for line in fp:
+ line = line.split('#', 1)[0]
line = line.strip()
- if line.startswith('#'):
- continue
- match = regex.match(line)
- if match is None:
- continue
- self.tests.append(match.group(1))
+ match = regex.search(line)
+ if match is not None:
+ self.tests.append(match.group())
removepy(self.tests)
for name in self.selected:
print(name)
+ def _list_cases(self, suite):
+ for test in suite:
+ if isinstance(test, unittest.loader._FailedTest):
+ continue
+ if isinstance(test, unittest.TestSuite):
+ self._list_cases(test)
+ elif isinstance(test, unittest.TestCase):
+ print(test.id())
+
+ def list_cases(self):
+ for test in self.selected:
+ abstest = get_abs_module(self.ns, test)
+ try:
+ suite = unittest.defaultTestLoader.loadTestsFromName(abstest)
+ self._list_cases(suite)
+ except unittest.SkipTest:
+ self.skipped.append(test)
+
+ if self.skipped:
+ print(file=sys.stderr)
+ print(count(len(self.skipped), "test"), "skipped:", file=sys.stderr)
+ printlist(self.skipped, file=sys.stderr)
+
def rerun_failed_tests(self):
self.ns.verbose = True
self.ns.failfast = False
if self.bad:
return
+ def display_header(self):
+ # Print basic platform information
+ print("==", platform.python_implementation(), *sys.version.split())
+ print("==", platform.platform(aliased=True),
+ "%s-endian" % sys.byteorder)
+ print("== hash algorithm:", sys.hash_info.algorithm,
+ "64bit" if sys.maxsize > 2**32 else "32bit")
+ print("== cwd:", os.getcwd())
+ cpu_count = os.cpu_count()
+ if cpu_count:
+ print("== CPU count:", cpu_count)
+ print("== encodings: locale=%s, FS=%s"
+ % (locale.getpreferredencoding(False),
+ sys.getfilesystemencoding()))
+ print("Testing with flags:", sys.flags)
+
def run_tests(self):
# For a partial run, we do not need to clutter the output.
- if (self.ns.verbose
- or self.ns.header
- or not (self.ns.pgo or self.ns.quiet or self.ns.single
- or self.tests or self.ns.args)):
- # Print basic platform information
- print("==", platform.python_implementation(), *sys.version.split())
- print("== ", platform.platform(aliased=True),
- "%s-endian" % sys.byteorder)
- print("== ", "hash algorithm:", sys.hash_info.algorithm,
- "64bit" if sys.maxsize > 2**32 else "32bit")
- print("== cwd:", os.getcwd())
- print("== encodings: locale=%s, FS=%s"
- % (locale.getpreferredencoding(False),
- sys.getfilesystemencoding()))
- print("Testing with flags:", sys.flags)
+ if (self.ns.header
+ or not(self.ns.pgo or self.ns.quiet or self.ns.single
+ or self.tests or self.ns.args)):
+ self.display_header()
if self.ns.randomize:
print("Using random seed", self.ns.random_seed)
self.list_tests()
sys.exit(0)
+ if self.ns.list_cases:
+ self.list_cases()
+ sys.exit(0)
+
self.run_tests()
self.display_result()
return "%d %ss" % (n, word)
-def printlist(x, width=70, indent=4):
+def printlist(x, width=70, indent=4, file=None):
"""Print the elements of iterable x to stdout.
Optional arg width (default 70) is the maximum line length.
blanks = ' ' * indent
# Print the sorted list: 'x' may be a '--random' list or a set()
print(textwrap.fill(' '.join(str(elt) for elt in sorted(x)), width,
- initial_indent=blanks, subsequent_indent=blanks))
+ initial_indent=blanks, subsequent_indent=blanks),
+ file=file)
def main(tests=None, **kwargs):
indirect_test()
alloc_after, rc_after, fd_after = dash_R_cleanup(fs, ps, pic, zdc,
abcs)
- print('.', end='', flush=True)
+ print('.', end='', file=sys.stderr, flush=True)
if i >= nwarmup:
rc_deltas[i] = rc_after - rc_before
alloc_deltas[i] = alloc_after - alloc_before
sys._clear_type_cache()
# Clear ABC registries, restoring previously saved ABC registries.
- for abc in [getattr(collections.abc, a) for a in collections.abc.__all__]:
- if not isabstract(abc):
- continue
+ abs_classes = [getattr(collections.abc, a) for a in collections.abc.__all__]
+ abs_classes = filter(isabstract, abs_classes)
+ if 'typing' in sys.modules:
+ t = sys.modules['typing']
+ # These classes require special treatment because they do not appear
+ # in direct subclasses of collections.abc classes
+ abs_classes = list(abs_classes) + [t.ChainMap, t.Counter, t.DefaultDict]
+ for abc in abs_classes:
for obj in abc.__subclasses__() + [abc]:
obj._abc_registry = abcs.get(obj, WeakSet()).copy()
obj._abc_cache.clear()
return stdtests + sorted(tests)
+def get_abs_module(ns, test):
+ if test.startswith('test.') or ns.testdir:
+ return test
+ else:
+ # Always import it from the test package
+ return 'test.' + test
+
+
def runtest(ns, test):
"""Run a single test.
test_time = 0.0
refleak = False # True if the test leaked references.
try:
- if test.startswith('test.') or ns.testdir:
- abstest = test
- else:
- # Always import it from the test package
- abstest = 'test.' + test
+ abstest = get_abs_module(ns, test)
clear_caches()
with saved_test_environment(test, ns.verbose, ns.quiet, pgo=ns.pgo) as environment:
start_time = time.time()
slaveargs = json.dumps(slaveargs)
cmd = [sys.executable, *support.args_from_interpreter_flags(),
- '-X', 'faulthandler',
+ '-u', # Unbuffered stdout and stderr
'-m', 'test.regrtest',
'--slaveargs', slaveargs]
if ns.pgo:
finally:
self.current_test = None
- stdout, _, result = stdout.strip().rpartition("\n")
if retcode != 0:
result = (CHILD_ERROR, "Exit code %s" % retcode)
self.output.put((test, stdout.rstrip(), stderr.rstrip(),
result))
- return True
+ return False
+ stdout, _, result = stdout.strip().rpartition("\n")
if not result:
self.output.put((None, None, None, None))
return True
and test_time >= PROGRESS_MIN_TIME
and not regrtest.ns.pgo):
text += ' (%.0f sec)' % test_time
+ elif ok == CHILD_ERROR:
+ text = '%s (%s)' % (text, test_time)
running = get_running(workers)
if running and not regrtest.ns.pgo:
text += ' -- running: %s' % ', '.join(running)
if result[0] == INTERRUPTED:
raise KeyboardInterrupt
- if result[0] == CHILD_ERROR:
- msg = "Child error on {}: {}".format(test, result[1])
- raise Exception(msg)
test_index += 1
except KeyboardInterrupt:
regrtest.interrupted = True
if not self.quiet and not self.pgo:
print(f"Warning -- {name} was modified by {self.testname}",
file=sys.stderr, flush=True)
- if self.verbose > 1:
- print(f" Before: {original}\n After: {current} ",
- file=sys.stderr, flush=True)
+ print(f" Before: {original}\n After: {current} ",
+ file=sys.stderr, flush=True)
return False
dd if=/dev/zero of=sndhdr.raw bs=20 count=1
sox -s -2 -c 2 -r 44100 sndhdr.raw sndhdr.<format>
-
-Sound file samples used by Lib/test/test_sndhdr.py and generated using the
-following commands:
-
- dd if=/dev/zero of=sndhdr.raw bs=20 count=1
- sox -s -2 -c 2 -r 44100 sndhdr.raw sndhdr.<format>
-
def case_pred(test):
if match_tests is None:
return True
- for name in test.id().split("."):
- if fnmatch.fnmatchcase(name, match_tests):
+ test_id = test.id()
+
+ for match_test in match_tests:
+ if fnmatch.fnmatchcase(test_id, match_test):
return True
+
+ for name in test_id.split("."):
+ if fnmatch.fnmatchcase(name, match_test):
+ return True
return False
_filter_suite(suite, case_pred)
_run_suite(suite)
restoring the old value at the end of the block. If `attr` doesn't
exist on `obj`, it will be created and then deleted at the end of the
block.
+
+ The old value (or None if it doesn't exist) will be assigned to the
+ target of the "as" clause, if there is one.
"""
if hasattr(obj, attr):
real_val = getattr(obj, attr)
setattr(obj, attr, new_val)
try:
- yield
+ yield real_val
finally:
setattr(obj, attr, real_val)
else:
try:
yield
finally:
- delattr(obj, attr)
+ if hasattr(obj, attr):
+ delattr(obj, attr)
@contextlib.contextmanager
def swap_item(obj, item, new_val):
restoring the old value at the end of the block. If `item` doesn't
exist on `obj`, it will be created and then deleted at the end of the
block.
+
+ The old value (or None if it doesn't exist) will be assigned to the
+ target of the "as" clause, if there is one.
"""
if item in obj:
real_val = obj[item]
obj[item] = new_val
try:
- yield
+ yield real_val
finally:
obj[item] = real_val
else:
try:
yield
finally:
- del obj[item]
+ if item in obj:
+ del obj[item]
def strip_python_stderr(stderr):
"""Strip the stderr of a Python process from potential debug output
(0, self.old_value[1]))
except (ValueError, OSError):
pass
+
if sys.platform == 'darwin':
# Check if the 'Crash Reporter' on OSX was configured
# in 'Developer' mode and warn that it will get triggered
#
# This assumes that this context manager is used in tests
# that might trigger the next manager.
- value = subprocess.Popen(['/usr/bin/defaults', 'read',
- 'com.apple.CrashReporter', 'DialogType'],
- stdout=subprocess.PIPE).communicate()[0]
- if value.strip() == b'developer':
+ cmd = ['/usr/bin/defaults', 'read',
+ 'com.apple.CrashReporter', 'DialogType']
+ proc = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ with proc:
+ stdout = proc.communicate()[0]
+ if stdout.strip() == b'developer':
print("this test triggers the Crash Reporter, "
"that is intentional", end='', flush=True)
if _is_android_emulator:
interval = minimum_interval
return sys.setswitchinterval(interval)
+
+
+@contextlib.contextmanager
+def disable_faulthandler():
+ # use sys.__stderr__ instead of sys.stderr, since regrtest replaces
+ # sys.stderr with a StringIO which has no file descriptor when a test
+ # is run with -W/--verbose3.
+ fd = sys.__stderr__.fileno()
+
+ is_enabled = faulthandler.is_enabled()
+ try:
+ faulthandler.disable()
+ yield
+ finally:
+ if is_enabled:
+ faulthandler.enable(file=fd, all_threads=True)
self.assertEqual(B.counter, 1)
+class TestABCWithInitSubclass(unittest.TestCase):
+ def test_works_with_init_subclass(self):
+ saved_kwargs = {}
+ class ReceivesClassKwargs:
+ def __init_subclass__(cls, **kwargs):
+ super().__init_subclass__()
+ saved_kwargs.update(kwargs)
+ class Receiver(ReceivesClassKwargs, abc.ABC, x=1, y=2, z=3):
+ pass
+ self.assertEqual(saved_kwargs, dict(x=1, y=2, z=3))
+
+
if __name__ == "__main__":
unittest.main()
import array
from array import _array_reconstructor as array_reconstructor
-try:
- # Try to determine availability of long long independently
- # of the array module under test
- struct.calcsize('@q')
- have_long_long = True
-except struct.error:
- have_long_long = False
-
sizeof_wchar = array.array('u').itemsize
def __init__(self, typecode, newarg=None):
array.array.__init__(self)
-typecodes = "ubBhHiIlLfd"
-if have_long_long:
- typecodes += 'qQ'
+typecodes = 'ubBhHiIlLfdqQ'
class MiscTest(unittest.TestCase):
b = array.array(self.typecode, a)
self.assertEqual(a, b)
-class SignedNumberTest(NumberTest):
+class IntegerNumberTest(NumberTest):
+ def test_type_error(self):
+ a = array.array(self.typecode)
+ a.append(42)
+ with self.assertRaises(TypeError):
+ a.append(42.0)
+ with self.assertRaises(TypeError):
+ a[0] = 42.0
+
+class Intable:
+ def __init__(self, num):
+ self._num = num
+ def __int__(self):
+ return self._num
+ def __sub__(self, other):
+ return Intable(int(self) - int(other))
+ def __add__(self, other):
+ return Intable(int(self) + int(other))
+
+class SignedNumberTest(IntegerNumberTest):
example = [-1, 0, 1, 42, 0x7f]
smallerexample = [-1, 0, 1, 42, 0x7e]
biggerexample = [-1, 0, 1, 43, 0x7f]
lower = -1 * int(pow(2, a.itemsize * 8 - 1))
upper = int(pow(2, a.itemsize * 8 - 1)) - 1
self.check_overflow(lower, upper)
+ self.check_overflow(Intable(lower), Intable(upper))
-class UnsignedNumberTest(NumberTest):
+class UnsignedNumberTest(IntegerNumberTest):
example = [0, 1, 17, 23, 42, 0xff]
smallerexample = [0, 1, 17, 23, 42, 0xfe]
biggerexample = [0, 1, 17, 23, 43, 0xff]
lower = 0
upper = int(pow(2, a.itemsize * 8)) - 1
self.check_overflow(lower, upper)
+ self.check_overflow(Intable(lower), Intable(upper))
def test_bytes_extend(self):
s = bytes(self.example)
typecode = 'L'
minitemsize = 4
-@unittest.skipIf(not have_long_long, 'need long long support')
class LongLongTest(SignedNumberTest, unittest.TestCase):
typecode = 'q'
minitemsize = 8
-@unittest.skipIf(not have_long_long, 'need long long support')
class UnsignedLongLongTest(UnsignedNumberTest, unittest.TestCase):
typecode = 'Q'
minitemsize = 8
def test_get_event_loop_new_process(self):
async def main():
pool = concurrent.futures.ProcessPoolExecutor()
- return await self.loop.run_in_executor(
+ result = await self.loop.run_in_executor(
pool, _test_get_event_loop_new_process__sub_proc)
+ pool.shutdown()
+ return result
self.unpatch_get_running_loop()
self.assertFalse(m_log.error.called)
@mock.patch('asyncio.base_events.logger')
+ def test_tb_logger_not_called_after_cancel(self, m_log):
+ fut = self._new_future(loop=self.loop)
+ fut.set_exception(Exception())
+ fut.cancel()
+ del fut
+ self.assertFalse(m_log.error.called)
+
+ @mock.patch('asyncio.base_events.logger')
def test_tb_logger_result_unretrieved(self, m_log):
fut = self._new_future(loop=self.loop)
fut.set_result(42)
self.assertTrue(tb.cancelled())
self.assertTrue(tc.done())
+ def test_finished_waiter_cancelled(self):
+ lock = asyncio.Lock(loop=self.loop)
+
+ ta = asyncio.Task(lock.acquire(), loop=self.loop)
+ test_utils.run_briefly(self.loop)
+ self.assertTrue(lock.locked())
+
+ tb = asyncio.Task(lock.acquire(), loop=self.loop)
+ test_utils.run_briefly(self.loop)
+ self.assertEqual(len(lock._waiters), 1)
+
+ # Create a second waiter, wake up the first, and cancel it.
+ # Without the fix, the second was not woken up.
+ tc = asyncio.Task(lock.acquire(), loop=self.loop)
+ lock.release()
+ tb.cancel()
+ test_utils.run_briefly(self.loop)
+
+ self.assertTrue(lock.locked())
+ self.assertTrue(ta.done())
+ self.assertTrue(tb.cancelled())
+
def test_release_not_acquired(self):
lock = asyncio.Lock(loop=self.loop)
sslpipe.do_handshake.side_effect = mock_handshake
with mock.patch('asyncio.sslproto._SSLPipe', return_value=sslpipe):
ssl_proto.connection_made(transport)
+ return transport
def test_cancel_handshake(self):
# Python issue #23197: cancelling a handshake must not raise an
test_utils.run_briefly(self.loop)
self.assertIsInstance(waiter.exception(), ConnectionAbortedError)
+ def test_close_during_handshake(self):
+ # bpo-29743 Closing transport during handshake process leaks socket
+ waiter = asyncio.Future(loop=self.loop)
+ ssl_proto = self.ssl_protocol(waiter)
+
+ def do_handshake(callback):
+ return []
+
+ transport = self.connection_made(ssl_proto)
+ test_utils.run_briefly(self.loop)
+
+ ssl_proto._app_transport.close()
+ self.assertTrue(transport.abort.called)
+
+ def test_get_extra_info_on_closed_connection(self):
+ waiter = asyncio.Future(loop=self.loop)
+ ssl_proto = self.ssl_protocol(waiter)
+ self.assertIsNone(ssl_proto._get_extra_info('socket'))
+ default = object()
+ self.assertIs(ssl_proto._get_extra_info('socket', default), default)
+ self.connection_made(ssl_proto)
+ self.assertIsNotNone(ssl_proto._get_extra_info('socket'))
+ ssl_proto.connection_lost(None)
+ self.assertIsNone(ssl_proto._get_extra_info('socket'))
+
+
if __name__ == '__main__':
unittest.main()
self.assertFalse(t._must_cancel) # White-box test.
self.assertFalse(t.cancel())
+ def test_cancel_at_end(self):
+ """coroutine end right after task is cancelled"""
+ loop = asyncio.new_event_loop()
+ self.set_event_loop(loop)
+
+ @asyncio.coroutine
+ def task():
+ t.cancel()
+ self.assertTrue(t._must_cancel) # White-box test.
+ return 12
+
+ t = self.new_task(loop, task())
+ self.assertRaises(
+ asyncio.CancelledError, loop.run_until_complete, t)
+ self.assertTrue(t.done())
+ self.assertFalse(t._must_cancel) # White-box test.
+ self.assertFalse(t.cancel())
+
def test_stop_while_run_in_complete(self):
def gen():
})
mock_handler.reset_mock()
+ @mock.patch('asyncio.base_events.logger')
+ def test_tb_logger_not_called_after_cancel(self, m_log):
+ loop = asyncio.new_event_loop()
+ self.set_event_loop(loop)
+
+ @asyncio.coroutine
+ def coro():
+ raise TypeError
+
+ @asyncio.coroutine
+ def runner():
+ task = self.new_task(loop, coro())
+ yield from asyncio.sleep(0.05, loop=loop)
+ task.cancel()
+ task = None
+
+ loop.run_until_complete(runner())
+ self.assertFalse(m_log.error.called)
+
@mock.patch('asyncio.coroutines.logger')
def test_coroutine_never_yielded(self, m_log):
with set_coroutine_debug(True):
class BaseTestAPI:
def tearDown(self):
- asyncore.close_all()
+ asyncore.close_all(ignore_all=True)
def loop_waiting_for_flag(self, instance, timeout=5):
timeout = float(timeout) / 100
def test_set_reuse_addr(self):
if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX:
self.skipTest("Not applicable to AF_UNIX sockets.")
- sock = socket.socket(self.family)
- try:
- sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- except OSError:
- unittest.skip("SO_REUSEADDR not supported on this platform")
- else:
- # if SO_REUSEADDR succeeded for sock we expect asyncore
- # to do the same
- s = asyncore.dispatcher(socket.socket(self.family))
- self.assertFalse(s.socket.getsockopt(socket.SOL_SOCKET,
- socket.SO_REUSEADDR))
- s.socket.close()
- s.create_socket(self.family)
- s.set_reuse_addr()
- self.assertTrue(s.socket.getsockopt(socket.SOL_SOCKET,
- socket.SO_REUSEADDR))
- finally:
- sock.close()
+
+ with socket.socket(self.family) as sock:
+ try:
+ sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ except OSError:
+ unittest.skip("SO_REUSEADDR not supported on this platform")
+ else:
+ # if SO_REUSEADDR succeeded for sock we expect asyncore
+ # to do the same
+ s = asyncore.dispatcher(socket.socket(self.family))
+ self.assertFalse(s.socket.getsockopt(socket.SOL_SOCKET,
+ socket.SO_REUSEADDR))
+ s.socket.close()
+ s.create_socket(self.family)
+ s.set_reuse_addr()
+ self.assertTrue(s.socket.getsockopt(socket.SOL_SOCKET,
+ socket.SO_REUSEADDR))
@unittest.skipUnless(threading, 'Threading required for this test.')
@support.reap_threads
def test_quick_connect(self):
# see: http://bugs.python.org/issue10340
- if self.family in (socket.AF_INET, getattr(socket, "AF_INET6", object())):
- server = BaseServer(self.family, self.addr)
- t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1,
- count=500))
- t.start()
- def cleanup():
- t.join(timeout=TIMEOUT)
- if t.is_alive():
- self.fail("join() timed out")
- self.addCleanup(cleanup)
-
- s = socket.socket(self.family, socket.SOCK_STREAM)
- s.settimeout(.2)
- s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
- struct.pack('ii', 1, 0))
- try:
- s.connect(server.address)
- except OSError:
- pass
- finally:
- s.close()
+ if self.family not in (socket.AF_INET, getattr(socket, "AF_INET6", object())):
+ self.skipTest("test specific to AF_INET and AF_INET6")
+
+ server = BaseServer(self.family, self.addr)
+ # run the thread 500 ms: the socket should be connected in 200 ms
+ t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1,
+ count=5))
+ t.start()
+ try:
+ with socket.socket(self.family, socket.SOCK_STREAM) as s:
+ s.settimeout(.2)
+ s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
+ struct.pack('ii', 1, 0))
+
+ try:
+ s.connect(server.address)
+ except OSError:
+ pass
+ finally:
+ t.join(timeout=TIMEOUT)
+ if t.is_alive():
+ self.fail("join() timed out")
class TestAPI_UseIPv4Sockets(BaseTestAPI):
family = socket.AF_INET
def raise2():
raise SystemError
+def exit():
+ raise SystemExit
+
class GeneralTest(unittest.TestCase):
self.assertRaises(ZeroDivisionError, atexit._run_exitfuncs)
self.assertIn("ZeroDivisionError", self.stream.getvalue())
+ def test_exit(self):
+ # be sure a SystemExit is handled properly
+ atexit.register(exit)
+
+ self.assertRaises(SystemExit, atexit._run_exitfuncs)
+ self.assertEqual(self.stream.getvalue(), '')
+
def test_print_tracebacks(self):
# Issue #18776: the tracebacks should be printed when errors occur.
def f():
self.assertEqual(l, [5])
+@support.cpython_only
class SubinterpreterTest(unittest.TestCase):
def test_callbacks_leak(self):
a = b % (b'seventy-nine', 79)
self.assertEqual(a, b'seventy-nine / 100 = 79%')
self.assertIs(type(a), self.type2test)
+ # issue 29714
+ b = self.type2test(b'hello,\x00%b!')
+ b = b % b'world'
+ self.assertEqual(b, b'hello,\x00world!')
+ self.assertIs(type(b), self.type2test)
def test_imod(self):
b = self.type2test(b'hello, %b!')
b %= (b'seventy-nine', 79)
self.assertEqual(b, b'seventy-nine / 100 = 79%')
self.assertIs(type(b), self.type2test)
+ # issue 29714
+ b = self.type2test(b'hello,\x00%b!')
+ b %= b'world'
+ self.assertEqual(b, b'hello,\x00world!')
+ self.assertIs(type(b), self.type2test)
def test_rmod(self):
with self.assertRaises(TypeError):
+import datetime
import unittest
+from test.support import cpython_only
+try:
+ import _testcapi
+except ImportError:
+ _testcapi = None
# The test cases here cover several paths through the function calling
# code. They depend on the METH_XXX flag that is used to define a C
self.assertRaises(TypeError, [].count, x=2, y=2)
+def pyfunc(arg1, arg2):
+ return [arg1, arg2]
+
+
+def pyfunc_noarg():
+ return "noarg"
+
+
+class PythonClass:
+ def method(self, arg1, arg2):
+ return [arg1, arg2]
+
+ def method_noarg(self):
+ return "noarg"
+
+ @classmethod
+ def class_method(cls):
+ return "classmethod"
+
+ @staticmethod
+ def static_method():
+ return "staticmethod"
+
+
+PYTHON_INSTANCE = PythonClass()
+
+
+IGNORE_RESULT = object()
+
+
+@cpython_only
+class FastCallTests(unittest.TestCase):
+ # Test calls with positional arguments
+ CALLS_POSARGS = (
+ # (func, args: tuple, result)
+
+ # Python function with 2 arguments
+ (pyfunc, (1, 2), [1, 2]),
+
+ # Python function without argument
+ (pyfunc_noarg, (), "noarg"),
+
+ # Python class methods
+ (PythonClass.class_method, (), "classmethod"),
+ (PythonClass.static_method, (), "staticmethod"),
+
+ # Python instance methods
+ (PYTHON_INSTANCE.method, (1, 2), [1, 2]),
+ (PYTHON_INSTANCE.method_noarg, (), "noarg"),
+ (PYTHON_INSTANCE.class_method, (), "classmethod"),
+ (PYTHON_INSTANCE.static_method, (), "staticmethod"),
+
+ # C function: METH_NOARGS
+ (globals, (), IGNORE_RESULT),
+
+ # C function: METH_O
+ (id, ("hello",), IGNORE_RESULT),
+
+ # C function: METH_VARARGS
+ (dir, (1,), IGNORE_RESULT),
+
+ # C function: METH_VARARGS | METH_KEYWORDS
+ (min, (5, 9), 5),
+
+ # C function: METH_FASTCALL
+ (divmod, (1000, 33), (30, 10)),
+
+ # C type static method: METH_FASTCALL | METH_CLASS
+ (int.from_bytes, (b'\x01\x00', 'little'), 1),
+
+ # bpo-30524: Test that calling a C type static method with no argument
+ # doesn't crash (ignore the result): METH_FASTCALL | METH_CLASS
+ (datetime.datetime.now, (), IGNORE_RESULT),
+ )
+
+ # Test calls with positional and keyword arguments
+ CALLS_KWARGS = (
+ # (func, args: tuple, kwargs: dict, result)
+
+ # Python function with 2 arguments
+ (pyfunc, (1,), {'arg2': 2}, [1, 2]),
+ (pyfunc, (), {'arg1': 1, 'arg2': 2}, [1, 2]),
+
+ # Python instance methods
+ (PYTHON_INSTANCE.method, (1,), {'arg2': 2}, [1, 2]),
+ (PYTHON_INSTANCE.method, (), {'arg1': 1, 'arg2': 2}, [1, 2]),
+
+ # C function: METH_VARARGS | METH_KEYWORDS
+ (max, ([],), {'default': 9}, 9),
+
+ # C type static method: METH_FASTCALL | METH_CLASS
+ (int.from_bytes, (b'\x01\x00',), {'byteorder': 'little'}, 1),
+ (int.from_bytes, (), {'bytes': b'\x01\x00', 'byteorder': 'little'}, 1),
+ )
+
+ def check_result(self, result, expected):
+ if expected is IGNORE_RESULT:
+ return
+ self.assertEqual(result, expected)
+
+ def test_fastcall(self):
+ # Test _PyObject_FastCall()
+
+ for func, args, expected in self.CALLS_POSARGS:
+ with self.subTest(func=func, args=args):
+ result = _testcapi.pyobject_fastcall(func, args)
+ self.check_result(result, expected)
+
+ if not args:
+ # args=NULL, nargs=0
+ result = _testcapi.pyobject_fastcall(func, None)
+ self.check_result(result, expected)
+
+ def test_fastcall_dict(self):
+ # Test _PyObject_FastCallDict()
+
+ for func, args, expected in self.CALLS_POSARGS:
+ with self.subTest(func=func, args=args):
+ # kwargs=NULL
+ result = _testcapi.pyobject_fastcalldict(func, args, None)
+ self.check_result(result, expected)
+
+ # kwargs={}
+ result = _testcapi.pyobject_fastcalldict(func, args, {})
+ self.check_result(result, expected)
+
+ if not args:
+ # args=NULL, nargs=0, kwargs=NULL
+ result = _testcapi.pyobject_fastcalldict(func, None, None)
+ self.check_result(result, expected)
+
+ # args=NULL, nargs=0, kwargs={}
+ result = _testcapi.pyobject_fastcalldict(func, None, {})
+ self.check_result(result, expected)
+
+ for func, args, kwargs, expected in self.CALLS_KWARGS:
+ with self.subTest(func=func, args=args, kwargs=kwargs):
+ result = _testcapi.pyobject_fastcalldict(func, args, kwargs)
+ self.check_result(result, expected)
+
+ def test_fastcall_keywords(self):
+ # Test _PyObject_FastCallKeywords()
+
+ for func, args, expected in self.CALLS_POSARGS:
+ with self.subTest(func=func, args=args):
+ # kwnames=NULL
+ result = _testcapi.pyobject_fastcallkeywords(func, args, None)
+ self.check_result(result, expected)
+
+ # kwnames=()
+ result = _testcapi.pyobject_fastcallkeywords(func, args, ())
+ self.check_result(result, expected)
+
+ if not args:
+ # kwnames=NULL
+ result = _testcapi.pyobject_fastcallkeywords(func, None, None)
+ self.check_result(result, expected)
+
+ # kwnames=()
+ result = _testcapi.pyobject_fastcallkeywords(func, None, ())
+ self.check_result(result, expected)
+
+ for func, args, kwargs, expected in self.CALLS_KWARGS:
+ with self.subTest(func=func, args=args, kwargs=kwargs):
+ kwnames = tuple(kwargs.keys())
+ args = args + tuple(kwargs.values())
+ result = _testcapi.pyobject_fastcallkeywords(func, args, kwnames)
+ self.check_result(result, expected)
+
+
if __name__ == "__main__":
unittest.main()
def __len__(self):
return 1
self.assertRaises(TypeError, _posixsubprocess.fork_exec,
- 1,Z(),3,[1, 2],5,6,7,8,9,10,11,12,13,14,15,16,17)
+ 1,Z(),3,(1, 2),5,6,7,8,9,10,11,12,13,14,15,16,17)
# Issue #15736: overflow in _PySequence_BytesToCharpArray()
class Z(object):
def __len__(self):
def __getitem__(self, i):
return b'x'
self.assertRaises(MemoryError, _posixsubprocess.fork_exec,
- 1,Z(),3,[1, 2],5,6,7,8,9,10,11,12,13,14,15,16,17)
+ 1,Z(),3,(1, 2),5,6,7,8,9,10,11,12,13,14,15,16,17)
@unittest.skipUnless(_posixsubprocess, '_posixsubprocess required for this test.')
def test_subprocess_fork_exec(self):
# Issue #15738: crash in subprocess_fork_exec()
self.assertRaises(TypeError, _posixsubprocess.fork_exec,
- Z(),[b'1'],3,[1, 2],5,6,7,8,9,10,11,12,13,14,15,16,17)
+ Z(),[b'1'],3,(1, 2),5,6,7,8,9,10,11,12,13,14,15,16,17)
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
# test the format unit when not skipped
format = c + "i"
try:
- # (note: the format string must be bytes!)
_testcapi.parse_tuple_and_keywords(tuple_1, dict_b,
- format.encode("ascii"), keywords)
+ format, keywords)
when_not_skipped = False
except SystemError as e:
s = "argument 1 (impossible<bad format char>)"
optional_format = "|" + format
try:
_testcapi.parse_tuple_and_keywords(empty_tuple, dict_b,
- optional_format.encode("ascii"), keywords)
+ optional_format, keywords)
when_skipped = False
except SystemError as e:
s = "impossible<bad format char>: '{}'".format(format)
self.assertIs(when_skipped, when_not_skipped, message)
def test_parse_tuple_and_keywords(self):
- # parse_tuple_and_keywords error handling tests
+ # Test handling errors in the parse_tuple_and_keywords helper itself
self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
(), {}, 42, [])
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
- (), {}, b'', 42)
+ (), {}, '', 42)
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
- (), {}, b'', [''] * 42)
+ (), {}, '', [''] * 42)
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
- (), {}, b'', [42])
+ (), {}, '', [42])
+
+ def test_bad_use(self):
+ # Test handling invalid format and keywords in
+ # PyArg_ParseTupleAndKeywords()
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (1,), {}, '||O', ['a'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (1, 2), {}, '|O|O', ['a', 'b'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {'a': 1}, '$$O', ['a'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {'a': 1, 'b': 2}, '$O$O', ['a', 'b'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {'a': 1}, '$|O', ['a'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {'a': 1, 'b': 2}, '$O|O', ['a', 'b'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (1,), {}, '|O', ['a', 'b'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (1,), {}, '|OO', ['a'])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {}, '|$O', [''])
+ self.assertRaises(SystemError, _testcapi.parse_tuple_and_keywords,
+ (), {}, '|OO', ['a', ''])
def test_positional_only(self):
parse = _testcapi.parse_tuple_and_keywords
- parse((1, 2, 3), {}, b'OOO', ['', '', 'a'])
- parse((1, 2), {'a': 3}, b'OOO', ['', '', 'a'])
+ parse((1, 2, 3), {}, 'OOO', ['', '', 'a'])
+ parse((1, 2), {'a': 3}, 'OOO', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 2 positional arguments \(1 given\)'):
- parse((1,), {'a': 3}, b'OOO', ['', '', 'a'])
- parse((1,), {}, b'O|OO', ['', '', 'a'])
+ parse((1,), {'a': 3}, 'OOO', ['', '', 'a'])
+ parse((1,), {}, 'O|OO', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 1 positional arguments \(0 given\)'):
- parse((), {}, b'O|OO', ['', '', 'a'])
- parse((1, 2), {'a': 3}, b'OO$O', ['', '', 'a'])
+ parse((), {}, 'O|OO', ['', '', 'a'])
+ parse((1, 2), {'a': 3}, 'OO$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes exactly 2 positional arguments \(1 given\)'):
- parse((1,), {'a': 3}, b'OO$O', ['', '', 'a'])
- parse((1,), {}, b'O|O$O', ['', '', 'a'])
+ parse((1,), {'a': 3}, 'OO$O', ['', '', 'a'])
+ parse((1,), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(TypeError,
r'Function takes at least 1 positional arguments \(0 given\)'):
- parse((), {}, b'O|O$O', ['', '', 'a'])
+ parse((), {}, 'O|O$O', ['', '', 'a'])
with self.assertRaisesRegex(SystemError, r'Empty parameter name after \$'):
- parse((1,), {}, b'O|$OO', ['', '', 'a'])
+ parse((1,), {}, 'O|$OO', ['', '', 'a'])
with self.assertRaisesRegex(SystemError, 'Empty keyword'):
- parse((1,), {}, b'O|OO', ['', 'a', ''])
+ parse((1,), {}, 'O|OO', ['', 'a', ''])
@unittest.skipUnless(threading, 'Threading required for this test.')
a = A(hash(A.f)^(-1))
hash(a.f)
+ def testSetattrWrapperNameIntern(self):
+ # Issue #25794: __setattr__ should intern the attribute name
+ class A:
+ pass
+
+ def add(self, other):
+ return 'summa'
+
+ name = str(b'__add__', 'ascii') # shouldn't be optimized
+ self.assertIsNot(name, '__add__') # not interned
+ type.__setattr__(A, name, add)
+ self.assertEqual(A() + 1, 'summa')
+
+ name2 = str(b'__add__', 'ascii')
+ self.assertIsNot(name2, '__add__')
+ self.assertIsNot(name2, name)
+ type.__delattr__(A, name2)
+ with self.assertRaises(TypeError):
+ A() + 1
+
+ def testSetattrNonStringName(self):
+ class A:
+ pass
+
+ with self.assertRaises(TypeError):
+ type.__setattr__(A, b'x', None)
+
if __name__ == '__main__':
unittest.main()
"""
import sys
+import threading
import unittest
import weakref
-from test.support import run_doctest, run_unittest, cpython_only
+from test.support import (run_doctest, run_unittest, cpython_only,
+ check_impl_detail)
def consts(t):
self.assertTrue(self.called)
+if check_impl_detail(cpython=True):
+ import ctypes
+ py = ctypes.pythonapi
+ freefunc = ctypes.CFUNCTYPE(None,ctypes.c_voidp)
+
+ RequestCodeExtraIndex = py._PyEval_RequestCodeExtraIndex
+ RequestCodeExtraIndex.argtypes = (freefunc,)
+ RequestCodeExtraIndex.restype = ctypes.c_ssize_t
+
+ SetExtra = py._PyCode_SetExtra
+ SetExtra.argtypes = (ctypes.py_object, ctypes.c_ssize_t, ctypes.c_voidp)
+ SetExtra.restype = ctypes.c_int
+
+ GetExtra = py._PyCode_GetExtra
+ GetExtra.argtypes = (ctypes.py_object, ctypes.c_ssize_t,
+ ctypes.POINTER(ctypes.c_voidp))
+ GetExtra.restype = ctypes.c_int
+
+ LAST_FREED = None
+ def myfree(ptr):
+ global LAST_FREED
+ LAST_FREED = ptr
+
+ FREE_FUNC = freefunc(myfree)
+ FREE_INDEX = RequestCodeExtraIndex(FREE_FUNC)
+
+ class CoExtra(unittest.TestCase):
+ def get_func(self):
+ # Defining a function causes the containing function to have a
+ # reference to the code object. We need the code objects to go
+ # away, so we eval a lambda.
+ return eval('lambda:42')
+
+ def test_get_non_code(self):
+ f = self.get_func()
+
+ self.assertRaises(SystemError, SetExtra, 42, FREE_INDEX,
+ ctypes.c_voidp(100))
+ self.assertRaises(SystemError, GetExtra, 42, FREE_INDEX,
+ ctypes.c_voidp(100))
+
+ def test_bad_index(self):
+ f = self.get_func()
+ self.assertRaises(SystemError, SetExtra, f.__code__,
+ FREE_INDEX+100, ctypes.c_voidp(100))
+ self.assertEqual(GetExtra(f.__code__, FREE_INDEX+100,
+ ctypes.c_voidp(100)), 0)
+
+ def test_free_called(self):
+ # Verify that the provided free function gets invoked
+ # when the code object is cleaned up.
+ f = self.get_func()
+
+ SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(100))
+ del f
+ self.assertEqual(LAST_FREED, 100)
+
+ def test_get_set(self):
+ # Test basic get/set round tripping.
+ f = self.get_func()
+
+ extra = ctypes.c_voidp()
+
+ SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(200))
+ # reset should free...
+ SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(300))
+ self.assertEqual(LAST_FREED, 200)
+
+ extra = ctypes.c_voidp()
+ GetExtra(f.__code__, FREE_INDEX, extra)
+ self.assertEqual(extra.value, 300)
+ del f
+
+ def test_free_different_thread(self):
+ # Freeing a code object on a different thread then
+ # where the co_extra was set should be safe.
+ f = self.get_func()
+ class ThreadTest(threading.Thread):
+ def __init__(self, f, test):
+ super().__init__()
+ self.f = f
+ self.test = test
+ def run(self):
+ del self.f
+ self.test.assertEqual(LAST_FREED, 500)
+
+ SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(500))
+ tt = ThreadTest(f, self)
+ del f
+ tt.start()
+ tt.join()
+ self.assertEqual(LAST_FREED, 500)
+
def test_main(verbose=None):
from test import test_code
run_doctest(test_code, verbose)
- run_unittest(CodeTest, CodeConstsTest, CodeWeakRefTest)
-
+ tests = [CodeTest, CodeConstsTest, CodeWeakRefTest]
+ if check_impl_detail(cpython=True):
+ tests.append(CoExtra)
+ run_unittest(*tests)
if __name__ == "__main__":
test_main()
(b"abc\x84\x32\x80\x80def", "replace", 'abc\ufffd2\ufffd\ufffddef'),
(b"abc\x81\x30\x81\x30def", "strict", 'abc\x80def'),
(b"abc\x86\x30\x81\x30def", "replace", 'abc\ufffd0\ufffd0def'),
+ # issue29990
+ (b"\xff\x30\x81\x30", "strict", None),
+ (b"\x81\x30\xff\x30", "strict", None),
+ (b"abc\x81\x39\xff\x39\xc1\xc4", "replace", "abc\ufffd\x39\ufffd\x39\u804a"),
+ (b"abc\xab\x36\xff\x30def", "replace", 'abc\ufffd\x36\ufffd\x30def'),
+ (b"abc\xbf\x38\xff\x32\xc1\xc4", "ignore", "abc\x38\x32\u804a"),
)
has_iso10646 = True
(b'ab~{\x81\x81\x41\x44~}cd', 'replace', 'ab\uFFFD\uFFFD\u804Acd'),
(b'ab~{\x41\x44~}cd', 'replace', 'ab\u804Acd'),
(b"ab~{\x79\x79\x41\x44~}cd", "replace", "ab\ufffd\ufffd\u804acd"),
+ # issue 30003
+ ('ab~cd', 'strict', b'ab~~cd'), # escape ~
+ (b'~{Dc~~:C~}', 'strict', None), # ~~ only in ASCII mode
+ (b'~{Dc~\n:C~}', 'strict', None), # ~\n only in ASCII mode
)
if __name__ == "__main__":
class CustomEqualObject:
def __eq__(self, other):
return False
- class CustomSequence(list):
- def __contains__(self, value):
- return Sequence.__contains__(self, value)
+ class CustomSequence(Sequence):
+ def __init__(self, seq):
+ self._seq = seq
+ def __getitem__(self, index):
+ return self._seq[index]
+ def __len__(self):
+ return len(self._seq)
nan = float('nan')
obj = CustomEqualObject()
+ seq = CustomSequence([nan, obj, nan])
containers = [
- CustomSequence([nan, obj]),
+ seq,
ItemsView({1: nan, 2: obj}),
ValuesView({1: nan, 2: obj})
]
for container in containers:
for elem in container:
self.assertIn(elem, container)
+ self.assertEqual(seq.index(nan), 0)
+ self.assertEqual(seq.index(obj), 1)
+ self.assertEqual(seq.count(nan), 2)
+ self.assertEqual(seq.count(obj), 1)
def assertSameSet(self, s1, s2):
# coerce both to a real set then check equality
self.assertTrue(issubclass(DefaultEnter, AbstractContextManager))
+ class NoEnter(ManagerFromScratch):
+ __enter__ = None
+
+ self.assertFalse(issubclass(NoEnter, AbstractContextManager))
+
+ class NoExit(ManagerFromScratch):
+ __exit__ = None
+
+ self.assertFalse(issubclass(NoExit, AbstractContextManager))
+
class ContextManagerTestCase(unittest.TestCase):
else:
self.fail('StopIteration was suppressed')
+ def test_contextmanager_do_not_unchain_non_stopiteration_exceptions(self):
+ @contextmanager
+ def test_issue29692():
+ try:
+ yield
+ except Exception as exc:
+ raise RuntimeError('issue29692:Chained') from exc
+ try:
+ with test_issue29692():
+ raise ZeroDivisionError
+ except Exception as ex:
+ self.assertIs(type(ex), RuntimeError)
+ self.assertEqual(ex.args[0], 'issue29692:Chained')
+ self.assertIsInstance(ex.__cause__, ZeroDivisionError)
+
+ try:
+ with test_issue29692():
+ raise StopIteration('issue29692:Unchained')
+ except Exception as ex:
+ self.assertIs(type(ex), StopIteration)
+ self.assertEqual(ex.args[0], 'issue29692:Unchained')
+ self.assertIsNone(ex.__cause__)
+
def _create_contextmanager_attribs(self):
def attribs(**kw):
def decorate(func):
"coroutine is being awaited already"):
waiter(coro).send(None)
+ def test_await_16(self):
+ # See https://bugs.python.org/issue29600 for details.
+
+ async def f():
+ return ValueError()
+
+ async def g():
+ try:
+ raise KeyError
+ except:
+ return await f()
+
+ _, result = run_async(g())
+ self.assertIsNone(result.__context__)
+
def test_with_1(self):
class Manager:
def __init__(self, name):
sys.set_coroutine_wrapper(None)
+@support.cpython_only
class CAPITest(unittest.TestCase):
def test_tp_await_1(self):
support.check_free_after_iterating(self, lambda d: iter(d.values()), dict)
support.check_free_after_iterating(self, lambda d: iter(d.items()), dict)
+ def test_equal_operator_modifying_operand(self):
+ # test fix for seg fault reported in issue 27945 part 3.
+ class X():
+ def __del__(self):
+ dict_b.clear()
+
+ def __eq__(self, other):
+ dict_a.clear()
+ return True
+
+ def __hash__(self):
+ return 13
+
+ dict_a = {X(): 0}
+ dict_b = {X(): X()}
+ self.assertTrue(dict_a == dict_b)
+
+ def test_fromkeys_operator_modifying_dict_operand(self):
+ # test fix for seg fault reported in issue 27945 part 4a.
+ class X(int):
+ def __hash__(self):
+ return 13
+
+ def __eq__(self, other):
+ if len(d) > 1:
+ d.clear()
+ return False
+
+ d = {} # this is required to exist so that d can be constructed!
+ d = {X(1): 1, X(2): 2}
+ try:
+ dict.fromkeys(d) # shouldn't crash
+ except RuntimeError: # implementation defined
+ pass
+
+ def test_fromkeys_operator_modifying_set_operand(self):
+ # test fix for seg fault reported in issue 27945 part 4b.
+ class X(int):
+ def __hash__(self):
+ return 13
+
+ def __eq__(self, other):
+ if len(d) > 1:
+ d.clear()
+ return False
+
+ d = {} # this is required to exist so that d can be constructed!
+ d = {X(1), X(2)}
+ try:
+ dict.fromkeys(d) # shouldn't crash
+ except RuntimeError: # implementation defined
+ pass
+
+ def test_dictitems_contains_use_after_free(self):
+ class X:
+ def __eq__(self, other):
+ d.clear()
+ return NotImplemented
+
+ d = {0: set()}
+ (0, X()) in d.items()
+
+ def test_init_use_after_free(self):
+ class X:
+ def __hash__(self):
+ pair[:] = []
+ return 13
+
+ pair = [X(), 123]
+ dict([pair])
+
+ def test_oob_indexing_dictiter_iternextitem(self):
+ class X(int):
+ def __del__(self):
+ d.clear()
+
+ d = {i: X(i) for i in range(8)}
+
+ def iter_and_mutate():
+ for result in d.items():
+ if result[0] == 2:
+ d[2] = None # free d[2] --> X(2).__del__ was called
+
+ self.assertRaises(RuntimeError, iter_and_mutate)
+
class CAPITest(unittest.TestCase):
g.flatten(msg)
self.assertEqual(s.getvalue(), self.typ(expected))
+ def test_compat32_max_line_length_does_not_fold_when_none(self):
+ msg = self.msgmaker(self.typ(self.refold_long_expected[0]))
+ s = self.ioclass()
+ g = self.genclass(s, policy=policy.compat32.clone(max_line_length=None))
+ g.flatten(msg)
+ self.assertEqual(s.getvalue(), self.typ(self.refold_long_expected[0]))
+
class TestGenerator(TestGeneratorBase, TestEmailBase):
# Python test set -- part 5, built-in exceptions
+import copy
import os
import sys
import unittest
exc = ImportError(arg)
self.assertEqual(str(arg), str(exc))
+ def test_copy_pickle(self):
+ for kwargs in (dict(),
+ dict(name='somename'),
+ dict(path='somepath'),
+ dict(name='somename', path='somepath')):
+ orig = ImportError('test', **kwargs)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ exc = pickle.loads(pickle.dumps(orig, proto))
+ self.assertEqual(exc.args, ('test',))
+ self.assertEqual(exc.msg, 'test')
+ self.assertEqual(exc.name, orig.name)
+ self.assertEqual(exc.path, orig.path)
+ for c in copy.copy, copy.deepcopy:
+ exc = c(orig)
+ self.assertEqual(exc.args, ('test',))
+ self.assertEqual(exc.msg, 'test')
+ self.assertEqual(exc.name, orig.name)
+ self.assertEqual(exc.path, orig.path)
+
if __name__ == '__main__':
unittest.main()
3,
name)
+ @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
+ def test_raise_nonfatal_exception(self):
+ # These exceptions are not strictly errors. Letting
+ # faulthandler display the traceback when they are
+ # raised is likely to result in noise. However, they
+ # may still terminate the process if there is no
+ # handler installed for them (which there typically
+ # is, e.g. for debug messages).
+ for exc in (
+ 0x00000000,
+ 0x34567890,
+ 0x40000000,
+ 0x40001000,
+ 0x70000000,
+ 0x7FFFFFFF,
+ ):
+ output, exitcode = self.get_output(f"""
+ import faulthandler
+ faulthandler.enable()
+ faulthandler._raise_exception(0x{exc:x})
+ """
+ )
+ self.assertEqual(output, [])
+ # On Windows older than 7 SP1, the actual exception code has
+ # bit 29 cleared.
+ self.assertIn(exitcode,
+ (exc, exc & ~0x10000000))
+
+ @unittest.skipUnless(MS_WINDOWS, 'specific to Windows')
+ def test_disable_windows_exc_handler(self):
+ code = dedent("""
+ import faulthandler
+ faulthandler.enable()
+ faulthandler.disable()
+ code = faulthandler._EXCEPTION_ACCESS_VIOLATION
+ faulthandler._raise_exception(code)
+ """)
+ output, exitcode = self.get_output(code)
+ self.assertEqual(output, [])
+ self.assertEqual(exitcode, 0xC0000005)
if __name__ == "__main__":
from functools import wraps
from test.support import (TESTFN, TESTFN_UNICODE, check_warnings, run_unittest,
- make_bad_fd, cpython_only)
+ make_bad_fd, cpython_only, swap_attr)
from collections import UserList
import _io # C implementation of io
finally:
os.close(fd)
+ def testRecursiveRepr(self):
+ # Issue #25455
+ with swap_attr(self.f, 'name', self.f):
+ with self.assertRaises(RuntimeError):
+ repr(self.f) # Should not crash
+
def testErrors(self):
f = self.f
self.assertFalse(f.isatty())
self.assertEqual(float(memoryview(b'12.34')[1:4]), 2.3)
def test_error_message(self):
- testlist = ('\xbd', '123\xbd', ' 123 456 ')
- for s in testlist:
- try:
+ def check(s):
+ with self.assertRaises(ValueError, msg='float(%r)' % (s,)) as cm:
float(s)
- except ValueError as e:
- self.assertIn(s.strip(), e.args[0])
- else:
- self.fail("Expected int(%r) to raise a ValueError", s)
-
+ self.assertEqual(str(cm.exception),
+ 'could not convert string to float: %r' % (s,))
+
+ check('\xbd')
+ check('123\xbd')
+ check(' 123 456 ')
+ check(b' 123 456 ')
+
+ # non-ascii digits (error came from non-digit '!')
+ check('\u0663\u0661\u0664!')
+ # embedded NUL
+ check('123\x00')
+ check('123\x00 245')
+ check('123\x00245')
+ # byte string with embedded NUL
+ check(b'123\x00')
+ # non-UTF-8 byte string
+ check(b'123\xa0')
@support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
def test_float_with_comma(self):
"""Test cases for the fnmatch module."""
import unittest
+import os
from fnmatch import fnmatch, fnmatchcase, translate, filter
class FnmatchTestCase(unittest.TestCase):
- def check_match(self, filename, pattern, should_match=1, fn=fnmatch):
+ def check_match(self, filename, pattern, should_match=True, fn=fnmatch):
if should_match:
self.assertTrue(fn(filename, pattern),
"expected %r to match pattern %r"
% (filename, pattern))
else:
- self.assertTrue(not fn(filename, pattern),
+ self.assertFalse(fn(filename, pattern),
"expected %r not to match pattern %r"
% (filename, pattern))
check('abc', '*')
check('abc', 'ab[cd]')
check('abc', 'ab[!de]')
- check('abc', 'ab[de]', 0)
- check('a', '??', 0)
- check('a', 'b', 0)
+ check('abc', 'ab[de]', False)
+ check('a', '??', False)
+ check('a', 'b', False)
# these test that '\' is handled correctly in character sets;
# see SF bug #409651
check('\\', r'[\]')
check('a', r'[!\]')
- check('\\', r'[!\]', 0)
+ check('\\', r'[!\]', False)
# test that filenames with newlines in them are handled correctly.
# http://bugs.python.org/issue6665
def test_fnmatchcase(self):
check = self.check_match
- check('AbC', 'abc', 0, fnmatchcase)
- check('abc', 'AbC', 0, fnmatchcase)
+ check('abc', 'abc', True, fnmatchcase)
+ check('AbC', 'abc', False, fnmatchcase)
+ check('abc', 'AbC', False, fnmatchcase)
+ check('AbC', 'AbC', True, fnmatchcase)
+
+ check('usr/bin', 'usr/bin', True, fnmatchcase)
+ check('usr\\bin', 'usr/bin', False, fnmatchcase)
+ check('usr/bin', 'usr\\bin', False, fnmatchcase)
+ check('usr\\bin', 'usr\\bin', True, fnmatchcase)
def test_bytes(self):
self.check_match(b'test', b'te*')
self.check_match(b'test\xff', b'te*\xff')
self.check_match(b'foo\nbar', b'foo*')
+ def test_case(self):
+ ignorecase = os.path.normcase('ABC') == os.path.normcase('abc')
+ check = self.check_match
+ check('abc', 'abc')
+ check('AbC', 'abc', ignorecase)
+ check('abc', 'AbC', ignorecase)
+ check('AbC', 'AbC')
+
+ def test_sep(self):
+ normsep = os.path.normcase('\\') == os.path.normcase('/')
+ check = self.check_match
+ check('usr/bin', 'usr/bin')
+ check('usr\\bin', 'usr/bin', normsep)
+ check('usr/bin', 'usr\\bin', normsep)
+ check('usr\\bin', 'usr\\bin')
+
+
class TranslateTestCase(unittest.TestCase):
def test_translate(self):
class FilterTestCase(unittest.TestCase):
def test_filter(self):
- self.assertEqual(filter(['a', 'b'], 'a'), ['a'])
+ self.assertEqual(filter(['Python', 'Ruby', 'Perl', 'Tcl'], 'P*'),
+ ['Python', 'Perl'])
+ self.assertEqual(filter([b'Python', b'Ruby', b'Perl', b'Tcl'], b'P*'),
+ [b'Python', b'Perl'])
+
+ def test_mix_bytes_str(self):
+ self.assertRaises(TypeError, filter, ['test'], b'*')
+ self.assertRaises(TypeError, filter, [b'test'], '*')
+
+ def test_case(self):
+ ignorecase = os.path.normcase('P') == os.path.normcase('p')
+ self.assertEqual(filter(['Test.py', 'Test.rb', 'Test.PL'], '*.p*'),
+ ['Test.py', 'Test.PL'] if ignorecase else ['Test.py'])
+ self.assertEqual(filter(['Test.py', 'Test.rb', 'Test.PL'], '*.P*'),
+ ['Test.py', 'Test.PL'] if ignorecase else ['Test.PL'])
+
+ def test_sep(self):
+ normsep = os.path.normcase('\\') == os.path.normcase('/')
+ self.assertEqual(filter(['usr/bin', 'usr', 'usr\\lib'], 'usr/*'),
+ ['usr/bin', 'usr\\lib'] if normsep else ['usr/bin'])
+ self.assertEqual(filter(['usr/bin', 'usr', 'usr\\lib'], 'usr\\*'),
+ ['usr/bin', 'usr\\lib'] if normsep else ['usr\\lib'])
if __name__ == "__main__":
testcommon(b"%b", b"abc", b"abc")
testcommon(b"%b", bytearray(b"def"), b"def")
testcommon(b"%b", fb, b"123")
+ testcommon(b"%b", memoryview(b"abc"), b"abc")
# # %s is an alias for %b -- should only be used for Py2/3 code
testcommon(b"%s", b"abc", b"abc")
testcommon(b"%s", bytearray(b"def"), b"def")
testcommon(b"%s", fb, b"123")
+ testcommon(b"%s", memoryview(b"abc"), b"abc")
# %a will give the equivalent of
# repr(some_obj).encode('ascii', 'backslashreplace')
testcommon(b"%a", 3.14, b"3.14")
test_exc(b"%c", 3.14, TypeError,
"%c requires an integer in range(256) or a single byte")
test_exc(b"%b", "Xc", TypeError,
- "%b requires bytes, or an object that implements __bytes__, not 'str'")
+ "%b requires a bytes-like object, "
+ "or an object that implements __bytes__, not 'str'")
test_exc(b"%s", "Wd", TypeError,
- "%b requires bytes, or an object that implements __bytes__, not 'str'")
+ "%b requires a bytes-like object, "
+ "or an object that implements __bytes__, not 'str'")
if maxsize == 2**31-1:
# crashes 2.2.1 and earlier:
"f'{10:{ }}'",
"f' { } '",
+ # The Python parser ignores also the following
+ # whitespace characters in additional to a space.
+ "f'''{\t\f\r\n}'''",
+
# Catch the empty expression before the
# invalid conversion.
"f'{!x}'",
"f'{:x'",
])
+ # Different error message is raised for other whitespace characters.
+ self.assertAllRaise(SyntaxError, 'invalid character in identifier',
+ ["f'''{\xa0}'''",
+ "\xa0",
+ ])
+
def test_parens_in_expressions(self):
self.assertEqual(f'{3,}', '(3,)')
self.assertEqual(f'2\x203', '2 3')
self.assertEqual(f'\x203', ' 3')
+ with self.assertWarns(DeprecationWarning): # invalid escape sequence
+ value = eval(r"f'\{6*7}'")
+ self.assertEqual(value, '\\42')
+ self.assertEqual(f'\\{6*7}', '\\42')
+ self.assertEqual(fr'\{6*7}', '\\42')
+
+ AMPERSAND = 'spam'
+ # Get the right unicode character (&), or pick up local variable
+ # depending on the number of backslashes.
+ self.assertEqual(f'\N{AMPERSAND}', '&')
+ self.assertEqual(f'\\N{AMPERSAND}', '\\Nspam')
+ self.assertEqual(fr'\N{AMPERSAND}', '\\Nspam')
+ self.assertEqual(f'\\\N{AMPERSAND}', '\\&')
+
def test_misformed_unicode_character_name(self):
# These test are needed because unicode names are parsed
# differently inside f-strings.
self.assertEqual(f'{d["foo"]}', 'bar')
self.assertEqual(f"{d['foo']}", 'bar')
+ def test_backslash_char(self):
+ # Check eval of a backslash followed by a control char.
+ # See bpo-30682: this used to raise an assert in pydebug mode.
+ self.assertEqual(eval('f"\\\n"'), '')
+ self.assertEqual(eval('f"\\\r"'), '')
+
if __name__ == '__main__':
unittest.main()
else:
self.fail('partial object allowed __dict__ to be deleted')
+ def test_manually_adding_non_string_keyword(self):
+ p = self.partial(capture)
+ # Adding a non-string/unicode keyword to partial kwargs
+ p.keywords[1234] = 'value'
+ r = repr(p)
+ self.assertIn('1234', r)
+ self.assertIn("'value'", r)
+ with self.assertRaises(TypeError):
+ p()
+
+ def test_keystr_replaces_value(self):
+ p = self.partial(capture)
+
+ class MutatesYourDict(object):
+ def __str__(self):
+ p.keywords[self] = ['sth2']
+ return 'astr'
+
+ # Raplacing the value during key formatting should keep the original
+ # value alive (at least long enough).
+ p.keywords[MutatesYourDict()] = ['sth']
+ r = repr(p)
+ self.assertIn('astr', r)
+ self.assertIn("['sth']", r)
+
+
class TestPartialPy(TestPartial, unittest.TestCase):
partial = py_functools.partial
# The code for testing gdb was adapted from similar work in Unladen Swallow's
# Lib/test/test_jit_gdb.py
+import locale
import os
import re
import subprocess
import sys
import sysconfig
+import textwrap
import unittest
-import locale
# Is this Python configured to support threads?
try:
breakpoint='time_gmtime',
cmds_after_breakpoint=['py-bt-full'],
)
- self.assertIn('#0 <built-in method gmtime', gdb_output)
+ self.assertIn('#1 <built-in method gmtime', gdb_output)
+
+ @unittest.skipIf(python_is_optimized(),
+ "Python was compiled with optimizations")
+ def test_wrapper_call(self):
+ cmd = textwrap.dedent('''
+ class MyList(list):
+ def __init__(self):
+ super().__init__() # wrapper_call()
+
+ id("first break point")
+ l = MyList()
+ ''')
+ # Verify with "py-bt":
+ gdb_output = self.get_stack_trace(cmd,
+ cmds_after_breakpoint=['break wrapper_call', 'continue', 'py-bt'])
+ self.assertRegex(gdb_output,
+ r"<method-wrapper u?'__init__' of MyList object at ")
class PyPrintTests(DebuggerTests):
from test import support
+_testcapi = support.import_module('_testcapi')
+
+
+# This tests to make sure that if a SIGINT arrives just before we send into a
+# yield from chain, the KeyboardInterrupt is raised in the innermost
+# generator (see bpo-30039).
+class SignalAndYieldFromTest(unittest.TestCase):
+
+ def generator1(self):
+ return (yield from self.generator2())
+
+ def generator2(self):
+ try:
+ yield
+ except KeyboardInterrupt:
+ return "PASSED"
+ else:
+ return "FAILED"
+
+ def test_raise_and_yield_from(self):
+ gen = self.generator1()
+ gen.send(None)
+ try:
+ _testcapi.raise_SIGINT_then_send_None(gen)
+ except BaseException as _exc:
+ exc = _exc
+ self.assertIs(type(exc), StopIteration)
+ self.assertEqual(exc.value, "PASSED")
+
class FinalizationTest(unittest.TestCase):
import inspect
from test.support import (reap_threads, verbose, transient_internet,
- run_with_tz, run_with_locale)
+ run_with_tz, run_with_locale, cpython_only)
import unittest
from unittest import mock
from datetime import datetime, timezone, timedelta
ssl_context=ssl_context)
client.shutdown()
+ # Mock the private method _connect(), so mark the test as specific
+ # to CPython stdlib
+ @cpython_only
+ def test_certfile_arg_warn(self):
+ with support.check_warnings(('', DeprecationWarning)):
+ with mock.patch.object(self.imap_class, 'open'):
+ with mock.patch.object(self.imap_class, '_connect'):
+ self.imap_class('localhost', 143, certfile=CERTFILE)
+
class ThreadedNetworkedTests(unittest.TestCase):
server_class = socketserver.TCPServer
imap_class = imaplib.IMAP4
_server = self.imap_class(self.host, self.port)
self.check_logincapa(_server)
- def test_logincapa_with_client_certfile(self):
- with transient_internet(self.host):
- with support.check_warnings(('', DeprecationWarning)):
- _server = self.imap_class(self.host, self.port,
- certfile=CERTFILE)
- self.check_logincapa(_server)
-
- def test_logincapa_with_client_ssl_context(self):
- with transient_internet(self.host):
- _server = self.imap_class(
- self.host, self.port, ssl_context=self.create_ssl_context())
- self.check_logincapa(_server)
-
def test_logout(self):
with transient_internet(self.host):
_server = self.imap_class(self.host, self.port)
try:
os.listdir(unc)
except OSError as e:
- if e.errno in (errno.EPERM, errno.EACCES):
+ if e.errno in (errno.EPERM, errno.EACCES, errno.ENOENT):
# See issue #15338
self.skipTest("cannot access administrative share %r" % (unc,))
raise
machinery = util.import_importlib('importlib.machinery')
importlib_util = util.import_importlib('importlib.util')
+import importlib.util
import os
import pathlib
import string
) = util.test_both(PEP3147Tests, util=importlib_util)
+class MagicNumberTests(unittest.TestCase):
+ """
+ Test release compatibility issues relating to importlib
+ """
+ @unittest.skipUnless(
+ sys.version_info.releaselevel in ('final', 'release'),
+ 'only applies to candidate or final python release levels'
+ )
+ def test_magic_number(self):
+ """
+ Each python minor release should generally have a MAGIC_NUMBER
+ that does not change once the release reaches candidate status.
+
+ Once a release reaches candidate status, the value of the constant
+ EXPECTED_MAGIC_NUMBER in this test should be changed.
+ This test will then check that the actual MAGIC_NUMBER matches
+ the expected value for the release.
+
+ In exceptional cases, it may be required to change the MAGIC_NUMBER
+ for a maintenance release. In this case the change should be
+ discussed in python-dev. If a change is required, community
+ stakeholders such as OS package maintainers must be notified
+ in advance. Such exceptional releases will then require an
+ adjustment to this test case.
+ """
+ EXPECTED_MAGIC_NUMBER = 3379
+ actual = int.from_bytes(importlib.util.MAGIC_NUMBER[:2], 'little')
+
+ msg = (
+ "To avoid breaking backwards compatibility with cached bytecode "
+ "files that can't be automatically regenerated by the current "
+ "user, candidate and final releases require the current "
+ "importlib.util.MAGIC_NUMBER to match the expected "
+ "magic number in this test. Set the expected "
+ "magic number in this test to the current MAGIC_NUMBER to "
+ "continue with the release.\n\n"
+ "Changing the MAGIC_NUMBER for a maintenance release "
+ "requires discussion in python-dev and notification of "
+ "community stakeholders."
+ )
+ self.assertEqual(EXPECTED_MAGIC_NUMBER, actual, msg)
+
+
if __name__ == '__main__':
unittest.main()
self.assertFalse(inspect.isabstract(int))
self.assertFalse(inspect.isabstract(5))
+ def test_isabstract_during_init_subclass(self):
+ from abc import ABCMeta, abstractmethod
+ isabstract_checks = []
+ class AbstractChecker(metaclass=ABCMeta):
+ def __init_subclass__(cls):
+ isabstract_checks.append(inspect.isabstract(cls))
+ class AbstractClassExample(AbstractChecker):
+ @abstractmethod
+ def foo(self):
+ pass
+ class ClassExample(AbstractClassExample):
+ def foo(self):
+ pass
+ self.assertEqual(isabstract_checks, [True, False])
+
+ isabstract_checks.clear()
+ class AbstractChild(AbstractClassExample):
+ pass
+ class AbstractGrandchild(AbstractChild):
+ pass
+ class ConcreteGrandchild(ClassExample):
+ pass
+ self.assertEqual(isabstract_checks, [True, True, False])
+
class TestInterpreterStack(IsTestBase):
def __init__(self, *args, **kwargs):
def test_getcomments(self):
self.assertEqual(inspect.getcomments(mod), '# line 1\n')
self.assertEqual(inspect.getcomments(mod.StupidGit), '# line 20\n')
+ # If the object source file is not available, return None.
+ co = compile('x=1', '_non_existing_filename.py', 'exec')
+ self.assertIsNone(inspect.getcomments(co))
+ # If the object has been defined in C, return None.
+ self.assertIsNone(inspect.getcomments(list))
def test_getmodule(self):
# Check actual module
('kwargs', ..., int, "var_keyword")),
...))
+ def test_signature_without_self(self):
+ def test_args_only(*args): # NOQA
+ pass
+
+ def test_args_kwargs_only(*args, **kwargs): # NOQA
+ pass
+
+ class A:
+ @classmethod
+ def test_classmethod(*args): # NOQA
+ pass
+
+ @staticmethod
+ def test_staticmethod(*args): # NOQA
+ pass
+
+ f1 = functools.partialmethod((test_classmethod), 1)
+ f2 = functools.partialmethod((test_args_only), 1)
+ f3 = functools.partialmethod((test_staticmethod), 1)
+ f4 = functools.partialmethod((test_args_kwargs_only),1)
+
+ self.assertEqual(self.signature(test_args_only),
+ ((('args', ..., ..., 'var_positional'),), ...))
+ self.assertEqual(self.signature(test_args_kwargs_only),
+ ((('args', ..., ..., 'var_positional'),
+ ('kwargs', ..., ..., 'var_keyword')), ...))
+ self.assertEqual(self.signature(A.f1),
+ ((('args', ..., ..., 'var_positional'),), ...))
+ self.assertEqual(self.signature(A.f2),
+ ((('args', ..., ..., 'var_positional'),), ...))
+ self.assertEqual(self.signature(A.f3),
+ ((('args', ..., ..., 'var_positional'),), ...))
+ self.assertEqual(self.signature(A.f4),
+ ((('args', ..., ..., 'var_positional'),
+ ('kwargs', ..., ..., 'var_keyword')), ...))
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
with self.open(support.TESTFN, "r") as f:
self.assertRaises(TypeError, f.readline, 5.3)
+ def test_readline_nonsizeable(self):
+ # Issue #30061
+ # Crash when readline() returns an object without __len__
+ class R(self.IOBase):
+ def readline(self):
+ return None
+ self.assertRaises((TypeError, StopIteration), next, R())
+
+ def test_next_nonsizeable(self):
+ # Issue #30061
+ # Crash when __next__() returns an object without __len__
+ class R(self.IOBase):
+ def __next__(self):
+ return None
+ self.assertRaises(TypeError, R().readlines, 1)
+
def test_raw_bytes_io(self):
f = self.BytesIO()
self.write_ops(f)
raw.name = b"dummy"
self.assertEqual(repr(b), "<%s name=b'dummy'>" % clsname)
+ def test_recursive_repr(self):
+ # Issue #25455
+ raw = self.MockRawIO()
+ b = self.tp(raw)
+ with support.swap_attr(raw, 'name', b):
+ try:
+ repr(b) # Should not crash
+ except RuntimeError:
+ pass
+
def test_flush_error_on_close(self):
# Test that buffered file is closed despite failed flush
# and that flush() is called before file closed.
t.buffer.detach()
repr(t) # Should not raise an exception
+ def test_recursive_repr(self):
+ # Issue #25455
+ raw = self.BytesIO()
+ t = self.TextIOWrapper(raw)
+ with support.swap_attr(raw, 'name', t):
+ try:
+ repr(t) # Should not crash
+ except RuntimeError:
+ pass
+
def test_line_buffering(self):
r = self.BytesIO()
b = self.BufferedWriter(r, 1000)
self.assertRaises(ValueError, f.readinto1, bytearray(1024))
self.assertRaises(ValueError, f.readline)
self.assertRaises(ValueError, f.readlines)
+ self.assertRaises(ValueError, f.readlines, 1)
self.assertRaises(ValueError, f.seek, 0)
self.assertRaises(ValueError, f.tell)
self.assertRaises(ValueError, f.truncate)
import sys
import time
import threading
+ from test.support import SuppressCrashReport
file = sys.{stream_name}
file.write('.')
file.flush()
+ crash = SuppressCrashReport()
+ crash.__enter__()
+ # don't call __exit__(): the crash occurs at Python shutdown
+
thread = threading.Thread(target=run)
thread.daemon = True
thread.start()
ipaddress.ip_address('::2'))
def testInterfaceComparison(self):
- self.assertTrue(ipaddress.ip_interface('1.1.1.1') <=
- ipaddress.ip_interface('1.1.1.1'))
- self.assertTrue(ipaddress.ip_interface('1.1.1.1') <=
- ipaddress.ip_interface('1.1.1.2'))
- self.assertTrue(ipaddress.ip_interface('::1') <=
- ipaddress.ip_interface('::1'))
- self.assertTrue(ipaddress.ip_interface('::1') <=
- ipaddress.ip_interface('::2'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') ==
+ ipaddress.ip_interface('1.1.1.1/24'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.1/16') <
+ ipaddress.ip_interface('1.1.1.1/24'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') <
+ ipaddress.ip_interface('1.1.1.2/24'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.2/16') <
+ ipaddress.ip_interface('1.1.1.1/24'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') >
+ ipaddress.ip_interface('1.1.1.1/16'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.2/24') >
+ ipaddress.ip_interface('1.1.1.1/24'))
+ self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') >
+ ipaddress.ip_interface('1.1.1.2/16'))
+
+ self.assertTrue(ipaddress.ip_interface('::1/64') ==
+ ipaddress.ip_interface('::1/64'))
+ self.assertTrue(ipaddress.ip_interface('::1/64') <
+ ipaddress.ip_interface('::1/80'))
+ self.assertTrue(ipaddress.ip_interface('::1/64') <
+ ipaddress.ip_interface('::2/64'))
+ self.assertTrue(ipaddress.ip_interface('::2/48') <
+ ipaddress.ip_interface('::1/64'))
+ self.assertTrue(ipaddress.ip_interface('::1/80') >
+ ipaddress.ip_interface('::1/64'))
+ self.assertTrue(ipaddress.ip_interface('::2/64') >
+ ipaddress.ip_interface('::1/64'))
+ self.assertTrue(ipaddress.ip_interface('::1/64') >
+ ipaddress.ip_interface('::2/48'))
def testNetworkComparison(self):
# ip1 and ip2 have the same network address
self.assertRaises(AssertionError, list, cycle(gen1()))
self.assertEqual(hist, [0,1])
+ def test_long_chain_of_empty_iterables(self):
+ # Make sure itertools.chain doesn't run into recursion limits when
+ # dealing with long chains of empty iterables. Even with a high
+ # number this would probably only fail in Py_DEBUG mode.
+ it = chain.from_iterable(() for unused in range(10000000))
+ with self.assertRaises(StopIteration):
+ next(it)
+
class SubclassWithKwargsTest(unittest.TestCase):
def test_keywords_in_subclass(self):
# count is not subclassable...
import sys
import textwrap
import unittest
-import subprocess
+from subprocess import Popen, PIPE
from test import support
from test.support.script_helper import assert_python_ok
""")
def test_stdin_stdout(self):
- with subprocess.Popen(
- (sys.executable, '-m', 'json.tool'),
- stdin=subprocess.PIPE, stdout=subprocess.PIPE) as proc:
+ args = sys.executable, '-m', 'json.tool'
+ with Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) as proc:
out, err = proc.communicate(self.data.encode())
self.assertEqual(out.splitlines(), self.expect.encode().splitlines())
- self.assertEqual(err, None)
+ self.assertEqual(err, b'')
def _create_infile(self):
infile = support.TESTFN
server.ready.wait()
hcls = logging.handlers.SysLogHandler
if isinstance(server.server_address, tuple):
- self.sl_hdlr = hcls(('localhost', server.port))
+ self.sl_hdlr = hcls((server.server_address[0], server.port))
else:
self.sl_hdlr = hcls(server.server_address)
self.log_output = ''
SysLogHandlerTest.tearDown(self)
support.unlink(self.address)
+@unittest.skipUnless(support.IPV6_ENABLED,
+ 'IPv6 support required for this test.')
+@unittest.skipUnless(threading, 'Threading required for this test.')
+class IPv6SysLogHandlerTest(SysLogHandlerTest):
+
+ """Test for SysLogHandler with IPv6 host."""
+
+ server_class = TestUDPServer
+ address = ('::1', 0)
+
+ def setUp(self):
+ self.server_class.address_family = socket.AF_INET6
+ super(IPv6SysLogHandlerTest, self).setUp()
+
+ def tearDown(self):
+ self.server_class.address_family = socket.AF_INET
+ super(IPv6SysLogHandlerTest, self).tearDown()
+
@unittest.skipUnless(threading, 'Threading required for this test.')
class HTTPHandlerTest(BaseTest):
"""Test for HTTPHandler."""
handler.close()
@patch.object(logging.handlers.QueueListener, 'handle')
+ @support.reap_threads
def test_handle_called_with_queue_queue(self, mock_handle):
for i in range(self.repeat):
log_queue = queue.Queue()
@support.requires_multiprocessing_queue
@patch.object(logging.handlers.QueueListener, 'handle')
+ @support.reap_threads
def test_handle_called_with_mp_queue(self, mock_handle):
for i in range(self.repeat):
log_queue = multiprocessing.Queue()
self.setup_and_log(log_queue, '%s_%s' % (self.id(), i))
+ log_queue.close()
+ log_queue.join_thread()
self.assertEqual(mock_handle.call_count, 5 * self.repeat,
'correct number of handled log messages')
return []
@support.requires_multiprocessing_queue
+ @support.reap_threads
def test_no_messages_in_queue_after_stop(self):
"""
Five messages are logged then the QueueListener is stopped. This
self.setup_and_log(queue, '%s_%s' %(self.id(), i))
# time.sleep(1)
items = list(self.get_all_from_queue(queue))
+ queue.close()
+ queue.join_thread()
+
expected = [[], [logging.handlers.QueueListener._sentinel]]
self.assertIn(items, expected,
'Found unexpected messages in queue: %s' % (
QueueHandlerTest, ShutdownTest, ModuleLevelMiscTest, BasicConfigTest,
LoggerAdapterTest, LoggerTest, SMTPHandlerTest, FileHandlerTest,
RotatingFileHandlerTest, LastResortTest, LogRecordTest,
- ExceptionTest, SysLogHandlerTest, HTTPHandlerTest,
+ ExceptionTest, SysLogHandlerTest, IPv6SysLogHandlerTest, HTTPHandlerTest,
NTEventLogHandlerTest, TimedRotatingFileHandlerTest,
UnixSocketHandlerTest, UnixDatagramHandlerTest, UnixSysLogHandlerTest,
MiscTestCase
def setUpClass(cls):
support.requires("network")
with support.transient_internet(cls.NNTP_HOST):
- cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False)
+ try:
+ cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT,
+ usenetrc=False)
+ except EOFError:
+ raise unittest.SkipTest(f"{cls} got EOF error on connecting "
+ f"to {cls.NNTP_HOST!r}")
@classmethod
def tearDownClass(cls):
# force CreateFile to fail with ERROR_ACCESS_DENIED.
DETACHED_PROCESS = 8
subprocess.check_call(
- ['icacls.exe', fname, '/deny', 'Users:(S)'],
+ # bpo-30584: Use security identifier *S-1-5-32-545 instead
+ # of localized "Users" to not depend on the locale.
+ ['icacls.exe', fname, '/deny', '*S-1-5-32-545:(S)'],
creationflags=DETACHED_PROCESS
)
result = os.stat(fname)
if not self.support_subsecond(self.fname):
delta = 1.0
+ elif os.name == 'nt':
+ # On Windows, the usual resolution of time.time() is 15.6 ms.
+ # bpo-30649: Tolerate 50 ms for slow Windows buildbots.
+ delta = 0.050
else:
- # On Windows, the usual resolution of time.time() is 15.6 ms
+ # bpo-30649: PPC64 Fedora 3.x buildbot requires
+ # at least a delta of 14 ms
delta = 0.020
st = os.stat(self.fname)
msg = ("st_time=%r, current=%r, dt=%r"
+import copy
import parser
+import pickle
import unittest
import operator
import struct
# not even remotely valid:
self.check_bad_tree((1, 2, 3), "<junk>")
+ def test_illegal_terminal(self):
+ tree = \
+ (257,
+ (269,
+ (270,
+ (271,
+ (277,
+ (1,))),
+ (4, ''))),
+ (4, ''),
+ (0, ''))
+ self.check_bad_tree(tree, "too small items in terminal node")
+ tree = \
+ (257,
+ (269,
+ (270,
+ (271,
+ (277,
+ (1, b'pass'))),
+ (4, ''))),
+ (4, ''),
+ (0, ''))
+ self.check_bad_tree(tree, "non-string second item in terminal node")
+ tree = \
+ (257,
+ (269,
+ (270,
+ (271,
+ (277,
+ (1, 'pass', '0', 0))),
+ (4, ''))),
+ (4, ''),
+ (0, ''))
+ self.check_bad_tree(tree, "non-integer third item in terminal node")
+ tree = \
+ (257,
+ (269,
+ (270,
+ (271,
+ (277,
+ (1, 'pass', 0, 0))),
+ (4, ''))),
+ (4, ''),
+ (0, ''))
+ self.check_bad_tree(tree, "too many items in terminal node")
+
def test_illegal_yield_1(self):
# Illegal yield statement: def f(): return 1; yield 1
tree = \
(4, ''), (0, ''))
self.check_bad_tree(tree, "from import fred")
+ def test_illegal_encoding(self):
+ # Illegal encoding declaration
+ tree = \
+ (339,
+ (257, (0, '')))
+ self.check_bad_tree(tree, "missed encoding")
+ tree = \
+ (339,
+ (257, (0, '')),
+ b'iso-8859-1')
+ self.check_bad_tree(tree, "non-string encoding")
+ tree = \
+ (339,
+ (257, (0, '')),
+ '\udcff')
+ with self.assertRaises(UnicodeEncodeError):
+ parser.sequence2st(tree)
+
class CompileTestCase(unittest.TestCase):
self.assertRaises(TypeError, operator.lt, st1, 1815)
self.assertRaises(TypeError, operator.gt, b'waterloo', st2)
+ def test_copy_pickle(self):
+ sts = [
+ parser.expr('2 + 3'),
+ parser.suite('x = 2; y = x + 3'),
+ parser.expr('list(x**3 for x in range(20))')
+ ]
+ for st in sts:
+ st_copy = copy.copy(st)
+ self.assertEqual(st_copy.totuple(), st.totuple())
+ st_copy = copy.deepcopy(st)
+ self.assertEqual(st_copy.totuple(), st.totuple())
+ for proto in range(pickle.HIGHEST_PROTOCOL+1):
+ st_copy = pickle.loads(pickle.dumps(st, proto))
+ self.assertEqual(st_copy.totuple(), st.totuple())
+
check_sizeof = support.check_sizeof
@support.cpython_only
import stat
import tempfile
import unittest
+from unittest import mock
from test import support
android_not_root = support.android_not_root
os.path.join(BASE, 'foo'))
p = P(BASE, 'foo', 'in', 'spam')
self.assertEqual(str(p.resolve(strict=False)),
- os.path.join(BASE, 'foo'))
+ os.path.join(BASE, 'foo', 'in', 'spam'))
p = P(BASE, '..', 'foo', 'in', 'spam')
self.assertEqual(str(p.resolve(strict=False)),
- os.path.abspath(os.path.join('foo')))
+ os.path.abspath(os.path.join('foo', 'in', 'spam')))
# These are all relative symlinks
p = P(BASE, 'dirB', 'fileB')
self._check_resolve_relative(p, p)
self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB'))
# Non-strict
p = P(BASE, 'dirA', 'linkC', 'fileB', 'foo', 'in', 'spam')
- self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB', 'foo'), False)
+ self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB', 'foo', 'in',
+ 'spam'), False)
p = P(BASE, 'dirA', 'linkC', '..', 'foo', 'in', 'spam')
if os.name == 'nt':
# In Windows, if linkY points to dirB, 'dirA\linkY\..'
# resolves to 'dirA' without resolving linkY first.
- self._check_resolve_relative(p, P(BASE, 'dirA', 'foo'), False)
+ self._check_resolve_relative(p, P(BASE, 'dirA', 'foo', 'in',
+ 'spam'), False)
else:
# In Posix, if linkY points to dirB, 'dirA/linkY/..'
# resolves to 'dirB/..' first before resolving to parent of dirB.
- self._check_resolve_relative(p, P(BASE, 'foo'), False)
+ self._check_resolve_relative(p, P(BASE, 'foo', 'in', 'spam'), False)
# Now create absolute symlinks
d = tempfile.mkdtemp(suffix='-dirD')
self.addCleanup(support.rmtree, d)
self._check_resolve_absolute(p, P(BASE, 'dirB', 'fileB'))
# Non-strict
p = P(BASE, 'dirA', 'linkX', 'linkY', 'foo', 'in', 'spam')
- self._check_resolve_relative(p, P(BASE, 'dirB', 'foo'), False)
+ self._check_resolve_relative(p, P(BASE, 'dirB', 'foo', 'in', 'spam'),
+ False)
p = P(BASE, 'dirA', 'linkX', 'linkY', '..', 'foo', 'in', 'spam')
if os.name == 'nt':
# In Windows, if linkY points to dirB, 'dirA\linkY\..'
# resolves to 'dirA' without resolving linkY first.
- self._check_resolve_relative(p, P(d, 'foo'), False)
+ self._check_resolve_relative(p, P(d, 'foo', 'in', 'spam'), False)
else:
# In Posix, if linkY points to dirB, 'dirA/linkY/..'
# resolves to 'dirB/..' first before resolving to parent of dirB.
- self._check_resolve_relative(p, P(BASE, 'foo'), False)
+ self._check_resolve_relative(p, P(BASE, 'foo', 'in', 'spam'), False)
@with_symlinks
def test_resolve_dot(self):
r = q / '3' / '4'
self.assertRaises(FileNotFoundError, r.resolve, strict=True)
# Non-strict
- self.assertEqual(r.resolve(strict=False), p / '3')
+ self.assertEqual(r.resolve(strict=False), p / '3' / '4')
def test_with(self):
p = self.cls(BASE)
self.assertTrue(p.exists())
self.assertEqual(p.stat().st_ctime, st_ctime_first)
+ def test_mkdir_exist_ok_root(self):
+ # Issue #25803: A drive root could raise PermissionError on Windows
+ self.cls('/').resolve().mkdir(exist_ok=True)
+ self.cls('/').resolve().mkdir(parents=True, exist_ok=True)
+
@only_nt # XXX: not sure how to test this on POSIX
def test_mkdir_with_unknown_drive(self):
for d in 'ZYXWVUTSRQPONMLKJIHGFEDCBA':
p.mkdir(exist_ok=True)
self.assertEqual(cm.exception.errno, errno.EEXIST)
+ def test_mkdir_concurrent_parent_creation(self):
+ for pattern_num in range(32):
+ p = self.cls(BASE, 'dirCPC%d' % pattern_num)
+ self.assertFalse(p.exists())
+
+ def my_mkdir(path, mode=0o777):
+ path = str(path)
+ # Emulate another process that would create the directory
+ # just before we try to create it ourselves. We do it
+ # in all possible pattern combinations, assuming that this
+ # function is called at most 5 times (dirCPC/dir1/dir2,
+ # dirCPC/dir1, dirCPC, dirCPC/dir1, dirCPC/dir1/dir2).
+ if pattern.pop():
+ os.mkdir(path, mode) # from another process
+ concurrently_created.add(path)
+ os.mkdir(path, mode) # our real call
+
+ pattern = [bool(pattern_num & (1 << n)) for n in range(5)]
+ concurrently_created = set()
+ p12 = p / 'dir1' / 'dir2'
+ try:
+ with mock.patch("pathlib._normal_accessor.mkdir", my_mkdir):
+ p12.mkdir(parents=True, exist_ok=False)
+ except FileExistsError:
+ self.assertIn(str(p12), concurrently_created)
+ else:
+ self.assertNotIn(str(p12), concurrently_created)
+ self.assertTrue(p.exists())
+
@with_symlinks
def test_symlink_to(self):
P = self.cls(BASE)
self.assertRaises(ValueError, self.gen.setstate, (1, None, None))
def test_setstate_middle_arg(self):
+ start_state = self.gen.getstate()
# Wrong type, s/b tuple
self.assertRaises(TypeError, self.gen.setstate, (2, None, None))
# Wrong length, s/b 625
self.gen.setstate((2, (1,)*624+(625,), None))
with self.assertRaises((ValueError, OverflowError)):
self.gen.setstate((2, (1,)*624+(-1,), None))
+ # Failed calls to setstate() should not have changed the state.
+ bits100 = self.gen.getrandbits(100)
+ self.gen.setstate(start_state)
+ self.assertEqual(self.gen.getrandbits(100), bits100)
# Little trick to make "tuple(x % (2**32) for x in internalstate)"
# raise ValueError. I cannot think of a simple way to achieve this, so
x = range(10**20+10, 10**20, 3)
self.assertEqual(len(x), 0)
self.assertEqual(len(list(x)), 0)
+ self.assertFalse(x)
x = range(10**20, 10**20+10, -3)
self.assertEqual(len(x), 0)
self.assertEqual(len(list(x)), 0)
+ self.assertFalse(x)
x = range(10**20+10, 10**20, -3)
self.assertEqual(len(x), 4)
self.assertEqual(len(list(x)), 4)
+ self.assertTrue(x)
# Now test range() with longs
- self.assertEqual(list(range(-2**100)), [])
- self.assertEqual(list(range(0, -2**100)), [])
- self.assertEqual(list(range(0, 2**100, -1)), [])
- self.assertEqual(list(range(0, 2**100, -1)), [])
+ for x in [range(-2**100),
+ range(0, -2**100),
+ range(0, 2**100, -1)]:
+ self.assertEqual(list(x), [])
+ self.assertFalse(x)
a = int(10 * sys.maxsize)
b = int(100 * sys.maxsize)
step = x[1] - x[0]
length = 1 + ((x[-1] - x[0]) // step)
return length
+
a = -sys.maxsize
b = sys.maxsize
expected_len = b - a
self.assertIn(a, x)
self.assertNotIn(b, x)
self.assertRaises(OverflowError, len, x)
+ self.assertTrue(x)
self.assertEqual(_range_len(x), expected_len)
self.assertEqual(x[0], a)
idx = sys.maxsize+1
self.assertIn(a, x)
self.assertNotIn(b, x)
self.assertRaises(OverflowError, len, x)
+ self.assertTrue(x)
self.assertEqual(_range_len(x), expected_len)
self.assertEqual(x[0], a)
idx = sys.maxsize+1
self.assertIn(a, x)
self.assertNotIn(b, x)
self.assertRaises(OverflowError, len, x)
+ self.assertTrue(x)
self.assertEqual(_range_len(x), expected_len)
self.assertEqual(x[0], a)
idx = sys.maxsize+1
self.assertIn(a, x)
self.assertNotIn(b, x)
self.assertRaises(OverflowError, len, x)
+ self.assertTrue(x)
self.assertEqual(_range_len(x), expected_len)
self.assertEqual(x[0], a)
idx = sys.maxsize+1
upper_char = '\u1ea0' # Latin Capital Letter A with Dot Below
lower_char = '\u1ea1' # Latin Small Letter A with Dot Below
- p = re.compile(upper_char, re.I | re.U)
- q = p.match(lower_char)
+ p = re.compile('.' + upper_char, re.I | re.S)
+ q = p.match('\n' + lower_char)
self.assertTrue(q)
- p = re.compile(lower_char, re.I | re.U)
- q = p.match(upper_char)
+ p = re.compile('.' + lower_char, re.I | re.S)
+ q = p.match('\n' + upper_char)
self.assertTrue(q)
- p = re.compile('(?i)' + upper_char, re.U)
- q = p.match(lower_char)
+ p = re.compile('(?i).' + upper_char, re.S)
+ q = p.match('\n' + lower_char)
self.assertTrue(q)
- p = re.compile('(?i)' + lower_char, re.U)
- q = p.match(upper_char)
+ p = re.compile('(?i).' + lower_char, re.S)
+ q = p.match('\n' + upper_char)
self.assertTrue(q)
- p = re.compile('(?iu)' + upper_char)
- q = p.match(lower_char)
+ p = re.compile('(?is).' + upper_char)
+ q = p.match('\n' + lower_char)
self.assertTrue(q)
- p = re.compile('(?iu)' + lower_char)
- q = p.match(upper_char)
+ p = re.compile('(?is).' + lower_char)
+ q = p.match('\n' + upper_char)
self.assertTrue(q)
- self.assertTrue(re.match('(?ixu) ' + upper_char, lower_char))
- self.assertTrue(re.match('(?ixu) ' + lower_char, upper_char))
+ p = re.compile('(?s)(?i).' + upper_char)
+ q = p.match('\n' + lower_char)
+ self.assertTrue(q)
+
+ p = re.compile('(?s)(?i).' + lower_char)
+ q = p.match('\n' + upper_char)
+ self.assertTrue(q)
+
+ self.assertTrue(re.match('(?ix) ' + upper_char, lower_char))
+ self.assertTrue(re.match('(?ix) ' + lower_char, upper_char))
+ self.assertTrue(re.match(' (?i) ' + upper_char, lower_char, re.X))
+ self.assertTrue(re.match('(?x) (?i) ' + upper_char, lower_char))
+ self.assertTrue(re.match(' (?x) (?i) ' + upper_char, lower_char, re.X))
p = upper_char + '(?i)'
with self.assertWarns(DeprecationWarning) as warns:
self.assertTrue(re.match(p, lower_char))
self.assertEqual(
str(warns.warnings[0].message),
- 'Flags not at the start of the expression %s' % p
+ 'Flags not at the start of the expression %r' % p
)
+ self.assertEqual(warns.warnings[0].filename, __file__)
p = upper_char + '(?i)%s' % ('.?' * 100)
with self.assertWarns(DeprecationWarning) as warns:
self.assertTrue(re.match(p, lower_char))
self.assertEqual(
str(warns.warnings[0].message),
- 'Flags not at the start of the expression %s (truncated)' % p[:20]
+ 'Flags not at the start of the expression %r (truncated)' % p[:20]
)
+ self.assertEqual(warns.warnings[0].filename, __file__)
+
+ # bpo-30605: Compiling a bytes instance regex was throwing a BytesWarning
+ with warnings.catch_warnings():
+ warnings.simplefilter('error', BytesWarning)
+ p = b'A(?i)'
+ with self.assertWarns(DeprecationWarning) as warns:
+ self.assertTrue(re.match(p, b'a'))
+ self.assertEqual(
+ str(warns.warnings[0].message),
+ 'Flags not at the start of the expression %r' % p
+ )
+ self.assertEqual(warns.warnings[0].filename, __file__)
+
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match('(?s).(?i)' + upper_char, '\n' + lower_char))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match('(?i) ' + upper_char + ' (?x)', lower_char))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match(' (?x) (?i) ' + upper_char, lower_char))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match('^(?i)' + upper_char, lower_char))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match('$|(?i)' + upper_char, lower_char))
+ with self.assertWarns(DeprecationWarning) as warns:
+ self.assertTrue(re.match('(?:(?i)' + upper_char + ')', lower_char))
+ self.assertRegex(str(warns.warnings[0].message),
+ 'Flags not at the start')
+ self.assertEqual(warns.warnings[0].filename, __file__)
+ with self.assertWarns(DeprecationWarning) as warns:
+ self.assertTrue(re.fullmatch('(^)?(?(1)(?i)' + upper_char + ')',
+ lower_char))
+ self.assertRegex(str(warns.warnings[0].message),
+ 'Flags not at the start')
+ self.assertEqual(warns.warnings[0].filename, __file__)
+ with self.assertWarns(DeprecationWarning) as warns:
+ self.assertTrue(re.fullmatch('($)?(?(1)|(?i)' + upper_char + ')',
+ lower_char))
+ self.assertRegex(str(warns.warnings[0].message),
+ 'Flags not at the start')
+ self.assertEqual(warns.warnings[0].filename, __file__)
+
def test_dollar_matches_twice(self):
"$ matches the end of string, and just before the terminating \n"
def test_locale_flag(self):
import locale
- enc = locale.getpreferredencoding(False)
+ _, enc = locale.getlocale(locale.LC_CTYPE)
# Search non-ASCII letter
for i in range(128, 256):
try:
ns = libregrtest._parse_args(['--header'])
self.assertTrue(ns.header)
+ ns = libregrtest._parse_args(['--verbose'])
+ self.assertTrue(ns.header)
+
def test_randomize(self):
for opt in '-r', '--randomize':
with self.subTest(opt=opt):
for opt in '-m', '--match':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt, 'pattern'])
- self.assertEqual(ns.match_tests, 'pattern')
+ self.assertEqual(ns.match_tests, ['pattern'])
self.checkError([opt], 'expected one argument')
+ ns = libregrtest._parse_args(['-m', 'pattern1',
+ '-m', 'pattern2'])
+ self.assertEqual(ns.match_tests, ['pattern1', 'pattern2'])
+
+ self.addCleanup(support.unlink, support.TESTFN)
+ with open(support.TESTFN, "w") as fp:
+ print('matchfile1', file=fp)
+ print('matchfile2', file=fp)
+
+ filename = os.path.abspath(support.TESTFN)
+ ns = libregrtest._parse_args(['-m', 'match',
+ '--matchfile', filename])
+ self.assertEqual(ns.match_tests,
+ ['match', 'matchfile1', 'matchfile2'])
+
def test_failfast(self):
for opt in '-G', '--failfast':
with self.subTest(opt=opt):
ns = libregrtest._parse_args([opt])
self.assertTrue(ns.forever)
-
def test_unrecognized_argument(self):
self.checkError(['--xxx'], 'usage:')
self.assertRegex(output, regex)
def parse_executed_tests(self, output):
- regex = (r'^[0-9]+:[0-9]+:[0-9]+ \[ *[0-9]+(?:/ *[0-9]+)?\] (%s)'
+ regex = (r'^[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?\[ *[0-9]+(?:/ *[0-9]+)*\] (%s)'
% self.TESTNAME_REGEX)
parser = re.finditer(regex, output, re.MULTILINE)
return list(match.group(1) for match in parser)
self.fail(msg)
return proc
-
def run_python(self, args, **kw):
args = [sys.executable, '-X', 'faulthandler', '-I', *args]
proc = self.run_command(args, **kw)
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
+ # test format 'Lib/test/test_opcodes.py'
+ with open(filename, "w") as fp:
+ for name in tests:
+ print('Lib/test/%s.py' % name, file=fp)
+
+ output = self.run_tests('--fromfile', filename)
+ self.check_executed_tests(output, tests)
+
def test_interrupted(self):
code = TEST_INTERRUPTED
test = self.create_test('sigint', code=code)
self.assertEqual(output.rstrip().splitlines(),
tests)
+ def test_list_cases(self):
+ # test --list-cases
+ code = textwrap.dedent("""
+ import unittest
+
+ class Tests(unittest.TestCase):
+ def test_method1(self):
+ pass
+ def test_method2(self):
+ pass
+ """)
+ testname = self.create_test(code=code)
+ all_methods = ['%s.Tests.test_method1' % testname,
+ '%s.Tests.test_method2' % testname]
+ output = self.run_tests('--list-cases', testname)
+ self.assertEqual(output.splitlines(), all_methods)
+
+ def test_crashed(self):
+ # Any code which causes a crash
+ code = 'import faulthandler; faulthandler._sigsegv()'
+ crash_test = self.create_test(name="crash", code=code)
+ ok_test = self.create_test(name="ok")
+
+ tests = [crash_test, ok_test]
+ output = self.run_tests("-j2", *tests, exitcode=1)
+ self.check_executed_tests(output, tests, failed=crash_test,
+ randomize=True)
+
+ def parse_methods(self, output):
+ regex = re.compile("^(test[^ ]+).*ok$", flags=re.MULTILINE)
+ return [match.group(1) for match in regex.finditer(output)]
+
+ def test_matchfile(self):
+ code = textwrap.dedent("""
+ import unittest
+
+ class Tests(unittest.TestCase):
+ def test_method1(self):
+ pass
+ def test_method2(self):
+ pass
+ def test_method3(self):
+ pass
+ def test_method4(self):
+ pass
+ """)
+ all_methods = ['test_method1', 'test_method2',
+ 'test_method3', 'test_method4']
+ testname = self.create_test(code=code)
+
+ # by default, all methods should be run
+ output = self.run_tests("-v", testname)
+ methods = self.parse_methods(output)
+ self.assertEqual(methods, all_methods)
+
+ # only run a subset
+ filename = support.TESTFN
+ self.addCleanup(support.unlink, filename)
+
+ subset = [
+ # only match the method name
+ 'test_method1',
+ # match the full identifier
+ '%s.Tests.test_method3' % testname]
+ with open(filename, "w") as fp:
+ for name in subset:
+ print(name, file=fp)
+
+ output = self.run_tests("-v", "--matchfile", filename, testname)
+ methods = self.parse_methods(output)
+ subset = ['test_method1', 'test_method3']
+ self.assertEqual(methods, subset)
+
if __name__ == '__main__':
unittest.main()
from xml.sax import make_parser, ContentHandler, \
SAXException, SAXReaderNotAvailable, SAXParseException
import unittest
+from unittest import mock
try:
make_parser()
except SAXReaderNotAvailable:
with self.assertRaises(SAXException):
self.check_parse(BytesIO(xml_bytes(self.data, 'iso-8859-1', None)))
make_xml_file(self.data, 'iso-8859-1', None)
- with support.check_warnings(('unclosed file', ResourceWarning)):
- # XXX Failed parser leaks an opened file.
- with self.assertRaises(SAXException):
- self.check_parse(TESTFN)
- # Collect leaked file.
- gc.collect()
+ with self.assertRaises(SAXException):
+ self.check_parse(TESTFN)
with open(TESTFN, 'rb') as f:
with self.assertRaises(SAXException):
self.check_parse(f)
input.setEncoding('iso-8859-1')
self.check_parse(input)
+ def test_parse_close_source(self):
+ builtin_open = open
+ fileobj = None
+
+ def mock_open(*args):
+ nonlocal fileobj
+ fileobj = builtin_open(*args)
+ return fileobj
+
+ with mock.patch('xml.sax.saxutils.open', side_effect=mock_open):
+ make_xml_file(self.data, 'iso-8859-1', None)
+ with self.assertRaises(SAXException):
+ self.check_parse(TESTFN)
+ self.assertTrue(fileobj.closed)
+
def check_parseString(self, s):
from xml.sax import parseString
result = StringIO()
import site
-if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
- # need to add user site directory for tests
- try:
- os.makedirs(site.USER_SITE)
- site.addsitedir(site.USER_SITE)
- except PermissionError as exc:
- raise unittest.SkipTest('unable to create user site directory (%r): %s'
- % (site.USER_SITE, exc))
+
+OLD_SYS_PATH = None
+
+
+def setUpModule():
+ global OLD_SYS_PATH
+ OLD_SYS_PATH = sys.path[:]
+
+ if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
+ # need to add user site directory for tests
+ try:
+ os.makedirs(site.USER_SITE)
+ # modify sys.path: will be restored by tearDownModule()
+ site.addsitedir(site.USER_SITE)
+ except PermissionError as exc:
+ raise unittest.SkipTest('unable to create user site directory (%r): %s'
+ % (site.USER_SITE, exc))
+
+
+def tearDownModule():
+ sys.path[:] = OLD_SYS_PATH
class HelperFunctionsTests(unittest.TestCase):
print(line, file=f)
return exe_file
except:
- os.unlink(_pth_file)
- os.unlink(exe_file)
+ test.support.unlink(_pth_file)
+ test.support.unlink(exe_file)
raise
@classmethod
def _cleanup_underpth_exe(self, exe_file):
_pth_file = os.path.splitext(exe_file)[0] + '._pth'
- os.unlink(_pth_file)
- os.unlink(exe_file)
+ test.support.unlink(_pth_file)
+ test.support.unlink(exe_file)
@classmethod
def _calc_sys_path_for_underpth_nosite(self, sys_prefix, lines):
self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
def test_host_resolution(self):
- for addr in ['0.1.1.~1', '1+.1.1.1', '::1q', '::1::2',
- '1:1:1:1:1:1:1:1:1']:
- self.assertRaises(OSError, socket.gethostbyname, addr)
- self.assertRaises(OSError, socket.gethostbyaddr, addr)
-
for addr in [support.HOST, '10.0.0.1', '255.255.255.255']:
self.assertEqual(socket.gethostbyname(addr), addr)
for host in [support.HOST]:
self.assertIn(host, socket.gethostbyaddr(host)[2])
+ def test_host_resolution_bad_address(self):
+ # These are all malformed IP addresses and expected not to resolve to
+ # any result. But some ISPs, e.g. AWS, may successfully resolve these
+ # IPs.
+ explanation = (
+ "resolving an invalid IP address did not raise OSError; "
+ "can be caused by a broken DNS server"
+ )
+ for addr in ['0.1.1.~1', '1+.1.1.1', '::1q', '::1::2',
+ '1:1:1:1:1:1:1:1:1']:
+ with self.assertRaises(OSError):
+ socket.gethostbyname(addr)
+ with self.assertRaises(OSError, msg=explanation):
+ socket.gethostbyaddr(addr)
+
@unittest.skipUnless(hasattr(socket, 'sethostname'), "test needs socket.sethostname()")
@unittest.skipUnless(hasattr(socket, 'gethostname'), "test needs socket.gethostname()")
def test_sethostname(self):
self.assertEqual(swapped & mask, mask)
self.assertRaises(OverflowError, func, 1<<34)
+ @support.cpython_only
def testNtoHErrors(self):
good_values = [ 1, 2, 3, 1, 2, 3 ]
bad_values = [ -1, -2, -3, -1, -2, -3 ]
else:
raise
+ def testUnbound(self):
+ # Issue #30205
+ self.assertIn(self.sock.getsockname(), ('', None))
+
def testStrAddr(self):
# Test binding to and retrieving a normal string pathname.
path = os.path.abspath(support.TESTFN)
self.assertEqual(len(dec), msglen * multiplier)
self.assertEqual(dec, msg * multiplier)
- @support.requires_linux_version(4, 3) # see test_aes_cbc
+ @support.requires_linux_version(4, 9) # see issue29324
def test_aead_aes_gcm(self):
key = bytes.fromhex('c939cc13397c1d37de6ae0e1cb7c423c')
iv = bytes.fromhex('b3d8cc017cbb89b39e0f67e2')
op.sendmsg_afalg(op=socket.ALG_OP_ENCRYPT, iv=iv,
assoclen=assoclen, flags=socket.MSG_MORE)
op.sendall(assoc, socket.MSG_MORE)
- op.sendall(plain, socket.MSG_MORE)
- op.sendall(b'\x00' * taglen)
+ op.sendall(plain)
res = op.recv(assoclen + len(plain) + taglen)
self.assertEqual(expected_ct, res[assoclen:-taglen])
self.assertEqual(expected_tag, res[-taglen:])
# now with msg
op, _ = algo.accept()
with op:
- msg = assoc + plain + b'\x00' * taglen
+ msg = assoc + plain
op.sendmsg_afalg([msg], op=socket.ALG_OP_ENCRYPT, iv=iv,
assoclen=assoclen)
res = op.recv(assoclen + len(plain) + taglen)
pack_uint32 = struct.Struct('I').pack
op, _ = algo.accept()
with op:
- msg = assoc + plain + b'\x00' * taglen
+ msg = assoc + plain
op.sendmsg(
[msg],
([socket.SOL_ALG, socket.ALG_SET_OP, pack_uint32(socket.ALG_OP_ENCRYPT)],
[socket.SOL_ALG, socket.ALG_SET_AEAD_ASSOCLEN, pack_uint32(assoclen)],
)
)
- res = op.recv(len(msg))
+ res = op.recv(len(msg) + taglen)
self.assertEqual(expected_ct, res[assoclen:-taglen])
self.assertEqual(expected_tag, res[-taglen:])
msg = assoc + expected_ct + expected_tag
op.sendmsg_afalg([msg], op=socket.ALG_OP_DECRYPT, iv=iv,
assoclen=assoclen)
- res = op.recv(len(msg))
- self.assertEqual(plain, res[assoclen:-taglen])
+ res = op.recv(len(msg) - taglen)
+ self.assertEqual(plain, res[assoclen:])
@support.requires_linux_version(4, 3) # see test_aes_cbc
def test_drbg_pr_sha256(self):
class EchoServer (asyncore.dispatcher):
- class ConnectionHandler (asyncore.dispatcher_with_send):
+ class ConnectionHandler(asyncore.dispatcher_with_send):
def __init__(self, conn, certfile):
self.socket = test_wrap_socket(conn, server_side=True,
self.join()
if support.verbose:
sys.stdout.write(" cleanup: successfully joined.\n")
+ # make sure that ConnectionHandler is removed from socket_map
+ asyncore.close_all(ignore_all=True)
def start (self, flag=None):
self.flag = flag
# environment
b"['__CF_USER_TEXT_ENCODING']"))
+ def test_invalid_cmd(self):
+ # null character in the command name
+ cmd = sys.executable + '\0'
+ with self.assertRaises(ValueError):
+ subprocess.Popen([cmd, "-c", "pass"])
+
+ # null character in the command argument
+ with self.assertRaises(ValueError):
+ subprocess.Popen([sys.executable, "-c", "pass#\0"])
+
+ def test_invalid_env(self):
+ # null character in the enviroment variable name
+ newenv = os.environ.copy()
+ newenv["FRUIT\0VEGETABLE"] = "cabbage"
+ with self.assertRaises(ValueError):
+ subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
+
+ # null character in the enviroment variable value
+ newenv = os.environ.copy()
+ newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
+ with self.assertRaises(ValueError):
+ subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
+
+ # equal character in the enviroment variable name
+ newenv = os.environ.copy()
+ newenv["FRUIT=ORANGE"] = "lemon"
+ with self.assertRaises(ValueError):
+ subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
+
+ # equal character in the enviroment variable value
+ newenv = os.environ.copy()
+ newenv["FRUIT"] = "orange=lemon"
+ with subprocess.Popen([sys.executable, "-c",
+ 'import sys, os;'
+ 'sys.stdout.write(os.getenv("FRUIT"))'],
+ stdout=subprocess.PIPE,
+ env=newenv) as p:
+ stdout, stderr = p.communicate()
+ self.assertEqual(stdout, b"orange=lemon")
+
def test_communicate_stdin(self):
p = subprocess.Popen([sys.executable, "-c",
'import sys;'
with self.assertRaises(TypeError):
_posixsubprocess.fork_exec(
args, exe_list,
- True, [], cwd, env_list,
+ True, (), cwd, env_list,
-1, -1, -1, -1,
1, 2, 3, 4,
True, True, func)
def test_fork_exec_sorted_fd_sanity_check(self):
# Issue #23564: sanity check the fork_exec() fds_to_keep sanity check.
import _posixsubprocess
+ class BadInt:
+ first = True
+ def __init__(self, value):
+ self.value = value
+ def __int__(self):
+ if self.first:
+ self.first = False
+ return self.value
+ raise ValueError
+
gc_enabled = gc.isenabled()
try:
gc.enable()
(18, 23, 42, 2**63), # Out of range.
(5, 4), # Not sorted.
(6, 7, 7, 8), # Duplicate.
+ (BadInt(1), BadInt(2)),
):
with self.assertRaises(
ValueError,
def test_swap_attr(self):
class Obj:
- x = 1
+ pass
obj = Obj()
- with support.swap_attr(obj, "x", 5):
+ obj.x = 1
+ with support.swap_attr(obj, "x", 5) as x:
self.assertEqual(obj.x, 5)
+ self.assertEqual(x, 1)
self.assertEqual(obj.x, 1)
+ with support.swap_attr(obj, "y", 5) as y:
+ self.assertEqual(obj.y, 5)
+ self.assertIsNone(y)
+ self.assertFalse(hasattr(obj, 'y'))
+ with support.swap_attr(obj, "y", 5):
+ del obj.y
+ self.assertFalse(hasattr(obj, 'y'))
def test_swap_item(self):
- D = {"item":1}
- with support.swap_item(D, "item", 5):
- self.assertEqual(D["item"], 5)
- self.assertEqual(D["item"], 1)
+ D = {"x":1}
+ with support.swap_item(D, "x", 5) as x:
+ self.assertEqual(D["x"], 5)
+ self.assertEqual(x, 1)
+ self.assertEqual(D["x"], 1)
+ with support.swap_item(D, "y", 5) as y:
+ self.assertEqual(D["y"], 5)
+ self.assertIsNone(y)
+ self.assertNotIn("y", D)
+ with support.swap_item(D, "y", 5):
+ del D["y"]
+ self.assertNotIn("y", D)
class RefClass:
attribute1 = None
return inner
check(get_cell().__closure__[0], size('P'))
# code
- check(get_cell().__code__, size('6i13P'))
- check(get_cell.__code__, size('6i13P'))
+ def check_code_size(a, expected_size):
+ self.assertGreaterEqual(sys.getsizeof(a), expected_size)
+ check_code_size(get_cell().__code__, size('6i13P'))
+ check_code_size(get_cell.__code__, size('6i13P'))
def get_cell2(x):
def inner():
return x
return inner
- check(get_cell2.__code__, size('6i13P') + 1)
+ check_code_size(get_cell2.__code__, size('6i13P') + calcsize('n'))
# complex
check(complex(0,1), size('2d'))
# method_descriptor (descriptor object)
from hashlib import md5
from contextlib import contextmanager
from random import Random
+import pathlib
import unittest
import unittest.mock
self.assertIsInstance(tar.name, bytes)
self.assertEqual(tar.name, os.path.abspath(fobj.name))
+ def test_pathlike_name(self):
+ tarname = pathlib.Path(self.tarname)
+ with tarfile.open(tarname, mode=self.mode) as tar:
+ self.assertIsInstance(tar.name, str)
+ self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
+ with self.taropen(tarname) as tar:
+ self.assertIsInstance(tar.name, str)
+ self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
+ with tarfile.TarFile.open(tarname, mode=self.mode) as tar:
+ self.assertIsInstance(tar.name, str)
+ self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
+ if self.suffix == '':
+ with tarfile.TarFile(tarname, mode='r') as tar:
+ self.assertIsInstance(tar.name, str)
+ self.assertEqual(tar.name, os.path.abspath(os.fspath(tarname)))
+
def test_illegal_mode_arg(self):
with open(tmpname, 'wb'):
pass
finally:
support.rmtree(DIR)
+ def test_extractall_pathlike_name(self):
+ DIR = pathlib.Path(TEMPDIR) / "extractall"
+ with support.temp_dir(DIR), \
+ tarfile.open(tarname, encoding="iso8859-1") as tar:
+ directories = [t for t in tar if t.isdir()]
+ tar.extractall(DIR, directories)
+ for tarinfo in directories:
+ path = DIR / tarinfo.name
+ self.assertEqual(os.path.getmtime(path), tarinfo.mtime)
+
+ def test_extract_pathlike_name(self):
+ dirtype = "ustar/dirtype"
+ DIR = pathlib.Path(TEMPDIR) / "extractall"
+ with support.temp_dir(DIR), \
+ tarfile.open(tarname, encoding="iso8859-1") as tar:
+ tarinfo = tar.getmember(dirtype)
+ tar.extract(tarinfo, path=DIR)
+ extracted = DIR / dirtype
+ self.assertEqual(os.path.getmtime(extracted), tarinfo.mtime)
+
def test_init_close_fobj(self):
# Issue #7341: Close the internal file object in the TarFile
# constructor in case of an error. For the test we rely on
finally:
support.rmdir(path)
+ def test_gettarinfo_pathlike_name(self):
+ with tarfile.open(tmpname, self.mode) as tar:
+ path = pathlib.Path(TEMPDIR) / "file"
+ with open(path, "wb") as fobj:
+ fobj.write(b"aaa")
+ tarinfo = tar.gettarinfo(path)
+ tarinfo2 = tar.gettarinfo(os.fspath(path))
+ self.assertIsInstance(tarinfo.name, str)
+ self.assertEqual(tarinfo.name, tarinfo2.name)
+ self.assertEqual(tarinfo.size, 3)
+
@unittest.skipUnless(hasattr(os, "link"),
"Missing hardlink implementation")
def test_link_size(self):
self.assertEqual(len(names), 1)
self.assertIn("spameggs42", names[0])
+ def test_create_pathlike_name(self):
+ with tarfile.open(pathlib.Path(tmpname), self.mode) as tobj:
+ self.assertIsInstance(tobj.name, str)
+ self.assertEqual(tobj.name, os.path.abspath(tmpname))
+ tobj.add(pathlib.Path(self.file_path))
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ def test_create_taropen_pathlike_name(self):
+ with self.taropen(pathlib.Path(tmpname), "x") as tobj:
+ self.assertIsInstance(tobj.name, str)
+ self.assertEqual(tobj.name, os.path.abspath(tmpname))
+ tobj.add(pathlib.Path(self.file_path))
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
class GzipCreateTest(GzipTest, CreateTest):
pass
tempfile._get_default_tempdir()
self.assertEqual(os.listdir(our_temp_directory), [])
- open = io.open
def bad_writer(*args, **kwargs):
- fp = open(*args, **kwargs)
+ fp = orig_open(*args, **kwargs)
fp.write = raise_OSError
return fp
- with support.swap_attr(io, "open", bad_writer):
+ with support.swap_attr(io, "open", bad_writer) as orig_open:
# test again with failing write()
with self.assertRaises(FileNotFoundError):
tempfile._get_default_tempdir()
with _print_mutex:
print(arg)
+
class BasicThreadTest(unittest.TestCase):
def setUp(self):
self.running = 0
self.next_ident = 0
+ key = support.threading_setup()
+ self.addCleanup(support.threading_cleanup, *key)
+
class ThreadRunningTests(BasicThreadTest):
for i in range(20):
t = threading.Thread(target=lambda: None)
t.start()
- self.addCleanup(t.join)
pid = os.fork()
if pid == 0:
- os._exit(1 if t.is_alive() else 0)
+ os._exit(11 if t.is_alive() else 10)
else:
+ t.join()
+
pid, status = os.waitpid(pid, 0)
- self.assertEqual(0, status)
+ self.assertTrue(os.WIFEXITED(status))
+ self.assertEqual(10, os.WEXITSTATUS(status))
def test_main_thread(self):
main = threading.main_thread()
import os
import unittest
from test.support.script_helper import assert_python_ok
+from test.support import findfile
from test.test_tools import scriptsdir, skip_if_missing
self.assertEqual(out, b'')
self.assertGreater(err, b'')
+ def test_reindent_file_with_bad_encoding(self):
+ bad_coding_path = findfile('bad_coding.py')
+ rc, out, err = assert_python_ok(self.script, '-r', bad_coding_path)
+ self.assertEqual(out, b'')
+ self.assertNotEqual(err, b'')
+
if __name__ == '__main__':
unittest.main()
b'number of frames',
stderr)
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
def test_pymem_alloc0(self):
# Issue #21639: Check that PyMem_Malloc(0) with tracemalloc enabled
# does not crash.
from unittest import TestCase, main, skipUnless, SkipTest
from copy import copy, deepcopy
-from typing import Any
+from typing import Any, NoReturn
from typing import TypeVar, AnyStr
from typing import T, KT, VT # Not in __all__.
from typing import Union, Optional
with self.assertRaises(TypeError):
type(Any)()
- def test_cannot_subscript(self):
- with self.assertRaises(TypeError):
- Any[int]
-
def test_any_works_with_alias(self):
# These expressions must simply not fail.
typing.Match[Any]
typing.IO[Any]
+class NoReturnTests(BaseTestCase):
+
+ def test_noreturn_instance_type_error(self):
+ with self.assertRaises(TypeError):
+ isinstance(42, NoReturn)
+
+ def test_noreturn_subclass_type_error(self):
+ with self.assertRaises(TypeError):
+ issubclass(Employee, NoReturn)
+ with self.assertRaises(TypeError):
+ issubclass(NoReturn, Employee)
+
+ def test_repr(self):
+ self.assertEqual(repr(NoReturn), 'typing.NoReturn')
+
+ def test_not_generic(self):
+ with self.assertRaises(TypeError):
+ NoReturn[int]
+
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError):
+ class A(NoReturn):
+ pass
+ with self.assertRaises(TypeError):
+ class A(type(NoReturn)):
+ pass
+
+ def test_cannot_instantiate(self):
+ with self.assertRaises(TypeError):
+ NoReturn()
+ with self.assertRaises(TypeError):
+ type(NoReturn)()
+
+
class TypeVarTests(BaseTestCase):
def test_basic_plain(self):
return data
else:
raise StopAsyncIteration
+
+class ACM:
+ async def __aenter__(self) -> int:
+ return 42
+ async def __aexit__(self, etype, eval, tb):
+ return None
"""
if ASYNCIO:
else:
# fake names for the sake of static analysis
asyncio = None
- AwaitableWrapper = AsyncIteratorWrapper = object
+ AwaitableWrapper = AsyncIteratorWrapper = ACM = object
PY36 = sys.version_info[:2] >= (3, 6)
PY36_TESTS = """
from test import ann_module, ann_module2, ann_module3
+from typing import AsyncContextManager
class A:
y: float
return f'{self.x} -> {self.y}'
def __add__(self, other):
return 0
+
+async def g_with(am: AsyncContextManager[int]):
+ x: int
+ async with am as x:
+ return x
+
+try:
+ g_with(ACM()).send(None)
+except StopIteration as e:
+ assert e.args[0] == 42
"""
if PY36:
class OtherABCTests(BaseTestCase):
- @skipUnless(hasattr(typing, 'ContextManager'),
- 'requires typing.ContextManager')
def test_contextmanager(self):
@contextlib.contextmanager
def manager():
self.assertIsInstance(cm, typing.ContextManager)
self.assertNotIsInstance(42, typing.ContextManager)
+ @skipUnless(ASYNCIO, 'Python 3.5 required')
+ def test_async_contextmanager(self):
+ class NotACM:
+ pass
+ self.assertIsInstance(ACM(), typing.AsyncContextManager)
+ self.assertNotIsInstance(NotACM(), typing.AsyncContextManager)
+ @contextlib.contextmanager
+ def manager():
+ yield 42
+
+ cm = manager()
+ self.assertNotIsInstance(cm, typing.AsyncContextManager)
+ self.assertEqual(typing.AsyncContextManager[int].__args__, (int,))
+ with self.assertRaises(TypeError):
+ isinstance(42, typing.AsyncContextManager[int])
+ with self.assertRaises(TypeError):
+ typing.AsyncContextManager[int, str]
+
class TypeTests(BaseTestCase):
return 'no chance for this'
""")
+ with self.assertRaises(AttributeError):
+ exec("""
+class XMethBad2(NamedTuple):
+ x: int
+ def _source(self):
+ return 'no chance for this as well'
+""")
+
@skipUnless(PY36, 'Python 3.6 required')
def test_namedtuple_keyword_usage(self):
LocalEmployee = NamedTuple("LocalEmployee", name=str, age=int)
self.assertNotIn('sys', a)
# Check that Text is defined.
self.assertIn('Text', a)
+ # Check previously missing classes.
+ self.assertIn('SupportsBytes', a)
+ self.assertIn('SupportsComplex', a)
if __name__ == '__main__':
def test_relativelocalfile(self):
self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)
+
class ProxyTests(unittest.TestCase):
def setUp(self):
self.assertFalse(bypass('newdomain.com')) # no port
self.assertFalse(bypass('newdomain.com:1235')) # wrong port
+
class ProxyTests_withOrderedEnv(unittest.TestCase):
def setUp(self):
proxies = urllib.request.getproxies_environment()
self.assertEqual('http://somewhere:3128', proxies['http'])
+
class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
"""Test urlopen() opening a fake http connection."""
finally:
self.unfakeftp()
-
def test_userpass_inurl(self):
self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
try:
"https://localhost", cafile="/nonexistent/path", context=context
)
+
class urlopen_DataTests(unittest.TestCase):
"""Test urlopen() opening a data URL."""
# missing padding character
self.assertRaises(ValueError,urllib.request.urlopen,'data:;base64,Cg=')
+
class urlretrieve_FileTests(unittest.TestCase):
"""Test urllib.urlretrieve() on local files"""
mgr = urllib.request.HTTPPasswordMgr()
add = mgr.add_password
find_user_pass = mgr.find_user_password
+
add("Some Realm", "http://example.com/", "joe", "password")
add("Some Realm", "http://example.com/ni", "ni", "ni")
- add("c", "http://example.com/foo", "foo", "ni")
- add("c", "http://example.com/bar", "bar", "nini")
- add("b", "http://example.com/", "first", "blah")
- add("b", "http://example.com/", "second", "spam")
- add("a", "http://example.com", "1", "a")
add("Some Realm", "http://c.example.com:3128", "3", "c")
add("Some Realm", "d.example.com", "4", "d")
add("Some Realm", "e.example.com:3128", "5", "e")
+ # For the same realm, password set the highest path is the winner.
self.assertEqual(find_user_pass("Some Realm", "example.com"),
('joe', 'password'))
-
- #self.assertEqual(find_user_pass("Some Realm", "http://example.com/ni"),
- # ('ni', 'ni'))
-
+ self.assertEqual(find_user_pass("Some Realm", "http://example.com/ni"),
+ ('joe', 'password'))
self.assertEqual(find_user_pass("Some Realm", "http://example.com"),
('joe', 'password'))
self.assertEqual(find_user_pass("Some Realm", "http://example.com/"),
('joe', 'password'))
- self.assertEqual(
- find_user_pass("Some Realm", "http://example.com/spam"),
- ('joe', 'password'))
- self.assertEqual(
- find_user_pass("Some Realm", "http://example.com/spam/spam"),
- ('joe', 'password'))
+ self.assertEqual(find_user_pass("Some Realm",
+ "http://example.com/spam"),
+ ('joe', 'password'))
+
+ self.assertEqual(find_user_pass("Some Realm",
+ "http://example.com/spam/spam"),
+ ('joe', 'password'))
+
+ # You can have different passwords for different paths.
+
+ add("c", "http://example.com/foo", "foo", "ni")
+ add("c", "http://example.com/bar", "bar", "nini")
+
self.assertEqual(find_user_pass("c", "http://example.com/foo"),
('foo', 'ni'))
+
self.assertEqual(find_user_pass("c", "http://example.com/bar"),
('bar', 'nini'))
+
+ # For the same path, newer password should be considered.
+
+ add("b", "http://example.com/", "first", "blah")
+ add("b", "http://example.com/", "second", "spam")
+
self.assertEqual(find_user_pass("b", "http://example.com/"),
('second', 'spam'))
# No special relationship between a.example.com and example.com:
+ add("a", "http://example.com", "1", "a")
self.assertEqual(find_user_pass("a", "http://example.com/"),
('1', 'a'))
+
self.assertEqual(find_user_pass("a", "http://a.example.com/"),
(None, None))
for url, ftp in [
("file://ftp.example.com//foo.txt", False),
("file://ftp.example.com///foo.txt", False),
-# XXXX bug: fails with OSError, should be URLError
("file://ftp.example.com/foo.txt", False),
("file://somehost//foo/something.txt", False),
("file://localhost//foo/something.txt", False),
req = Request(url)
try:
h.file_open(req)
- # XXXX remove OSError when bug fixed
- except (urllib.error.URLError, OSError):
+ except urllib.error.URLError:
self.assertFalse(ftp)
else:
self.assertIs(o.req, req)
self.assertEqual(req.host, "proxy.example.com:3128")
self.assertEqual(req.get_header("Proxy-authorization"), "FooBar")
- # TODO: This should be only for OSX
@unittest.skipUnless(sys.platform == 'darwin', "only relevant for OSX")
def test_osx_proxy_bypass(self):
bypass = {
self.assertTrue(conn.fakesock.closed, "Connection not closed")
-
class MiscTests(unittest.TestCase):
def opener_has_handler(self, opener, handler_class):
support.requires('network')
+
class URLTimeoutTest(unittest.TestCase):
# XXX this test doesn't seem to test anything useful.
def testURLread(self):
with support.transient_internet("www.example.com"):
f = urllib.request.urlopen("http://www.example.com/")
- x = f.read()
+ f.read()
class urlopenNetworkTests(unittest.TestCase):
- """Tests urllib.reqest.urlopen using the network.
+ """Tests urllib.request.urlopen using the network.
These tests are not exhaustive. Assuming that testing using files does a
good job overall of some of the basic interface features. There are no
def test_reporthook(self):
records = []
+
def recording_reporthook(blocks, block_size, total_size):
records.append((blocks, block_size, total_size))
RFC3986_BASE = 'http://a/b/c/d;p?q'
SIMPLE_BASE = 'http://a/b/c/d'
-# A list of test cases. Each test case is a two-tuple that contains
-# a string with the query and a dictionary with the expected result.
+# Each parse_qsl testcase is a two-tuple that contains
+# a string with the query and a list with the expected result.
parse_qsl_test_cases = [
("", []),
(b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]),
]
+# Each parse_qs testcase is a two-tuple that contains
+# a string with the query and a dictionary with the expected result.
+
parse_qs_test_cases = [
("", {}),
("&", {}),
def test_RFC2396(self):
# cases from RFC 2396
-
self.checkJoin(RFC2396_BASE, 'g:h', 'g:h')
self.checkJoin(RFC2396_BASE, 'g', 'http://a/b/c/g')
self.checkJoin(RFC2396_BASE, './g', 'http://a/b/c/g')
# self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g')
# self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g')
-
def test_RFC3986(self):
- # Test cases from RFC3986
self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y')
self.checkJoin(RFC3986_BASE, ';x', 'http://a/b/c/;x')
self.checkJoin(RFC3986_BASE, 'g:h','g:h')
self.checkJoin(RFC3986_BASE, '../../g','http://a/g')
self.checkJoin(RFC3986_BASE, '../../../g', 'http://a/g')
- #Abnormal Examples
+ # Abnormal Examples
# The 'abnormal scenarios' are incompatible with RFC2986 parsing
# Tests are here for reference.
def test_parse_fragments(self):
# Exercise the allow_fragments parameter of urlparse() and urlsplit()
tests = (
- ("http:#frag", "path"),
- ("//example.net#frag", "path"),
- ("index.html#frag", "path"),
- (";a=b#frag", "params"),
- ("?a=b#frag", "query"),
- ("#frag", "path"),
+ ("http:#frag", "path", "frag"),
+ ("//example.net#frag", "path", "frag"),
+ ("index.html#frag", "path", "frag"),
+ (";a=b#frag", "params", "frag"),
+ ("?a=b#frag", "query", "frag"),
+ ("#frag", "path", "frag"),
+ ("abc#@frag", "path", "@frag"),
+ ("//abc#@frag", "path", "@frag"),
+ ("//abc:80#@frag", "path", "@frag"),
+ ("//abc#@frag:80", "path", "@frag:80"),
)
- for url, attr in tests:
+ for url, attr, expected_frag in tests:
for func in (urllib.parse.urlparse, urllib.parse.urlsplit):
if attr == "params" and func is urllib.parse.urlsplit:
attr = "path"
with self.subTest(url=url, function=func):
result = func(url, allow_fragments=False)
self.assertEqual(result.fragment, "")
- self.assertTrue(getattr(result, attr).endswith("#frag"))
+ self.assertTrue(
+ getattr(result, attr).endswith("#" + expected_frag))
self.assertEqual(func(url, "", False).fragment, "")
result = func(url, allow_fragments=True)
- self.assertEqual(result.fragment, "frag")
- self.assertFalse(getattr(result, attr).endswith("frag"))
- self.assertEqual(func(url, "", True).fragment, "frag")
- self.assertEqual(func(url).fragment, "frag")
+ self.assertEqual(result.fragment, expected_frag)
+ self.assertFalse(
+ getattr(result, attr).endswith(expected_frag))
+ self.assertEqual(func(url, "", True).fragment,
+ expected_frag)
+ self.assertEqual(func(url).fragment, expected_frag)
def test_mixed_types_rejected(self):
# Several functions that process either strings or ASCII encoded bytes
self.assertEqual(splithost('/foo/bar/baz.html'),
(None, '/foo/bar/baz.html'))
+ # bpo-30500: # starts a fragment.
+ self.assertEqual(splithost('//127.0.0.1#@host.com'),
+ ('127.0.0.1', '/#@host.com'))
+ self.assertEqual(splithost('//127.0.0.1#@host.com:80'),
+ ('127.0.0.1', '/#@host.com:80'))
+ self.assertEqual(splithost('//127.0.0.1:80#@host.com'),
+ ('127.0.0.1:80', '/#@host.com'))
+
+ # Empty host is returned as empty string.
+ self.assertEqual(splithost("///file"),
+ ('', '/file'))
+
+ # Trailing semicolon, question mark and hash symbol are kept.
+ self.assertEqual(splithost("//example.net/file;"),
+ ('example.net', '/file;'))
+ self.assertEqual(splithost("//example.net/file?"),
+ ('example.net', '/file?'))
+ self.assertEqual(splithost("//example.net/file#"),
+ ('example.net', '/file#'))
+
def test_splituser(self):
splituser = urllib.parse.splituser
self.assertEqual(splituser('User:Pass@www.python.org:080'),
with self.assertRaises(RuntimeError):
repr(e) # Should not crash
+ def test_element_get_text(self):
+ # Issue #27863
+ class X(str):
+ def __del__(self):
+ try:
+ elem.text
+ except NameError:
+ pass
+
+ b = ET.TreeBuilder()
+ b.start('tag', {})
+ b.data('ABCD')
+ b.data(X('EFGH'))
+ b.data('IJKL')
+ b.end('tag')
+
+ elem = b.close()
+ self.assertEqual(elem.text, 'ABCDEFGHIJKL')
+
+ def test_element_get_tail(self):
+ # Issue #27863
+ class X(str):
+ def __del__(self):
+ try:
+ elem[0].tail
+ except NameError:
+ pass
+
+ b = ET.TreeBuilder()
+ b.start('root', {})
+ b.start('tag', {})
+ b.end('tag')
+ b.data('ABCD')
+ b.data(X('EFGH'))
+ b.data('IJKL')
+ b.end('root')
+
+ elem = b.close()
+ self.assertEqual(elem[0].tail, 'ABCDEFGHIJKL')
+
+ def test_element_iter(self):
+ # Issue #27863
+ state = {
+ 'tag': 'tag',
+ '_children': [None], # non-Element
+ 'attrib': 'attr',
+ 'tail': 'tail',
+ 'text': 'text',
+ }
+
+ e = ET.Element('tag')
+ try:
+ e.__setstate__(state)
+ except AttributeError:
+ e.__dict__ = state
+
+ it = e.iter()
+ self.assertIs(next(it), e)
+ self.assertRaises(AttributeError, next, it)
+
+ def test_subscr(self):
+ # Issue #27863
+ class X:
+ def __index__(self):
+ del e[:]
+ return 1
+
+ e = ET.Element('elem')
+ e.append(ET.Element('child'))
+ e[:X()] # shouldn't crash
+
+ e.append(ET.Element('child'))
+ e[0:10:X()] # shouldn't crash
+
+ def test_ass_subscr(self):
+ # Issue #27863
+ class X:
+ def __index__(self):
+ e[:] = []
+ return 1
+
+ e = ET.Element('elem')
+ for _ in range(10):
+ e.insert(0, ET.Element('child'))
+
+ e[0:10:X()] = [] # shouldn't crash
+
+ def test_treebuilder_start(self):
+ # Issue #27863
+ def element_factory(x, y):
+ return []
+ b = ET.TreeBuilder(element_factory=element_factory)
+
+ b.start('tag', {})
+ b.data('ABCD')
+ self.assertRaises(AttributeError, b.start, 'tag2', {})
+ del b
+ gc_collect()
+
+ def test_treebuilder_end(self):
+ # Issue #27863
+ def element_factory(x, y):
+ return []
+ b = ET.TreeBuilder(element_factory=element_factory)
+
+ b.start('tag', {})
+ b.data('ABCD')
+ self.assertRaises(AttributeError, b.end, 'tag')
+ del b
+ gc_collect()
+
+
class MutatingElementPath(str):
def __new__(cls, elem, *args):
self = str.__new__(cls, *args)
self.assertEqual(p.method(), 5)
self.assertEqual(p.method(), 5)
+
+class SimpleXMLRPCDispatcherTestCase(unittest.TestCase):
+ class DispatchExc(Exception):
+ """Raised inside the dispatched functions when checking for
+ chained exceptions"""
+
+ def test_call_registered_func(self):
+ """Calls explicitly registered function"""
+ # Makes sure any exception raised inside the function has no other
+ # exception chained to it
+
+ exp_params = 1, 2, 3
+
+ def dispatched_func(*params):
+ raise self.DispatchExc(params)
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ dispatcher.register_function(dispatched_func)
+ with self.assertRaises(self.DispatchExc) as exc_ctx:
+ dispatcher._dispatch('dispatched_func', exp_params)
+ self.assertEqual(exc_ctx.exception.args, (exp_params,))
+ self.assertIsNone(exc_ctx.exception.__cause__)
+ self.assertIsNone(exc_ctx.exception.__context__)
+
+ def test_call_instance_func(self):
+ """Calls a registered instance attribute as a function"""
+ # Makes sure any exception raised inside the function has no other
+ # exception chained to it
+
+ exp_params = 1, 2, 3
+
+ class DispatchedClass:
+ def dispatched_func(self, *params):
+ raise SimpleXMLRPCDispatcherTestCase.DispatchExc(params)
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ dispatcher.register_instance(DispatchedClass())
+ with self.assertRaises(self.DispatchExc) as exc_ctx:
+ dispatcher._dispatch('dispatched_func', exp_params)
+ self.assertEqual(exc_ctx.exception.args, (exp_params,))
+ self.assertIsNone(exc_ctx.exception.__cause__)
+ self.assertIsNone(exc_ctx.exception.__context__)
+
+ def test_call_dispatch_func(self):
+ """Calls the registered instance's `_dispatch` function"""
+ # Makes sure any exception raised inside the function has no other
+ # exception chained to it
+
+ exp_method = 'method'
+ exp_params = 1, 2, 3
+
+ class TestInstance:
+ def _dispatch(self, method, params):
+ raise SimpleXMLRPCDispatcherTestCase.DispatchExc(
+ method, params)
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ dispatcher.register_instance(TestInstance())
+ with self.assertRaises(self.DispatchExc) as exc_ctx:
+ dispatcher._dispatch(exp_method, exp_params)
+ self.assertEqual(exc_ctx.exception.args, (exp_method, exp_params))
+ self.assertIsNone(exc_ctx.exception.__cause__)
+ self.assertIsNone(exc_ctx.exception.__context__)
+
+ def test_registered_func_is_none(self):
+ """Calls explicitly registered function which is None"""
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ dispatcher.register_function(None, name='method')
+ with self.assertRaisesRegex(Exception, 'method'):
+ dispatcher._dispatch('method', ('param',))
+
+ def test_instance_has_no_func(self):
+ """Attempts to call nonexistent function on a registered instance"""
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ dispatcher.register_instance(object())
+ with self.assertRaisesRegex(Exception, 'method'):
+ dispatcher._dispatch('method', ('param',))
+
+ def test_cannot_locate_func(self):
+ """Calls a function that the dispatcher cannot locate"""
+
+ dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
+ with self.assertRaisesRegex(Exception, 'method'):
+ dispatcher._dispatch('method', ('param',))
+
+
class HelperTestCase(unittest.TestCase):
def test_escape(self):
self.assertEqual(xmlrpclib.escape("a&b"), "a&b")
KeepaliveServerTestCase1, KeepaliveServerTestCase2,
GzipServerTestCase, GzipUtilTestCase,
MultiPathServerTestCase, ServerProxyTestCase, FailingServerTestCase,
- CGIHandlerTestCase)
+ CGIHandlerTestCase, SimpleXMLRPCDispatcherTestCase)
if __name__ == "__main__":
import io
import os
import importlib.util
+import pathlib
import posixpath
import time
import struct
from random import randint, random, getrandbits
from test.support import script_helper
-from test.support import (TESTFN, findfile, unlink, rmtree, temp_dir,
+from test.support import (TESTFN, findfile, unlink, rmtree, temp_dir, temp_cwd,
requires_zlib, requires_bz2, requires_lzma,
captured_stdout, check_warnings)
for f in get_files(self):
self.zip_open_test(f, self.compression)
+ def test_open_with_pathlike(self):
+ path = pathlib.Path(TESTFN2)
+ self.zip_open_test(path, self.compression)
+ with zipfile.ZipFile(path, "r", self.compression) as zipfp:
+ self.assertIsInstance(zipfp.filename, str)
+
def zip_random_open_test(self, f, compression):
self.make_test_archive(f, compression)
compression = zipfile.ZIP_LZMA
+class AbstractWriterTests:
+
+ def tearDown(self):
+ unlink(TESTFN2)
+
+ def test_close_after_close(self):
+ data = b'content'
+ with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
+ w = zipf.open('test', 'w')
+ w.write(data)
+ w.close()
+ self.assertTrue(w.closed)
+ w.close()
+ self.assertTrue(w.closed)
+ self.assertEqual(zipf.read('test'), data)
+
+ def test_write_after_close(self):
+ data = b'content'
+ with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
+ w = zipf.open('test', 'w')
+ w.write(data)
+ w.close()
+ self.assertTrue(w.closed)
+ self.assertRaises(ValueError, w.write, b'')
+ self.assertEqual(zipf.read('test'), data)
+
+class StoredWriterTests(AbstractWriterTests, unittest.TestCase):
+ compression = zipfile.ZIP_STORED
+
+@requires_zlib
+class DeflateWriterTests(AbstractWriterTests, unittest.TestCase):
+ compression = zipfile.ZIP_DEFLATED
+
+@requires_bz2
+class Bzip2WriterTests(AbstractWriterTests, unittest.TestCase):
+ compression = zipfile.ZIP_BZIP2
+
+@requires_lzma
+class LzmaWriterTests(AbstractWriterTests, unittest.TestCase):
+ compression = zipfile.ZIP_LZMA
+
+
class PyZipFileTests(unittest.TestCase):
def assertCompiledIn(self, name, namelist):
if name + 'o' not in namelist:
finally:
rmtree(TESTFN2)
+ def test_write_pathlike(self):
+ os.mkdir(TESTFN2)
+ try:
+ with open(os.path.join(TESTFN2, "mod1.py"), "w") as fp:
+ fp.write("print(42)\n")
+
+ with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
+ zipfp.writepy(pathlib.Path(TESTFN2) / "mod1.py")
+ names = zipfp.namelist()
+ self.assertCompiledIn('mod1.py', names)
+ finally:
+ rmtree(TESTFN2)
+
class ExtractTests(unittest.TestCase):
- def test_extract(self):
+
+ def make_test_file(self):
with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
for fpath, fdata in SMALL_TEST_DATA:
zipfp.writestr(fpath, fdata)
+ def test_extract(self):
+ with temp_cwd():
+ self.make_test_file()
+ with zipfile.ZipFile(TESTFN2, "r") as zipfp:
+ for fpath, fdata in SMALL_TEST_DATA:
+ writtenfile = zipfp.extract(fpath)
+
+ # make sure it was written to the right place
+ correctfile = os.path.join(os.getcwd(), fpath)
+ correctfile = os.path.normpath(correctfile)
+
+ self.assertEqual(writtenfile, correctfile)
+
+ # make sure correct data is in correct file
+ with open(writtenfile, "rb") as f:
+ self.assertEqual(fdata.encode(), f.read())
+
+ unlink(writtenfile)
+
+ def _test_extract_with_target(self, target):
+ self.make_test_file()
with zipfile.ZipFile(TESTFN2, "r") as zipfp:
for fpath, fdata in SMALL_TEST_DATA:
- writtenfile = zipfp.extract(fpath)
+ writtenfile = zipfp.extract(fpath, target)
# make sure it was written to the right place
- correctfile = os.path.join(os.getcwd(), fpath)
+ correctfile = os.path.join(target, fpath)
correctfile = os.path.normpath(correctfile)
-
- self.assertEqual(writtenfile, correctfile)
+ self.assertTrue(os.path.samefile(writtenfile, correctfile), (writtenfile, target))
# make sure correct data is in correct file
with open(writtenfile, "rb") as f:
unlink(writtenfile)
- # remove the test file subdirectories
- rmtree(os.path.join(os.getcwd(), 'ziptest2dir'))
+ unlink(TESTFN2)
+
+ def test_extract_with_target(self):
+ with temp_dir() as extdir:
+ self._test_extract_with_target(extdir)
+
+ def test_extract_with_target_pathlike(self):
+ with temp_dir() as extdir:
+ self._test_extract_with_target(pathlib.Path(extdir))
def test_extract_all(self):
- with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
- for fpath, fdata in SMALL_TEST_DATA:
- zipfp.writestr(fpath, fdata)
+ with temp_cwd():
+ self.make_test_file()
+ with zipfile.ZipFile(TESTFN2, "r") as zipfp:
+ zipfp.extractall()
+ for fpath, fdata in SMALL_TEST_DATA:
+ outfile = os.path.join(os.getcwd(), fpath)
+
+ with open(outfile, "rb") as f:
+ self.assertEqual(fdata.encode(), f.read())
+
+ unlink(outfile)
+ def _test_extract_all_with_target(self, target):
+ self.make_test_file()
with zipfile.ZipFile(TESTFN2, "r") as zipfp:
- zipfp.extractall()
+ zipfp.extractall(target)
for fpath, fdata in SMALL_TEST_DATA:
- outfile = os.path.join(os.getcwd(), fpath)
+ outfile = os.path.join(target, fpath)
with open(outfile, "rb") as f:
self.assertEqual(fdata.encode(), f.read())
unlink(outfile)
- # remove the test file subdirectories
- rmtree(os.path.join(os.getcwd(), 'ziptest2dir'))
+ unlink(TESTFN2)
+
+ def test_extract_all_with_target(self):
+ with temp_dir() as extdir:
+ self._test_extract_all_with_target(extdir)
+
+ def test_extract_all_with_target_pathlike(self):
+ with temp_dir() as extdir:
+ self._test_extract_all_with_target(pathlib.Path(extdir))
def check_file(self, filename, content):
self.assertTrue(os.path.isfile(filename))
with open(TESTFN, "w") as fp:
fp.write("this is not a legal zip file\n")
self.assertFalse(zipfile.is_zipfile(TESTFN))
+ # - passing a path-like object
+ self.assertFalse(zipfile.is_zipfile(pathlib.Path(TESTFN)))
# - passing a file object
with open(TESTFN, "rb") as fp:
self.assertFalse(zipfile.is_zipfile(fp))
zi = zipfile.ZipInfo.from_file(__file__)
self.assertEqual(posixpath.basename(zi.filename), 'test_zipfile.py')
self.assertFalse(zi.is_dir())
+ self.assertEqual(zi.file_size, os.path.getsize(__file__))
+
+ def test_from_file_pathlike(self):
+ zi = zipfile.ZipInfo.from_file(pathlib.Path(__file__))
+ self.assertEqual(posixpath.basename(zi.filename), 'test_zipfile.py')
+ self.assertFalse(zi.is_dir())
+ self.assertEqual(zi.file_size, os.path.getsize(__file__))
+
+ def test_from_file_bytes(self):
+ zi = zipfile.ZipInfo.from_file(os.fsencode(__file__), 'test')
+ self.assertEqual(posixpath.basename(zi.filename), 'test')
+ self.assertFalse(zi.is_dir())
+ self.assertEqual(zi.file_size, os.path.getsize(__file__))
+
+ def test_from_file_fileno(self):
+ with open(__file__, 'rb') as f:
+ zi = zipfile.ZipInfo.from_file(f.fileno(), 'test')
+ self.assertEqual(posixpath.basename(zi.filename), 'test')
+ self.assertFalse(zi.is_dir())
+ self.assertEqual(zi.file_size, os.path.getsize(__file__))
def test_from_dir(self):
dirpath = os.path.dirname(os.path.abspath(__file__))
return self.tk.getint(
self.tk.call('winfo', 'ismapped', self._w))
def winfo_manager(self):
- """Return the window mananger name for this widget."""
+ """Return the window manager name for this widget."""
return self.tk.call('winfo', 'manager', self._w)
def winfo_name(self):
"""Return the name of this widget."""
return self.tk.splitlist(self.tk.call('image', 'names'))
def image_types(self):
- """Return a list of all available image types (e.g. phote bitmap)."""
+ """Return a list of all available image types (e.g. photo bitmap)."""
return self.tk.splitlist(self.tk.call('image', 'types'))
return self.tk.call('wm', 'focusmodel', self._w, model)
focusmodel = wm_focusmodel
def wm_forget(self, window): # new in Tk 8.5
- """The window will be unmappend from the screen and will no longer
+ """The window will be unmapped from the screen and will no longer
be managed by wm. toplevel windows will be treated like frame
windows once they are no longer managed by wm, however, the menu
option configuration will be remembered and the menus will return
"""Return item which is closest to pixel at X, Y.
If several match take the top-most.
All items closer than HALO are considered overlapping (all are
- closests). If START is specified the next below this tag is taken."""
+ closest). If START is specified the next below this tag is taken."""
return self.find('closest', x, y, halo, start)
def find_enclosed(self, x1, y1, x2, y2):
"""Return all items in rectangle defined
"""Print the contents of the canvas to a postscript
file. Valid options: colormap, colormode, file, fontmap,
height, pageanchor, pageheight, pagewidth, pagex, pagey,
- rotate, witdh, x, y."""
+ rotate, width, x, y."""
return self.tk.call((self._w, 'postscript') +
self._options(cnf, kw))
def tag_raise(self, *args):
return self.tk.getint(
self.tk.call('image', 'height', self.name))
def type(self):
- """Return the type of the imgage, e.g. "photo" or "bitmap"."""
+ """Return the type of the image, e.g. "photo" or "bitmap"."""
return self.tk.call('image', 'type', self.name)
def width(self):
"""Return the width of the image."""
import collections.abc as collections_abc
except ImportError:
import collections as collections_abc # Fallback for PY3.2.
+if sys.version_info[:2] >= (3, 6):
+ import _collections_abc # Needed for private function _check_methods # noqa
try:
- from types import SlotWrapperType, MethodWrapperType, MethodDescriptorType
+ from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType
except ImportError:
- SlotWrapperType = type(object.__init__)
+ WrapperDescriptorType = type(object.__init__)
MethodWrapperType = type(object().__str__)
MethodDescriptorType = type(str.join)
# for 'Generic' and ABCs below.
'ByteString',
'Container',
+ 'ContextManager',
'Hashable',
'ItemsView',
'Iterable',
# AsyncIterable,
# Coroutine,
# Collection,
- # ContextManager,
# AsyncGenerator,
+ # AsyncContextManager
# Structural checks, a.k.a. protocols.
'Reversible',
'SupportsAbs',
+ 'SupportsBytes',
+ 'SupportsComplex',
'SupportsFloat',
'SupportsInt',
'SupportsRound',
Any = _Any(_root=True)
+class _NoReturn(_FinalTypingBase, _root=True):
+ """Special type indicating functions that never return.
+ Example::
+
+ from typing import NoReturn
+
+ def stop() -> NoReturn:
+ raise Exception('no way')
+
+ This type is invalid in other positions, e.g., ``List[NoReturn]``
+ will fail in static type checkers.
+ """
+
+ __slots__ = ()
+
+ def __instancecheck__(self, obj):
+ raise TypeError("NoReturn cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ raise TypeError("NoReturn cannot be used with issubclass().")
+
+
+NoReturn = _NoReturn(_root=True)
+
+
class TypeVar(_TypingBase, _root=True):
"""Type variable.
_allowed_types = (types.FunctionType, types.BuiltinFunctionType,
types.MethodType, types.ModuleType,
- SlotWrapperType, MethodWrapperType, MethodDescriptorType)
+ WrapperDescriptorType, MethodWrapperType, MethodDescriptorType)
def get_type_hints(obj, globalns=None, localns=None):
if hasattr(contextlib, 'AbstractContextManager'):
class ContextManager(Generic[T_co], extra=contextlib.AbstractContextManager):
__slots__ = ()
- __all__.append('ContextManager')
+else:
+ class ContextManager(Generic[T_co]):
+ __slots__ = ()
+
+ def __enter__(self):
+ return self
+
+ @abc.abstractmethod
+ def __exit__(self, exc_type, exc_value, traceback):
+ return None
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is ContextManager:
+ # In Python 3.6+, it is possible to set a method to None to
+ # explicitly indicate that the class does not implement an ABC
+ # (https://bugs.python.org/issue25958), but we do not support
+ # that pattern here because this fallback class is only used
+ # in Python 3.5 and earlier.
+ if (any("__enter__" in B.__dict__ for B in C.__mro__) and
+ any("__exit__" in B.__dict__ for B in C.__mro__)):
+ return True
+ return NotImplemented
+
+
+if hasattr(contextlib, 'AbstractAsyncContextManager'):
+ class AsyncContextManager(Generic[T_co],
+ extra=contextlib.AbstractAsyncContextManager):
+ __slots__ = ()
+
+ __all__.append('AsyncContextManager')
+elif sys.version_info[:2] >= (3, 5):
+ exec("""
+class AsyncContextManager(Generic[T_co]):
+ __slots__ = ()
+
+ async def __aenter__(self):
+ return self
+
+ @abc.abstractmethod
+ async def __aexit__(self, exc_type, exc_value, traceback):
+ return None
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is AsyncContextManager:
+ if sys.version_info[:2] >= (3, 6):
+ return _collections_abc._check_methods(C, "__aenter__", "__aexit__")
+ if (any("__aenter__" in B.__dict__ for B in C.__mro__) and
+ any("__aexit__" in B.__dict__ for B in C.__mro__)):
+ return True
+ return NotImplemented
+
+__all__.append('AsyncContextManager')
+""")
class Dict(dict, MutableMapping[KT, VT], extra=dict):
# attributes prohibited to set in NamedTuple class syntax
_prohibited = ('__new__', '__init__', '__slots__', '__getnewargs__',
'_fields', '_field_defaults', '_field_types',
- '_make', '_replace', '_asdict')
+ '_make', '_replace', '_asdict', '_source')
_special = ('__module__', '__name__', '__qualname__', '__annotations__')
If args is not empty, call a callable passing positional and keyword
arguments.
"""
- if not _is_subtype(self.expected, self._base_type):
- raise TypeError('%s() arg 1 must be %s' %
- (name, self._base_type_str))
- if args and args[0] is None:
- warnings.warn("callable is None",
- DeprecationWarning, 3)
- args = ()
- if not args:
- self.msg = kwargs.pop('msg', None)
- if kwargs:
- warnings.warn('%r is an invalid keyword argument for '
- 'this function' % next(iter(kwargs)),
- DeprecationWarning, 3)
- return self
-
- callable_obj, *args = args
try:
- self.obj_name = callable_obj.__name__
- except AttributeError:
- self.obj_name = str(callable_obj)
- with self:
- callable_obj(*args, **kwargs)
+ if not _is_subtype(self.expected, self._base_type):
+ raise TypeError('%s() arg 1 must be %s' %
+ (name, self._base_type_str))
+ if args and args[0] is None:
+ warnings.warn("callable is None",
+ DeprecationWarning, 3)
+ args = ()
+ if not args:
+ self.msg = kwargs.pop('msg', None)
+ if kwargs:
+ warnings.warn('%r is an invalid keyword argument for '
+ 'this function' % next(iter(kwargs)),
+ DeprecationWarning, 3)
+ return self
+
+ callable_obj, *args = args
+ try:
+ self.obj_name = callable_obj.__name__
+ except AttributeError:
+ self.obj_name = str(callable_obj)
+ with self:
+ callable_obj(*args, **kwargs)
+ finally:
+ # bpo-23890: manually break a reference cycle
+ self = None
class _AssertRaisesContext(_AssertRaisesBaseContext):
self.assertEqual(the_exception.error_code, 3)
"""
context = _AssertRaisesContext(expected_exception, self)
- return context.handle('assertRaises', args, kwargs)
+ try:
+ return context.handle('assertRaises', args, kwargs)
+ finally:
+ # bpo-23890: manually break a reference cycle
+ context = None
def assertWarns(self, expected_warning, *args, **kwargs):
"""Fail unless a warning of class warnClass is triggered
%(prog)s test_module - run tests from test_module
%(prog)s module.TestClass - run tests from module.TestClass
%(prog)s module.Class.test_method - run specified test method
+ %(prog)s path/to/test_file.py - run tests from test_file.py
"""
MODULE_EXAMPLES = """\
with self.assertRaises(TypeError):
self.assertRaises((ValueError, object))
+ def testAssertRaisesRefcount(self):
+ # bpo-23890: assertRaises() must not keep objects alive longer
+ # than expected
+ def func() :
+ try:
+ raise ValueError
+ except ValueError:
+ raise ValueError
+
+ refcount = sys.getrefcount(func)
+ self.assertRaises(ValueError, func)
+ self.assertEqual(refcount, sys.getrefcount(func))
+
def testAssertRaisesRegex(self):
class ExceptionMock(Exception):
pass
__all__ = ['URLError', 'HTTPError', 'ContentTooShortError']
-# do these error classes make sense?
-# make sure all of the OSError stuff is overridden. we just want to be
-# subtypes.
-
class URLError(OSError):
# URLError is a sub-type of OSError, but it doesn't share any of
# the implementation. need to override __init__ and __str__.
"DefragResult", "ParseResult", "SplitResult",
"DefragResultBytes", "ParseResultBytes", "SplitResultBytes"]
-# A classification of schemes ('' means apply by default)
-uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
+# A classification of schemes.
+# The empty string classifies URLs with no scheme specified,
+# being the default value returned by “urlsplit” and “urlparse”.
+
+uses_relative = ['', 'ftp', 'http', 'gopher', 'nntp', 'imap',
'wais', 'file', 'https', 'shttp', 'mms',
- 'prospero', 'rtsp', 'rtspu', '', 'sftp',
+ 'prospero', 'rtsp', 'rtspu', 'sftp',
'svn', 'svn+ssh', 'ws', 'wss']
-uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
+
+uses_netloc = ['', 'ftp', 'http', 'gopher', 'nntp', 'telnet',
'imap', 'wais', 'file', 'mms', 'https', 'shttp',
- 'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
+ 'snews', 'prospero', 'rtsp', 'rtspu', 'rsync',
'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh',
'ws', 'wss']
-uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap',
+
+uses_params = ['', 'ftp', 'hdl', 'prospero', 'http', 'imap',
'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips',
- 'mms', '', 'sftp', 'tel']
+ 'mms', 'sftp', 'tel']
# These are not actually used anymore, but should stay for backwards
# compatibility. (They are undocumented, but have a public-looking name.)
+
non_hierarchical = ['gopher', 'hdl', 'mailto', 'news',
'telnet', 'wais', 'imap', 'snews', 'sip', 'sips']
-uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms',
- 'gopher', 'rtsp', 'rtspu', 'sip', 'sips', '']
-uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news',
+
+uses_query = ['', 'http', 'wais', 'imap', 'https', 'shttp', 'mms',
+ 'gopher', 'rtsp', 'rtspu', 'sip', 'sips']
+
+uses_fragment = ['', 'ftp', 'hdl', 'http', 'gopher', 'news',
'nntp', 'wais', 'https', 'shttp', 'snews',
- 'file', 'prospero', '']
+ 'file', 'prospero']
# Characters valid in scheme names
scheme_chars = ('abcdefghijklmnopqrstuvwxyz'
append(bits[i + 1])
return ''.join(res)
+
def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
encoding='utf-8', errors='replace'):
"""Parse a query given as a string argument.
encoding and errors: specify how to decode percent-encoded sequences
into Unicode characters, as accepted by the bytes.decode() method.
+
+ Returns a dictionary.
"""
parsed_result = {}
pairs = parse_qsl(qs, keep_blank_values, strict_parsing,
parsed_result[name] = [value]
return parsed_result
+
def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
encoding='utf-8', errors='replace'):
"""Parse a query given as a string argument.
- Arguments:
+ Arguments:
- qs: percent-encoded query string to be parsed
+ qs: percent-encoded query string to be parsed
- keep_blank_values: flag indicating whether blank values in
- percent-encoded queries should be treated as blank strings. A
- true value indicates that blanks should be retained as blank
- strings. The default false value indicates that blank values
- are to be ignored and treated as if they were not included.
+ keep_blank_values: flag indicating whether blank values in
+ percent-encoded queries should be treated as blank strings.
+ A true value indicates that blanks should be retained as blank
+ strings. The default false value indicates that blank values
+ are to be ignored and treated as if they were not included.
- strict_parsing: flag indicating what to do with parsing errors. If
- false (the default), errors are silently ignored. If true,
- errors raise a ValueError exception.
+ strict_parsing: flag indicating what to do with parsing errors. If
+ false (the default), errors are silently ignored. If true,
+ errors raise a ValueError exception.
- encoding and errors: specify how to decode percent-encoded sequences
- into Unicode characters, as accepted by the bytes.decode() method.
+ encoding and errors: specify how to decode percent-encoded sequences
+ into Unicode characters, as accepted by the bytes.decode() method.
- Returns a list, as G-d intended.
+ Returns a list, as G-d intended.
"""
qs, _coerce_result = _coerce_args(qs)
pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')]
"""splithost('//host[:port]/path') --> 'host[:port]', '/path'."""
global _hostprog
if _hostprog is None:
- _hostprog = re.compile('//([^/?]*)(.*)', re.DOTALL)
+ _hostprog = re.compile('//([^/#?]*)(.*)', re.DOTALL)
match = _hostprog.match(url)
if match:
origurl = 'file://' + filename
return addinfourl(open(localfile, 'rb'), headers, origurl)
except OSError as exp:
- # users shouldn't expect OSErrors coming from urlopen()
raise URLError(exp)
raise URLError('file not on local host')
of the 'file' scheme; not recommended for general use."""
return quote(pathname)
-# This really consists of two pieces:
-# (1) a class which handles opening of all sorts of URLs
-# (plus assorted utilities etc.)
-# (2) a set of functions for parsing URLs
-# XXX Should these be separated out into different modules?
-
ftpcache = {}
+
+
class URLopener:
"""Class to open URLs.
This is a class rather than just a subroutine because we may need
source = saxutils.prepare_input_source(source)
self._source = source
- self.reset()
- self._cont_handler.setDocumentLocator(ExpatLocator(self))
- xmlreader.IncrementalParser.parse(self, source)
+ try:
+ self.reset()
+ self._cont_handler.setDocumentLocator(ExpatLocator(self))
+ xmlreader.IncrementalParser.parse(self, source)
+ except:
+ # bpo-30264: Close the source on error to not leak resources:
+ # xml.sax.parse() doesn't give access to the underlying parser
+ # to the caller
+ self._close_source()
+ raise
def prepareParser(self, source):
if source.getSystemId() is not None:
# FIXME: when to invoke error()?
self._err_handler.fatalError(exc)
+ def _close_source(self):
+ source = self._source
+ try:
+ file = source.getCharacterStream()
+ if file is not None:
+ file.close()
+ finally:
+ file = source.getByteStream()
+ if file is not None:
+ file.close()
+
def close(self):
if (self._entity_stack or self._parser is None or
isinstance(self._parser, _ClosedParser)):
parser.ErrorColumnNumber = self._parser.ErrorColumnNumber
parser.ErrorLineNumber = self._parser.ErrorLineNumber
self._parser = parser
- try:
- file = self._source.getCharacterStream()
- if file is not None:
- file.close()
- finally:
- file = self._source.getByteStream()
- if file is not None:
- file.close()
+ self._close_source()
def _reset_cont_handler(self):
self._parser.ProcessingInstructionHandler = \
not be called.
"""
- func = None
try:
- # check to see if a matching function has been registered
+ # call the matching registered function
func = self.funcs[method]
except KeyError:
- if self.instance is not None:
- # check for a _dispatch method
- if hasattr(self.instance, '_dispatch'):
- return self.instance._dispatch(method, params)
- else:
- # call instance method directly
- try:
- func = resolve_dotted_attribute(
- self.instance,
- method,
- self.allow_dotted_names
- )
- except AttributeError:
- pass
-
- if func is not None:
- return func(*params)
+ pass
else:
+ if func is not None:
+ return func(*params)
raise Exception('method "%s" is not supported' % method)
+ if self.instance is not None:
+ if hasattr(self.instance, '_dispatch'):
+ # call the `_dispatch` method on the instance
+ return self.instance._dispatch(method, params)
+
+ # call the instance's method directly
+ try:
+ func = resolve_dotted_attribute(
+ self.instance,
+ method,
+ self.allow_dotted_names
+ )
+ except AttributeError:
+ pass
+ else:
+ if func is not None:
+ return func(*params)
+
+ raise Exception('method "%s" is not supported' % method)
+
class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
"""Simple XML-RPC request handler class.
this will be the same as filename, but without a drive letter and with
leading path separators removed).
"""
+ if isinstance(filename, os.PathLike):
+ filename = os.fspath(filename)
st = os.stat(filename)
isdir = stat.S_ISDIR(st.st_mode)
mtime = time.localtime(st.st_mtime)
return True
def write(self, data):
+ if self.closed:
+ raise ValueError('I/O operation on closed file.')
nbytes = len(data)
self._file_size += nbytes
self._crc = crc32(data, self._crc)
return nbytes
def close(self):
+ if self.closed:
+ return
super().close()
# Flush any data from the compressor, and update header info
if self._compressor:
self._comment = b''
# Check if we were passed a file-like object
+ if isinstance(file, os.PathLike):
+ file = os.fspath(file)
if isinstance(file, str):
# No, it's a filename
self._filePassed = 0
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
- self._start_disk = 0
try:
self.start_dir = self.fp.tell()
except (AttributeError, OSError):
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
- self.start_dir = self._start_disk = self.fp.tell()
+ self.start_dir = self.fp.tell()
else:
raise ValueError("Mode must be 'r', 'w', 'x', or 'a'")
except:
offset_cd = endrec[_ECD_OFFSET] # offset of central directory
self._comment = endrec[_ECD_COMMENT] # archive comment
- # self._start_disk: Position of the start of ZIP archive
- # It is zero, unless ZIP was concatenated to another file
- self._start_disk = endrec[_ECD_LOCATION] - size_cd - offset_cd
+ # "concat" is zero, unless zip was concatenated to another file
+ concat = endrec[_ECD_LOCATION] - size_cd - offset_cd
if endrec[_ECD_SIGNATURE] == stringEndArchive64:
# If Zip64 extension structures are present, account for them
- self._start_disk -= (sizeEndCentDir64 + sizeEndCentDir64Locator)
+ concat -= (sizeEndCentDir64 + sizeEndCentDir64Locator)
if self.debug > 2:
- inferred = self._start_disk + offset_cd
- print("given, inferred, offset", offset_cd, inferred, self._start_disk)
+ inferred = concat + offset_cd
+ print("given, inferred, offset", offset_cd, inferred, concat)
# self.start_dir: Position of start of central directory
- self.start_dir = offset_cd + self._start_disk
+ self.start_dir = offset_cd + concat
fp.seek(self.start_dir, 0)
data = fp.read(size_cd)
fp = io.BytesIO(data)
t>>11, (t>>5)&0x3F, (t&0x1F) * 2 )
x._decodeExtra()
- x.header_offset = x.header_offset + self._start_disk
+ x.header_offset = x.header_offset + concat
self.filelist.append(x)
self.NameToInfo[x.filename] = x
as possible. `member' may be a filename or a ZipInfo object. You can
specify a different directory using `path'.
"""
- if not isinstance(member, ZipInfo):
- member = self.getinfo(member)
-
if path is None:
path = os.getcwd()
+ else:
+ path = os.fspath(path)
return self._extract_member(member, path, pwd)
if members is None:
members = self.namelist()
+ if path is None:
+ path = os.getcwd()
+ else:
+ path = os.fspath(path)
+
for zipinfo in members:
- self.extract(zipinfo, path, pwd)
+ self._extract_member(zipinfo, path, pwd)
@classmethod
def _sanitize_windows_name(cls, arcname, pathsep):
"""Extract the ZipInfo object 'member' to a physical
file on the path targetpath.
"""
+ if not isinstance(member, ZipInfo):
+ member = self.getinfo(member)
+
# build the destination pathname, replacing
# forward slashes to platform specific separators.
arcname = member.filename.replace('/', os.path.sep)
file_size = zinfo.file_size
compress_size = zinfo.compress_size
- header_offset = zinfo.header_offset - self._start_disk
- if header_offset > ZIP64_LIMIT:
- extra.append(header_offset)
+ if zinfo.header_offset > ZIP64_LIMIT:
+ extra.append(zinfo.header_offset)
header_offset = 0xffffffff
+ else:
+ header_offset = zinfo.header_offset
extra_data = zinfo.extra
min_version = 0
# Write end-of-zip-archive record
centDirCount = len(self.filelist)
centDirSize = pos2 - self.start_dir
- centDirOffset = self.start_dir - self._start_disk
+ centDirOffset = self.start_dir
requires_zip64 = None
if centDirCount > ZIP_FILECOUNT_LIMIT:
requires_zip64 = "Files count"
If filterfunc(pathname) is given, it is called with every argument.
When it is False, the file or directory is skipped.
"""
+ pathname = os.fspath(pathname)
if filterfunc and not filterfunc(pathname):
if self.debug:
label = 'path' if os.path.isdir(pathname) else 'file'
Python 2.6.
In addition to what is supplied with OS X 10.5+ and Xcode 3+, the script
-requires an installed version of git and a third-party version of
+requires an installed third-party version of
Tcl/Tk 8.4 (for OS X 10.4 and 10.5 deployment targets) or Tcl/TK 8.5
(for 10.6 or later) installed in /Library/Frameworks. When installed,
the Python built by this script will attempt to dynamically link first to
32-bit-only installer builds are still possible on OS X 10.4 with Xcode 2.5
and the installation of additional components, such as a newer Python
-(2.5 is needed for Python parser updates), git, and for the documentation
+(2.5 is needed for Python parser updates) and for the documentation
build either svn (pre-3.4.1) or sphinx-build (3.4.1 and later).
Usage: see USAGE variable in the script.
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
os.environ['PATH'] = base_path
print("Setting default PATH: %s"%(os.environ['PATH']))
- # Ensure ws have access to git and to sphinx-build.
- # You may have to create links in /usr/bin for them.
- runCommand('git --version')
+ # Ensure we have access to sphinx-build.
+ # You may have to create a link in /usr/bin for it.
runCommand('sphinx-build --version')
def parseOptions(args=None):
shellQuote(WORKDIR)[1:-1],
shellQuote(WORKDIR)[1:-1]))
- # bpo-29550: avoid using make touch until it is fixed for git
- # print("Running make touch")
- # runCommand("make touch")
-
- print("Running make")
- runCommand("make")
+ # Look for environment value BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS
+ # and, if defined, append its value to the make command. This allows
+ # us to pass in version control tags, like GITTAG, to a build from a
+ # tarball rather than from a vcs checkout, thus eliminating the need
+ # to have a working copy of the vcs program on the build machine.
+ #
+ # A typical use might be:
+ # export BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS=" \
+ # GITVERSION='echo 123456789a' \
+ # GITTAG='echo v3.6.0' \
+ # GITBRANCH='echo 3.6'"
+
+ make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
+ if make_extras:
+ make_cmd = "make " + make_extras
+ else:
+ make_cmd = "make"
+ print("Running " + make_cmd)
+ runCommand(make_cmd)
print("Running make install")
runCommand("make install DESTDIR=%s"%(
CFLAGSFORSHARED=@CFLAGSFORSHARED@
# C flags used for building the interpreter object files
PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
+# Strict or non-strict aliasing flags used to compile dtoa.c, see above
+CFLAGS_ALIASING=@CFLAGS_ALIASING@
# Machine-dependent subdirectories
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
-PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
+PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
BUILD_GNU_TYPE= @build@
Modules/_io/stringio.o
##########################################################################
-# Grammar
-GRAMMAR_H= Include/graminit.h
-GRAMMAR_C= Python/graminit.c
-GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
-
LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
PGENOBJS= $(POBJS) $(PGOBJS)
##########################################################################
-# opcode.h generation
-OPCODE_H_DIR= $(srcdir)/Include
-OPCODE_H_SCRIPT= $(srcdir)/Tools/scripts/generate_opcode_h.py
-OPCODE_H= $(OPCODE_H_DIR)/opcode.h
-OPCODE_H_GEN= $(PYTHON_FOR_GEN) $(OPCODE_H_SCRIPT) $(srcdir)/Lib/opcode.py $(OPCODE_H)
-
-##########################################################################
-# AST
-AST_H_DIR= Include
-AST_H= $(AST_H_DIR)/Python-ast.h
-AST_C_DIR= Python
-AST_C= $(AST_C_DIR)/Python-ast.c
-AST_ASDL= $(srcdir)/Parser/Python.asdl
-
-ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
-# Note that a build now requires Python to exist before the build starts.
-# Use "hg touch" to fix up screwed up file mtimes in a checkout.
-ASDLGEN= $(PYTHON_FOR_GEN) $(srcdir)/Parser/asdl_c.py
-
-##########################################################################
# Python
-OPCODETARGETS_H= \
- Python/opcode_targets.h
-
-OPCODETARGETGEN= \
- $(srcdir)/Python/makeopcodetargets.py
-
-OPCODETARGETGEN_FILES= \
- $(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py
-
PYTHON_OBJS= \
Python/_warnings.o \
Python/Python-ast.o \
@echo "lcov report at $(COVERAGE_REPORT)/index.html"
@echo
-coverage-report:
+# Force regeneration of parser and importlib
+coverage-report: regen-grammar regen-importlib
: # force rebuilding of parser and importlib
@touch $(GRAMMAR_INPUT)
@touch $(srcdir)/Lib/importlib/_bootstrap.py
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-Python/importlib_external.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib Python/marshal.c
+.PHONY: regen-importlib
+regen-importlib: Programs/_freeze_importlib
+ # Regenerate Python/importlib_external.h
+ # from Lib/importlib/_bootstrap_external.py using _freeze_importlib
./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
-
-Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib Python/marshal.c
+ $(srcdir)/Lib/importlib/_bootstrap_external.py \
+ $(srcdir)/Python/importlib_external.h
+ # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py
+ # using _freeze_importlib
./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+ $(srcdir)/Lib/importlib/_bootstrap.py \
+ $(srcdir)/Python/importlib.h
+
+
+############################################################################
+# Regenerate all generated files
+regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
############################################################################
# Special rules for object files
$(IO_OBJS): $(IO_H)
-$(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
- @$(MKDIR_P) Include
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-$(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+.PHONY: regen-grammar
+regen-grammar: $(PGEN)
+ # Regenerate Include/graminit.h and Python/graminit.c
+ # from Grammar/Grammar using pgen
+ @$(MKDIR_P) Include
+ $(PGEN) $(srcdir)/Grammar/Grammar \
+ $(srcdir)/Include/graminit.h \
+ $(srcdir)/Python/graminit.c
+
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
$(srcdir)/Include/token.h \
$(srcdir)/Include/grammar.h
Parser/pgenmain.o: $(srcdir)/Include/parsetok.h
-$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
- $(MKDIR_P) $(AST_H_DIR)
- $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
-
-$(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES)
- $(MKDIR_P) $(AST_C_DIR)
- $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
-
-$(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
- $(OPCODE_H_GEN)
-
-Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+.PHONY=regen-ast
+regen-ast:
+ # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h
+ $(MKDIR_P) $(srcdir)/Include
+ $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \
+ -h $(srcdir)/Include \
+ $(srcdir)/Parser/Python.asdl
+ # Regenerate Python/Python-ast.c using Parser/asdl_c.py -c
+ $(MKDIR_P) $(srcdir)/Python
+ $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \
+ -c $(srcdir)/Python \
+ $(srcdir)/Parser/Python.asdl
+
+.PHONY: regen-opcode
+regen-opcode:
+ # Regenerate Include/opcode.h from Lib/opcode.py
+ # using Tools/scripts/generate_opcode_h.py
+ $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \
+ $(srcdir)/Lib/opcode.py \
+ $(srcdir)/Include/opcode.h
+
+Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
$(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-common.h
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
-$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
- $(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+.PHONY: regen-opcode-targets
+regen-opcode-targets:
+ # Regenerate Python/opcode_targets.h from Lib/opcode.py
+ # using Python/makeopcodetargets.py
+ $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \
+ $(srcdir)/Python/opcode_targets.h
-Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
+Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h
-Python/frozen.o: Python/importlib.h Python/importlib_external.h
+Python/frozen.o: $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib_external.h
# Generate DTrace probe macros, then rename them (PYTHON_ -> PyDTrace_) to
# follow our naming conventions. dtrace(1) uses the output filename to generate
# an include guard, so we can't use a pipeline to transform its output.
Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
+ $(MKDIR_P) Include
$(DTRACE) $(DFLAGS) -o $@ -h -s $<
: sed in-place edit with POSIX-only tools
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
Objects/typeobject.o: Objects/typeslots.inc
-Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
- $(PYTHON_FOR_GEN) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h Objects/typeslots.inc
+
+.PHONY: regen-typeslots
+regen-typeslots:
+ # Regenerate Objects/typeslots.inc from Include/typeslotsh
+ # using Objects/typeslots.py
+ $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \
+ < $(srcdir)/Include/typeslots.h \
+ $(srcdir)/Objects/typeslots.inc
############################################################################
# Header files
$(srcdir)/Include/node.h \
$(srcdir)/Include/object.h \
$(srcdir)/Include/objimpl.h \
- $(OPCODE_H) \
+ $(srcdir)/Include/opcode.h \
$(srcdir)/Include/osdefs.h \
$(srcdir)/Include/osmodule.h \
$(srcdir)/Include/patchlevel.h \
$(srcdir)/Include/weakrefobject.h \
pyconfig.h \
$(PARSER_HEADERS) \
- $(AST_H) \
+ $(srcdir)/Include/Python-ast.h \
$(DTRACE_HEADERS)
$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
# Run a basic set of regression tests.
# This excludes some tests that are particularly resource-intensive.
-test: all platform
+test: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(TESTOPTS)
# Run the full test suite twice - once without .pyc files, and once with.
# the bytecode read from a .pyc file had the bug, sometimes the directly
# generated bytecode. This is sometimes a very shy bug needing a lot of
# sample data.
-testall: all platform
+testall: @DEF_MAKE_RULE@ platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
# Run the test suite for both architectures in a Universal build on OSX.
# Must be run on an Intel box.
-testuniversal: all platform
+testuniversal: @DEF_MAKE_RULE@ platform
if [ `arch` != 'i386' ];then \
echo "This can only be used on OSX/i386" ;\
exit 1 ;\
test_multiprocessing_forkserver \
test_mailbox test_socket test_poll \
test_select test_zipfile test_concurrent_futures
-quicktest: all platform
+quicktest: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(QUICKTESTOPTS)
# pkgconfig directory
LIBPC= $(LIBDIR)/pkgconfig
-libainstall: all python-config
+libainstall: @DEF_MAKE_RULE@ python-config
@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
do \
if test ! -d $(DESTDIR)$$i; then \
.c.o:
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $<
+# bpo-30104: dtoa.c uses union to cast double to unsigned long[2]. clang 4.0
+# with -O2 or higher and strict aliasing miscompiles the ratio() function
+# causing rounding issues. Compile dtoa.c using -fno-strict-aliasing on clang.
+# https://bugs.llvm.org//show_bug.cgi?id=31928
+Python/dtoa.o: Python/dtoa.c
+ $(CC) -c $(PY_CORE_CFLAGS) $(CFLAGS_ALIASING) -o $@ $<
+
# Run reindent on the library
reindent:
./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
$(SHELL) config.status --recheck
$(SHELL) config.status
-# Rebuild the configure script from configure.ac; also rebuild pyconfig.h.in
+# Regenerate configure and pyconfig.h.in
+.PHONY: autoconf
autoconf:
+ # Regenerate the configure script from configure.ac using autoconf
(cd $(srcdir); autoconf -Wall)
+ # Regenerate pyconfig.h.in from configure.ac using autoheader
(cd $(srcdir); autoheader -Wall)
# Create a tags file for vi
etags Include/*.h; \
for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
-# This fixes up the mtimes of checked-in generated files, assuming that they
-# only *appear* to be outdated because of checkout order.
-# This is run while preparing a source release tarball, and can be run manually
-# to avoid bootstrap issues.
-touch:
- cd $(srcdir); \
- hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
-
# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes as well
pycremoval:
done
-rm -f core Makefile Makefile.pre config.status \
Modules/Setup Modules/Setup.local Modules/Setup.config \
- Modules/ld_so_aix Modules/python.exp Misc/python.pc
+ Modules/ld_so_aix Modules/python.exp Misc/python.pc \
+ Misc/python-config.sh
-rm -f python*-gdb.py
# Issue #28258: set LC_ALL to avoid issues with Estonian locale.
# Expansion is performed here by shell (spawned by make) itself before
-exec rm -f {} ';'
# Check for smelly exported symbols (not starting with Py/_Py)
-smelly: all
+smelly: @DEF_MAKE_RULE@
nm -p $(LIBRARY) | \
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
-o -print
# Perform some verification checks on any modified files.
-patchcheck: all
+patchcheck: @DEF_MAKE_RULE@
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
# Dependencies
.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
-.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
+.PHONY: frameworkaltinstallunixtools recheck clean clobber distclean
.PHONY: smelly funny patchcheck touch altmaninstall commoninstall
.PHONY: gdbhooks
Andy Bensky
Bennett Benson
Ezra Berch
+Stuart Berg
Michel Van den Bergh
Julian Berman
Brice Berna
Greg Copeland
Ian Cordasco
Aldo Cortesi
+Mircea Cosbuc
David Costanzo
Scott Cotton
Greg Couch
Kim Gräsman
Nathaniel Gray
Eddy De Greef
+Duane Griffin
Grant Griffin
Andrea Griffini
Duncan Grisby
Daniel Andrade Groppe
Dag Gruneau
Filip Gruszczyński
+Andrii Grynenko
+Grzegorz Grzywacz
Thomas Guettler
Yuyang Guo
Anuj Gupta
Vivek Khera
Dhiru Kholia
Akshit Khurana
+Sanyam Khurana
Mads Kiilerich
Jason Killen
Jan Kim
Taek Joo Kim
Sam Kimbrel
+Tomohiko Kinebuchi
James King
W. Trevor King
Paul Kippes
Doug Marien
Sven Marnach
Alex Martelli
+Dennis Mårtensson
Anthony Martin
Owen Martin
Sidney San Martín
Matti Mäki
Jörg Müller
Kaushik N
+Dong-hee Na
Dale Nagata
John Nagle
Takahiro Nakayama
Anthon van der Neut
George Neville-Neil
Hieu Nguyen
+Nam Nguyen
Johannes Nicolai
Samuel Nicolary
Jonathan Niehof
Pascal Oberndoerfer
Jeffrey Ollie
Adam Olsen
+Bryan Olson
Grant Olson
Koray Oner
Piet van Oostrum
Douglas Orr
William Orr
Michele Orrù
+Tomáš Orsava
Oleg Oshmyan
+Denis Osipov
Denis S. Otkidach
Peter Otten
Michael Otteneder
Jim St. Pierre
Dan Pierson
Martijn Pieters
+Antoine Pietri
Anand B. Pillai
François Pinard
Tom Pinckney
Barry Scott
Steven Scott
Nick Seidenman
+Michael Seifert
Žiga Seilnacht
Yury Selivanov
Fred Sells
Michael Stone
Serhiy Storchaka
Ken Stox
+Charalampos Stratakis
Dan Stromberg
Donald Stufft
Daniel Stutzbach
Gerald S. Williams
Jason Williams
John Williams
+Roy Williams
Sue Williams
Carol Willing
Steven Willis
Mike Zarnstorff
Yury V. Zaytsev
Siebren van der Zee
+Christophe Zeitouny
Nickolai Zeldovich
Yuxiao Zeng
Uwe Zessin
Python News
+++++++++++
+What's New in Python 3.6.2?
+===========================
+
+*Release date: 2017-07-17*
+
+- No changes since release candidate 2
+
+
+What's New in Python 3.6.2 release candidate 2?
+===============================================
+
+*Release date: 2017-07-07*
+
+Core and Builtins
+-----------------
+
+Library
+-------
+
+- [Security] bpo-30730: Prevent environment variables injection in subprocess on
+ Windows. Prevent passing other environment variables and command arguments.
+
+- [Security] bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes
+ of multiple security vulnerabilities including: CVE-2017-9233 (External
+ entity infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
+ CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718)
+ and CVE-2012-0876 (Counter hash flooding with SipHash).
+ Note: the CVE-2016-5300 (Use os-specific entropy sources like getrandom)
+ doesn't impact Python, since Python already gets entropy from the OS to set
+ the expat secret using ``XML_SetHashSalt()``.
+
+- [Security] bpo-30500: Fix urllib.parse.splithost() to correctly parse
+ fragments. For example, ``splithost('//127.0.0.1#@evil.com/')`` now
+ correctly returns the ``127.0.0.1`` host, instead of treating ``@evil.com``
+ as the host in an authentification (``login@host``).
+
+
+What's New in Python 3.6.2 release candidate 1?
+===============================================
+
+*Release date: 2017-06-17*
+
+Core and Builtins
+-----------------
+
+- bpo-30682: Removed a too-strict assertion that failed for certain f-strings,
+ such as eval("f'\\\n'") and eval("f'\\\r'").
+
+- bpo-30604: Move co_extra_freefuncs to not be per-thread to avoid crashes
+
+- bpo-29104: Fixed parsing backslashes in f-strings.
+
+- bpo-27945: Fixed various segfaults with dict when input collections are
+ mutated during searching, inserting or comparing. Based on patches by
+ Duane Griffin and Tim Mitchell.
+
+- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
+ non-interned attribute names. Based on patch by Eryk Sun.
+
+- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in
+ the middle of resuming a chain of nested 'yield from' or 'await'
+ calls, it's now correctly delivered to the innermost frame.
+
+- bpo-12414: sys.getsizeof() on a code object now returns the sizes
+ which includes the code struct and sizes of objects which it references.
+ Patch by Dong-hee Na.
+
+- bpo-29949: Fix memory usage regression of set and frozenset object.
+
+- bpo-29935: Fixed error messages in the index() method of tuple, list and deque
+ when pass indices of wrong type.
+
+- bpo-29859: Show correct error messages when any of the pthread_* calls in
+ thread_pthread.h fails.
+
+- bpo-28876: ``bool(range)`` works even if ``len(range)``
+ raises :exc:`OverflowError`.
+
+- bpo-29600: Fix wrapping coroutine return values in StopIteration.
+
+- bpo-28856: Fix an oversight that %b format for bytes should support objects
+ follow the buffer protocol.
+
+- bpo-29714: Fix a regression that bytes format may fail when containing zero
+ bytes inside.
+
+- bpo-29478: If max_line_length=None is specified while using the Compat32 policy,
+ it is no longer ignored. Patch by Mircea Cosbuc.
+
+Library
+-------
+
+- bpo-30038: Fix race condition between signal delivery and wakeup file
+ descriptor. Patch by Nathaniel Smith.
+
+- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings.
+
+- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference
+ cycle to not keep objects alive longer than expected.
+
+- bpo-30149: inspect.signature() now supports callables with
+ variable-argument parameters wrapped with partialmethod.
+ Patch by Dong-hee Na.
+
+- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects.
+ Patch by Sanjay Sundaresan.
+
+- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a
+ bytes instance with misplaced inline modifier. Patch by Roy Williams.
+
+- [Security] bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes
+ of CVE-2016-0718 and CVE-2016-4472. See
+ https://sourceforge.net/p/expat/bugs/537/ for more information.
+
+- bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
+
+- bpo-28994: The traceback no longer displayed for SystemExit raised in
+ a callback registered by atexit.
+
+- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was
+ called.
+
+- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add
+ support for ContextManager on all versions. Original PRs by Jelle Zijlstra
+ and Ivan Levkivskyi
+
+- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
+ implementation. Patch by Michaël Sghaïer.
+
+- bpo-29743: Closing transport during handshake process leaks open socket.
+ Patch by Nikolay Kim
+
+- bpo-27585: Fix waiter cancellation in asyncio.Lock.
+ Patch by Mathieu Sornay.
+
+- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore EINVAL
+ on stdin.write() if the child process is still running but closed the pipe.
+
+- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch
+ by Nate Soares.
+
+- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract base
+ classes to use keyword parameters in __init_subclass__. Patch by Nate Soares.
+
+- bpo-30557: faulthandler now correctly filters and displays exception codes
+ on Windows
+
+- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
+ handle IPv6 addresses.
+
+- bpo-29960: Preserve generator state when _random.Random.setstate()
+ raises an exception. Patch by Bryan Olson.
+
+- bpo-30414: multiprocessing.Queue._feed background running
+ thread do not break from main loop on exception.
+
+- bpo-30003: Fix handling escape characters in HZ codec. Based on patch
+ by Ma Lin.
+
+- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under
+ *spawn* and *forkserver* start methods.
+
+- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error
+ (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted.
+ This error occurs sometimes on SSL connections.
+
+- bpo-30375: Warnings emitted when compile a regular expression now always
+ point to the line in the user code. Previously they could point into inners
+ of the re module if emitted from inside of groups or conditionals.
+
+- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is
+ running coroutine and the coroutine returned without any more ``await``.
+
+- bpo-30266: contextlib.AbstractContextManager now supports anti-registration
+ by setting __enter__ = None or __exit__ = None, following the pattern
+ introduced in bpo-25958. Patch by Jelle Zijlstra.
+
+- bpo-30298: Weaken the condition of deprecation warnings for inline modifiers.
+ Now allowed several subsequential inline modifiers at the start of the
+ pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and comments
+ now are allowed before and between inline modifiers (e.g.
+ ``'(?x) (?i) (?s)...'``).
+
+- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma Lin.
+
+- Revert bpo-26293 for zipfile breakage. See also bpo-29094.
+
+- bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
+ Misusing them could cause memory leaks or crashes. Now scanner and encoder
+ objects are completely initialized in the __new__ methods.
+
+- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process
+ when Ctrl-C is received.
+
+- bpo-28556: Various updates to typing module: add typing.NoReturn type, use
+ WrapperDescriptorType, minor bug-fixes. Original PRs by
+ Jim Fasarakis-Hilliard and Ivan Levkivskyi.
+
+- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
+
+- bpo-30070: Fixed leaks and crashes in errors handling in the parser module.
+
+- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when
+ readline() or __next__() respectively return non-sizeable object.
+ Fixed possible other errors caused by not checking results of PyObject_Size(),
+ PySequence_Size(), or PyMapping_Size().
+
+- bpo-30017: Allowed calling the close() method of the zip entry writer object
+ multiple times. Writing to a closed writer now always produces a ValueError.
+
+- bpo-30068: _io._IOBase.readlines will check if it's closed first when
+ hint is present.
+
+- bpo-29694: Fixed race condition in pathlib mkdir with flags
+ parents=True. Patch by Armin Rigo.
+
+- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in
+ contextlib.contextmanager. Patch by Siddharth Velankar.
+
+- bpo-29998: Pickling and copying ImportError now preserves name and path
+ attributes.
+
+- bpo-29953: Fixed memory leaks in the replace() method of datetime and time
+ objects when pass out of bound fold argument.
+
+- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering
+ long runs of empty iterables.
+
+- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions
+ and wrong types.
+
+- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an
+ exception at the very first of an iterable may swallow the exception or
+ make the program hang. Patch by Davin Potts and Xiang Zhang.
+
+- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True)
+ when the OS gives priority to errors such as EACCES over EEXIST.
+
+- bpo-29861: Release references to tasks, their arguments and their results
+ as soon as they are finished in multiprocessing.Pool.
+
+- bpo-29884: faulthandler: Restore the old sigaltstack during teardown.
+ Patch by Christophe Zeitouny.
+
+- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects.
+
+- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords
+ are not strings. Patch by Michael Seifert.
+
+- bpo-29742: get_extra_info() raises exception if get called on closed ssl transport.
+ Patch by Nikolay Kim.
+
+- bpo-8256: Fixed possible failing or crashing input() if attributes "encoding"
+ or "errors" of sys.stdin or sys.stdout are not set or are not strings.
+
+- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting big
+ intables (objects that have __int__) as elements. Patch by Oren Milman.
+
+- bpo-28231: The zipfile module now accepts path-like objects for external
+ paths.
+
+- bpo-26915: index() and count() methods of collections.abc.Sequence now
+ check identity before checking equality when do comparisons.
+
+- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other
+ exception) to exception(s) raised in the dispatched methods.
+ Patch by Petr Motejlek.
+
+- bpo-30177: path.resolve(strict=False) no longer cuts the path after the first
+ element not present in the filesystem. Patch by Antoine Pietri.
+
+IDLE
+----
+
+- bpo-15786: Fix several problems with IDLE's autocompletion box.
+ The following should now work: clicking on selection box items;
+ using the scrollbar; selecting an item by hitting Return.
+ Hangs on MacOSX should no longer happen. Patch by Louie Lu.
+
+- bpo-25514: Add doc subsubsection about IDLE failure to start.
+ Popup no-connection message directs users to this section.
+
+- bpo-30642: Fix reference leaks in IDLE tests.
+ Patches by Louie Lu and Terry Jan Reedy.
+
+- bpo-30495: Add docstrings for textview.py and use PEP8 names.
+ Patches by Cheryl Sabella and Terry Jan Reedy.
+
+- bpo-30290: Help-about: use pep8 names and add tests.
+ Increase coverage to 100%.
+ Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy.
+
+- bpo-30303: Add _utest option to textview; add new tests.
+ Increase coverage to 100%.
+ Patches by Louie Lu and Terry Jan Reedy.
+
+C API
+-----
+
+- Issue #27867: Function PySlice_GetIndicesEx() no longer replaced with a macro
+ if Py_LIMITED_API is not set.
+
+
+Build
+-----
+
+- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable
+ C ``assert()`` checks. Defaults to off. ``--with-pydebug`` implies
+ ``--with-assertions``.
+
+- bpo-28787: Fix out-of-tree builds of Python when configured with
+ ``--with--dtrace``.
+
+- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
+ ``make install`` and some other make targets when configured with
+ ``--enable-optimizations``.
+
+- bpo-23404: Don't regenerate generated files based on file modification time
+ anymore: the action is now explicit. Replace ``make touch`` with
+ ``make regen-all``.
+
+- bpo-29643: Fix ``--enable-optimization`` didn't work.
+
+Documentation
+-------------
+
+- bpo-30176: Add missing attribute related constants in curses documentation.
+
+- Issue #30052: the link targets for :func:`bytes` and
+ :func:`bytearray` are now their respective type definitions, rather
+ than the corresponding builtin function entries. Use :ref:`bytes <func-bytes>`
+ and :ref:`bytearray <func-bytearray>` to reference the latter.
+
+ In order to ensure this and future cross-reference updates are applied
+ automatically, the daily documentation builds now disable the default
+ output caching features in Sphinx.
+
+- bpo-26985: Add missing info of code object in inspect documentation.
+
+Tools/Demos
+-----------
+
+- Issue #29367: python-gdb.py now supports also ``method-wrapper``
+ (``wrapperobject``) objects.
+
+Tests
+-----
+
+- bpo-30357: test_thread: setUp() now uses support.threading_setup() and
+ support.threading_cleanup() to wait until threads complete to avoid
+ random side effects on following tests. Initial patch written by Grzegorz
+ Grzywacz.
+
+- bpo-30197: Enhanced functions swap_attr() and swap_item() in the
+ test.support module. They now work when delete replaced attribute or item
+ inside the with statement. The old value of the attribute or item (or None
+ if it doesn't exist) now will be assigned to the target of the "as" clause,
+ if there is one.
+
+Windows
+-------
+
+- bpo-30687: Locate msbuild.exe on Windows when building rather than
+ vcvarsall.bat
+
+- bpo-30450: The build process on Windows no longer depends on Subversion,
+ instead pulling external code from GitHub via a Python script. If Python 3.6
+ is not found on the system (via ``py -3.6``), NuGet is used to download a
+ copy of 32-bit Python.
+
+
What's New in Python 3.6.1?
===========================
- Issue #28598: Support __rmod__ for subclasses of str being called before
str.__mod__. Patch by Martijn Pieters.
-- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
-
- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX.
Patch by Matthieu Dartiailh.
- Issue #28427: old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
-- Issue 28923: Remove editor artifacts from Tix.py.
+- Issue #28923: Remove editor artifacts from Tix.py.
- Issue #29055: Neaten-up empty population error on random.choice()
by suppressing the upstream exception.
now when the grp module cannot be imported, as for example on Android
platforms.
+IDLE
+----
+
+- Issue #29071: IDLE colors f-string prefixes (but not invalid ur prefixes).
+
+- Issue #28572: Add 10% to coverage of IDLE's test_configdialog.
+ Update and augment description of the configuration system.
+
Windows
-------
non-None value is passed to it.send(val).
- Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix
- for readability (was "`").
+ for readability.
- Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
a workaround to Tix library bug.
alpha releases, where backslashes are allowed anywhere in an
f-string. Also, require that expressions inside f-strings be
enclosed within literal braces, and not escapes like
- f'\x7b"hi"\x7d'.
+ ``f'\x7b"hi"\x7d'``.
- Issue #28046: Remove platform-specific directories from sys.path.
- Issue #24277: The new email API is no longer provisional, and the docs
have been reorganized and rewritten to emphasize the new API.
-- Issue #22450: urllib now includes an "Accept: */*" header among the
+- Issue #22450: urllib now includes an ``Accept: */*`` header among the
default headers. This makes the results of REST API requests more
consistent and predictable especially when proxy servers are involved.
characters, not on arbitrary unicode line breaks. This also fixes a bug in
HTTP header parsing.
-- Issue 27331: The email.mime classes now all accept an optional policy keyword.
+- Issue #27331: The email.mime classes now all accept an optional policy keyword.
-- Issue 27988: Fix email iter_attachments incorrect mutation of payload list.
+- Issue #27988: Fix email iter_attachments incorrect mutation of payload list.
- Issue #16113: Add SHA-3 and SHAKE support to hashlib module.
in ``def f(): 1.0``.
- Issue #4806: Avoid masking the original TypeError exception when using star
- (*) unpacking in function calls. Based on patch by Hagen Fürstenau and
+ (``*``) unpacking in function calls. Based on patch by Hagen Fürstenau and
Daniel Urban.
- Issue #26146: Add a new kind of AST node: ``ast.Constant``. It can be used
- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
option if it is safe to do so.
-- Issue #26012: Don't traverse into symlinks for ** pattern in
+- Issue #26012: Don't traverse into symlinks for ``**`` pattern in
pathlib.Path.[r]glob().
- Issue #24120: Ignore PermissionError when traversing a tree with
- Issue #25584: Added "escape" to the __all__ list in the glob module.
-- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
+- Issue #25584: Fixed recursive glob() with patterns starting with ``**``.
- Issue #25446: Fix regression in smtplib's AUTH LOGIN support.
- Issue #28427: old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
-- Issue 28923: Remove editor artifacts from Tix.py.
+- Issue #28923: Remove editor artifacts from Tix.py.
- Issue #28871: Fixed a crash when deallocate deep ElementTree.
- Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp().
-- Issue #19003:m email.generator now replaces only \r and/or \n line
+- Issue #19003:m email.generator now replaces only ``\r`` and/or ``\n`` line
endings, per the RFC, instead of all unicode line endings.
- Issue #28019: itertools.count() no longer rounds non-integer step in range
- Issue #27445: Don't pass str(_charset) to MIMEText.set_payload().
Patch by Claude Paroz.
-- Issue #22450: urllib now includes an "Accept: */*" header among the
+- Issue #22450: urllib now includes an ``Accept: */*`` header among the
default headers. This makes the results of REST API requests more
consistent and predictable especially when proxy servers are involved.
characters, not on arbitrary unicode line breaks. This also fixes a bug in
HTTP header parsing.
-- Issue 27988: Fix email iter_attachments incorrect mutation of payload list.
+- Issue #27988: Fix email iter_attachments incorrect mutation of payload list.
- Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name
fields in X.509 certs.
cookie names.
- Issue #4806: Avoid masking the original TypeError exception when using star
- (*) unpacking in function calls. Based on patch by Hagen Fürstenau and
+ (``*``) unpacking in function calls. Based on patch by Hagen Fürstenau and
Daniel Urban.
- Issue #27138: Fix the doc comment for FileFinder.find_spec().
- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
option if it is safe to do so.
-- Issue #26012: Don't traverse into symlinks for ** pattern in
+- Issue #26012: Don't traverse into symlinks for ``**`` pattern in
pathlib.Path.[r]glob().
- Issue #24120: Ignore PermissionError when traversing a tree with
- Issue #25584: Added "escape" to the __all__ list in the glob module.
-- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
+- Issue #25584: Fixed recursive glob() with patterns starting with ``**``.
- Issue #25446: Fix regression in smtplib's AUTH LOGIN support.
- Issue #23521: Corrected pure python implementation of timedelta division.
- * Eliminated OverflowError from timedelta * float for some floats;
+ * Eliminated OverflowError from ``timedelta * float`` for some floats;
* Corrected rounding in timedlta true division.
- Issue #21619: Popen objects no longer leave a zombie after exit in the with
character instead of truncating it. Based on patch by Victor Stinner.
- Issue #13968: The glob module now supports recursive search in
- subdirectories using the "**" pattern.
+ subdirectories using the ``**`` pattern.
- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.
static PyObject *
future_cancel(FutureObj *fut)
{
+ fut->fut_log_tb = 0;
+
if (fut->fut_state != STATE_PENDING) {
Py_RETURN_FALSE;
}
}
}
+static int
+FutureObj_set_log_traceback(FutureObj *fut, PyObject *val)
+{
+ int is_true = PyObject_IsTrue(val);
+ if (is_true < 0) {
+ return -1;
+ }
+ fut->fut_log_tb = is_true;
+ return 0;
+}
+
static PyObject *
FutureObj_get_loop(FutureObj *fut)
{
{"_callbacks", (getter)FutureObj_get_callbacks, NULL, NULL}, \
{"_result", (getter)FutureObj_get_result, NULL, NULL}, \
{"_exception", (getter)FutureObj_get_exception, NULL, NULL}, \
- {"_log_traceback", (getter)FutureObj_get_log_traceback, NULL, NULL}, \
+ {"_log_traceback", (getter)FutureObj_get_log_traceback, \
+ (setter)FutureObj_set_log_traceback, NULL}, \
{"_source_traceback", (getter)FutureObj_get_source_traceback, NULL, NULL},
static PyGetSetDef FutureType_getsetlist[] = {
_asyncio_Task_cancel_impl(TaskObj *self)
/*[clinic end generated code: output=6bfc0479da9d5757 input=13f9bf496695cb52]*/
{
+ self->task_log_tb = 0;
+
if (self->task_state != STATE_PENDING) {
Py_RETURN_FALSE;
}
if (_PyGen_FetchStopIterationValue(&o) == 0) {
/* The error is StopIteration and that means that
the underlying coroutine has resolved */
+ if (task->task_must_cancel) {
+ // Task is cancelled right before coro stops.
+ Py_DECREF(o);
+ task->task_must_cancel = 0;
+ et = asyncio_CancelledError;
+ Py_INCREF(et);
+ ev = NULL;
+ tb = NULL;
+ goto set_exception;
+ }
PyObject *res = future_set_result((FutureObj*)task, o);
Py_DECREF(o);
if (res == NULL) {
/* Some other exception; pop it and call Task.set_exception() */
PyErr_Fetch(&et, &ev, &tb);
+
+set_exception:
assert(et);
if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject *) et)) {
PyErr_NormalizeException(&et, &ev, &tb);
int cmp;
if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
- _PyEval_SliceIndex, &start,
- _PyEval_SliceIndex, &stop))
+ _PyEval_SliceIndexNotNone, &start,
+ _PyEval_SliceIndexNotNone, &stop))
return NULL;
if (start < 0) {
start += Py_SIZE(deque);
PyObject *np;
Py_ssize_t start, stop, step, slicelen, cur, i;
- if (PySlice_GetIndicesEx(item,
- self->b_length, &start, &stop,
- &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelen = PySlice_AdjustIndices(self->b_length, &start, &stop, step);
stgdict = PyObject_stgdict((PyObject *)self);
assert(stgdict); /* Cannot be NULL for array object instances */
else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelen, otherlen, i, cur;
- if (PySlice_GetIndicesEx(item,
- self->b_length, &start, &stop,
- &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return -1;
}
+ slicelen = PySlice_AdjustIndices(self->b_length, &start, &stop, step);
if ((step < 0 && start < stop) ||
(step > 0 && start > stop))
stop = start;
EXPORT(void)
_testfunc_large_struct_update_value(Test in)
{
- in.first = 0x0badf00d;
- in.second = 0x0badf00d;
- in.third = 0x0badf00d;
+ ((volatile Test *)&in)->first = 0x0badf00d;
+ ((volatile Test *)&in)->second = 0x0badf00d;
+ ((volatile Test *)&in)->third = 0x0badf00d;
}
EXPORT(void)testfunc_array(int values[4])
PyTypeObject PyCursesWindow_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "_curses.curses window", /*tp_name*/
+ "_curses.window", /*tp_name*/
sizeof(PyCursesWindowObject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
time_kws,
&hh, &mm, &ss, &us, &tzinfo, &fold))
return NULL;
+ if (fold != 0 && fold != 1) {
+ PyErr_SetString(PyExc_ValueError,
+ "fold must be either 0 or 1");
+ return NULL;
+ }
tuple = Py_BuildValue("iiiiO", hh, mm, ss, us, tzinfo);
if (tuple == NULL)
return NULL;
clone = time_new(Py_TYPE(self), tuple, NULL);
if (clone != NULL) {
- if (fold != 0 && fold != 1) {
- PyErr_SetString(PyExc_ValueError,
- "fold must be either 0 or 1");
- return NULL;
- }
TIME_SET_FOLD(clone, fold);
}
Py_DECREF(tuple);
&y, &m, &d, &hh, &mm, &ss, &us,
&tzinfo, &fold))
return NULL;
+ if (fold != 0 && fold != 1) {
+ PyErr_SetString(PyExc_ValueError,
+ "fold must be either 0 or 1");
+ return NULL;
+ }
tuple = Py_BuildValue("iiiiiiiO", y, m, d, hh, mm, ss, us, tzinfo);
if (tuple == NULL)
return NULL;
clone = datetime_new(Py_TYPE(self), tuple, NULL);
-
if (clone != NULL) {
- if (fold != 0 && fold != 1) {
- PyErr_SetString(PyExc_ValueError,
- "fold must be either 0 or 1");
- return NULL;
- }
DATE_SET_FOLD(clone, fold);
}
Py_DECREF(tuple);
LOCAL(PyObject*)
list_join(PyObject* list)
{
- /* join list elements (destroying the list in the process) */
+ /* join list elements */
PyObject* joiner;
PyObject* result;
return NULL;
result = PyUnicode_Join(joiner, list);
Py_DECREF(joiner);
- if (result)
- Py_DECREF(list);
return result;
}
{
/* return borrowed reference to text attribute */
- PyObject* res = self->text;
+ PyObject *res = self->text;
if (JOIN_GET(res)) {
res = JOIN_OBJ(res);
if (PyList_CheckExact(res)) {
- res = list_join(res);
- if (!res)
+ PyObject *tmp = list_join(res);
+ if (!tmp)
return NULL;
- self->text = res;
+ self->text = tmp;
+ Py_DECREF(res);
+ res = tmp;
}
}
{
/* return borrowed reference to text attribute */
- PyObject* res = self->tail;
+ PyObject *res = self->tail;
if (JOIN_GET(res)) {
res = JOIN_OBJ(res);
if (PyList_CheckExact(res)) {
- res = list_join(res);
- if (!res)
+ PyObject *tmp = list_join(res);
+ if (!tmp)
return NULL;
- self->tail = res;
+ self->tail = tmp;
+ Py_DECREF(res);
+ res = tmp;
}
}
if (!self->extra)
return PyList_New(0);
- if (PySlice_GetIndicesEx(item,
- self->extra->length,
- &start, &stop, &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelen = PySlice_AdjustIndices(self->extra->length, &start, &stop,
+ step);
if (slicelen <= 0)
return PyList_New(0);
return -1;
}
- if (PySlice_GetIndicesEx(item,
- self->extra->length,
- &start, &stop, &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return -1;
}
+ slicelen = PySlice_AdjustIndices(self->extra->length, &start, &stop,
+ step);
if (value == NULL) {
/* Delete slice */
continue;
}
+ if (!PyObject_TypeCheck(extra->children[child_index], &Element_Type)) {
+ PyErr_Format(PyExc_AttributeError,
+ "'%.100s' object has no attribute 'iter'",
+ Py_TYPE(extra->children[child_index])->tp_name);
+ return NULL;
+ }
elem = (ElementObject *)extra->children[child_index];
item->child_index++;
Py_INCREF(elem);
/* helpers for handling of arbitrary element-like objects */
static int
-treebuilder_set_element_text_or_tail(PyObject *element, PyObject *data,
+treebuilder_set_element_text_or_tail(PyObject *element, PyObject **data,
PyObject **dest, _Py_Identifier *name)
{
if (Element_CheckExact(element)) {
- Py_DECREF(JOIN_OBJ(*dest));
- *dest = JOIN_SET(data, PyList_CheckExact(data));
+ PyObject *tmp = JOIN_OBJ(*dest);
+ *dest = JOIN_SET(*data, PyList_CheckExact(*data));
+ *data = NULL;
+ Py_DECREF(tmp);
return 0;
}
else {
- PyObject *joined = list_join(data);
+ PyObject *joined = list_join(*data);
int r;
if (joined == NULL)
return -1;
r = _PyObject_SetAttrId(element, name, joined);
Py_DECREF(joined);
- return r;
+ if (r < 0)
+ return -1;
+ Py_CLEAR(*data);
+ return 0;
}
}
-/* These two functions steal a reference to data */
-static int
-treebuilder_set_element_text(PyObject *element, PyObject *data)
+LOCAL(int)
+treebuilder_flush_data(TreeBuilderObject* self)
{
- _Py_IDENTIFIER(text);
- return treebuilder_set_element_text_or_tail(
- element, data, &((ElementObject *) element)->text, &PyId_text);
-}
+ PyObject *element = self->last;
-static int
-treebuilder_set_element_tail(PyObject *element, PyObject *data)
-{
- _Py_IDENTIFIER(tail);
- return treebuilder_set_element_text_or_tail(
- element, data, &((ElementObject *) element)->tail, &PyId_tail);
+ if (!self->data) {
+ return 0;
+ }
+
+ if (self->this == element) {
+ _Py_IDENTIFIER(text);
+ return treebuilder_set_element_text_or_tail(
+ element, &self->data,
+ &((ElementObject *) element)->text, &PyId_text);
+ }
+ else {
+ _Py_IDENTIFIER(tail);
+ return treebuilder_set_element_text_or_tail(
+ element, &self->data,
+ &((ElementObject *) element)->tail, &PyId_tail);
+ }
}
static int
PyObject* this;
elementtreestate *st = ET_STATE_GLOBAL;
- if (self->data) {
- if (self->this == self->last) {
- if (treebuilder_set_element_text(self->last, self->data))
- return NULL;
- }
- else {
- if (treebuilder_set_element_tail(self->last, self->data))
- return NULL;
- }
- self->data = NULL;
+ if (treebuilder_flush_data(self) < 0) {
+ return NULL;
}
if (!self->element_factory || self->element_factory == Py_None) {
{
PyObject* item;
- if (self->data) {
- if (self->this == self->last) {
- if (treebuilder_set_element_text(self->last, self->data))
- return NULL;
- } else {
- if (treebuilder_set_element_tail(self->last, self->data))
- return NULL;
- }
- self->data = NULL;
+ if (treebuilder_flush_data(self) < 0) {
+ return NULL;
}
if (self->index == 0) {
/* Pack keyword arguments */
assert (PyDict_Check(pto->kw));
for (i = 0; PyDict_Next(pto->kw, &i, &key, &value);) {
- Py_SETREF(arglist, PyUnicode_FromFormat("%U, %U=%R", arglist,
+ /* Prevent key.__str__ from deleting the value. */
+ Py_INCREF(value);
+ Py_SETREF(arglist, PyUnicode_FromFormat("%U, %S=%R", arglist,
key, value));
+ Py_DECREF(value);
if (arglist == NULL)
goto done;
}
res = PyUnicode_FromFormat("<%s>", Py_TYPE(self)->tp_name);
}
else {
- res = PyUnicode_FromFormat("<%s name=%R>",
- Py_TYPE(self)->tp_name, nameobj);
+ int status = Py_ReprEnter((PyObject *)self);
+ res = NULL;
+ if (status == 0) {
+ res = PyUnicode_FromFormat("<%s name=%R>",
+ Py_TYPE(self)->tp_name, nameobj);
+ Py_ReprLeave((PyObject *)self);
+ }
+ else if (status > 0) {
+ PyErr_Format(PyExc_RuntimeError,
+ "reentrant call inside %s.__repr__",
+ Py_TYPE(self)->tp_name);
+ }
Py_DECREF(nameobj);
}
return res;
self->fd, mode_string(self), self->closefd ? "True" : "False");
}
else {
- res = PyUnicode_FromFormat(
- "<_io.FileIO name=%R mode='%s' closefd=%s>",
- nameobj, mode_string(self), self->closefd ? "True" : "False");
+ int status = Py_ReprEnter((PyObject *)self);
+ res = NULL;
+ if (status == 0) {
+ res = PyUnicode_FromFormat(
+ "<_io.FileIO name=%R mode='%s' closefd=%s>",
+ nameobj, mode_string(self), self->closefd ? "True" : "False");
+ Py_ReprLeave((PyObject *)self);
+ }
+ else if (status > 0) {
+ PyErr_Format(PyExc_RuntimeError,
+ "reentrant call inside %s.__repr__",
+ Py_TYPE(self)->tp_name);
+ }
Py_DECREF(nameobj);
}
return res;
if (line == NULL)
return NULL;
- if (PyObject_Size(line) == 0) {
+ if (PyObject_Size(line) <= 0) {
+ /* Error or empty */
Py_DECREF(line);
return NULL;
}
/*[clinic end generated code: output=2f50421677fa3dea input=1961c4a95e96e661]*/
{
Py_ssize_t length = 0;
- PyObject *result;
+ PyObject *result, *it = NULL;
result = PyList_New(0);
if (result == NULL)
PyObject *ret = _PyObject_CallMethodId(result, &PyId_extend, "O", self);
if (ret == NULL) {
- Py_DECREF(result);
- return NULL;
+ goto error;
}
Py_DECREF(ret);
return result;
}
+ it = PyObject_GetIter(self);
+ if (it == NULL) {
+ goto error;
+ }
+
while (1) {
- PyObject *line = PyIter_Next(self);
+ Py_ssize_t line_length;
+ PyObject *line = PyIter_Next(it);
if (line == NULL) {
if (PyErr_Occurred()) {
- Py_DECREF(result);
- return NULL;
+ goto error;
}
else
break; /* StopIteration raised */
if (PyList_Append(result, line) < 0) {
Py_DECREF(line);
- Py_DECREF(result);
- return NULL;
+ goto error;
}
- length += PyObject_Size(line);
+ line_length = PyObject_Size(line);
Py_DECREF(line);
-
- if (length > hint)
+ if (line_length < 0) {
+ goto error;
+ }
+ if (line_length > hint - length)
break;
+ length += line_length;
}
+
+ Py_DECREF(it);
return result;
+
+ error:
+ Py_XDECREF(it);
+ Py_DECREF(result);
+ return NULL;
}
/*[clinic input]
textiowrapper_repr(textio *self)
{
PyObject *nameobj, *modeobj, *res, *s;
+ int status;
CHECK_INITIALIZED(self);
if (res == NULL)
return NULL;
+ status = Py_ReprEnter((PyObject *)self);
+ if (status != 0) {
+ if (status > 0) {
+ PyErr_Format(PyExc_RuntimeError,
+ "reentrant call inside %s.__repr__",
+ Py_TYPE(self)->tp_name);
+ }
+ goto error;
+ }
nameobj = _PyObject_GetAttrId((PyObject *) self, &PyId_name);
if (nameobj == NULL) {
if (PyErr_ExceptionMatches(PyExc_Exception))
goto error;
PyUnicode_AppendAndDel(&res, s);
if (res == NULL)
- return NULL;
+ goto error;
}
modeobj = _PyObject_GetAttrId((PyObject *) self, &PyId_mode);
if (modeobj == NULL) {
goto error;
PyUnicode_AppendAndDel(&res, s);
if (res == NULL)
- return NULL;
+ goto error;
}
s = PyUnicode_FromFormat("%U encoding=%R>",
res, self->encoding);
Py_DECREF(res);
+ if (status == 0) {
+ Py_ReprLeave((PyObject *)self);
+ }
return s;
-error:
+
+ error:
Py_XDECREF(res);
+ if (status == 0) {
+ Py_ReprLeave((PyObject *)self);
+ }
return NULL;
}
DWORD length;
wchar_t name_buf[MAX_PATH], *pname_buf = name_buf;
-
+
length = GetFullPathNameW(decoded_wstr, MAX_PATH, pname_buf, NULL);
if (length > MAX_PATH) {
pname_buf = PyMem_New(wchar_t, length);
self->fd = fd;
if (fd < 0) {
- PyObject *decodedname = Py_None;
- Py_INCREF(decodedname);
+ PyObject *decodedname;
int d = PyUnicode_FSDecoder(nameobj, (void*)&decodedname);
if (!d)
wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, wbuf, wlen);
if (wlen) {
res = WriteConsoleW(self->handle, wbuf, wlen, &n, NULL);
- if (n < wlen) {
+ if (res && n < wlen) {
/* Wrote fewer characters than expected, which means our
* len value may be wrong. So recalculate it from the
* characters that were written. As this could potentially
_build_rval_index_tuple(PyObject *rval, Py_ssize_t idx);
static PyObject *
scanner_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
-static int
-scanner_init(PyObject *self, PyObject *args, PyObject *kwds);
static void
scanner_dealloc(PyObject *self);
static int
scanner_clear(PyObject *self);
static PyObject *
encoder_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
-static int
-encoder_init(PyObject *self, PyObject *args, PyObject *kwds);
static void
encoder_dealloc(PyObject *self);
static int
scanner_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyScannerObject *s;
- s = (PyScannerObject *)type->tp_alloc(type, 0);
- if (s != NULL) {
- s->strict = NULL;
- s->object_hook = NULL;
- s->object_pairs_hook = NULL;
- s->parse_float = NULL;
- s->parse_int = NULL;
- s->parse_constant = NULL;
- }
- return (PyObject *)s;
-}
-
-static int
-scanner_init(PyObject *self, PyObject *args, PyObject *kwds)
-{
- /* Initialize Scanner object */
PyObject *ctx;
static char *kwlist[] = {"context", NULL};
- PyScannerObject *s;
-
- assert(PyScanner_Check(self));
- s = (PyScannerObject *)self;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:make_scanner", kwlist, &ctx))
- return -1;
+ return NULL;
- if (s->memo == NULL) {
- s->memo = PyDict_New();
- if (s->memo == NULL)
- goto bail;
+ s = (PyScannerObject *)type->tp_alloc(type, 0);
+ if (s == NULL) {
+ return NULL;
}
+ s->memo = PyDict_New();
+ if (s->memo == NULL)
+ goto bail;
+
/* All of these will fail "gracefully" so we don't need to verify them */
s->strict = PyObject_GetAttrString(ctx, "strict");
if (s->strict == NULL)
if (s->parse_constant == NULL)
goto bail;
- return 0;
+ return (PyObject *)s;
bail:
- Py_CLEAR(s->strict);
- Py_CLEAR(s->object_hook);
- Py_CLEAR(s->object_pairs_hook);
- Py_CLEAR(s->parse_float);
- Py_CLEAR(s->parse_int);
- Py_CLEAR(s->parse_constant);
- return -1;
+ Py_DECREF(s);
+ return NULL;
}
PyDoc_STRVAR(scanner_doc, "JSON scanner object");
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
- scanner_init, /* tp_init */
+ 0, /* tp_init */
0,/* PyType_GenericAlloc, */ /* tp_alloc */
scanner_new, /* tp_new */
0,/* PyObject_GC_Del, */ /* tp_free */
static PyObject *
encoder_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- PyEncoderObject *s;
- s = (PyEncoderObject *)type->tp_alloc(type, 0);
- if (s != NULL) {
- s->markers = NULL;
- s->defaultfn = NULL;
- s->encoder = NULL;
- s->indent = NULL;
- s->key_separator = NULL;
- s->item_separator = NULL;
- s->sort_keys = NULL;
- s->skipkeys = NULL;
- }
- return (PyObject *)s;
-}
-
-static int
-encoder_init(PyObject *self, PyObject *args, PyObject *kwds)
-{
- /* initialize Encoder object */
static char *kwlist[] = {"markers", "default", "encoder", "indent", "key_separator", "item_separator", "sort_keys", "skipkeys", "allow_nan", NULL};
PyEncoderObject *s;
PyObject *item_separator, *sort_keys, *skipkeys;
int allow_nan;
- assert(PyEncoder_Check(self));
- s = (PyEncoderObject *)self;
-
if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOOUUOOp:make_encoder", kwlist,
&markers, &defaultfn, &encoder, &indent,
&key_separator, &item_separator,
&sort_keys, &skipkeys, &allow_nan))
- return -1;
+ return NULL;
if (markers != Py_None && !PyDict_Check(markers)) {
PyErr_Format(PyExc_TypeError,
"make_encoder() argument 1 must be dict or None, "
"not %.200s", Py_TYPE(markers)->tp_name);
- return -1;
+ return NULL;
}
+ s = (PyEncoderObject *)type->tp_alloc(type, 0);
+ if (s == NULL)
+ return NULL;
+
s->markers = markers;
s->defaultfn = defaultfn;
s->encoder = encoder;
Py_INCREF(s->item_separator);
Py_INCREF(s->sort_keys);
Py_INCREF(s->skipkeys);
- return 0;
+ return (PyObject *)s;
}
static PyObject *
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
- encoder_init, /* tp_init */
+ 0, /* tp_init */
0, /* tp_alloc */
encoder_new, /* tp_new */
0, /* tp_free */
PyObject *m = PyModule_Create(&jsonmodule);
if (!m)
return NULL;
- PyScannerType.tp_new = PyType_GenericNew;
if (PyType_Ready(&PyScannerType) < 0)
goto fail;
- PyEncoderType.tp_new = PyType_GenericNew;
if (PyType_Ready(&PyEncoderType) < 0)
goto fail;
Py_INCREF((PyObject*)&PyScannerType);
static int
_sanity_check_python_fd_sequence(PyObject *fd_sequence)
{
- Py_ssize_t seq_idx, seq_len = PySequence_Length(fd_sequence);
+ Py_ssize_t seq_idx;
long prev_fd = -1;
- for (seq_idx = 0; seq_idx < seq_len; ++seq_idx) {
- PyObject* py_fd = PySequence_Fast_GET_ITEM(fd_sequence, seq_idx);
- long iter_fd = PyLong_AsLong(py_fd);
+ for (seq_idx = 0; seq_idx < PyTuple_GET_SIZE(fd_sequence); ++seq_idx) {
+ PyObject* py_fd = PyTuple_GET_ITEM(fd_sequence, seq_idx);
+ long iter_fd;
+ if (!PyLong_Check(py_fd)) {
+ return 1;
+ }
+ iter_fd = PyLong_AsLong(py_fd);
if (iter_fd < 0 || iter_fd <= prev_fd || iter_fd > INT_MAX) {
- /* Negative, overflow, not a Long, unsorted, too big for a fd. */
+ /* Negative, overflow, unsorted, too big for a fd. */
return 1;
}
prev_fd = iter_fd;
{
/* Binary search. */
Py_ssize_t search_min = 0;
- Py_ssize_t search_max = PySequence_Length(fd_sequence) - 1;
+ Py_ssize_t search_max = PyTuple_GET_SIZE(fd_sequence) - 1;
if (search_max < 0)
return 0;
do {
long middle = (search_min + search_max) / 2;
- long middle_fd = PyLong_AsLong(
- PySequence_Fast_GET_ITEM(fd_sequence, middle));
+ long middle_fd = PyLong_AsLong(PyTuple_GET_ITEM(fd_sequence, middle));
if (fd == middle_fd)
return 1;
if (fd > middle_fd)
{
Py_ssize_t i, len;
- len = PySequence_Length(py_fds_to_keep);
+ len = PyTuple_GET_SIZE(py_fds_to_keep);
for (i = 0; i < len; ++i) {
- PyObject* fdobj = PySequence_Fast_GET_ITEM(py_fds_to_keep, i);
+ PyObject* fdobj = PyTuple_GET_ITEM(py_fds_to_keep, i);
long fd = PyLong_AsLong(fdobj);
assert(!PyErr_Occurred());
assert(0 <= fd && fd <= INT_MAX);
_close_fds_by_brute_force(long start_fd, PyObject *py_fds_to_keep)
{
long end_fd = safe_get_max_fd();
- Py_ssize_t num_fds_to_keep = PySequence_Length(py_fds_to_keep);
+ Py_ssize_t num_fds_to_keep = PyTuple_GET_SIZE(py_fds_to_keep);
Py_ssize_t keep_seq_idx;
int fd_num;
/* As py_fds_to_keep is sorted we can loop through the list closing
* fds inbetween any in the keep list falling within our range. */
for (keep_seq_idx = 0; keep_seq_idx < num_fds_to_keep; ++keep_seq_idx) {
- PyObject* py_keep_fd = PySequence_Fast_GET_ITEM(py_fds_to_keep,
- keep_seq_idx);
+ PyObject* py_keep_fd = PyTuple_GET_ITEM(py_fds_to_keep, keep_seq_idx);
int keep_fd = PyLong_AsLong(py_keep_fd);
if (keep_fd < start_fd)
continue;
/* Close all open file descriptors from start_fd and higher.
- * Do not close any in the sorted py_fds_to_keep list.
+ * Do not close any in the sorted py_fds_to_keep tuple.
*
* This function violates the strict use of async signal safe functions. :(
* It calls opendir(), readdir() and closedir(). Of these, the one most
#endif
if (!PyArg_ParseTuple(
- args, "OOpOOOiiiiiiiiiiO:fork_exec",
- &process_args, &executable_list, &close_fds, &py_fds_to_keep,
+ args, "OOpO!OOiiiiiiiiiiO:fork_exec",
+ &process_args, &executable_list,
+ &close_fds, &PyTuple_Type, &py_fds_to_keep,
&cwd_obj, &env_list,
&p2cread, &p2cwrite, &c2pread, &c2pwrite,
&errread, &errwrite, &errpipe_read, &errpipe_write,
PyErr_SetString(PyExc_ValueError, "errpipe_write must be >= 3");
return NULL;
}
- if (PySequence_Length(py_fds_to_keep) < 0) {
- PyErr_SetString(PyExc_ValueError, "cannot get length of fds_to_keep");
- return NULL;
- }
if (_sanity_check_python_fd_sequence(py_fds_to_keep)) {
PyErr_SetString(PyExc_ValueError, "bad value(s) in fds_to_keep");
return NULL;
goto cleanup;
for (arg_num = 0; arg_num < num_args; ++arg_num) {
PyObject *borrowed_arg, *converted_arg;
+ if (PySequence_Fast_GET_SIZE(fast_args) != num_args) {
+ PyErr_SetString(PyExc_RuntimeError, "args changed during iteration");
+ goto cleanup;
+ }
borrowed_arg = PySequence_Fast_GET_ITEM(fast_args, arg_num);
if (PyUnicode_FSConverter(borrowed_arg, &converted_arg) == 0)
goto cleanup;
int i;
unsigned long element;
long index;
+ uint32_t new_state[N];
if (!PyTuple_Check(state)) {
PyErr_SetString(PyExc_TypeError,
element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
if (element == (unsigned long)-1 && PyErr_Occurred())
return NULL;
- self->state[i] = (uint32_t)element;
+ new_state[i] = (uint32_t)element;
}
index = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
return NULL;
}
self->index = (int)index;
+ for (i = 0; i < N; i++)
+ self->state[i] = new_state[i];
Py_INCREF(Py_None);
return Py_None;
self->ssl = NULL;
self->Socket = NULL;
self->ctx = sslctx;
+ Py_INCREF(sslctx);
self->shutdown_seen_zero = 0;
self->handshake_done = 0;
self->owner = NULL;
self->server_hostname = hostname;
}
- Py_INCREF(sslctx);
-
/* Make sure the SSL error state is initialized */
(void) ERR_get_state();
ERR_clear_error();
int i, j;
PyObject *lst, *res = NULL;
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- /* Calls x509v3_cache_extensions and sets up crldp */
- X509_check_ca(certificate);
-#endif
dps = X509_get_ext_d2i(certificate, NID_crl_distribution_points, NULL, NULL);
if (dps == NULL)
done:
Py_XDECREF(lst);
-#if OPENSSL_VERSION_NUMBER < 0x10001000L
- sk_DIST_POINT_free(dps);
-#endif
+ CRL_DIST_POINTS_free(dps);
return res;
}
Mix string into the OpenSSL PRNG state.
entropy (a float) is a lower bound on the entropy contained in
-string. See RFC 1750.
+string. See RFC 4086.
[clinic start generated code]*/
static PyObject *
_ssl_RAND_add_impl(PyObject *module, Py_buffer *view, double entropy)
-/*[clinic end generated code: output=e6dd48df9c9024e9 input=580c85e6a3a4fe29]*/
+/*[clinic end generated code: output=e6dd48df9c9024e9 input=5c33017422828f5c]*/
{
const char *buf;
Py_ssize_t len, written;
"ubyte format requires 0 <= number <= 255");
return -1;
}
- *p = (char)x;
+ *(unsigned char *)p = (unsigned char)x;
return 0;
}
{
long x;
Py_ssize_t i;
+ unsigned char *q = (unsigned char *)p;
if (get_long(v, &x) < 0)
return -1;
i = f->size;
#endif
}
do {
- p[--i] = (char)x;
+ q[--i] = (unsigned char)(x & 0xffL);
x >>= 8;
} while (i > 0);
return 0;
{
unsigned long x;
Py_ssize_t i;
+ unsigned char *q = (unsigned char *)p;
if (get_ulong(v, &x) < 0)
return -1;
i = f->size;
RANGE_ERROR(x, f, 1, maxint - 1);
}
do {
- p[--i] = (char)x;
+ q[--i] = (unsigned char)(x & 0xffUL);
x >>= 8;
} while (i > 0);
return 0;
{
long x;
Py_ssize_t i;
+ unsigned char *q = (unsigned char *)p;
if (get_long(v, &x) < 0)
return -1;
i = f->size;
#endif
}
do {
- *p++ = (char)x;
+ *q++ = (unsigned char)(x & 0xffL);
x >>= 8;
} while (--i > 0);
return 0;
{
unsigned long x;
Py_ssize_t i;
+ unsigned char *q = (unsigned char *)p;
if (get_ulong(v, &x) < 0)
return -1;
i = f->size;
RANGE_ERROR(x, f, 1, maxint - 1);
}
do {
- *p++ = (char)x;
+ *q++ = (unsigned char)(x & 0xffUL);
x >>= 8;
} while (--i > 0);
return 0;
{
Py_ssize_t start, stop, step, slicelength;
- if (PySlice_GetIndicesEx(key, base->shape[dim],
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(key, &start, &stop, &step) < 0) {
return -1;
}
+ slicelength = PySlice_AdjustIndices(base->shape[dim], &start, &stop, step);
if (base->suboffsets == NULL || dim == 0) {
"first argument must be a slice object");
return NULL;
}
- if (PySlice_GetIndicesEx(key, len, &s[0], &s[1], &s[2], &s[3]) < 0) {
+ if (PySlice_Unpack(key, &s[0], &s[1], &s[2]) < 0) {
return NULL;
}
+ s[3] = PySlice_AdjustIndices(len, &s[0], &s[1], s[2]);
ret = PyTuple_New(4);
if (ret == NULL)
{
PyObject *sub_args;
PyObject *sub_kwargs;
- char *sub_format;
+ const char *sub_format;
PyObject *sub_keywords;
Py_ssize_t i, size;
double buffers[8][4]; /* double ensures alignment where necessary */
- if (!PyArg_ParseTuple(args, "OOyO:parse_tuple_and_keywords",
+ if (!PyArg_ParseTuple(args, "OOsO:parse_tuple_and_keywords",
&sub_args, &sub_kwargs,
&sub_format, &sub_keywords))
return NULL;
if (_PyTime_AsTimeval(t, &tv, round) < 0)
return NULL;
- seconds = PyLong_FromLong((long long)tv.tv_sec);
+ seconds = PyLong_FromLongLong(tv.tv_sec);
if (seconds == NULL)
return NULL;
return Py_BuildValue("Nl", seconds, tv.tv_usec);
}
+static int
+fastcall_args(PyObject *args, PyObject ***stack, Py_ssize_t *nargs)
+{
+ if (args == Py_None) {
+ *stack = NULL;
+ *nargs = 0;
+ }
+ else if (PyTuple_Check(args)) {
+ *stack = &PyTuple_GET_ITEM(args, 0);
+ *nargs = PyTuple_GET_SIZE(args);
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError, "args must be None or a tuple");
+ return -1;
+ }
+ return 0;
+}
+
+
+static PyObject *
+test_pyobject_fastcall(PyObject *self, PyObject *args)
+{
+ PyObject *func, *func_args;
+ PyObject **stack;
+ Py_ssize_t nargs;
+
+ if (!PyArg_ParseTuple(args, "OO", &func, &func_args)) {
+ return NULL;
+ }
+
+ if (fastcall_args(func_args, &stack, &nargs) < 0) {
+ return NULL;
+ }
+ return _PyObject_FastCall(func, stack, nargs);
+}
+
+
+static PyObject *
+test_pyobject_fastcalldict(PyObject *self, PyObject *args)
+{
+ PyObject *func, *func_args, *kwargs;
+ PyObject **stack;
+ Py_ssize_t nargs;
+
+ if (!PyArg_ParseTuple(args, "OOO", &func, &func_args, &kwargs)) {
+ return NULL;
+ }
+
+ if (fastcall_args(func_args, &stack, &nargs) < 0) {
+ return NULL;
+ }
+
+ if (kwargs == Py_None) {
+ kwargs = NULL;
+ }
+ else if (!PyDict_Check(kwargs)) {
+ PyErr_SetString(PyExc_TypeError, "kwnames must be None or a dict");
+ return NULL;
+ }
+
+ return _PyObject_FastCallDict(func, stack, nargs, kwargs);
+}
+
+
+static PyObject *
+test_pyobject_fastcallkeywords(PyObject *self, PyObject *args)
+{
+ PyObject *func, *func_args, *kwnames = NULL;
+ PyObject **stack;
+ Py_ssize_t nargs, nkw;
+
+ if (!PyArg_ParseTuple(args, "OOO", &func, &func_args, &kwnames)) {
+ return NULL;
+ }
+
+ if (fastcall_args(func_args, &stack, &nargs) < 0) {
+ return NULL;
+ }
+
+ if (kwnames == Py_None) {
+ kwnames = NULL;
+ }
+ else if (PyTuple_Check(kwnames)) {
+ nkw = PyTuple_GET_SIZE(kwnames);
+ if (nargs < nkw) {
+ PyErr_SetString(PyExc_ValueError, "kwnames longer than args");
+ return NULL;
+ }
+ nargs -= nkw;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
+ return NULL;
+ }
+ return _PyObject_FastCallKeywords(func, stack, nargs, kwnames);
+}
+
+
+static PyObject *
+raise_SIGINT_then_send_None(PyObject *self, PyObject *args)
+{
+ PyGenObject *gen;
+
+ if (!PyArg_ParseTuple(args, "O!", &PyGen_Type, &gen))
+ return NULL;
+
+ /* This is used in a test to check what happens if a signal arrives just
+ as we're in the process of entering a yield from chain (see
+ bpo-30039).
+
+ Needs to be done in C, because:
+ - we don't have a Python wrapper for raise()
+ - we need to make sure that the Python-level signal handler doesn't run
+ *before* we enter the generator frame, which is impossible in Python
+ because we check for signals before every bytecode operation.
+ */
+ raise(SIGINT);
+ return _PyGen_Send(gen, Py_None);
+}
+
+
static PyMethodDef TestMethods[] = {
{"raise_exception", raise_exception, METH_VARARGS},
{"raise_memoryerror", (PyCFunction)raise_memoryerror, METH_NOARGS},
{"tracemalloc_untrack", tracemalloc_untrack, METH_VARARGS},
{"tracemalloc_get_traceback", tracemalloc_get_traceback, METH_VARARGS},
{"dict_get_version", dict_get_version, METH_VARARGS},
+ {"pyobject_fastcall", test_pyobject_fastcall, METH_VARARGS},
+ {"pyobject_fastcalldict", test_pyobject_fastcalldict, METH_VARARGS},
+ {"pyobject_fastcallkeywords", test_pyobject_fastcallkeywords, METH_VARARGS},
+ {"raise_SIGINT_then_send_None", raise_SIGINT_then_send_None, METH_VARARGS},
{NULL, NULL} /* sentinel */
};
return NULL;
}
- envsize = PyMapping_Length(environment);
-
keys = PyMapping_Keys(environment);
values = PyMapping_Values(environment);
if (!keys || !values)
goto error;
+ envsize = PySequence_Fast_GET_SIZE(keys);
+ if (PySequence_Fast_GET_SIZE(values) != envsize) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "environment changed size during iteration");
+ goto error;
+ }
+
totalsize = 1; /* trailing null character */
for (i = 0; i < envsize; i++) {
- PyObject* key = PyList_GET_ITEM(keys, i);
- PyObject* value = PyList_GET_ITEM(values, i);
+ PyObject* key = PySequence_Fast_GET_ITEM(keys, i);
+ PyObject* value = PySequence_Fast_GET_ITEM(values, i);
if (! PyUnicode_Check(key) || ! PyUnicode_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"environment can only contain strings");
goto error;
}
+ if (PyUnicode_FindChar(key, '\0', 0, PyUnicode_GET_LENGTH(key), 1) != -1 ||
+ PyUnicode_FindChar(value, '\0', 0, PyUnicode_GET_LENGTH(value), 1) != -1)
+ {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ goto error;
+ }
+ /* Search from index 1 because on Windows starting '=' is allowed for
+ defining hidden environment variables. */
+ if (PyUnicode_GET_LENGTH(key) == 0 ||
+ PyUnicode_FindChar(key, '=', 1, PyUnicode_GET_LENGTH(key), 1) != -1)
+ {
+ PyErr_SetString(PyExc_ValueError, "illegal environment variable name");
+ goto error;
+ }
if (totalsize > PY_SSIZE_T_MAX - PyUnicode_GET_LENGTH(key) - 1) {
PyErr_SetString(PyExc_OverflowError, "environment too long");
goto error;
end = buffer + totalsize;
for (i = 0; i < envsize; i++) {
- PyObject* key = PyList_GET_ITEM(keys, i);
- PyObject* value = PyList_GET_ITEM(values, i);
+ PyObject* key = PySequence_Fast_GET_ITEM(keys, i);
+ PyObject* value = PySequence_Fast_GET_ITEM(values, i);
if (!PyUnicode_AsUCS4(key, p, end - p, 0))
goto error;
p += PyUnicode_GET_LENGTH(key);
if (env_mapping != Py_None) {
environment = getenvironment(env_mapping);
- if (! environment)
+ if (environment == NULL) {
return NULL;
+ }
+ /* contains embedded null characters */
wenvironment = PyUnicode_AsUnicode(environment);
- if (wenvironment == NULL)
- {
- Py_XDECREF(environment);
+ if (wenvironment == NULL) {
+ Py_DECREF(environment);
return NULL;
}
}
(unsigned long) ((unsigned int *)ap->ob_item)[i]);
}
+static PyObject *
+get_int_unless_float(PyObject *v)
+{
+ if (PyFloat_Check(v)) {
+ PyErr_SetString(PyExc_TypeError,
+ "array item must be integer");
+ return NULL;
+ }
+ return (PyObject *)_PyLong_FromNbInt(v);
+}
+
static int
II_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
{
unsigned long x;
- if (PyLong_Check(v)) {
- x = PyLong_AsUnsignedLong(v);
- if (x == (unsigned long) -1 && PyErr_Occurred())
+ int do_decref = 0; /* if nb_int was called */
+
+ if (!PyLong_Check(v)) {
+ v = get_int_unless_float(v);
+ if (NULL == v) {
return -1;
+ }
+ do_decref = 1;
}
- else {
- long y;
- if (!PyArg_Parse(v, "l;array item must be integer", &y))
- return -1;
- if (y < 0) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned int is less than minimum");
- return -1;
+ x = PyLong_AsUnsignedLong(v);
+ if (x == (unsigned long)-1 && PyErr_Occurred()) {
+ if (do_decref) {
+ Py_DECREF(v);
}
- x = (unsigned long)y;
-
+ return -1;
}
if (x > UINT_MAX) {
PyErr_SetString(PyExc_OverflowError,
- "unsigned int is greater than maximum");
+ "unsigned int is greater than maximum");
+ if (do_decref) {
+ Py_DECREF(v);
+ }
return -1;
}
-
if (i >= 0)
((unsigned int *)ap->ob_item)[i] = (unsigned int)x;
+
+ if (do_decref) {
+ Py_DECREF(v);
+ }
return 0;
}
LL_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
{
unsigned long x;
- if (PyLong_Check(v)) {
- x = PyLong_AsUnsignedLong(v);
- if (x == (unsigned long) -1 && PyErr_Occurred())
- return -1;
- }
- else {
- long y;
- if (!PyArg_Parse(v, "l;array item must be integer", &y))
- return -1;
- if (y < 0) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned long is less than minimum");
+ int do_decref = 0; /* if nb_int was called */
+
+ if (!PyLong_Check(v)) {
+ v = get_int_unless_float(v);
+ if (NULL == v) {
return -1;
}
- x = (unsigned long)y;
-
+ do_decref = 1;
}
- if (x > ULONG_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned long is greater than maximum");
+ x = PyLong_AsUnsignedLong(v);
+ if (x == (unsigned long)-1 && PyErr_Occurred()) {
+ if (do_decref) {
+ Py_DECREF(v);
+ }
return -1;
}
-
if (i >= 0)
((unsigned long *)ap->ob_item)[i] = x;
+
+ if (do_decref) {
+ Py_DECREF(v);
+ }
return 0;
}
QQ_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
{
unsigned long long x;
- if (PyLong_Check(v)) {
- x = PyLong_AsUnsignedLongLong(v);
- if (x == (unsigned long long) -1 && PyErr_Occurred())
+ int do_decref = 0; /* if nb_int was called */
+
+ if (!PyLong_Check(v)) {
+ v = get_int_unless_float(v);
+ if (NULL == v) {
return -1;
+ }
+ do_decref = 1;
}
- else {
- long long y;
- if (!PyArg_Parse(v, "L;array item must be integer", &y))
- return -1;
- if (y < 0) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned long long is less than minimum");
- return -1;
+ x = PyLong_AsUnsignedLongLong(v);
+ if (x == (unsigned long long)-1 && PyErr_Occurred()) {
+ if (do_decref) {
+ Py_DECREF(v);
}
- x = (unsigned long long)y;
+ return -1;
}
-
if (i >= 0)
((unsigned long long *)ap->ob_item)[i] = x;
+
+ if (do_decref) {
+ Py_DECREF(v);
+ }
return 0;
}
arrayobject* ar;
int itemsize = self->ob_descr->itemsize;
- if (PySlice_GetIndicesEx(item, Py_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop,
+ step);
if (slicelength <= 0) {
return newarrayobject(&Arraytype, 0, self->ob_descr);
return (*self->ob_descr->setitem)(self, i, value);
}
else if (PySlice_Check(item)) {
- if (PySlice_GetIndicesEx(item,
- Py_SIZE(self), &start, &stop,
- &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return -1;
}
+ slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop,
+ step);
}
else {
PyErr_SetString(PyExc_TypeError,
Py_XDECREF(exc_tb);
}
PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
- if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
+ if (!PyErr_GivenExceptionMatches(exc_type, PyExc_SystemExit)) {
PySys_WriteStderr("Error in atexit._run_exitfuncs:\n");
PyErr_NormalizeException(&exc_type, &exc_value, &exc_tb);
PyErr_Display(exc_type, exc_value, exc_tb);
REQUIRE_INBUF(4);
c3 = INBYTE3;
c4 = INBYTE4;
- if (c < 0x81 || c3 < 0x81 || c4 < 0x30 || c4 > 0x39)
+ if (c < 0x81 || c > 0xFE ||
+ c3 < 0x81 || c3 > 0xFE ||
+ c4 < 0x30 || c4 > 0x39)
return 1;
c -= 0x81; c2 -= 0x30;
c3 -= 0x81; c4 -= 0x30;
DBCHAR code;
if (c < 0x80) {
- if (state->i == 0) {
- WRITEBYTE1((unsigned char)c);
- NEXT(1, 1);
- }
- else {
- WRITEBYTE3('~', '}', (unsigned char)c);
- NEXT(1, 3);
+ if (state->i) {
+ WRITEBYTE2('~', '}');
+ NEXT_OUT(2);
state->i = 0;
}
+ WRITEBYTE1((unsigned char)c);
+ NEXT(1, 1);
+ if (c == '~') {
+ WRITEBYTE1('~');
+ NEXT_OUT(1);
+ }
continue;
}
unsigned char c2 = INBYTE2;
REQUIRE_INBUF(2);
- if (c2 == '~') {
+ if (c2 == '~' && state->i == 0)
OUTCHAR('~');
- NEXT_IN(2);
- continue;
- }
else if (c2 == '{' && state->i == 0)
state->i = 1; /* set GB */
+ else if (c2 == '\n' && state->i == 0)
+ ; /* line-continuation */
else if (c2 == '}' && state->i == 1)
state->i = 0; /* set ASCII */
- else if (c2 == '\n')
- ; /* line-continuation */
else
return 1;
NEXT_IN(2);
if (r == -1)
return NULL;
}
+ /* PySequence_Length() can fail */
+ if (PyErr_Occurred())
+ return NULL;
Py_RETURN_NONE;
}
"Mix string into the OpenSSL PRNG state.\n"
"\n"
"entropy (a float) is a lower bound on the entropy contained in\n"
-"string. See RFC 1750.");
+"string. See RFC 4086.");
#define _SSL_RAND_ADD_METHODDEF \
{"RAND_add", (PyCFunction)_ssl_RAND_add, METH_VARARGS, _ssl_RAND_add__doc__},
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
-/*[clinic end generated code: output=a859b21fe68a6115 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=56cead8610faa505 input=a9049054013a1b77]*/
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- and Clark Cooper
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
+Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
+Copyright (c) 2001-2017 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
+++ /dev/null
-#ifndef AMIGACONFIG_H
-#define AMIGACONFIG_H
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#define BYTEORDER 4321
-
-/* Define to 1 if you have the `bcopy' function. */
-#define HAVE_BCOPY 1
-
-/* Define to 1 if you have the <check.h> header file. */
-#undef HAVE_CHECK_H
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* whether byteorder is bigendian */
-#define WORDS_BIGENDIAN
-
-/* Define to specify how much context to retain around the current parse
- point. */
-#define XML_CONTEXT_BYTES 1024
-
-/* Define to make parameter entity parsing functionality available. */
-#define XML_DTD
-
-/* Define to make XML Namespaces functionality available. */
-#define XML_NS
-
-#endif /* AMIGACONFIG_H */
/* Added in 2.0. */
XML_ERROR_RESERVED_PREFIX_XML,
XML_ERROR_RESERVED_PREFIX_XMLNS,
- XML_ERROR_RESERVED_NAMESPACE_URI
+ XML_ERROR_RESERVED_NAMESPACE_URI,
+ /* Added in 2.2.1. */
+ XML_ERROR_INVALID_ARGUMENT
};
enum XML_Content_Type {
XML_EntityDeclHandler handler);
/* OBSOLETE -- OBSOLETE -- OBSOLETE
- This handler has been superceded by the EntityDeclHandler above.
+ This handler has been superseded by the EntityDeclHandler above.
It is provided here for backward compatibility.
This is called for a declaration of an unparsed (NDATA) entity.
be called, despite an external subset being parsed.
Note: If XML_DTD is not defined when Expat is compiled, returns
XML_ERROR_FEATURE_REQUIRES_XML_DTD.
+ Note: If parser == NULL, returns XML_ERROR_INVALID_ARGUMENT.
*/
XMLPARSEAPI(enum XML_Error)
XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
to the XML_StartElementHandler that were specified in the start-tag
rather than defaulted. Each attribute/value pair counts as 2; thus
this correspondds to an index into the atts array passed to the
- XML_StartElementHandler.
+ XML_StartElementHandler. Returns -1 if parser == NULL.
*/
XMLPARSEAPI(int)
XML_GetSpecifiedAttributeCount(XML_Parser parser);
/* Returns the index of the ID attribute passed in the last call to
- XML_StartElementHandler, or -1 if there is no ID attribute. Each
- attribute/value pair counts as 2; thus this correspondds to an
- index into the atts array passed to the XML_StartElementHandler.
+ XML_StartElementHandler, or -1 if there is no ID attribute or
+ parser == NULL. Each attribute/value pair counts as 2; thus this
+ correspondds to an index into the atts array passed to the
+ XML_StartElementHandler.
*/
XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser);
entities is requested; otherwise it will return non-zero.
Note: If XML_SetParamEntityParsing is called after XML_Parse or
XML_ParseBuffer, then it has no effect and will always return 0.
+ Note: If parser == NULL, the function will do nothing and return 0.
*/
XMLPARSEAPI(int)
XML_SetParamEntityParsing(XML_Parser parser,
Helps in preventing DoS attacks based on predicting hash
function behavior. This must be called before parsing is started.
Returns 1 if successful, 0 when called after parsing has started.
+ Note: If parser == NULL, the function will do nothing and return 0.
*/
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt);
-#define XML_HAS_SET_HASH_SALT /* Python Only: Defined for pyexpat.c. */
-
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
*/
the location is the location of the character at which the error
was detected; otherwise the location is the location of the last
parse event, as described above.
+
+ Note: XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber
+ return 0 to indicate an error.
+ Note: XML_GetCurrentByteIndex returns -1 to indicate an error.
*/
XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
/* Exposing the memory handling functions used in Expat */
XMLPARSEAPI(void *)
+XML_ATTR_MALLOC
+XML_ATTR_ALLOC_SIZE(2)
XML_MemMalloc(XML_Parser parser, size_t size);
XMLPARSEAPI(void *)
+XML_ATTR_ALLOC_SIZE(3)
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
XMLPARSEAPI(void)
XML_GetFeatureList(void);
-/* Expat follows the GNU/Linux convention of odd number minor version for
- beta/development releases and even number minor version for stable
- releases. Micro is bumped with each release, and set to 0 with each
- change to major or minor version.
+/* Expat follows the semantic versioning convention.
+ See http://semver.org.
*/
#define XML_MAJOR_VERSION 2
-#define XML_MINOR_VERSION 1
+#define XML_MINOR_VERSION 2
#define XML_MICRO_VERSION 1
#ifdef __cplusplus
#endif
#endif /* not defined XML_STATIC */
+#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
+#define XMLIMPORT __attribute__ ((visibility ("default")))
+#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
+#define XML_ATTR_MALLOC __attribute__((__malloc__))
+#else
+#define XML_ATTR_MALLOC
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
+#else
+#define XML_ATTR_ALLOC_SIZE(x)
+#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#endif
#ifdef XML_UNICODE_WCHAR_T
-#define XML_UNICODE
+# define XML_UNICODE
+# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
+# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
+# endif
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#define inline
#endif
#endif
+
+#ifndef UNUSED_P
+# ifdef __GNUC__
+# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
+# else
+# define UNUSED_P(p) UNUSED_ ## p
+# endif
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void
+align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
+
+
+#ifdef __cplusplus
+}
+#endif
+++ /dev/null
-/*================================================================
-** Copyright 2000, Clark Cooper
-** All rights reserved.
-**
-** This is free software. You are permitted to copy, distribute, or modify
-** it under the terms of the MIT/X license (contained in the COPYING file
-** with this distribution.)
-**
-*/
-
-#ifndef MACCONFIG_H
-#define MACCONFIG_H
-
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#define BYTEORDER 4321
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* whether byteorder is bigendian */
-#define WORDS_BIGENDIAN
-
-/* Define to specify how much context to retain around the current parse
- point. */
-#undef XML_CONTEXT_BYTES
-
-/* Define to make parameter entity parsing functionality available. */
-#define XML_DTD
-
-/* Define to make XML Namespaces functionality available. */
-#define XML_NS
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `long' if <sys/types.h> does not define. */
-#define off_t long
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-
-#endif /* ifndef MACCONFIG_H */
--- /dev/null
+/* ==========================================================================
+ * siphash.h - SipHash-2-4 in a single header file
+ * --------------------------------------------------------------------------
+ * Derived by William Ahern from the reference implementation[1] published[2]
+ * by Jean-Philippe Aumasson and Daniel J. Berstein. Licensed in kind.
+ * by Jean-Philippe Aumasson and Daniel J. Berstein.
+ * Minimal changes by Sebastian Pipping on top, details below.
+ * Licensed under the CC0 Public Domain Dedication license.
+ *
+ * 1. https://www.131002.net/siphash/siphash24.c
+ * 2. https://www.131002.net/siphash/
+ * --------------------------------------------------------------------------
+ * HISTORY:
+ *
+ * 2017-06-10 (Sebastian Pipping)
+ * - Clarify license note in the header
+ * - Address C89 issues:
+ * - Stop using inline keyword (and let compiler decide)
+ * - Turn integer suffix ULL to UL
+ * - Replace _Bool by int
+ * - Turn macro siphash24 into a function
+ * - Address invalid conversion (void pointer) by explicit cast
+ * - Always expose sip24_valid (for self-tests)
+ *
+ * 2012-11-04 - Born. (William Ahern)
+ * --------------------------------------------------------------------------
+ * USAGE:
+ *
+ * SipHash-2-4 takes as input two 64-bit words as the key, some number of
+ * message bytes, and outputs a 64-bit word as the message digest. This
+ * implementation employs two data structures: a struct sipkey for
+ * representing the key, and a struct siphash for representing the hash
+ * state.
+ *
+ * For converting a 16-byte unsigned char array to a key, use either the
+ * macro sip_keyof or the routine sip_tokey. The former instantiates a
+ * compound literal key, while the latter requires a key object as a
+ * parameter.
+ *
+ * unsigned char secret[16];
+ * arc4random_buf(secret, sizeof secret);
+ * struct sipkey *key = sip_keyof(secret);
+ *
+ * For hashing a message, use either the convenience macro siphash24 or the
+ * routines sip24_init, sip24_update, and sip24_final.
+ *
+ * struct siphash state;
+ * void *msg;
+ * size_t len;
+ * uint64_t hash;
+ *
+ * sip24_init(&state, key);
+ * sip24_update(&state, msg, len);
+ * hash = sip24_final(&state);
+ *
+ * or
+ *
+ * hash = siphash24(msg, len, key);
+ *
+ * To convert the 64-bit hash value to a canonical 8-byte little-endian
+ * binary representation, use either the macro sip_binof or the routine
+ * sip_tobin. The former instantiates and returns a compound literal array,
+ * while the latter requires an array object as a parameter.
+ * --------------------------------------------------------------------------
+ * NOTES:
+ *
+ * o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers
+ * lacking compound literal support. Instead, you must use the lower-level
+ * interfaces which take as parameters the temporary state objects.
+ *
+ * o Uppercase macros may evaluate parameters more than once. Lowercase
+ * macros should not exhibit any such side effects.
+ * ==========================================================================
+ */
+#ifndef SIPHASH_H
+#define SIPHASH_H
+
+#include <stddef.h> /* size_t */
+#include <stdint.h> /* uint64_t uint32_t uint8_t */
+
+
+#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ( (x) >> (64 - (b))))
+
+#define SIP_U32TO8_LE(p, v) \
+ (p)[0] = (uint8_t)((v) >> 0); (p)[1] = (uint8_t)((v) >> 8); \
+ (p)[2] = (uint8_t)((v) >> 16); (p)[3] = (uint8_t)((v) >> 24);
+
+#define SIP_U64TO8_LE(p, v) \
+ SIP_U32TO8_LE((p) + 0, (uint32_t)((v) >> 0)); \
+ SIP_U32TO8_LE((p) + 4, (uint32_t)((v) >> 32));
+
+#define SIP_U8TO64_LE(p) \
+ (((uint64_t)((p)[0]) << 0) | \
+ ((uint64_t)((p)[1]) << 8) | \
+ ((uint64_t)((p)[2]) << 16) | \
+ ((uint64_t)((p)[3]) << 24) | \
+ ((uint64_t)((p)[4]) << 32) | \
+ ((uint64_t)((p)[5]) << 40) | \
+ ((uint64_t)((p)[6]) << 48) | \
+ ((uint64_t)((p)[7]) << 56))
+
+
+#define SIPHASH_INITIALIZER { 0, 0, 0, 0, { 0 }, 0, 0 }
+
+struct siphash {
+ uint64_t v0, v1, v2, v3;
+
+ unsigned char buf[8], *p;
+ uint64_t c;
+}; /* struct siphash */
+
+
+#define SIP_KEYLEN 16
+
+struct sipkey {
+ uint64_t k[2];
+}; /* struct sipkey */
+
+#define sip_keyof(k) sip_tokey(&(struct sipkey){ { 0 } }, (k))
+
+static struct sipkey *sip_tokey(struct sipkey *key, const void *src) {
+ key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
+ key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
+ return key;
+} /* sip_tokey() */
+
+
+#define sip_binof(v) sip_tobin((unsigned char[8]){ 0 }, (v))
+
+static void *sip_tobin(void *dst, uint64_t u64) {
+ SIP_U64TO8_LE((unsigned char *)dst, u64);
+ return dst;
+} /* sip_tobin() */
+
+
+static void sip_round(struct siphash *H, const int rounds) {
+ int i;
+
+ for (i = 0; i < rounds; i++) {
+ H->v0 += H->v1;
+ H->v1 = SIP_ROTL(H->v1, 13);
+ H->v1 ^= H->v0;
+ H->v0 = SIP_ROTL(H->v0, 32);
+
+ H->v2 += H->v3;
+ H->v3 = SIP_ROTL(H->v3, 16);
+ H->v3 ^= H->v2;
+
+ H->v0 += H->v3;
+ H->v3 = SIP_ROTL(H->v3, 21);
+ H->v3 ^= H->v0;
+
+ H->v2 += H->v1;
+ H->v1 = SIP_ROTL(H->v1, 17);
+ H->v1 ^= H->v2;
+ H->v2 = SIP_ROTL(H->v2, 32);
+ }
+} /* sip_round() */
+
+
+static struct siphash *sip24_init(struct siphash *H, const struct sipkey *key) {
+ H->v0 = 0x736f6d6570736575UL ^ key->k[0];
+ H->v1 = 0x646f72616e646f6dUL ^ key->k[1];
+ H->v2 = 0x6c7967656e657261UL ^ key->k[0];
+ H->v3 = 0x7465646279746573UL ^ key->k[1];
+
+ H->p = H->buf;
+ H->c = 0;
+
+ return H;
+} /* sip24_init() */
+
+
+#define sip_endof(a) (&(a)[sizeof (a) / sizeof *(a)])
+
+static struct siphash *sip24_update(struct siphash *H, const void *src, size_t len) {
+ const unsigned char *p = (const unsigned char *)src, *pe = p + len;
+ uint64_t m;
+
+ do {
+ while (p < pe && H->p < sip_endof(H->buf))
+ *H->p++ = *p++;
+
+ if (H->p < sip_endof(H->buf))
+ break;
+
+ m = SIP_U8TO64_LE(H->buf);
+ H->v3 ^= m;
+ sip_round(H, 2);
+ H->v0 ^= m;
+
+ H->p = H->buf;
+ H->c += 8;
+ } while (p < pe);
+
+ return H;
+} /* sip24_update() */
+
+
+static uint64_t sip24_final(struct siphash *H) {
+ char left = H->p - H->buf;
+ uint64_t b = (H->c + left) << 56;
+
+ switch (left) {
+ case 7: b |= (uint64_t)H->buf[6] << 48;
+ case 6: b |= (uint64_t)H->buf[5] << 40;
+ case 5: b |= (uint64_t)H->buf[4] << 32;
+ case 4: b |= (uint64_t)H->buf[3] << 24;
+ case 3: b |= (uint64_t)H->buf[2] << 16;
+ case 2: b |= (uint64_t)H->buf[1] << 8;
+ case 1: b |= (uint64_t)H->buf[0] << 0;
+ case 0: break;
+ }
+
+ H->v3 ^= b;
+ sip_round(H, 2);
+ H->v0 ^= b;
+ H->v2 ^= 0xff;
+ sip_round(H, 4);
+
+ return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
+} /* sip24_final() */
+
+
+static uint64_t siphash24(const void *src, size_t len, const struct sipkey *key) {
+ struct siphash state = SIPHASH_INITIALIZER;
+ return sip24_final(sip24_update(sip24_init(&state, key), src, len));
+} /* siphash24() */
+
+
+/*
+ * SipHash-2-4 output with
+ * k = 00 01 02 ...
+ * and
+ * in = (empty string)
+ * in = 00 (1 byte)
+ * in = 00 01 (2 bytes)
+ * in = 00 01 02 (3 bytes)
+ * ...
+ * in = 00 01 02 ... 3e (63 bytes)
+ */
+static int sip24_valid(void) {
+ static const unsigned char vectors[64][8] = {
+ { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
+ { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
+ { 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, },
+ { 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, },
+ { 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, },
+ { 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, },
+ { 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, },
+ { 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, },
+ { 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, },
+ { 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, },
+ { 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, },
+ { 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, },
+ { 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, },
+ { 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, },
+ { 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, },
+ { 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, },
+ { 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, },
+ { 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, },
+ { 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, },
+ { 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, },
+ { 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, },
+ { 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, },
+ { 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, },
+ { 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, },
+ { 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, },
+ { 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, },
+ { 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, },
+ { 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, },
+ { 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, },
+ { 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, },
+ { 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, },
+ { 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, },
+ { 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, },
+ { 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, },
+ { 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, },
+ { 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, },
+ { 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, },
+ { 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, },
+ { 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, },
+ { 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, },
+ { 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, },
+ { 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, },
+ { 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, },
+ { 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, },
+ { 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, },
+ { 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, },
+ { 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, },
+ { 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, },
+ { 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, },
+ { 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, },
+ { 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, },
+ { 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, },
+ { 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, },
+ { 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, },
+ { 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, },
+ { 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, },
+ { 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, },
+ { 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, },
+ { 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, },
+ { 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, },
+ { 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, },
+ { 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, },
+ { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
+ { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
+ };
+ unsigned char in[64];
+ struct sipkey k;
+ size_t i;
+
+ sip_tokey(&k, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017");
+
+ for (i = 0; i < sizeof in; ++i) {
+ in[i] = i;
+
+ if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i]))
+ return 0;
+ }
+
+ return 1;
+} /* sip24_valid() */
+
+
+#if SIPHASH_MAIN
+
+#include <stdio.h>
+
+int main(void) {
+ int ok = sip24_valid();
+
+ if (ok)
+ puts("OK");
+ else
+ puts("FAIL");
+
+ return !ok;
+} /* main() */
+
+#endif /* SIPHASH_MAIN */
+
+
+#endif /* SIPHASH_H */
+++ /dev/null
-/* expat_config.h for use with Open Watcom 1.5 and above. */
-
-#ifndef WATCOMCONFIG_H
-#define WATCOMCONFIG_H
-
-#ifdef __NT__
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#define BYTEORDER 1234
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "expat"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "expat 2.0.0"
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.0"
-
-/* Define to specify how much context to retain around the current parse
- point. */
-#define XML_CONTEXT_BYTES 1024
-
-/* Define to make parameter entity parsing functionality available. */
-#define XML_DTD 1
-
-/* Define to make XML Namespaces functionality available. */
-#define XML_NS 1
-
-#endif
-
#include <memory.h>
#include <string.h>
+
+#if defined(HAVE_EXPAT_CONFIG_H) /* e.g. MinGW */
+# include <expat_config.h>
+#else /* !defined(HAVE_EXPAT_CONFIG_H) */
+
+
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
+
+#endif /* !defined(HAVE_EXPAT_CONFIG_H) */
+
+
#endif /* ndef WINCONFIG_H */
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
-*/
-#define XML_BUILDING_EXPAT 1
+ 77fea421d361dca90041d0040ecf1dca651167fadf2af79e990e35168d70d933 (2.2.1+)
+*/
-#ifdef COMPILED_FROM_DSP
-#include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
-#elif defined(HAVE_EXPAT_CONFIG_H)
-#include <expat_config.h>
-#endif /* ndef COMPILED_FROM_DSP */
+#define _GNU_SOURCE 1 /* syscall prototype */
#include <stddef.h>
#include <string.h> /* memset(), memcpy() */
#include <assert.h>
#include <limits.h> /* UINT_MAX */
-#include <time.h> /* time() */
+#include <stdio.h> /* fprintf */
+#include <stdlib.h> /* getenv */
+
+#ifdef _WIN32
+#define getpid GetCurrentProcessId
+#else
+#include <sys/time.h> /* gettimeofday() */
+#include <sys/types.h> /* getpid() */
+#include <unistd.h> /* getpid() */
+#endif
+
+#define XML_BUILDING_EXPAT 1
+
+#ifdef _WIN32
+#include "winconfig.h"
+#elif defined(HAVE_EXPAT_CONFIG_H)
+#include <expat_config.h>
+#endif /* ndef _WIN32 */
#include "ascii.h"
#include "expat.h"
+#include "siphash.h"
#ifdef XML_UNICODE
#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
const XML_Memory_Handling_Suite *mem;
} HASH_TABLE;
-/* Basic character hash algorithm, taken from Python's string hash:
- h = h * 1000003 ^ character, the constant being a prime number.
+static size_t
+keylen(KEY s);
-*/
-#ifdef XML_UNICODE
-#define CHAR_HASH(h, c) \
- (((h) * 0xF4243) ^ (unsigned short)(c))
-#else
-#define CHAR_HASH(h, c) \
- (((h) * 0xF4243) ^ (unsigned char)(c))
-#endif
+static void
+copy_salt_to_sipkey(XML_Parser parser, struct sipkey * key);
/* For probing (after a collision) we need a step size relative prime
to the hash table size, which is a power of 2. We use double-hashing,
const char *end, const char **nextPtr, XML_Bool haveMore);
#endif /* XML_DTD */
+static void
+freeBindings(XML_Parser parser, BINDING *bindings);
static enum XML_Error
storeAtts(XML_Parser parser, const ENCODING *, const char *s,
TAG_NAME *tagNamePtr, BINDING **bindingsPtr);
getElementType(XML_Parser parser, const ENCODING *enc,
const char *ptr, const char *end);
-static unsigned long generate_hash_secret_salt(void);
+static unsigned long generate_hash_secret_salt(XML_Parser parser);
static XML_Bool startParsing(XML_Parser parser);
static XML_Parser
ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
};
+
+#if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
+# include <errno.h>
+
+# if defined(HAVE_GETRANDOM)
+# include <sys/random.h> /* getrandom */
+# else
+# include <unistd.h> /* syscall */
+# include <sys/syscall.h> /* SYS_getrandom */
+# endif
+
+/* Obtain entropy on Linux 3.17+ */
+static int
+writeRandomBytes_getrandom(void * target, size_t count) {
+ int success = 0; /* full count bytes written? */
+ size_t bytesWrittenTotal = 0;
+ const unsigned int getrandomFlags = 0;
+
+ do {
+ void * const currentTarget = (void*)((char*)target + bytesWrittenTotal);
+ const size_t bytesToWrite = count - bytesWrittenTotal;
+
+ const int bytesWrittenMore =
+#if defined(HAVE_GETRANDOM)
+ getrandom(currentTarget, bytesToWrite, getrandomFlags);
+#else
+ syscall(SYS_getrandom, currentTarget, bytesToWrite, getrandomFlags);
+#endif
+
+ if (bytesWrittenMore > 0) {
+ bytesWrittenTotal += bytesWrittenMore;
+ if (bytesWrittenTotal >= count)
+ success = 1;
+ }
+ } while (! success && (errno == EINTR || errno == EAGAIN));
+
+ return success;
+}
+
+#endif /* defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM) */
+
+
+#ifdef _WIN32
+
+typedef BOOLEAN (APIENTRY *RTLGENRANDOM_FUNC)(PVOID, ULONG);
+
+/* Obtain entropy on Windows XP / Windows Server 2003 and later.
+ * Hint on RtlGenRandom and the following article from libsodioum.
+ *
+ * Michael Howard: Cryptographically Secure Random number on Windows without using CryptoAPI
+ * https://blogs.msdn.microsoft.com/michael_howard/2005/01/14/cryptographically-secure-random-number-on-windows-without-using-cryptoapi/
+ */
+static int
+writeRandomBytes_RtlGenRandom(void * target, size_t count) {
+ int success = 0; /* full count bytes written? */
+ const HMODULE advapi32 = LoadLibrary("ADVAPI32.DLL");
+
+ if (advapi32) {
+ const RTLGENRANDOM_FUNC RtlGenRandom
+ = (RTLGENRANDOM_FUNC)GetProcAddress(advapi32, "SystemFunction036");
+ if (RtlGenRandom) {
+ if (RtlGenRandom((PVOID)target, (ULONG)count) == TRUE) {
+ success = 1;
+ }
+ }
+ FreeLibrary(advapi32);
+ }
+
+ return success;
+}
+
+#endif /* _WIN32 */
+
+
static unsigned long
-generate_hash_secret_salt(void)
+gather_time_entropy(void)
{
- unsigned int seed = time(NULL) % UINT_MAX;
- srand(seed);
- return rand();
+#ifdef _WIN32
+ FILETIME ft;
+ GetSystemTimeAsFileTime(&ft); /* never fails */
+ return ft.dwHighDateTime ^ ft.dwLowDateTime;
+#else
+ struct timeval tv;
+ int gettimeofday_res;
+
+ gettimeofday_res = gettimeofday(&tv, NULL);
+ assert (gettimeofday_res == 0);
+
+ /* Microseconds time is <20 bits entropy */
+ return tv.tv_usec;
+#endif
+}
+
+#if defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_LIBBSD)
+# include <bsd/stdlib.h>
+#endif
+
+static unsigned long
+ENTROPY_DEBUG(const char * label, unsigned long entropy) {
+ const char * const EXPAT_ENTROPY_DEBUG = getenv("EXPAT_ENTROPY_DEBUG");
+ if (EXPAT_ENTROPY_DEBUG && ! strcmp(EXPAT_ENTROPY_DEBUG, "1")) {
+ fprintf(stderr, "Entropy: %s --> 0x%0*lx (%lu bytes)\n",
+ label,
+ (int)sizeof(entropy) * 2, entropy,
+ (unsigned long)sizeof(entropy));
+ }
+ return entropy;
+}
+
+static unsigned long
+generate_hash_secret_salt(XML_Parser parser)
+{
+ unsigned long entropy;
+ (void)parser;
+#if defined(HAVE_ARC4RANDOM_BUF) || defined(__CloudABI__)
+ (void)gather_time_entropy;
+ arc4random_buf(&entropy, sizeof(entropy));
+ return ENTROPY_DEBUG("arc4random_buf", entropy);
+#else
+ /* Try high quality providers first .. */
+#ifdef _WIN32
+ if (writeRandomBytes_RtlGenRandom((void *)&entropy, sizeof(entropy))) {
+ return ENTROPY_DEBUG("RtlGenRandom", entropy);
+ }
+#elif defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
+ if (writeRandomBytes_getrandom((void *)&entropy, sizeof(entropy))) {
+ return ENTROPY_DEBUG("getrandom", entropy);
+ }
+#endif
+ /* .. and self-made low quality for backup: */
+
+ /* Process ID is 0 bits entropy if attacker has local access */
+ entropy = gather_time_entropy() ^ getpid();
+
+ /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
+ if (sizeof(unsigned long) == 4) {
+ return ENTROPY_DEBUG("fallback(4)", entropy * 2147483647);
+ } else {
+ return ENTROPY_DEBUG("fallback(8)",
+ entropy * (unsigned long)2305843009213693951);
+ }
+#endif
+}
+
+static unsigned long
+get_hash_secret_salt(XML_Parser parser) {
+ if (parser->m_parentParser != NULL)
+ return get_hash_secret_salt(parser->m_parentParser);
+ return parser->m_hash_secret_salt;
}
static XML_Bool /* only valid for root parser */
{
/* hash functions must be initialized before setContext() is called */
if (hash_secret_salt == 0)
- hash_secret_salt = generate_hash_secret_salt();
+ hash_secret_salt = generate_hash_secret_salt(parser);
if (ns) {
/* implicit context only set for root parser, since child
parsers (i.e. external entity parsers) will inherit it
{
TAG *tStk;
OPEN_INTERNAL_ENTITY *openEntityList;
+
+ if (parser == NULL)
+ return XML_FALSE;
+
if (parentParser)
return XML_FALSE;
/* move tagStack to freeTagList */
enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
{
+ if (parser == NULL)
+ return XML_STATUS_ERROR;
/* Block after XML_Parse()/XML_ParseBuffer() has been called.
XXX There's no way for the caller to determine which of the
XXX possible error cases caused the XML_STATUS_ERROR return.
{
XML_Parser parser = oldParser;
DTD *newDtd = NULL;
- DTD *oldDtd = _dtd;
- XML_StartElementHandler oldStartElementHandler = startElementHandler;
- XML_EndElementHandler oldEndElementHandler = endElementHandler;
- XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler;
- XML_ProcessingInstructionHandler oldProcessingInstructionHandler
- = processingInstructionHandler;
- XML_CommentHandler oldCommentHandler = commentHandler;
- XML_StartCdataSectionHandler oldStartCdataSectionHandler
- = startCdataSectionHandler;
- XML_EndCdataSectionHandler oldEndCdataSectionHandler
- = endCdataSectionHandler;
- XML_DefaultHandler oldDefaultHandler = defaultHandler;
- XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler
- = unparsedEntityDeclHandler;
- XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler;
- XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler
- = startNamespaceDeclHandler;
- XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler
- = endNamespaceDeclHandler;
- XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler;
- XML_ExternalEntityRefHandler oldExternalEntityRefHandler
- = externalEntityRefHandler;
- XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler;
- XML_UnknownEncodingHandler oldUnknownEncodingHandler
- = unknownEncodingHandler;
- XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler;
- XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler;
- XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler;
- XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler;
- ELEMENT_TYPE * oldDeclElementType = declElementType;
-
- void *oldUserData = userData;
- void *oldHandlerArg = handlerArg;
- XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
- XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
+ DTD *oldDtd;
+ XML_StartElementHandler oldStartElementHandler;
+ XML_EndElementHandler oldEndElementHandler;
+ XML_CharacterDataHandler oldCharacterDataHandler;
+ XML_ProcessingInstructionHandler oldProcessingInstructionHandler;
+ XML_CommentHandler oldCommentHandler;
+ XML_StartCdataSectionHandler oldStartCdataSectionHandler;
+ XML_EndCdataSectionHandler oldEndCdataSectionHandler;
+ XML_DefaultHandler oldDefaultHandler;
+ XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler;
+ XML_NotationDeclHandler oldNotationDeclHandler;
+ XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler;
+ XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler;
+ XML_NotStandaloneHandler oldNotStandaloneHandler;
+ XML_ExternalEntityRefHandler oldExternalEntityRefHandler;
+ XML_SkippedEntityHandler oldSkippedEntityHandler;
+ XML_UnknownEncodingHandler oldUnknownEncodingHandler;
+ XML_ElementDeclHandler oldElementDeclHandler;
+ XML_AttlistDeclHandler oldAttlistDeclHandler;
+ XML_EntityDeclHandler oldEntityDeclHandler;
+ XML_XmlDeclHandler oldXmlDeclHandler;
+ ELEMENT_TYPE * oldDeclElementType;
+
+ void *oldUserData;
+ void *oldHandlerArg;
+ XML_Bool oldDefaultExpandInternalEntities;
+ XML_Parser oldExternalEntityRefHandlerArg;
#ifdef XML_DTD
- enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
- int oldInEntityValue = prologState.inEntityValue;
+ enum XML_ParamEntityParsing oldParamEntityParsing;
+ int oldInEntityValue;
+#endif
+ XML_Bool oldns_triplets;
+ /* Note that the new parser shares the same hash secret as the old
+ parser, so that dtdCopy and copyEntityTable can lookup values
+ from hash tables associated with either parser without us having
+ to worry which hash secrets each table has.
+ */
+ unsigned long oldhash_secret_salt;
+
+ /* Validate the oldParser parameter before we pull everything out of it */
+ if (oldParser == NULL)
+ return NULL;
+
+ /* Stash the original parser contents on the stack */
+ oldDtd = _dtd;
+ oldStartElementHandler = startElementHandler;
+ oldEndElementHandler = endElementHandler;
+ oldCharacterDataHandler = characterDataHandler;
+ oldProcessingInstructionHandler = processingInstructionHandler;
+ oldCommentHandler = commentHandler;
+ oldStartCdataSectionHandler = startCdataSectionHandler;
+ oldEndCdataSectionHandler = endCdataSectionHandler;
+ oldDefaultHandler = defaultHandler;
+ oldUnparsedEntityDeclHandler = unparsedEntityDeclHandler;
+ oldNotationDeclHandler = notationDeclHandler;
+ oldStartNamespaceDeclHandler = startNamespaceDeclHandler;
+ oldEndNamespaceDeclHandler = endNamespaceDeclHandler;
+ oldNotStandaloneHandler = notStandaloneHandler;
+ oldExternalEntityRefHandler = externalEntityRefHandler;
+ oldSkippedEntityHandler = skippedEntityHandler;
+ oldUnknownEncodingHandler = unknownEncodingHandler;
+ oldElementDeclHandler = elementDeclHandler;
+ oldAttlistDeclHandler = attlistDeclHandler;
+ oldEntityDeclHandler = entityDeclHandler;
+ oldXmlDeclHandler = xmlDeclHandler;
+ oldDeclElementType = declElementType;
+
+ oldUserData = userData;
+ oldHandlerArg = handlerArg;
+ oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
+ oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
+#ifdef XML_DTD
+ oldParamEntityParsing = paramEntityParsing;
+ oldInEntityValue = prologState.inEntityValue;
#endif
- XML_Bool oldns_triplets = ns_triplets;
+ oldns_triplets = ns_triplets;
/* Note that the new parser shares the same hash secret as the old
parser, so that dtdCopy and copyEntityTable can lookup values
from hash tables associated with either parser without us having
to worry which hash secrets each table has.
*/
- unsigned long oldhash_secret_salt = hash_secret_salt;
+ oldhash_secret_salt = hash_secret_salt;
#ifdef XML_DTD
if (!context)
void XMLCALL
XML_UseParserAsHandlerArg(XML_Parser parser)
{
- handlerArg = parser;
+ if (parser != NULL)
+ handlerArg = parser;
}
enum XML_Error XMLCALL
XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD)
{
+ if (parser == NULL)
+ return XML_ERROR_INVALID_ARGUMENT;
#ifdef XML_DTD
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
void XMLCALL
XML_SetReturnNSTriplet(XML_Parser parser, int do_nst)
{
+ if (parser == NULL)
+ return;
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
return;
void XMLCALL
XML_SetUserData(XML_Parser parser, void *p)
{
+ if (parser == NULL)
+ return;
if (handlerArg == userData)
handlerArg = userData = p;
else
enum XML_Status XMLCALL
XML_SetBase(XML_Parser parser, const XML_Char *p)
{
+ if (parser == NULL)
+ return XML_STATUS_ERROR;
if (p) {
p = poolCopyString(&_dtd->pool, p);
if (!p)
const XML_Char * XMLCALL
XML_GetBase(XML_Parser parser)
{
+ if (parser == NULL)
+ return NULL;
return curBase;
}
int XMLCALL
XML_GetSpecifiedAttributeCount(XML_Parser parser)
{
+ if (parser == NULL)
+ return -1;
return nSpecifiedAtts;
}
int XMLCALL
XML_GetIdAttributeIndex(XML_Parser parser)
{
+ if (parser == NULL)
+ return -1;
return idAttIndex;
}
const XML_AttrInfo * XMLCALL
XML_GetAttributeInfo(XML_Parser parser)
{
+ if (parser == NULL)
+ return NULL;
return attInfo;
}
#endif
XML_StartElementHandler start,
XML_EndElementHandler end)
{
+ if (parser == NULL)
+ return;
startElementHandler = start;
endElementHandler = end;
}
void XMLCALL
XML_SetStartElementHandler(XML_Parser parser,
XML_StartElementHandler start) {
- startElementHandler = start;
+ if (parser != NULL)
+ startElementHandler = start;
}
void XMLCALL
XML_SetEndElementHandler(XML_Parser parser,
XML_EndElementHandler end) {
- endElementHandler = end;
+ if (parser != NULL)
+ endElementHandler = end;
}
void XMLCALL
XML_SetCharacterDataHandler(XML_Parser parser,
XML_CharacterDataHandler handler)
{
- characterDataHandler = handler;
+ if (parser != NULL)
+ characterDataHandler = handler;
}
void XMLCALL
XML_SetProcessingInstructionHandler(XML_Parser parser,
XML_ProcessingInstructionHandler handler)
{
- processingInstructionHandler = handler;
+ if (parser != NULL)
+ processingInstructionHandler = handler;
}
void XMLCALL
XML_SetCommentHandler(XML_Parser parser,
XML_CommentHandler handler)
{
- commentHandler = handler;
+ if (parser != NULL)
+ commentHandler = handler;
}
void XMLCALL
XML_StartCdataSectionHandler start,
XML_EndCdataSectionHandler end)
{
+ if (parser == NULL)
+ return;
startCdataSectionHandler = start;
endCdataSectionHandler = end;
}
void XMLCALL
XML_SetStartCdataSectionHandler(XML_Parser parser,
XML_StartCdataSectionHandler start) {
- startCdataSectionHandler = start;
+ if (parser != NULL)
+ startCdataSectionHandler = start;
}
void XMLCALL
XML_SetEndCdataSectionHandler(XML_Parser parser,
XML_EndCdataSectionHandler end) {
- endCdataSectionHandler = end;
+ if (parser != NULL)
+ endCdataSectionHandler = end;
}
void XMLCALL
XML_SetDefaultHandler(XML_Parser parser,
XML_DefaultHandler handler)
{
+ if (parser == NULL)
+ return;
defaultHandler = handler;
defaultExpandInternalEntities = XML_FALSE;
}
XML_SetDefaultHandlerExpand(XML_Parser parser,
XML_DefaultHandler handler)
{
+ if (parser == NULL)
+ return;
defaultHandler = handler;
defaultExpandInternalEntities = XML_TRUE;
}
XML_StartDoctypeDeclHandler start,
XML_EndDoctypeDeclHandler end)
{
+ if (parser == NULL)
+ return;
startDoctypeDeclHandler = start;
endDoctypeDeclHandler = end;
}
void XMLCALL
XML_SetStartDoctypeDeclHandler(XML_Parser parser,
XML_StartDoctypeDeclHandler start) {
- startDoctypeDeclHandler = start;
+ if (parser != NULL)
+ startDoctypeDeclHandler = start;
}
void XMLCALL
XML_SetEndDoctypeDeclHandler(XML_Parser parser,
XML_EndDoctypeDeclHandler end) {
- endDoctypeDeclHandler = end;
+ if (parser != NULL)
+ endDoctypeDeclHandler = end;
}
void XMLCALL
XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
XML_UnparsedEntityDeclHandler handler)
{
- unparsedEntityDeclHandler = handler;
+ if (parser != NULL)
+ unparsedEntityDeclHandler = handler;
}
void XMLCALL
XML_SetNotationDeclHandler(XML_Parser parser,
XML_NotationDeclHandler handler)
{
- notationDeclHandler = handler;
+ if (parser != NULL)
+ notationDeclHandler = handler;
}
void XMLCALL
XML_StartNamespaceDeclHandler start,
XML_EndNamespaceDeclHandler end)
{
+ if (parser == NULL)
+ return;
startNamespaceDeclHandler = start;
endNamespaceDeclHandler = end;
}
void XMLCALL
XML_SetStartNamespaceDeclHandler(XML_Parser parser,
XML_StartNamespaceDeclHandler start) {
- startNamespaceDeclHandler = start;
+ if (parser != NULL)
+ startNamespaceDeclHandler = start;
}
void XMLCALL
XML_SetEndNamespaceDeclHandler(XML_Parser parser,
XML_EndNamespaceDeclHandler end) {
- endNamespaceDeclHandler = end;
+ if (parser != NULL)
+ endNamespaceDeclHandler = end;
}
void XMLCALL
XML_SetNotStandaloneHandler(XML_Parser parser,
XML_NotStandaloneHandler handler)
{
- notStandaloneHandler = handler;
+ if (parser != NULL)
+ notStandaloneHandler = handler;
}
void XMLCALL
XML_SetExternalEntityRefHandler(XML_Parser parser,
XML_ExternalEntityRefHandler handler)
{
- externalEntityRefHandler = handler;
+ if (parser != NULL)
+ externalEntityRefHandler = handler;
}
void XMLCALL
XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg)
{
+ if (parser == NULL)
+ return;
if (arg)
externalEntityRefHandlerArg = (XML_Parser)arg;
else
XML_SetSkippedEntityHandler(XML_Parser parser,
XML_SkippedEntityHandler handler)
{
- skippedEntityHandler = handler;
+ if (parser != NULL)
+ skippedEntityHandler = handler;
}
void XMLCALL
XML_UnknownEncodingHandler handler,
void *data)
{
+ if (parser == NULL)
+ return;
unknownEncodingHandler = handler;
unknownEncodingHandlerData = data;
}
XML_SetElementDeclHandler(XML_Parser parser,
XML_ElementDeclHandler eldecl)
{
- elementDeclHandler = eldecl;
+ if (parser != NULL)
+ elementDeclHandler = eldecl;
}
void XMLCALL
XML_SetAttlistDeclHandler(XML_Parser parser,
XML_AttlistDeclHandler attdecl)
{
- attlistDeclHandler = attdecl;
+ if (parser != NULL)
+ attlistDeclHandler = attdecl;
}
void XMLCALL
XML_SetEntityDeclHandler(XML_Parser parser,
XML_EntityDeclHandler handler)
{
- entityDeclHandler = handler;
+ if (parser != NULL)
+ entityDeclHandler = handler;
}
void XMLCALL
XML_SetXmlDeclHandler(XML_Parser parser,
XML_XmlDeclHandler handler) {
- xmlDeclHandler = handler;
+ if (parser != NULL)
+ xmlDeclHandler = handler;
}
int XMLCALL
XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing peParsing)
{
+ if (parser == NULL)
+ return 0;
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
return 0;
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt)
{
+ if (parser == NULL)
+ return 0;
+ if (parser->m_parentParser)
+ return XML_SetHashSalt(parser->m_parentParser, hash_salt);
/* block after XML_Parse()/XML_ParseBuffer() has been called */
if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
return 0;
enum XML_Status XMLCALL
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
{
+ if ((parser == NULL) || (len < 0) || ((s == NULL) && (len != 0))) {
+ errorCode = XML_ERROR_INVALID_ARGUMENT;
+ return XML_STATUS_ERROR;
+ }
switch (ps_parsing) {
case XML_SUSPENDED:
errorCode = XML_ERROR_SUSPENDED;
const char *end;
int nLeftOver;
enum XML_Status result;
+ /* Detect overflow (a+b > MAX <==> b > MAX-a) */
+ if (len > ((XML_Size)-1) / 2 - parseEndByteIndex) {
+ errorCode = XML_ERROR_NO_MEMORY;
+ eventPtr = eventEndPtr = NULL;
+ processor = errorProcessor;
+ return XML_STATUS_ERROR;
+ }
parseEndByteIndex += len;
positionPtr = s;
ps_finalBuffer = (XML_Bool)isFinal;
nLeftOver = s + len - end;
if (nLeftOver) {
if (buffer == NULL || nLeftOver > bufferLim - buffer) {
- /* FIXME avoid integer overflow */
- char *temp;
- temp = (buffer == NULL
- ? (char *)MALLOC(len * 2)
- : (char *)REALLOC(buffer, len * 2));
+ /* avoid _signed_ integer overflow */
+ char *temp = NULL;
+ const int bytesToAllocate = (int)((unsigned)len * 2U);
+ if (bytesToAllocate > 0) {
+ temp = (buffer == NULL
+ ? (char *)MALLOC(bytesToAllocate)
+ : (char *)REALLOC(buffer, bytesToAllocate));
+ }
if (temp == NULL) {
errorCode = XML_ERROR_NO_MEMORY;
eventPtr = eventEndPtr = NULL;
return XML_STATUS_ERROR;
}
buffer = temp;
- bufferLim = buffer + len * 2;
+ bufferLim = buffer + bytesToAllocate;
}
memcpy(buffer, end, nLeftOver);
}
const char *start;
enum XML_Status result = XML_STATUS_OK;
+ if (parser == NULL)
+ return XML_STATUS_ERROR;
switch (ps_parsing) {
case XML_SUSPENDED:
errorCode = XML_ERROR_SUSPENDED;
void * XMLCALL
XML_GetBuffer(XML_Parser parser, int len)
{
+ if (parser == NULL)
+ return NULL;
if (len < 0) {
errorCode = XML_ERROR_NO_MEMORY;
return NULL;
if (len > bufferLim - bufferEnd) {
#ifdef XML_CONTEXT_BYTES
int keep;
-#endif
- int neededSize = len + (int)(bufferEnd - bufferPtr);
+#endif /* defined XML_CONTEXT_BYTES */
+ /* Do not invoke signed arithmetic overflow: */
+ int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr));
if (neededSize < 0) {
errorCode = XML_ERROR_NO_MEMORY;
return NULL;
}
#ifdef XML_CONTEXT_BYTES
keep = (int)(bufferPtr - buffer);
-
if (keep > XML_CONTEXT_BYTES)
keep = XML_CONTEXT_BYTES;
neededSize += keep;
if (bufferSize == 0)
bufferSize = INIT_BUFFER_SIZE;
do {
- bufferSize *= 2;
+ /* Do not invoke signed arithmetic overflow: */
+ bufferSize = (int) (2U * (unsigned) bufferSize);
} while (bufferSize < neededSize && bufferSize > 0);
if (bufferSize <= 0) {
errorCode = XML_ERROR_NO_MEMORY;
enum XML_Status XMLCALL
XML_StopParser(XML_Parser parser, XML_Bool resumable)
{
+ if (parser == NULL)
+ return XML_STATUS_ERROR;
switch (ps_parsing) {
case XML_SUSPENDED:
if (resumable) {
{
enum XML_Status result = XML_STATUS_OK;
+ if (parser == NULL)
+ return XML_STATUS_ERROR;
if (ps_parsing != XML_SUSPENDED) {
errorCode = XML_ERROR_NOT_SUSPENDED;
return XML_STATUS_ERROR;
void XMLCALL
XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status)
{
+ if (parser == NULL)
+ return;
assert(status != NULL);
*status = parser->m_parsingStatus;
}
enum XML_Error XMLCALL
XML_GetErrorCode(XML_Parser parser)
{
+ if (parser == NULL)
+ return XML_ERROR_INVALID_ARGUMENT;
return errorCode;
}
XML_Index XMLCALL
XML_GetCurrentByteIndex(XML_Parser parser)
{
+ if (parser == NULL)
+ return -1;
if (eventPtr)
- return parseEndByteIndex - (parseEndPtr - eventPtr);
+ return (XML_Index)(parseEndByteIndex - (parseEndPtr - eventPtr));
return -1;
}
int XMLCALL
XML_GetCurrentByteCount(XML_Parser parser)
{
+ if (parser == NULL)
+ return 0;
if (eventEndPtr && eventPtr)
return (int)(eventEndPtr - eventPtr);
return 0;
XML_GetInputContext(XML_Parser parser, int *offset, int *size)
{
#ifdef XML_CONTEXT_BYTES
+ if (parser == NULL)
+ return NULL;
if (eventPtr && buffer) {
- *offset = (int)(eventPtr - buffer);
- *size = (int)(bufferEnd - buffer);
+ if (offset != NULL)
+ *offset = (int)(eventPtr - buffer);
+ if (size != NULL)
+ *size = (int)(bufferEnd - buffer);
return buffer;
}
+#else
+ (void)parser;
+ (void)offset;
+ (void)size;
#endif /* defined XML_CONTEXT_BYTES */
return (char *) 0;
}
XML_Size XMLCALL
XML_GetCurrentLineNumber(XML_Parser parser)
{
+ if (parser == NULL)
+ return 0;
if (eventPtr && eventPtr >= positionPtr) {
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr = eventPtr;
XML_Size XMLCALL
XML_GetCurrentColumnNumber(XML_Parser parser)
{
+ if (parser == NULL)
+ return 0;
if (eventPtr && eventPtr >= positionPtr) {
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr = eventPtr;
void XMLCALL
XML_FreeContentModel(XML_Parser parser, XML_Content *model)
{
- FREE(model);
+ if (parser != NULL)
+ FREE(model);
}
void * XMLCALL
XML_MemMalloc(XML_Parser parser, size_t size)
{
+ if (parser == NULL)
+ return NULL;
return MALLOC(size);
}
void * XMLCALL
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size)
{
+ if (parser == NULL)
+ return NULL;
return REALLOC(ptr, size);
}
void XMLCALL
XML_MemFree(XML_Parser parser, void *ptr)
{
- FREE(ptr);
+ if (parser != NULL)
+ FREE(ptr);
}
void XMLCALL
XML_DefaultCurrent(XML_Parser parser)
{
+ if (parser == NULL)
+ return;
if (defaultHandler) {
if (openInternalEntities)
reportDefault(parser,
for (;;) {
int bufSize;
int convLen;
- XmlConvert(enc,
+ const enum XML_Convert_Result convert_res = XmlConvert(enc,
&fromPtr, rawNameEnd,
(ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
convLen = (int)(toPtr - (XML_Char *)tag->buf);
- if (fromPtr == rawNameEnd) {
+ if ((fromPtr >= rawNameEnd) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
tag->name.strLen = convLen;
break;
}
return XML_ERROR_NO_MEMORY;
poolFinish(&tempPool);
result = storeAtts(parser, enc, s, &name, &bindings);
- if (result)
+ if (result != XML_ERROR_NONE) {
+ freeBindings(parser, bindings);
return result;
+ }
poolFinish(&tempPool);
if (startElementHandler) {
startElementHandler(handlerArg, name.str, (const XML_Char **)atts);
if (noElmHandlers && defaultHandler)
reportDefault(parser, enc, s, next);
poolClear(&tempPool);
- while (bindings) {
- BINDING *b = bindings;
- if (endNamespaceDeclHandler)
- endNamespaceDeclHandler(handlerArg, b->prefix->name);
- bindings = bindings->nextTagBinding;
- b->nextTagBinding = freeBindingList;
- freeBindingList = b;
- b->prefix->binding = b->prevPrefixBinding;
- }
+ freeBindings(parser, bindings);
}
if (tagLevel == 0)
return epilogProcessor(parser, next, end, nextPtr);
if (MUST_CONVERT(enc, s)) {
for (;;) {
ICHAR *dataPtr = (ICHAR *)dataBuf;
- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
*eventEndPP = s;
charDataHandler(handlerArg, dataBuf,
(int)(dataPtr - (ICHAR *)dataBuf));
- if (s == next)
+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
break;
*eventPP = s;
}
/* not reached */
}
+/* This function does not call free() on the allocated memory, merely
+ * moving it to the parser's freeBindingList where it can be freed or
+ * reused as appropriate.
+ */
+static void
+freeBindings(XML_Parser parser, BINDING *bindings)
+{
+ while (bindings) {
+ BINDING *b = bindings;
+
+ /* startNamespaceDeclHandler will have been called for this
+ * binding in addBindings(), so call the end handler now.
+ */
+ if (endNamespaceDeclHandler)
+ endNamespaceDeclHandler(handlerArg, b->prefix->name);
+
+ bindings = bindings->nextTagBinding;
+ b->nextTagBinding = freeBindingList;
+ freeBindingList = b;
+ b->prefix->binding = b->prevPrefixBinding;
+ }
+}
+
/* Precondition: all arguments must be non-NULL;
Purpose:
- normalize attributes
if (s[-1] == 2) { /* prefixed */
ATTRIBUTE_ID *id;
const BINDING *b;
- unsigned long uriHash = hash_secret_salt;
+ unsigned long uriHash;
+ struct siphash sip_state;
+ struct sipkey sip_key;
+
+ copy_salt_to_sipkey(parser, &sip_key);
+ sip24_init(&sip_state, &sip_key);
+
((XML_Char *)s)[-1] = 0; /* clear flag */
id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
if (!id || !id->prefix)
if (!b)
return XML_ERROR_UNBOUND_PREFIX;
- /* as we expand the name we also calculate its hash value */
for (j = 0; j < b->uriLen; j++) {
const XML_Char c = b->uri[j];
if (!poolAppendChar(&tempPool, c))
return XML_ERROR_NO_MEMORY;
- uriHash = CHAR_HASH(uriHash, c);
}
+
+ sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
+
while (*s++ != XML_T(ASCII_COLON))
;
+
+ sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
+
do { /* copies null terminator */
- const XML_Char c = *s;
if (!poolAppendChar(&tempPool, *s))
return XML_ERROR_NO_MEMORY;
- uriHash = CHAR_HASH(uriHash, c);
} while (*s++);
+ uriHash = (unsigned long)sip24_final(&sip_state);
+
{ /* Check hash table for duplicate of expanded name (uriName).
Derived from code in lookup(parser, HASH_TABLE *table, ...).
*/
if (MUST_CONVERT(enc, s)) {
for (;;) {
ICHAR *dataPtr = (ICHAR *)dataBuf;
- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
*eventEndPP = next;
charDataHandler(handlerArg, dataBuf,
(int)(dataPtr - (ICHAR *)dataBuf));
- if (s == next)
+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
break;
*eventPP = s;
}
*nextPtr = next;
return XML_ERROR_NONE;
}
+ /* If we get this token, we have the start of what might be a
+ normal tag, but not a declaration (i.e. it doesn't begin with
+ "<!"). In a DTD context, that isn't legal.
+ */
+ else if (tok == XML_TOK_INSTANCE_START) {
+ *nextPtr = next;
+ return XML_ERROR_SYNTAX;
+ }
start = next;
eventPtr = start;
}
openEntity->internalEventEndPtr = NULL;
textStart = (char *)entity->textPtr;
textEnd = (char *)(entity->textPtr + entity->textLen);
+ /* Set a safe default value in case 'next' does not get set */
+ next = textStart;
#ifdef XML_DTD
if (entity->is_param) {
entity = openEntity->entity;
textStart = ((char *)entity->textPtr) + entity->processed;
textEnd = (char *)(entity->textPtr + entity->textLen);
+ /* Set a safe default value in case 'next' does not get set */
+ next = textStart;
#ifdef XML_DTD
if (entity->is_param) {
static enum XML_Error PTRCALL
errorProcessor(XML_Parser parser,
- const char *s,
- const char *end,
- const char **nextPtr)
+ const char *UNUSED_P(s),
+ const char *UNUSED_P(end),
+ const char **UNUSED_P(nextPtr))
{
return errorCode;
}
const char *s, const char *end)
{
if (MUST_CONVERT(enc, s)) {
+ enum XML_Convert_Result convert_res;
const char **eventPP;
const char **eventEndPP;
if (enc == encoding) {
}
do {
ICHAR *dataPtr = (ICHAR *)dataBuf;
- XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
+ convert_res = XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
*eventEndPP = s;
defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf));
*eventPP = s;
- } while (s != end);
+ } while ((convert_res != XML_CONVERT_COMPLETED) && (convert_res != XML_CONVERT_INPUT_INCOMPLETE));
}
else
defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s));
newE->defaultAtts = (DEFAULT_ATTRIBUTE *)
ms->malloc_fcn(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
if (!newE->defaultAtts) {
- ms->free_fcn(newE);
return 0;
}
}
return XML_FALSE;
}
+static size_t
+keylen(KEY s)
+{
+ size_t len = 0;
+ for (; *s; s++, len++);
+ return len;
+}
+
+static void
+copy_salt_to_sipkey(XML_Parser parser, struct sipkey * key)
+{
+ key->k[0] = 0;
+ key->k[1] = get_hash_secret_salt(parser);
+}
+
static unsigned long FASTCALL
hash(XML_Parser parser, KEY s)
{
- unsigned long h = hash_secret_salt;
- while (*s)
- h = CHAR_HASH(h, *s++);
- return h;
+ struct siphash state;
+ struct sipkey key;
+ (void)sip_tobin;
+ (void)sip24_valid;
+ copy_salt_to_sipkey(parser, &key);
+ sip24_init(&state, &key);
+ sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
+ return (unsigned long)sip24_final(&state);
}
static NAMED *
if (!pool->ptr && !poolGrow(pool))
return NULL;
for (;;) {
- XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
- if (ptr == end)
+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
break;
if (!poolGrow(pool))
return NULL;
return pool->start;
}
+static size_t
+poolBytesToAllocateFor(int blockSize)
+{
+ /* Unprotected math would be:
+ ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
+ **
+ ** Detect overflow, avoiding _signed_ overflow undefined behavior
+ ** For a + b * c we check b * c in isolation first, so that addition of a
+ ** on top has no chance of making us accept a small non-negative number
+ */
+ const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
+
+ if (blockSize <= 0)
+ return 0;
+
+ if (blockSize > (int)(INT_MAX / stretch))
+ return 0;
+
+ {
+ const int stretchedBlockSize = blockSize * (int)stretch;
+ const int bytesToAllocate = (int)(
+ offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
+ if (bytesToAllocate < 0)
+ return 0;
+
+ return (size_t)bytesToAllocate;
+ }
+}
+
static XML_Bool FASTCALL
poolGrow(STRING_POOL *pool)
{
}
}
if (pool->blocks && pool->start == pool->blocks->s) {
- int blockSize = (int)(pool->end - pool->start)*2;
- BLOCK *temp = (BLOCK *)
- pool->mem->realloc_fcn(pool->blocks,
- (offsetof(BLOCK, s)
- + blockSize * sizeof(XML_Char)));
+ BLOCK *temp;
+ int blockSize = (int)((unsigned)(pool->end - pool->start)*2U);
+ size_t bytesToAllocate;
+
+ if (blockSize < 0)
+ return XML_FALSE;
+
+ bytesToAllocate = poolBytesToAllocateFor(blockSize);
+ if (bytesToAllocate == 0)
+ return XML_FALSE;
+
+ temp = (BLOCK *)
+ pool->mem->realloc_fcn(pool->blocks, (unsigned)bytesToAllocate);
if (temp == NULL)
return XML_FALSE;
pool->blocks = temp;
else {
BLOCK *tem;
int blockSize = (int)(pool->end - pool->start);
+ size_t bytesToAllocate;
+
+ if (blockSize < 0)
+ return XML_FALSE;
+
if (blockSize < INIT_BLOCK_SIZE)
blockSize = INIT_BLOCK_SIZE;
- else
+ else {
+ /* Detect overflow, avoiding _signed_ overflow undefined behavior */
+ if ((int)((unsigned)blockSize * 2U) < 0) {
+ return XML_FALSE;
+ }
blockSize *= 2;
- tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s)
- + blockSize * sizeof(XML_Char));
+ }
+
+ bytesToAllocate = poolBytesToAllocateFor(blockSize);
+ if (bytesToAllocate == 0)
+ return XML_FALSE;
+
+ tem = (BLOCK *)pool->mem->malloc_fcn(bytesToAllocate);
if (!tem)
return XML_FALSE;
tem->size = blockSize;
#include <stddef.h>
-#ifdef COMPILED_FROM_DSP
+#ifdef _WIN32
#include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
-#endif /* ndef COMPILED_FROM_DSP */
+#endif /* ndef _WIN32 */
#include "expat_external.h"
#include "internal.h"
static int PTRCALL
prolog2(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
doctype0(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
doctype2(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
doctype3(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
doctype4(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
doctype5(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity0(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity1(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity3(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity4(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity6(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity8(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity9(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
entity10(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
notation0(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
notation2(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
notation3(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
notation4(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist0(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist1(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist3(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist4(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist5(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist6(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist7(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
attlist9(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element0(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element3(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element4(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element5(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element6(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
element7(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
condSect1(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
condSect2(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
static int PTRCALL
declClose(PROLOG_STATE *state,
int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
}
static int PTRCALL
-error(PROLOG_STATE *state,
- int tok,
- const char *ptr,
- const char *end,
- const ENCODING *enc)
+error(PROLOG_STATE *UNUSED_P(state),
+ int UNUSED_P(tok),
+ const char *UNUSED_P(ptr),
+ const char *UNUSED_P(end),
+ const ENCODING *UNUSED_P(enc))
{
return XML_ROLE_NONE;
}
#include <stddef.h>
-#ifdef COMPILED_FROM_DSP
+#ifdef _WIN32
#include "winconfig.h"
-#elif defined(MACOS_CLASSIC)
-#include "macconfig.h"
-#elif defined(__amigaos__)
-#include "amigaconfig.h"
-#elif defined(__WATCOMC__)
-#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
#include <expat_config.h>
#endif
-#endif /* ndef COMPILED_FROM_DSP */
+#endif /* ndef _WIN32 */
#include "expat_external.h"
#include "internal.h"
#define VTABLE VTABLE1, PREFIX(toUtf8), PREFIX(toUtf16)
#define UCS2_GET_NAMING(pages, hi, lo) \
- (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F)))
+ (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo) & 0x1F)))
/* A 2 byte UTF-8 representation splits the characters 11 bits between
the bottom 5 and 6 bits of the bytes. We need 8 bits to index into
(namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \
+ ((((byte)[0]) & 3) << 1) \
+ ((((byte)[1]) >> 5) & 1)] \
- & (1 << (((byte)[1]) & 0x1F)))
+ & (1u << (((byte)[1]) & 0x1F)))
/* A 3 byte UTF-8 representation splits the characters 16 bits between
the bottom 4, 6 and 6 bits of the bytes. We need 8 bits to index
<< 3) \
+ ((((byte)[1]) & 3) << 1) \
+ ((((byte)[2]) >> 5) & 1)] \
- & (1 << (((byte)[2]) & 0x1F)))
+ & (1u << (((byte)[2]) & 0x1F)))
#define UTF8_GET_NAMING(pages, p, n) \
((n) == 2 \
((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
static int PTRFASTCALL
-isNever(const ENCODING *enc, const char *p)
+isNever(const ENCODING *UNUSED_P(enc), const char *UNUSED_P(p))
{
return 0;
}
static int PTRFASTCALL
-utf8_isName2(const ENCODING *enc, const char *p)
+utf8_isName2(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
}
static int PTRFASTCALL
-utf8_isName3(const ENCODING *enc, const char *p)
+utf8_isName3(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
}
#define utf8_isName4 isNever
static int PTRFASTCALL
-utf8_isNmstrt2(const ENCODING *enc, const char *p)
+utf8_isNmstrt2(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
}
static int PTRFASTCALL
-utf8_isNmstrt3(const ENCODING *enc, const char *p)
+utf8_isNmstrt3(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
}
#define utf8_isNmstrt4 isNever
static int PTRFASTCALL
-utf8_isInvalid2(const ENCODING *enc, const char *p)
+utf8_isInvalid2(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_INVALID2((const unsigned char *)p);
}
static int PTRFASTCALL
-utf8_isInvalid3(const ENCODING *enc, const char *p)
+utf8_isInvalid3(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_INVALID3((const unsigned char *)p);
}
static int PTRFASTCALL
-utf8_isInvalid4(const ENCODING *enc, const char *p)
+utf8_isInvalid4(const ENCODING *UNUSED_P(enc), const char *p)
{
return UTF8_INVALID4((const unsigned char *)p);
}
E ## isInvalid3, \
E ## isInvalid4
+#define NULL_VTABLE \
+ /* isName2 */ NULL, \
+ /* isName3 */ NULL, \
+ /* isName4 */ NULL, \
+ /* isNmstrt2 */ NULL, \
+ /* isNmstrt3 */ NULL, \
+ /* isNmstrt4 */ NULL, \
+ /* isInvalid2 */ NULL, \
+ /* isInvalid3 */ NULL, \
+ /* isInvalid4 */ NULL
+
static int FASTCALL checkCharRefNumber(int);
#include "xmltok_impl.h"
UTF8_cval4 = 0xf0
};
-static void PTRCALL
-utf8_toUtf8(const ENCODING *enc,
+void
+align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef)
+{
+ const char * fromLim = *fromLimRef;
+ size_t walked = 0;
+ for (; fromLim > from; fromLim--, walked++) {
+ const unsigned char prev = (unsigned char)fromLim[-1];
+ if ((prev & 0xf8u) == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
+ if (walked + 1 >= 4) {
+ fromLim += 4 - 1;
+ break;
+ } else {
+ walked = 0;
+ }
+ } else if ((prev & 0xf0u) == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
+ if (walked + 1 >= 3) {
+ fromLim += 3 - 1;
+ break;
+ } else {
+ walked = 0;
+ }
+ } else if ((prev & 0xe0u) == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
+ if (walked + 1 >= 2) {
+ fromLim += 2 - 1;
+ break;
+ } else {
+ walked = 0;
+ }
+ } else if ((prev & 0x80u) == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
+ break;
+ }
+ }
+ *fromLimRef = fromLim;
+}
+
+static enum XML_Convert_Result PTRCALL
+utf8_toUtf8(const ENCODING *UNUSED_P(enc),
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
{
char *to;
const char *from;
- if (fromLim - *fromP > toLim - *toP) {
- /* Avoid copying partial characters. */
- for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--)
- if (((unsigned char)fromLim[-1] & 0xc0) != 0x80)
- break;
- }
- for (to = *toP, from = *fromP; from != fromLim; from++, to++)
+ const char *fromLimInitial = fromLim;
+
+ /* Avoid copying partial characters. */
+ align_limit_to_full_utf8_characters(*fromP, &fromLim);
+
+ for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++)
*to = *from;
*fromP = from;
*toP = to;
+
+ if (fromLim < fromLimInitial)
+ return XML_CONVERT_INPUT_INCOMPLETE;
+ else if ((to == toLim) && (from < fromLim))
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
+ else
+ return XML_CONVERT_COMPLETED;
}
-static void PTRCALL
+static enum XML_Convert_Result PTRCALL
utf8_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
{
+ enum XML_Convert_Result res = XML_CONVERT_COMPLETED;
unsigned short *to = *toP;
const char *from = *fromP;
- while (from != fromLim && to != toLim) {
+ while (from < fromLim && to < toLim) {
switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) {
case BT_LEAD2:
+ if (fromLim - from < 2) {
+ res = XML_CONVERT_INPUT_INCOMPLETE;
+ goto after;
+ }
*to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f));
from += 2;
break;
case BT_LEAD3:
+ if (fromLim - from < 3) {
+ res = XML_CONVERT_INPUT_INCOMPLETE;
+ goto after;
+ }
*to++ = (unsigned short)(((from[0] & 0xf) << 12)
| ((from[1] & 0x3f) << 6) | (from[2] & 0x3f));
from += 3;
case BT_LEAD4:
{
unsigned long n;
- if (to + 1 == toLim)
+ if (toLim - to < 2) {
+ res = XML_CONVERT_OUTPUT_EXHAUSTED;
+ goto after;
+ }
+ if (fromLim - from < 4) {
+ res = XML_CONVERT_INPUT_INCOMPLETE;
goto after;
+ }
n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12)
| ((from[2] & 0x3f) << 6) | (from[3] & 0x3f);
n -= 0x10000;
break;
}
}
+ if (from < fromLim)
+ res = XML_CONVERT_OUTPUT_EXHAUSTED;
after:
*fromP = from;
*toP = to;
+ return res;
}
#ifdef XML_NS
STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_)
};
-static void PTRCALL
-latin1_toUtf8(const ENCODING *enc,
+static enum XML_Convert_Result PTRCALL
+latin1_toUtf8(const ENCODING *UNUSED_P(enc),
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
{
for (;;) {
unsigned char c;
if (*fromP == fromLim)
- break;
+ return XML_CONVERT_COMPLETED;
c = (unsigned char)**fromP;
if (c & 0x80) {
if (toLim - *toP < 2)
- break;
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
*(*toP)++ = (char)((c >> 6) | UTF8_cval2);
*(*toP)++ = (char)((c & 0x3f) | 0x80);
(*fromP)++;
}
else {
if (*toP == toLim)
- break;
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
*(*toP)++ = *(*fromP)++;
}
}
}
-static void PTRCALL
-latin1_toUtf16(const ENCODING *enc,
+static enum XML_Convert_Result PTRCALL
+latin1_toUtf16(const ENCODING *UNUSED_P(enc),
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
{
- while (*fromP != fromLim && *toP != toLim)
+ while (*fromP < fromLim && *toP < toLim)
*(*toP)++ = (unsigned char)*(*fromP)++;
+
+ if ((*toP == toLim) && (*fromP < fromLim))
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
+ else
+ return XML_CONVERT_COMPLETED;
}
#ifdef XML_NS
#include "asciitab.h"
#include "latin1tab.h"
},
- STANDARD_VTABLE(sb_)
+ STANDARD_VTABLE(sb_) NULL_VTABLE
};
#endif
#undef BT_COLON
#include "latin1tab.h"
},
- STANDARD_VTABLE(sb_)
+ STANDARD_VTABLE(sb_) NULL_VTABLE
};
-static void PTRCALL
-ascii_toUtf8(const ENCODING *enc,
+static enum XML_Convert_Result PTRCALL
+ascii_toUtf8(const ENCODING *UNUSED_P(enc),
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
{
- while (*fromP != fromLim && *toP != toLim)
+ while (*fromP < fromLim && *toP < toLim)
*(*toP)++ = *(*fromP)++;
+
+ if ((*toP == toLim) && (*fromP < fromLim))
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
+ else
+ return XML_CONVERT_COMPLETED;
}
#ifdef XML_NS
#include "asciitab.h"
/* BT_NONXML == 0 */
},
- STANDARD_VTABLE(sb_)
+ STANDARD_VTABLE(sb_) NULL_VTABLE
};
#endif
#undef BT_COLON
/* BT_NONXML == 0 */
},
- STANDARD_VTABLE(sb_)
+ STANDARD_VTABLE(sb_) NULL_VTABLE
};
static int PTRFASTCALL
}
#define DEFINE_UTF16_TO_UTF8(E) \
-static void PTRCALL \
-E ## toUtf8(const ENCODING *enc, \
+static enum XML_Convert_Result PTRCALL \
+E ## toUtf8(const ENCODING *UNUSED_P(enc), \
const char **fromP, const char *fromLim, \
char **toP, const char *toLim) \
{ \
- const char *from; \
- for (from = *fromP; from != fromLim; from += 2) { \
+ const char *from = *fromP; \
+ fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */ \
+ for (; from < fromLim; from += 2) { \
int plane; \
unsigned char lo2; \
unsigned char lo = GET_LO(from); \
if (lo < 0x80) { \
if (*toP == toLim) { \
*fromP = from; \
- return; \
+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
} \
*(*toP)++ = lo; \
break; \
case 0x4: case 0x5: case 0x6: case 0x7: \
if (toLim - *toP < 2) { \
*fromP = from; \
- return; \
+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
} \
*(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2); \
*(*toP)++ = ((lo & 0x3f) | 0x80); \
default: \
if (toLim - *toP < 3) { \
*fromP = from; \
- return; \
+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
} \
/* 16 bits divided 4, 6, 6 amongst 3 bytes */ \
*(*toP)++ = ((hi >> 4) | UTF8_cval3); \
case 0xD8: case 0xD9: case 0xDA: case 0xDB: \
if (toLim - *toP < 4) { \
*fromP = from; \
- return; \
+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
+ } \
+ if (fromLim - from < 4) { \
+ *fromP = from; \
+ return XML_CONVERT_INPUT_INCOMPLETE; \
} \
plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \
*(*toP)++ = ((plane >> 2) | UTF8_cval4); \
} \
} \
*fromP = from; \
+ if (from < fromLim) \
+ return XML_CONVERT_INPUT_INCOMPLETE; \
+ else \
+ return XML_CONVERT_COMPLETED; \
}
#define DEFINE_UTF16_TO_UTF16(E) \
-static void PTRCALL \
-E ## toUtf16(const ENCODING *enc, \
+static enum XML_Convert_Result PTRCALL \
+E ## toUtf16(const ENCODING *UNUSED_P(enc), \
const char **fromP, const char *fromLim, \
unsigned short **toP, const unsigned short *toLim) \
{ \
+ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; \
+ fromLim = *fromP + (((fromLim - *fromP) >> 1) << 1); /* shrink to even */ \
/* Avoid copying first half only of surrogate */ \
if (fromLim - *fromP > ((toLim - *toP) << 1) \
- && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \
+ && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) { \
fromLim -= 2; \
- for (; *fromP != fromLim && *toP != toLim; *fromP += 2) \
+ res = XML_CONVERT_INPUT_INCOMPLETE; \
+ } \
+ for (; *fromP < fromLim && *toP < toLim; *fromP += 2) \
*(*toP)++ = (GET_HI(*fromP) << 8) | GET_LO(*fromP); \
+ if ((*toP == toLim) && (*fromP < fromLim)) \
+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
+ else \
+ return res; \
}
#define SET2(ptr, ch) \
#include "asciitab.h"
#include "latin1tab.h"
},
- STANDARD_VTABLE(little2_)
+ STANDARD_VTABLE(little2_) NULL_VTABLE
};
#endif
#undef BT_COLON
#include "latin1tab.h"
},
- STANDARD_VTABLE(little2_)
+ STANDARD_VTABLE(little2_) NULL_VTABLE
};
#if BYTEORDER != 4321
#include "iasciitab.h"
#include "latin1tab.h"
},
- STANDARD_VTABLE(little2_)
+ STANDARD_VTABLE(little2_) NULL_VTABLE
};
#endif
#undef BT_COLON
#include "latin1tab.h"
},
- STANDARD_VTABLE(little2_)
+ STANDARD_VTABLE(little2_) NULL_VTABLE
};
#endif
#include "asciitab.h"
#include "latin1tab.h"
},
- STANDARD_VTABLE(big2_)
+ STANDARD_VTABLE(big2_) NULL_VTABLE
};
#endif
#undef BT_COLON
#include "latin1tab.h"
},
- STANDARD_VTABLE(big2_)
+ STANDARD_VTABLE(big2_) NULL_VTABLE
};
#if BYTEORDER != 1234
#include "iasciitab.h"
#include "latin1tab.h"
},
- STANDARD_VTABLE(big2_)
+ STANDARD_VTABLE(big2_) NULL_VTABLE
};
#endif
#undef BT_COLON
#include "latin1tab.h"
},
- STANDARD_VTABLE(big2_)
+ STANDARD_VTABLE(big2_) NULL_VTABLE
};
#endif
}
static void PTRCALL
-initUpdatePosition(const ENCODING *enc, const char *ptr,
+initUpdatePosition(const ENCODING *UNUSED_P(enc), const char *ptr,
const char *end, POSITION *pos)
{
normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
return (c & ~0xFFFF) || checkCharRefNumber(c) < 0;
}
-static void PTRCALL
+static enum XML_Convert_Result PTRCALL
unknown_toUtf8(const ENCODING *enc,
const char **fromP, const char *fromLim,
char **toP, const char *toLim)
const char *utf8;
int n;
if (*fromP == fromLim)
- break;
+ return XML_CONVERT_COMPLETED;
utf8 = uenc->utf8[(unsigned char)**fromP];
n = *utf8++;
if (n == 0) {
int c = uenc->convert(uenc->userData, *fromP);
n = XmlUtf8Encode(c, buf);
if (n > toLim - *toP)
- break;
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
utf8 = buf;
*fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP]
- (BT_LEAD2 - 2));
}
else {
if (n > toLim - *toP)
- break;
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
(*fromP)++;
}
do {
}
}
-static void PTRCALL
+static enum XML_Convert_Result PTRCALL
unknown_toUtf16(const ENCODING *enc,
const char **fromP, const char *fromLim,
unsigned short **toP, const unsigned short *toLim)
{
const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
- while (*fromP != fromLim && *toP != toLim) {
+ while (*fromP < fromLim && *toP < toLim) {
unsigned short c = uenc->utf16[(unsigned char)**fromP];
if (c == 0) {
c = (unsigned short)
(*fromP)++;
*(*toP)++ = c;
}
+
+ if ((*toP == toLim) && (*fromP < fromLim))
+ return XML_CONVERT_OUTPUT_EXHAUSTED;
+ else
+ return XML_CONVERT_COMPLETED;
}
ENCODING *
{
const ENCODING **encPtr;
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
encPtr = enc->encPtr;
if (ptr + 1 == end) {
const char *,
const char **);
+enum XML_Convert_Result {
+ XML_CONVERT_COMPLETED = 0,
+ XML_CONVERT_INPUT_INCOMPLETE = 1,
+ XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
+};
+
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
const char *ptr,
const char *end,
const char **badPtr);
- void (PTRCALL *utf8Convert)(const ENCODING *enc,
+ enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
char **toP,
const char *toLim);
- void (PTRCALL *utf16Convert)(const ENCODING *enc,
+ enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,
#define PREFIX(ident) ident
#endif
+
+#define HAS_CHARS(enc, ptr, end, count) \
+ (end - ptr >= count * MINBPC(enc))
+
+#define HAS_CHAR(enc, ptr, end) \
+ HAS_CHARS(enc, ptr, end, 1)
+
+#define REQUIRE_CHARS(enc, ptr, end, count) \
+ { \
+ if (! HAS_CHARS(enc, ptr, end, count)) { \
+ return XML_TOK_PARTIAL; \
+ } \
+ }
+
+#define REQUIRE_CHAR(enc, ptr, end) \
+ REQUIRE_CHARS(enc, ptr, end, 1)
+
+
/* ptr points to character following "<!-" */
static int PTRCALL
PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr != end) {
+ if (HAS_CHAR(enc, ptr, end)) {
if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
ptr += MINBPC(enc);
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
INVALID_CASES(ptr, nextTokPtr)
case BT_MINUS:
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
*nextTokPtr = ptr;
return XML_TOK_INVALID;
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
case BT_MINUS:
return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_PERCNT:
- if (ptr + MINBPC(enc) == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHARS(enc, ptr, end, 2);
/* don't allow <!ENTITY% foo "whatever"> */
switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
case BT_S: case BT_CR: case BT_LF: case BT_PERCNT:
}
static int PTRCALL
-PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
+PREFIX(checkPiTarget)(const ENCODING *UNUSED_P(enc), const char *ptr,
const char *end, int *tokPtr)
{
int upper = 0;
{
int tok;
const char *target = ptr;
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_CR: case BT_LF:
return XML_TOK_INVALID;
}
ptr += MINBPC(enc);
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
INVALID_CASES(ptr, nextTokPtr)
case BT_QUEST:
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
*nextTokPtr = ptr + MINBPC(enc);
return tok;
return XML_TOK_INVALID;
}
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
*nextTokPtr = ptr + MINBPC(enc);
return tok;
}
static int PTRCALL
-PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
+PREFIX(scanCdataSection)(const ENCODING *UNUSED_P(enc), const char *ptr,
const char *end, const char **nextTokPtr)
{
static const char CDATA_LSQB[] = { ASCII_C, ASCII_D, ASCII_A,
ASCII_T, ASCII_A, ASCII_LSQB };
int i;
/* CDATA[ */
- if (end - ptr < 6 * MINBPC(enc))
- return XML_TOK_PARTIAL;
+ REQUIRE_CHARS(enc, ptr, end, 6);
for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
if (!CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
*nextTokPtr = ptr;
PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
if (MINBPC(enc) > 1) {
size_t n = end - ptr;
switch (BYTE_TYPE(enc, ptr)) {
case BT_RSQB:
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
break;
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
ptr -= MINBPC(enc);
break;
return XML_TOK_CDATA_SECT_CLOSE;
case BT_CR:
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc);
*nextTokPtr = ptr;
ptr += MINBPC(enc);
break;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_CR: case BT_LF:
- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
+ for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_S: case BT_CR: case BT_LF:
break;
PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr != end) {
+ if (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_DIGIT:
case BT_HEX:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
+ for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_DIGIT:
case BT_HEX:
PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
const char *end, const char **nextTokPtr)
{
- if (ptr != end) {
+ if (HAS_CHAR(enc, ptr, end)) {
if (CHAR_MATCHES(enc, ptr, ASCII_x))
return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
switch (BYTE_TYPE(enc, ptr)) {
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
+ for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_DIGIT:
break;
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_NUM:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_SEMI:
#ifdef XML_NS
int hadColon = 0;
#endif
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
#ifdef XML_NS
}
hadColon = 1;
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
int t;
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
t = BYTE_TYPE(enc, ptr);
if (t == BT_EQUALS)
break;
#endif
for (;;) {
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
open = BYTE_TYPE(enc, ptr);
if (open == BT_QUOT || open == BT_APOS)
break;
/* in attribute value */
for (;;) {
int t;
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
t = BYTE_TYPE(enc, ptr);
if (t == open)
break;
}
}
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
case BT_S:
case BT_CR:
/* ptr points to closing quote */
for (;;) {
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_CR: case BT_LF:
case BT_SOL:
sol:
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
*nextTokPtr = ptr;
return XML_TOK_INVALID;
#ifdef XML_NS
int hadColon;
#endif
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_EXCL:
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
case BT_MINUS:
return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
hadColon = 0;
#endif
/* we have a start-tag */
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
#ifdef XML_NS
}
hadColon = 1;
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
case BT_S: case BT_CR: case BT_LF:
{
ptr += MINBPC(enc);
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_GT:
case BT_SOL:
sol:
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
*nextTokPtr = ptr;
return XML_TOK_INVALID;
PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
if (MINBPC(enc) > 1) {
size_t n = end - ptr;
return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
case BT_CR:
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return XML_TOK_TRAILING_CR;
if (BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc);
return XML_TOK_DATA_NEWLINE;
case BT_RSQB:
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return XML_TOK_TRAILING_RSQB;
if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
break;
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return XML_TOK_TRAILING_RSQB;
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
ptr -= MINBPC(enc);
ptr += MINBPC(enc);
break;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
#undef LEAD_CASE
case BT_RSQB:
- if (ptr + MINBPC(enc) != end) {
+ if (HAS_CHARS(enc, ptr, end, 2)) {
if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
ptr += MINBPC(enc);
break;
}
- if (ptr + 2*MINBPC(enc) != end) {
+ if (HAS_CHARS(enc, ptr, end, 3)) {
if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) {
ptr += MINBPC(enc);
break;
PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_SEMI:
PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_CR: case BT_LF: case BT_S:
const char *ptr, const char *end,
const char **nextTokPtr)
{
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
int t = BYTE_TYPE(enc, ptr);
switch (t) {
INVALID_CASES(ptr, nextTokPtr)
ptr += MINBPC(enc);
if (t != open)
break;
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return -XML_TOK_LITERAL;
*nextTokPtr = ptr;
switch (BYTE_TYPE(enc, ptr)) {
const char **nextTokPtr)
{
int tok;
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
if (MINBPC(enc) > 1) {
size_t n = end - ptr;
case BT_LT:
{
ptr += MINBPC(enc);
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
case BT_EXCL:
return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
case BT_S: case BT_LF:
for (;;) {
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
break;
switch (BYTE_TYPE(enc, ptr)) {
case BT_S: case BT_LF:
return XML_TOK_OPEN_BRACKET;
case BT_RSQB:
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return -XML_TOK_CLOSE_BRACKET;
if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
- if (ptr + MINBPC(enc) == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHARS(enc, ptr, end, 2);
if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
*nextTokPtr = ptr + 2*MINBPC(enc);
return XML_TOK_COND_SECT_CLOSE;
return XML_TOK_OPEN_PAREN;
case BT_RPAR:
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return -XML_TOK_CLOSE_PAREN;
switch (BYTE_TYPE(enc, ptr)) {
case BT_AST:
*nextTokPtr = ptr;
return XML_TOK_INVALID;
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
case BT_GT: case BT_RPAR: case BT_COMMA:
ptr += MINBPC(enc);
switch (tok) {
case XML_TOK_NAME:
- if (ptr == end)
- return XML_TOK_PARTIAL;
+ REQUIRE_CHAR(enc, ptr, end);
tok = XML_TOK_PREFIXED_NAME;
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
const char *end, const char **nextTokPtr)
{
const char *start;
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
+ else if (! HAS_CHAR(enc, ptr, end))
+ return XML_TOK_PARTIAL;
start = ptr;
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: ptr += n; break;
case BT_CR:
if (ptr == start) {
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return XML_TOK_TRAILING_CR;
if (BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc);
const char *end, const char **nextTokPtr)
{
const char *start;
- if (ptr == end)
+ if (ptr >= end)
return XML_TOK_NONE;
+ else if (! HAS_CHAR(enc, ptr, end))
+ return XML_TOK_PARTIAL;
start = ptr;
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: ptr += n; break;
case BT_CR:
if (ptr == start) {
ptr += MINBPC(enc);
- if (ptr == end)
+ if (! HAS_CHAR(enc, ptr, end))
return XML_TOK_TRAILING_CR;
if (BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc);
end = ptr + n;
}
}
- while (ptr != end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
INVALID_CASES(ptr, nextTokPtr)
case BT_LT:
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) {
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) {
++level;
ptr += MINBPC(enc);
}
break;
case BT_RSQB:
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
- if ((ptr += MINBPC(enc)) == end)
- return XML_TOK_PARTIAL;
+ ptr += MINBPC(enc);
+ REQUIRE_CHAR(enc, ptr, end);
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
ptr += MINBPC(enc);
if (level == 0) {
{
ptr += MINBPC(enc);
end -= MINBPC(enc);
- for (; ptr != end; ptr += MINBPC(enc)) {
+ for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
switch (BYTE_TYPE(enc, ptr)) {
case BT_DIGIT:
case BT_HEX:
}
static int PTRFASTCALL
-PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
+PREFIX(charRefNumber)(const ENCODING *UNUSED_P(enc), const char *ptr)
{
int result = 0;
/* skip &# */
}
static int PTRCALL
-PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
+PREFIX(predefinedEntityName)(const ENCODING *UNUSED_P(enc), const char *ptr,
const char *end)
{
switch ((end - ptr)/MINBPC(enc)) {
}
static int PTRCALL
-PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
+PREFIX(nameMatchesAscii)(const ENCODING *UNUSED_P(enc), const char *ptr1,
const char *end1, const char *ptr2)
{
for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
- if (ptr1 == end1)
+ if (end1 - ptr1 < MINBPC(enc))
return 0;
if (!CHAR_MATCHES(enc, ptr1, *ptr2))
return 0;
const char *end,
POSITION *pos)
{
- while (ptr < end) {
+ while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
case BT_CR:
pos->lineNumber++;
ptr += MINBPC(enc);
- if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF)
+ if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
ptr += MINBPC(enc);
pos->columnNumber = (XML_Size)-1;
break;
int fd;
int all_threads;
PyInterpreterState *interp;
+#ifdef MS_WINDOWS
+ void *exc_handler;
+#endif
} fatal_error = {0, NULL, -1, 0};
#ifdef FAULTHANDLER_LATER
#ifdef HAVE_SIGALTSTACK
static stack_t stack;
+static stack_t old_stack;
#endif
DWORD code = exc_info->ExceptionRecord->ExceptionCode;
DWORD flags = exc_info->ExceptionRecord->ExceptionFlags;
- /* only log fatal exceptions */
- if (flags & EXCEPTION_NONCONTINUABLE) {
+ /* bpo-30557: only log fatal exceptions */
+ if (!(code & 0x80000000)) {
/* call the next exception handler */
return EXCEPTION_CONTINUE_SEARCH;
}
case EXCEPTION_IN_PAGE_ERROR: PUTS(fd, "page error"); break;
case EXCEPTION_STACK_OVERFLOW: PUTS(fd, "stack overflow"); break;
default:
- PUTS(fd, "code ");
- _Py_DumpDecimal(fd, code);
+ PUTS(fd, "code 0x");
+ _Py_DumpHexadecimal(fd, code, 8);
}
PUTS(fd, "\n\n");
}
#ifdef MS_WINDOWS
- AddVectoredExceptionHandler(1, faulthandler_exc_handler);
+ assert(fatal_error.exc_handler == NULL);
+ fatal_error.exc_handler = AddVectoredExceptionHandler(1, faulthandler_exc_handler);
#endif
return 0;
}
faulthandler_disable_fatal_handler(handler);
}
}
-
+#ifdef MS_WINDOWS
+ if (fatal_error.exc_handler != NULL) {
+ RemoveVectoredExceptionHandler(fatal_error.exc_handler);
+ fatal_error.exc_handler = NULL;
+ }
+#endif
Py_CLEAR(fatal_error.file);
}
stack.ss_size = SIGSTKSZ;
stack.ss_sp = PyMem_Malloc(stack.ss_size);
if (stack.ss_sp != NULL) {
- err = sigaltstack(&stack, NULL);
+ err = sigaltstack(&stack, &old_stack);
if (err) {
PyMem_Free(stack.ss_sp);
stack.ss_sp = NULL;
faulthandler_disable();
#ifdef HAVE_SIGALTSTACK
if (stack.ss_sp != NULL) {
+ /* Fetch the current alt stack */
+ stack_t current_stack;
+ if (sigaltstack(NULL, ¤t_stack) == 0) {
+ if (current_stack.ss_sp == stack.ss_sp) {
+ /* The current alt stack is the one that we installed.
+ It is safe to restore the old stack that we found when
+ we installed ours */
+ sigaltstack(&old_stack, NULL);
+ } else {
+ /* Someone switched to a different alt stack and didn't
+ restore ours when they were done (if they're done).
+ There's not much we can do in this unlikely case */
+ }
+ }
PyMem_Free(stack.ss_sp);
stack.ss_sp = NULL;
}
{
PyObject *item;
- if (lz->source == NULL)
- return NULL; /* already stopped */
-
- if (lz->active == NULL) {
- PyObject *iterable = PyIter_Next(lz->source);
- if (iterable == NULL) {
- Py_CLEAR(lz->source);
- return NULL; /* no more input sources */
- }
- lz->active = PyObject_GetIter(iterable);
- Py_DECREF(iterable);
+ /* lz->source is the iterator of iterables. If it's NULL, we've already
+ * consumed them all. lz->active is the current iterator. If it's NULL,
+ * we should grab a new one from lz->source. */
+ while (lz->source != NULL) {
if (lz->active == NULL) {
- Py_CLEAR(lz->source);
- return NULL; /* input not iterable */
+ PyObject *iterable = PyIter_Next(lz->source);
+ if (iterable == NULL) {
+ Py_CLEAR(lz->source);
+ return NULL; /* no more input sources */
+ }
+ lz->active = PyObject_GetIter(iterable);
+ Py_DECREF(iterable);
+ if (lz->active == NULL) {
+ Py_CLEAR(lz->source);
+ return NULL; /* input not iterable */
+ }
}
+ item = (*Py_TYPE(lz->active)->tp_iternext)(lz->active);
+ if (item != NULL)
+ return item;
+ if (PyErr_Occurred()) {
+ if (PyErr_ExceptionMatches(PyExc_StopIteration))
+ PyErr_Clear();
+ else
+ return NULL; /* input raised an exception */
+ }
+ /* lz->active is consumed, try with the next iterable. */
+ Py_CLEAR(lz->active);
}
- item = (*Py_TYPE(lz->active)->tp_iternext)(lz->active);
- if (item != NULL)
- return item;
- if (PyErr_Occurred()) {
- if (PyErr_ExceptionMatches(PyExc_StopIteration))
- PyErr_Clear();
- else
- return NULL; /* input raised an exception */
- }
- Py_CLEAR(lz->active);
- return chain_next(lz); /* recurse and use next active */
+ /* Everything had been consumed already. */
+ return NULL;
}
static PyObject *
Options and arguments (and corresponding environment variables):\n\
-b : issue warnings about str(bytes_instance), str(bytearray_instance)\n\
and comparing bytes/bytearray with str. (-bb: issue errors)\n\
--B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x\n\
+-B : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x\n\
-c cmd : program passed in as string (terminates option list)\n\
-d : debug output from parser; also PYTHONDEBUG=x\n\
-E : ignore PYTHON* environment variables (such as PYTHONPATH)\n\
else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelen;
- if (PySlice_GetIndicesEx(item, self->size,
- &start, &stop, &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelen = PySlice_AdjustIndices(self->size, &start, &stop, step);
if (slicelen <= 0)
return PyBytes_FromStringAndSize("", 0);
Py_ssize_t start, stop, step, slicelen;
Py_buffer vbuf;
- if (PySlice_GetIndicesEx(item,
- self->size, &start, &stop,
- &step, &slicelen) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return -1;
}
+ slicelen = PySlice_AdjustIndices(self->size, &start, &stop, step);
if (value == NULL) {
PyErr_SetString(PyExc_TypeError,
"mmap object doesn't support slice deletion");
short a_label = dfa_state->s_arc[arc].a_lbl;
assert(a_label < _PyParser_Grammar.g_ll.ll_nlabels);
if (_PyParser_Grammar.g_ll.ll_label[a_label].lb_type == ch_type) {
- /* The child is acceptable; if non-terminal, validate it recursively. */
+ /* The child is acceptable; if non-terminal, validate it recursively. */
if (ISNONTERMINAL(ch_type) && !validate_node(ch))
return 0;
*/
tree = build_node_tree(tuple);
if (tree != 0) {
- node *validation_root = tree;
+ node *validation_root = NULL;
int tree_type = 0;
switch (TYPE(tree)) {
case eval_input:
/* Might be an eval form. */
tree_type = PyST_EXPR;
+ validation_root = tree;
break;
case encoding_decl:
/* This looks like an encoding_decl so far. */
- if (NCH(tree) != 1)
+ if (NCH(tree) == 1) {
+ tree_type = PyST_SUITE;
+ validation_root = CHILD(tree, 0);
+ }
+ else {
err_string("Error Parsing encoding_decl");
- validation_root = CHILD(tree, 0);
- /* Fall through */
+ }
+ break;
case file_input:
/* This looks like an exec form so far. */
-
tree_type = PyST_SUITE;
+ validation_root = tree;
break;
default:
/* This is a fragment, at best. */
- PyNode_Free(tree);
err_string("parse tree does not use a valid start symbol");
- return (0);
}
- if (validate_node(validation_root))
+ if (validation_root != NULL && validate_node(validation_root))
st = parser_newstobject(tree, tree_type);
else
PyNode_Free(tree);
Py_ssize_t i;
int err;
+ if (len < 0) {
+ return NULL;
+ }
for (i = 1; i < len; ++i) {
/* elem must always be a sequence, however simple */
PyObject* elem = PySequence_GetItem(tuple, i);
if (type == -1 && PyErr_Occurred()) {
Py_DECREF(temp);
Py_DECREF(elem);
- return 0;
+ return NULL;
}
}
Py_DECREF(temp);
PyErr_SetObject(parser_error, err);
Py_XDECREF(err);
Py_XDECREF(elem);
- return (0);
+ return NULL;
}
if (ISTERMINAL(type)) {
Py_ssize_t len = PyObject_Size(elem);
if ((len != 2) && (len != 3)) {
err_string("terminal nodes must have 2 or 3 entries");
- return 0;
+ Py_DECREF(elem);
+ return NULL;
}
temp = PySequence_GetItem(elem, 1);
- if (temp == NULL)
- return 0;
+ if (temp == NULL) {
+ Py_DECREF(elem);
+ return NULL;
+ }
if (!PyUnicode_Check(temp)) {
PyErr_Format(parser_error,
"second item in terminal node must be a string,"
Py_TYPE(temp)->tp_name);
Py_DECREF(temp);
Py_DECREF(elem);
- return 0;
+ return NULL;
}
if (len == 3) {
PyObject *o = PySequence_GetItem(elem, 2);
- if (o != NULL) {
- if (PyLong_Check(o)) {
- int num = _PyLong_AsInt(o);
- if (num == -1 && PyErr_Occurred()) {
- Py_DECREF(o);
- Py_DECREF(temp);
- Py_DECREF(elem);
- return 0;
- }
- *line_num = num;
- }
- else {
- PyErr_Format(parser_error,
- "third item in terminal node must be an"
- " integer, found %s",
- Py_TYPE(temp)->tp_name);
+ if (o == NULL) {
+ Py_DECREF(temp);
+ Py_DECREF(elem);
+ return NULL;
+ }
+ if (PyLong_Check(o)) {
+ int num = _PyLong_AsInt(o);
+ if (num == -1 && PyErr_Occurred()) {
Py_DECREF(o);
Py_DECREF(temp);
Py_DECREF(elem);
- return 0;
+ return NULL;
}
+ *line_num = num;
+ }
+ else {
+ PyErr_Format(parser_error,
+ "third item in terminal node must be an"
+ " integer, found %s",
+ Py_TYPE(temp)->tp_name);
Py_DECREF(o);
+ Py_DECREF(temp);
+ Py_DECREF(elem);
+ return NULL;
}
+ Py_DECREF(o);
}
temp_str = PyUnicode_AsUTF8AndSize(temp, &len);
if (temp_str == NULL) {
Py_DECREF(temp);
- Py_XDECREF(elem);
- return 0;
+ Py_DECREF(elem);
+ return NULL;
}
strn = (char *)PyObject_MALLOC(len + 1);
if (strn == NULL) {
Py_DECREF(temp);
- Py_XDECREF(elem);
+ Py_DECREF(elem);
PyErr_NoMemory();
- return 0;
+ return NULL;
}
(void) memcpy(strn, temp_str, len + 1);
Py_DECREF(temp);
* It has to be one or the other; this is an error.
* Raise an exception.
*/
- PyObject *err = Py_BuildValue("os", elem, "unknown node type.");
+ PyObject *err = Py_BuildValue("Os", elem, "unknown node type.");
PyErr_SetObject(parser_error, err);
Py_XDECREF(err);
- Py_XDECREF(elem);
- return (0);
+ Py_DECREF(elem);
+ return NULL;
}
err = PyNode_AddChild(root, type, strn, *line_num, 0);
if (err == E_NOMEM) {
- Py_XDECREF(elem);
+ Py_DECREF(elem);
PyObject_FREE(strn);
- return (node *) PyErr_NoMemory();
+ PyErr_NoMemory();
+ return NULL;
}
if (err == E_OVERFLOW) {
- Py_XDECREF(elem);
+ Py_DECREF(elem);
PyObject_FREE(strn);
PyErr_SetString(PyExc_ValueError,
"unsupported number of child nodes");
node* new_child = CHILD(root, i - 1);
if (new_child != build_node_children(elem, new_child, line_num)) {
- Py_XDECREF(elem);
- return (0);
+ Py_DECREF(elem);
+ return NULL;
}
}
else if (type == NEWLINE) { /* It's true: we increment the */
++(*line_num); /* line number *after* the newline! */
}
- Py_XDECREF(elem);
+ Py_DECREF(elem);
}
return root;
}
if (num == encoding_decl) {
encoding = PySequence_GetItem(tuple, 2);
+ if (encoding == NULL) {
+ PyErr_SetString(parser_error, "missed encoding");
+ return NULL;
+ }
+ if (!PyUnicode_Check(encoding)) {
+ PyErr_Format(parser_error,
+ "encoding must be a string, found %.200s",
+ Py_TYPE(encoding)->tp_name);
+ Py_DECREF(encoding);
+ return NULL;
+ }
/* tuple isn't borrowed anymore here, need to DECREF */
tuple = PySequence_GetSlice(tuple, 0, 2);
- if (tuple == NULL)
+ if (tuple == NULL) {
+ Py_DECREF(encoding);
return NULL;
+ }
}
res = PyNode_New(num);
if (res != NULL) {
const char *temp;
temp = PyUnicode_AsUTF8AndSize(encoding, &len);
if (temp == NULL) {
- Py_DECREF(res);
+ PyNode_Free(res);
Py_DECREF(encoding);
Py_DECREF(tuple);
return NULL;
}
res->n_str = (char *)PyObject_MALLOC(len + 1);
if (res->n_str == NULL) {
- Py_DECREF(res);
+ PyNode_Free(res);
Py_DECREF(encoding);
Py_DECREF(tuple);
PyErr_NoMemory();
return NULL;
}
(void) memcpy(res->n_str, temp, len + 1);
- Py_DECREF(encoding);
- Py_DECREF(tuple);
}
}
+ if (encoding != NULL) {
+ Py_DECREF(encoding);
+ Py_DECREF(tuple);
+ }
}
else {
/* The tuple is illegal -- if the number is neither TERMINAL nor
* NONTERMINAL, we can't use it. Not sure the implementation
* allows this condition, but the API doesn't preclude it.
*/
- PyObject *err = Py_BuildValue("os", tuple,
+ PyObject *err = Py_BuildValue("Os", tuple,
"Illegal component tuple.");
PyErr_SetObject(parser_error, err);
Py_XDECREF(err);
result = Py_BuildValue("O(O)", pickle_constructor, tuple);
Py_DECREF(tuple);
}
- Py_DECREF(empty_dict);
Py_DECREF(newargs);
}
finally:
return NULL;
PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
-#ifdef HAVE_LARGEFILE_SUPPORT
+#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS)
+ Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino));
PyStructSequence_SET_ITEM(v, 1,
- PyLong_FromLongLong((long long)st->st_ino));
+ PyLong_FromUnsignedLongLong(st->st_ino));
#else
- PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long)st->st_ino));
+ Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
+ PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino));
#endif
#ifdef MS_WINDOWS
PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));
os_setgroups(PyObject *module, PyObject *groups)
/*[clinic end generated code: output=3fcb32aad58c5ecd input=fa742ca3daf85a7e]*/
{
- int i, len;
+ Py_ssize_t i, len;
gid_t grouplist[MAX_GROUPS];
if (!PySequence_Check(groups)) {
return NULL;
}
len = PySequence_Size(groups);
+ if (len < 0) {
+ return NULL;
+ }
if (len > MAX_GROUPS) {
PyErr_SetString(PyExc_ValueError, "too many groups");
return NULL;
#if (defined(HAVE_SENDFILE) && (defined(__FreeBSD__) || defined(__DragonFly__) \
|| defined(__APPLE__))) || defined(HAVE_READV) || defined(HAVE_WRITEV)
static Py_ssize_t
-iov_setup(struct iovec **iov, Py_buffer **buf, PyObject *seq, int cnt, int type)
+iov_setup(struct iovec **iov, Py_buffer **buf, PyObject *seq, Py_ssize_t cnt, int type)
{
- int i, j;
+ Py_ssize_t i, j;
Py_ssize_t blen, total = 0;
*iov = PyMem_New(struct iovec, cnt);
os_readv_impl(PyObject *module, int fd, PyObject *buffers)
/*[clinic end generated code: output=792da062d3fcebdb input=e679eb5dbfa0357d]*/
{
- int cnt;
- Py_ssize_t n;
+ Py_ssize_t cnt, n;
int async_err = 0;
struct iovec *iov;
Py_buffer *buf;
}
cnt = PySequence_Size(buffers);
+ if (cnt < 0)
+ return -1;
if (iov_setup(&iov, &buf, buffers, cnt, PyBUF_WRITABLE) < 0)
return -1;
"sendfile() headers must be a sequence");
return NULL;
} else {
- Py_ssize_t i = 0; /* Avoid uninitialized warning */
- sf.hdr_cnt = PySequence_Size(headers);
- if (sf.hdr_cnt > 0 &&
- (i = iov_setup(&(sf.headers), &hbuf,
- headers, sf.hdr_cnt, PyBUF_SIMPLE)) < 0)
+ Py_ssize_t i = PySequence_Size(headers);
+ if (i < 0)
+ return NULL;
+ if (i > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError,
+ "sendfile() header is too large");
return NULL;
+ }
+ if (i > 0) {
+ sf.hdr_cnt = (int)i;
+ i = iov_setup(&(sf.headers), &hbuf,
+ headers, sf.hdr_cnt, PyBUF_SIMPLE);
+ if (i < 0)
+ return NULL;
#ifdef __APPLE__
- sbytes += i;
+ sbytes += i;
#endif
+ }
}
}
if (trailers != NULL) {
"sendfile() trailers must be a sequence");
return NULL;
} else {
- Py_ssize_t i = 0; /* Avoid uninitialized warning */
- sf.trl_cnt = PySequence_Size(trailers);
- if (sf.trl_cnt > 0 &&
- (i = iov_setup(&(sf.trailers), &tbuf,
- trailers, sf.trl_cnt, PyBUF_SIMPLE)) < 0)
+ Py_ssize_t i = PySequence_Size(trailers);
+ if (i < 0)
+ return NULL;
+ if (i > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError,
+ "sendfile() trailer is too large");
return NULL;
+ }
+ if (i > 0) {
+ sf.trl_cnt = (int)i;
+ i = iov_setup(&(sf.trailers), &tbuf,
+ trailers, sf.trl_cnt, PyBUF_SIMPLE);
+ if (i < 0)
+ return NULL;
#ifdef __APPLE__
- sbytes += i;
+ sbytes += i;
#endif
+ }
}
}
os_writev_impl(PyObject *module, int fd, PyObject *buffers)
/*[clinic end generated code: output=56565cfac3aac15b input=5b8d17fe4189d2fe]*/
{
- int cnt;
+ Py_ssize_t cnt;
Py_ssize_t result;
int async_err = 0;
struct iovec *iov;
return -1;
}
cnt = PySequence_Size(buffers);
+ if (cnt < 0)
+ return -1;
if (iov_setup(&iov, &buf, buffers, cnt, PyBUF_SIMPLE) < 0) {
return -1;
PyObject *lstat;
#ifdef MS_WINDOWS
struct _Py_stat_struct win32_lstat;
- __int64 win32_file_index;
+ uint64_t win32_file_index;
int got_file_index;
#else /* POSIX */
#ifdef HAVE_DIRENT_D_TYPE
self->win32_file_index = stat.st_ino;
self->got_file_index = 1;
}
- return PyLong_FromLongLong((long long)self->win32_file_index);
+ Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->win32_file_index));
+ return PyLong_FromUnsignedLongLong(self->win32_file_index);
#else /* POSIX */
#ifdef HAVE_LARGEFILE_SUPPORT
return PyLong_FromLongLong((long long)self->d_ino);
if (PyModule_AddIntMacro(m, SCHED_RR)) return -1;
#endif
#ifdef SCHED_SPORADIC
- if (PyModule_AddIntMacro(m, SCHED_SPORADIC) return -1;
+ if (PyModule_AddIntMacro(m, SCHED_SPORADIC)) return -1;
#endif
#ifdef SCHED_BATCH
if (PyModule_AddIntMacro(m, SCHED_BATCH)) return -1;
Py_DECREF(self);
return NULL;
}
-#if ((XML_MAJOR_VERSION >= 2) && (XML_MINOR_VERSION >= 1)) || defined(XML_HAS_SET_HASH_SALT)
- /* This feature was added upstream in libexpat 2.1.0. Our expat copy
- * has a backport of this feature where we also define XML_HAS_SET_HASH_SALT
- * to indicate that we can still use it. */
+#if XML_COMBINED_VERSION >= 20100
+ /* This feature was added upstream in libexpat 2.1.0. */
XML_SetHashSalt(self->itself,
(unsigned long)_Py_HashSecret.expat.hashsalt);
#endif
Handlers[sig_num].tripped = 1;
+ if (!is_tripped) {
+ /* Set is_tripped after setting .tripped, as it gets
+ cleared in PyErr_CheckSignals() before .tripped. */
+ is_tripped = 1;
+ Py_AddPendingCall(checksignals_witharg, NULL);
+ }
+
+ /* And then write to the wakeup fd *after* setting all the globals and
+ doing the Py_AddPendingCall. We used to write to the wakeup fd and then
+ set the flag, but this allowed the following sequence of events
+ (especially on windows, where trip_signal runs in a new thread):
+
+ - main thread blocks on select([wakeup_fd], ...)
+ - signal arrives
+ - trip_signal writes to the wakeup fd
+ - the main thread wakes up
+ - the main thread checks the signal flags, sees that they're unset
+ - the main thread empties the wakeup fd
+ - the main thread goes back to sleep
+ - trip_signal sets the flags to request the Python-level signal handler
+ be run
+ - the main thread doesn't notice, because it's asleep
+
+ See bpo-30038 for more details.
+ */
+
#ifdef MS_WINDOWS
fd = Py_SAFE_DOWNCAST(wakeup.fd, SOCKET_T, int);
#else
}
}
}
-
- if (!is_tripped) {
- /* Set is_tripped after setting .tripped, as it gets
- cleared in PyErr_CheckSignals() before .tripped. */
- is_tripped = 1;
- Py_AddPendingCall(checksignals_witharg, NULL);
- }
}
static void
#include <net/if.h>
#endif
-#ifdef HAVE_SOCKADDR_ALG
-#include <linux/if_alg.h>
-#ifndef AF_ALG
-#define AF_ALG 38
-#endif
-#ifndef SOL_ALG
-#define SOL_ALG 279
-#endif
-
-/* Linux 3.19 */
-#ifndef ALG_SET_AEAD_ASSOCLEN
-#define ALG_SET_AEAD_ASSOCLEN 4
-#endif
-#ifndef ALG_SET_AEAD_AUTHSIZE
-#define ALG_SET_AEAD_AUTHSIZE 5
-#endif
-/* Linux 4.8 */
-#ifndef ALG_SET_PUBKEY
-#define ALG_SET_PUBKEY 6
-#endif
-
-#ifndef ALG_OP_SIGN
-#define ALG_OP_SIGN 2
-#endif
-#ifndef ALG_OP_VERIFY
-#define ALG_OP_VERIFY 3
-#endif
-
-#endif /* HAVE_SOCKADDR_ALG */
-
/* Generic socket object definitions and includes */
#define PySocket_BUILDING_SOCKET
#include "socketmodule.h"
{
struct sockaddr_un *a = (struct sockaddr_un *) addr;
#ifdef __linux__
- if (a->sun_path[0] == 0) { /* Linux abstract namespace */
- addrlen -= offsetof(struct sockaddr_un, sun_path);
- return PyBytes_FromStringAndSize(a->sun_path, addrlen);
+ size_t linuxaddrlen = addrlen - offsetof(struct sockaddr_un, sun_path);
+ if (linuxaddrlen > 0 && a->sun_path[0] == 0) { /* Linux abstract namespace */
+ return PyBytes_FromStringAndSize(a->sun_path, linuxaddrlen);
}
else
#endif /* linux */
#include <sys/kern_control.h>
#endif
+#ifdef HAVE_SOCKADDR_ALG
+#include <linux/if_alg.h>
+#ifndef AF_ALG
+#define AF_ALG 38
+#endif
+#ifndef SOL_ALG
+#define SOL_ALG 279
+#endif
+
+/* Linux 3.19 */
+#ifndef ALG_SET_AEAD_ASSOCLEN
+#define ALG_SET_AEAD_ASSOCLEN 4
+#endif
+#ifndef ALG_SET_AEAD_AUTHSIZE
+#define ALG_SET_AEAD_AUTHSIZE 5
+#endif
+/* Linux 4.8 */
+#ifndef ALG_SET_PUBKEY
+#define ALG_SET_PUBKEY 6
+#endif
+
+#ifndef ALG_OP_SIGN
+#define ALG_OP_SIGN 2
+#endif
+#ifndef ALG_OP_VERIFY
+#define ALG_OP_VERIFY 3
+#endif
+
+#endif /* HAVE_SOCKADDR_ALG */
+
+
#ifndef Py__SOCKET_H
#define Py__SOCKET_H
#ifdef __cplusplus
#ifdef HAVE_SYS_KERN_CONTROL_H
struct sockaddr_ctl ctl;
#endif
+#ifdef HAVE_SOCKADDR_ALG
+ struct sockaddr_alg alg;
+#endif
} sock_addr_t;
/* The object holding a socket. It holds some extra information,
static PyObject *
tmtotuple(struct tm *p
#ifndef HAVE_STRUCT_TM_TM_ZONE
- , const char *zone, int gmtoff
+ , const char *zone, time_t gmtoff
#endif
)
{
#else
PyStructSequence_SET_ITEM(v, 9,
PyUnicode_DecodeLocale(zone, "surrogateescape"));
- SET(10, gmtoff);
+ PyStructSequence_SET_ITEM(v, 10, _PyLong_FromTime_t(gmtoff));
#endif /* HAVE_STRUCT_TM_TM_ZONE */
#undef SET
if (PyErr_Occurred()) {
{
struct tm local = buf;
char zone[100];
- int gmtoff;
+ time_t gmtoff;
strftime(zone, sizeof(zone), "%Z", &buf);
gmtoff = timegm(&buf) - when;
return tmtotuple(&local, zone, gmtoff);
_Py_IDENTIFIER(decompress);
if (importing_zlib != 0)
- /* Someone has a zlib.py[co] in their Zip file;
+ /* Someone has a zlib.pyc in their Zip file;
let's avoid a stack overflow. */
return NULL;
importing_zlib = 1;
return d <= 1;
}
-/* Given the contents of a .py[co] file in a buffer, unmarshal the data
+/* Given the contents of a .pyc file in a buffer, unmarshal the data
and return the code object. Return None if it the magic word doesn't
match (we do this instead of raising an exception as we fall back
to .py if available and we don't want to mask other errors).
PyObject *toc_entry, *stripped;
time_t mtime;
- /* strip 'c' or 'o' from *.py[co] */
+ /* strip 'c' from *.pyc */
if (PyUnicode_READY(path) == -1)
return (time_t)-1;
stripped = PyUnicode_FromKindAndData(PyUnicode_KIND(path),
return kwdict;
}
-PyObject **
+int
_PyStack_UnpackDict(PyObject **args, Py_ssize_t nargs, PyObject *kwargs,
- PyObject **p_kwnames, PyObject *func)
+ PyObject ***p_stack, PyObject **p_kwnames)
{
PyObject **stack, **kwstack;
Py_ssize_t nkwargs;
assert(nargs >= 0);
assert(kwargs == NULL || PyDict_CheckExact(kwargs));
- nkwargs = (kwargs != NULL) ? PyDict_Size(kwargs) : 0;
- if (!nkwargs) {
+ if (kwargs == NULL || (nkwargs = PyDict_Size(kwargs)) == 0) {
+ *p_stack = args;
*p_kwnames = NULL;
- return args;
+ return 0;
}
if ((size_t)nargs > PY_SSIZE_T_MAX / sizeof(stack[0]) - (size_t)nkwargs) {
PyErr_NoMemory();
- return NULL;
+ return -1;
}
stack = PyMem_Malloc((nargs + nkwargs) * sizeof(stack[0]));
if (stack == NULL) {
PyErr_NoMemory();
- return NULL;
+ return -1;
}
kwnames = PyTuple_New(nkwargs);
if (kwnames == NULL) {
PyMem_Free(stack);
- return NULL;
+ return -1;
}
/* Copy position arguments (borrowed references) */
i++;
}
+ *p_stack = stack;
*p_kwnames = kwnames;
- return stack;
+ return 0;
}
PyObject *
array[i] = NULL;
goto fail;
}
- data = PyBytes_AsString(item);
- if (data == NULL) {
+ /* check for embedded null bytes */
+ if (PyBytes_AsStringAndSize(item, &data, NULL) < 0) {
/* NULL terminate before freeing. */
array[i] = NULL;
goto fail;
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
- Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
+ Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}
}
else if (PySlice_Check(index)) {
Py_ssize_t start, stop, step, slicelength, cur, i;
- if (PySlice_GetIndicesEx(index,
- PyByteArray_GET_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(index, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(PyByteArray_GET_SIZE(self),
+ &start, &stop, step);
if (slicelength <= 0)
return PyByteArray_FromStringAndSize("", 0);
}
}
else if (PySlice_Check(index)) {
- if (PySlice_GetIndicesEx(index,
- PyByteArray_GET_SIZE(self),
- &start, &stop, &step, &slicelen) < 0) {
+ if (PySlice_Unpack(index, &start, &stop, &step) < 0) {
return -1;
}
+ slicelen = PySlice_AdjustIndices(PyByteArray_GET_SIZE(self), &start,
+ &stop, step);
}
else {
PyErr_Format(PyExc_TypeError,
PyDoc_STRVAR_shared(_Py_index__doc__,
"B.index(sub[, start[, end]]) -> int\n\
\n\
-Like B.find() but raise ValueError when the subsection is not found.");
+Return the lowest index in B where subsection sub is found,\n\
+such that sub is contained within B[start,end]. Optional\n\
+arguments start and end are interpreted as in slice notation.\n\
+\n\
+Raises ValueError when the subsection is not found.");
PyObject *
_Py_bytes_index(const char *str, Py_ssize_t len, PyObject *args)
PyDoc_STRVAR_shared(_Py_rindex__doc__,
"B.rindex(sub[, start[, end]]) -> int\n\
\n\
-Like B.rfind() but raise ValueError when the subsection is not found.");
+Return the highest index in B where subsection sub is found,\n\
+such that sub is contained within B[start,end]. Optional\n\
+arguments start and end are interpreted as in slice notation.\n\
+\n\
+Raise ValueError when the subsection is not found.");
PyObject *
_Py_bytes_rindex(const char *str, Py_ssize_t len, PyObject *args)
"\n"
"Pad a numeric string B with zeros on the left, to fill a field\n"
"of the specified width. B is never truncated.");
-
return 0;
}
+static PyObject *_PyBytes_FromBuffer(PyObject *x);
+
static PyObject *
format_obj(PyObject *v, const char **pbuf, Py_ssize_t *plen)
{
*plen = PyBytes_GET_SIZE(result);
return result;
}
+ /* does it support buffer protocol? */
+ if (PyObject_CheckBuffer(v)) {
+ /* maybe we can avoid making a copy of the buffer object here? */
+ result = _PyBytes_FromBuffer(v);
+ if (result == NULL)
+ return NULL;
+ *pbuf = PyBytes_AS_STRING(result);
+ *plen = PyBytes_GET_SIZE(result);
+ return result;
+ }
PyErr_Format(PyExc_TypeError,
- "%%b requires bytes, or an object that implements __bytes__, not '%.100s'",
+ "%%b requires a bytes-like object, "
+ "or an object that implements __bytes__, not '%.100s'",
Py_TYPE(v)->tp_name);
return NULL;
}
Py_ssize_t len;
char *pos;
- pos = strchr(fmt + 1, '%');
+ pos = (char *)memchr(fmt + 1, '%', fmtcnt);
if (pos != NULL)
len = pos - fmt;
else
- len = format_len - (fmt - format);
+ len = fmtcnt + 1;
assert(len != 0);
memcpy(res, fmt, len);
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
- Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
+ Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}
char* result_buf;
PyObject* result;
- if (PySlice_GetIndicesEx(item,
- PyBytes_GET_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(PyBytes_GET_SIZE(self), &start,
+ &stop, step);
if (slicelength <= 0) {
return PyBytes_FromStringAndSize("", 0);
code_dealloc(PyCodeObject *co)
{
if (co->co_extra != NULL) {
- PyThreadState *tstate = PyThreadState_Get();
+ __PyCodeExtraState *state = __PyCodeExtraState_Get();
_PyCodeObjectExtra *co_extra = co->co_extra;
for (Py_ssize_t i = 0; i < co_extra->ce_size; i++) {
- freefunc free_extra = tstate->co_extra_freefuncs[i];
+ freefunc free_extra = state->co_extra_freefuncs[i];
if (free_extra != NULL) {
free_extra(co_extra->ce_extras[i]);
}
}
- PyMem_FREE(co->co_extra);
+ PyMem_Free(co_extra->ce_extras);
+ PyMem_Free(co_extra);
}
Py_XDECREF(co->co_code);
static PyObject *
code_sizeof(PyCodeObject *co, void *unused)
{
- Py_ssize_t res;
+ Py_ssize_t res = _PyObject_SIZE(Py_TYPE(co));
+ _PyCodeObjectExtra *co_extra = (_PyCodeObjectExtra*) co->co_extra;
- res = _PyObject_SIZE(Py_TYPE(co));
if (co->co_cell2arg != NULL && co->co_cellvars != NULL)
- res += PyTuple_GET_SIZE(co->co_cellvars) * sizeof(unsigned char);
+ res += PyTuple_GET_SIZE(co->co_cellvars) * sizeof(Py_ssize_t);
+
+ if (co_extra != NULL)
+ res += co_extra->ce_size * sizeof(co_extra->ce_extras[0]);
+
return PyLong_FromSsize_t(res);
}
int
_PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra)
{
- assert(*extra == NULL);
-
if (!PyCode_Check(code)) {
PyErr_BadInternalCall();
return -1;
if (co_extra == NULL || co_extra->ce_size <= index) {
+ *extra = NULL;
return 0;
}
int
_PyCode_SetExtra(PyObject *code, Py_ssize_t index, void *extra)
{
- PyThreadState *tstate = PyThreadState_Get();
+ __PyCodeExtraState *state = __PyCodeExtraState_Get();
if (!PyCode_Check(code) || index < 0 ||
- index >= tstate->co_extra_user_count) {
+ index >= state->co_extra_user_count) {
PyErr_BadInternalCall();
return -1;
}
}
co_extra->ce_extras = PyMem_Malloc(
- tstate->co_extra_user_count * sizeof(void*));
+ state->co_extra_user_count * sizeof(void*));
if (co_extra->ce_extras == NULL) {
PyMem_Free(co_extra);
return -1;
}
- co_extra->ce_size = tstate->co_extra_user_count;
+ co_extra->ce_size = state->co_extra_user_count;
for (Py_ssize_t i = 0; i < co_extra->ce_size; i++) {
co_extra->ce_extras[i] = NULL;
}
else if (co_extra->ce_size <= index) {
void** ce_extras = PyMem_Realloc(
- co_extra->ce_extras, tstate->co_extra_user_count * sizeof(void*));
+ co_extra->ce_extras, state->co_extra_user_count * sizeof(void*));
if (ce_extras == NULL) {
return -1;
}
for (Py_ssize_t i = co_extra->ce_size;
- i < tstate->co_extra_user_count;
+ i < state->co_extra_user_count;
i++) {
ce_extras[i] = NULL;
}
co_extra->ce_extras = ce_extras;
- co_extra->ce_size = tstate->co_extra_user_count;
+ co_extra->ce_size = state->co_extra_user_count;
+ }
+
+ if (co_extra->ce_extras[index] != NULL) {
+ freefunc free = state->co_extra_freefuncs[index];
+ if (free != NULL) {
+ free(co_extra->ce_extras[index]);
+ }
}
co_extra->ce_extras[index] = extra;
/* #define DEBUG_PYDICT */
-#ifdef Py_DEBUG
+#ifndef NDEBUG
static int
_PyDict_CheckConsistency(PyDictObject *mp)
{
PyDictKeyEntry *ep, *ep0;
Py_ssize_t hashpos, ix;
+ Py_INCREF(key);
+ Py_INCREF(value);
if (mp->ma_values != NULL && !PyUnicode_CheckExact(key)) {
if (insertion_resize(mp) < 0)
- return -1;
+ goto Fail;
}
ix = mp->ma_keys->dk_lookup(mp, key, hash, &value_addr, &hashpos);
- if (ix == DKIX_ERROR) {
- return -1;
- }
+ if (ix == DKIX_ERROR)
+ goto Fail;
assert(PyUnicode_CheckExact(key) || mp->ma_keys->dk_lookup == lookdict);
- Py_INCREF(value);
MAINTAIN_TRACKING(mp, key, value);
/* When insertion order is different from shared key, we can't share
if (_PyDict_HasSplitTable(mp) &&
((ix >= 0 && *value_addr == NULL && mp->ma_used != ix) ||
(ix == DKIX_EMPTY && mp->ma_used != mp->ma_keys->dk_nentries))) {
- if (insertion_resize(mp) < 0) {
- Py_DECREF(value);
- return -1;
- }
+ if (insertion_resize(mp) < 0)
+ goto Fail;
find_empty_slot(mp, key, hash, &value_addr, &hashpos);
ix = DKIX_EMPTY;
}
/* Insert into new slot. */
if (mp->ma_keys->dk_usable <= 0) {
/* Need to resize. */
- if (insertion_resize(mp) < 0) {
- Py_DECREF(value);
- return -1;
- }
+ if (insertion_resize(mp) < 0)
+ goto Fail;
find_empty_slot(mp, key, hash, &value_addr, &hashpos);
}
ep0 = DK_ENTRIES(mp->ma_keys);
ep = &ep0[mp->ma_keys->dk_nentries];
dk_set_index(mp->ma_keys, hashpos, mp->ma_keys->dk_nentries);
- Py_INCREF(key);
ep->me_key = key;
ep->me_hash = hash;
if (mp->ma_values) {
assert(_PyDict_CheckConsistency(mp));
Py_DECREF(old_value); /* which **CAN** re-enter (see issue #22653) */
+ Py_DECREF(key);
return 0;
}
mp->ma_used++;
mp->ma_version_tag = DICT_NEXT_VERSION();
assert(_PyDict_CheckConsistency(mp));
+ Py_DECREF(key);
return 0;
+
+Fail:
+ Py_DECREF(value);
+ Py_DECREF(key);
+ return -1;
}
/*
PyObject *key;
Py_hash_t hash;
- if (dictresize(mp, ESTIMATE_SIZE(Py_SIZE(iterable)))) {
+ if (dictresize(mp, ESTIMATE_SIZE(((PyDictObject *)iterable)->ma_used))) {
Py_DECREF(d);
return NULL;
}
/* Update/merge with this (key, value) pair. */
key = PySequence_Fast_GET_ITEM(fast, 0);
value = PySequence_Fast_GET_ITEM(fast, 1);
+ Py_INCREF(key);
+ Py_INCREF(value);
if (override || PyDict_GetItem(d, key) == NULL) {
int status = PyDict_SetItem(d, key, value);
- if (status < 0)
+ if (status < 0) {
+ Py_DECREF(key);
+ Py_DECREF(value);
goto Fail;
+ }
}
+ Py_DECREF(key);
+ Py_DECREF(value);
Py_DECREF(fast);
Py_DECREF(item);
}
bval = NULL;
else
bval = *vaddr;
- Py_DECREF(key);
if (bval == NULL) {
+ Py_DECREF(key);
Py_DECREF(aval);
if (PyErr_Occurred())
return -1;
return 0;
}
cmp = PyObject_RichCompareBool(aval, bval, Py_EQ);
+ Py_DECREF(key);
Py_DECREF(aval);
if (cmp <= 0) /* error or not equal */
return cmp;
static PyObject *
dictiter_iternextitem(dictiterobject *di)
{
- PyObject *key, *value, *result = di->di_result;
+ PyObject *key, *value, *result;
Py_ssize_t i, n;
PyDictObject *d = di->di_dict;
}
di->di_pos = i+1;
di->len--;
- if (result->ob_refcnt == 1) {
+ Py_INCREF(key);
+ Py_INCREF(value);
+ result = di->di_result;
+ if (Py_REFCNT(result) == 1) {
+ PyObject *oldkey = PyTuple_GET_ITEM(result, 0);
+ PyObject *oldvalue = PyTuple_GET_ITEM(result, 1);
+ PyTuple_SET_ITEM(result, 0, key); /* steals reference */
+ PyTuple_SET_ITEM(result, 1, value); /* steals reference */
Py_INCREF(result);
- Py_DECREF(PyTuple_GET_ITEM(result, 0));
- Py_DECREF(PyTuple_GET_ITEM(result, 1));
+ Py_DECREF(oldkey);
+ Py_DECREF(oldvalue);
}
else {
result = PyTuple_New(2);
if (result == NULL)
return NULL;
+ PyTuple_SET_ITEM(result, 0, key); /* steals reference */
+ PyTuple_SET_ITEM(result, 1, value); /* steals reference */
}
- Py_INCREF(key);
- Py_INCREF(value);
- PyTuple_SET_ITEM(result, 0, key); /* steals reference */
- PyTuple_SET_ITEM(result, 1, value); /* steals reference */
return result;
fail:
static int
dictitems_contains(_PyDictViewObject *dv, PyObject *obj)
{
+ int result;
PyObject *key, *value, *found;
if (dv->dv_dict == NULL)
return 0;
return -1;
return 0;
}
- return PyObject_RichCompareBool(value, found, Py_EQ);
+ Py_INCREF(found);
+ result = PyObject_RichCompareBool(value, found, Py_EQ);
+ Py_DECREF(found);
+ return result;
}
static PySequenceMethods dictitems_as_sequence = {
}
}
+static PyObject *
+ImportError_getstate(PyImportErrorObject *self)
+{
+ PyObject *dict = ((PyBaseExceptionObject *)self)->dict;
+ if (self->name || self->path) {
+ _Py_IDENTIFIER(name);
+ _Py_IDENTIFIER(path);
+ dict = dict ? PyDict_Copy(dict) : PyDict_New();
+ if (dict == NULL)
+ return NULL;
+ if (self->name && _PyDict_SetItemId(dict, &PyId_name, self->name) < 0) {
+ Py_DECREF(dict);
+ return NULL;
+ }
+ if (self->path && _PyDict_SetItemId(dict, &PyId_path, self->path) < 0) {
+ Py_DECREF(dict);
+ return NULL;
+ }
+ return dict;
+ }
+ else if (dict) {
+ Py_INCREF(dict);
+ return dict;
+ }
+ else {
+ Py_RETURN_NONE;
+ }
+}
+
+/* Pickling support */
+static PyObject *
+ImportError_reduce(PyImportErrorObject *self)
+{
+ PyObject *res;
+ PyObject *args;
+ PyObject *state = ImportError_getstate(self);
+ if (state == NULL)
+ return NULL;
+ args = ((PyBaseExceptionObject *)self)->args;
+ if (state == Py_None)
+ res = PyTuple_Pack(2, Py_TYPE(self), args);
+ else
+ res = PyTuple_Pack(3, Py_TYPE(self), args, state);
+ Py_DECREF(state);
+ return res;
+}
+
static PyMemberDef ImportError_members[] = {
{"msg", T_OBJECT, offsetof(PyImportErrorObject, msg), 0,
PyDoc_STR("exception message")},
};
static PyMethodDef ImportError_methods[] = {
+ {"__reduce__", (PyCFunction)ImportError_reduce, METH_NOARGS},
{NULL}
};
PyObject *e;
if (value == NULL ||
- (!PyTuple_Check(value) &&
- !PyObject_TypeCheck(value, (PyTypeObject *) PyExc_StopIteration)))
+ (!PyTuple_Check(value) && !PyExceptionInstance_Check(value)))
{
/* Delay exception instantiation if we can */
PyErr_SetObject(PyExc_StopIteration, value);
PyObject *v;
if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
- _PyEval_SliceIndex, &start,
- _PyEval_SliceIndex, &stop))
+ _PyEval_SliceIndexNotNone, &start,
+ _PyEval_SliceIndexNotNone, &stop))
return NULL;
if (start < 0) {
start += Py_SIZE(self);
PyObject* it;
PyObject **src, **dest;
- if (PySlice_GetIndicesEx(item, Py_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop,
+ step);
if (slicelength <= 0) {
return PyList_New(0);
else if (PySlice_Check(item)) {
Py_ssize_t start, stop, step, slicelength;
- if (PySlice_GetIndicesEx(item, Py_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return -1;
}
+ slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop,
+ step);
if (step == 1)
return list_ass_slice(self, start, stop, value);
All about co_lnotab, the line number table.
Code objects store a field named co_lnotab. This is an array of unsigned bytes
-disguised as a Python string. It is used to map bytecode offsets to source code
-line #s for tracebacks and to identify line number boundaries for line tracing.
+disguised as a Python bytes object. It is used to map bytecode offsets to
+source code line #s for tracebacks and to identify line number boundaries for
+line tracing.
The array is conceptually a compressed list of
(bytecode offset increment, line number increment)
pairs. The details are important and delicate, best illustrated by example:
byte code offset source code line number
- 0 1
- 6 2
- 50 7
+ 0 1
+ 6 2
+ 50 7
350 207
361 208
The above doesn't really work, but it's a start. An unsigned byte (byte code
offset) can't hold negative values, or values larger than 255, a signed byte
(line number) can't hold values larger than 127 or less than -128, and the
-above example contains two such values. So we make two tweaks:
+above example contains two such values. (Note that before 3.6, line number
+was also encoded by an unsigned byte.) So we make two tweaks:
(a) there's a deep assumption that byte code offsets increase monotonically,
and
until 2.2) expand 300, 200 to
255, 255, 45, 45,
but to
- 255, 0, 45, 128, 0, 72.
+ 255, 0, 45, 127, 0, 73.
The above is sufficient to reconstruct line numbers for tracebacks, but not for
line tracing. Tracing is handled by PyCode_CheckLineNumber() in codeobject.c
1: def f(a):
2: while a:
-3: print 1,
+3: print(1)
4: break
5: else:
-6: print 2,
+6: print(2)
which compiles to this:
- 2 0 SETUP_LOOP 19 (to 22)
- >> 3 LOAD_FAST 0 (a)
- 6 POP_JUMP_IF_FALSE 17
+ 2 0 SETUP_LOOP 26 (to 28)
+ >> 2 LOAD_FAST 0 (a)
+ 4 POP_JUMP_IF_FALSE 18
- 3 9 LOAD_CONST 1 (1)
- 12 PRINT_ITEM
+ 3 6 LOAD_GLOBAL 0 (print)
+ 8 LOAD_CONST 1 (1)
+ 10 CALL_FUNCTION 1
+ 12 POP_TOP
- 4 13 BREAK_LOOP
- 14 JUMP_ABSOLUTE 3
- >> 17 POP_BLOCK
+ 4 14 BREAK_LOOP
+ 16 JUMP_ABSOLUTE 2
+ >> 18 POP_BLOCK
- 6 18 LOAD_CONST 2 (2)
- 21 PRINT_ITEM
- >> 22 LOAD_CONST 0 (None)
- 25 RETURN_VALUE
+ 6 20 LOAD_GLOBAL 0 (print)
+ 22 LOAD_CONST 2 (2)
+ 24 CALL_FUNCTION 1
+ 26 POP_TOP
+ >> 28 LOAD_CONST 0 (None)
+ 30 RETURN_VALUE
-If 'a' is false, execution will jump to the POP_BLOCK instruction at offset 17
+If 'a' is false, execution will jump to the POP_BLOCK instruction at offset 18
and the co_lnotab will claim that execution has moved to line 4, which is wrong.
In this case, we could instead associate the POP_BLOCK with line 5, but that
would break jumps around loops without else clauses.
{
Py_ssize_t start, stop, step, slicelength;
- if (PySlice_GetIndicesEx(key, base->shape[dim],
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(key, &start, &stop, &step) < 0) {
return -1;
}
+ slicelength = PySlice_AdjustIndices(base->shape[dim], &start, &stop, step);
if (base->suboffsets == NULL || dim == 0) {
PyObject *kwnames;
_PyCFunctionFast fastmeth = (_PyCFunctionFast)meth;
- stack = _PyStack_UnpackDict(args, nargs, kwargs, &kwnames, func_obj);
- if (stack == NULL) {
+ if (_PyStack_UnpackDict(args, nargs, kwargs, &stack, &kwnames) < 0) {
return NULL;
}
_Py_AllocatedBlocks++;
- assert(nelem <= PY_SSIZE_T_MAX / elsize);
+ assert(elsize == 0 || nelem <= PY_SSIZE_T_MAX / elsize);
nbytes = nelem * elsize;
#ifdef WITH_VALGRIND
(objobjargproc)0, /* mp_ass_subscript */
};
+static int
+range_bool(rangeobject* self)
+{
+ return PyObject_IsTrue(self->length);
+}
+
+static PyNumberMethods range_as_number = {
+ .nb_bool = (inquiry)range_bool,
+};
+
static PyObject * range_iter(PyObject *seq);
static PyObject * range_reverse(PyObject *seq);
0, /* tp_setattr */
0, /* tp_reserved */
(reprfunc)range_repr, /* tp_repr */
- 0, /* tp_as_number */
+ &range_as_number, /* tp_as_number */
&range_as_sequence, /* tp_as_sequence */
&range_as_mapping, /* tp_as_mapping */
(hashfunc)range_hash, /* tp_hash */
entry->hash = hash;
if ((size_t)so->fill*3 < mask*2)
return 0;
- return set_table_resize(so, so->used);
+ return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
found_active:
Py_DECREF(key);
setentry small_copy[PySet_MINSIZE];
assert(minused >= 0);
- minused = (minused > 50000) ? minused * 2 : minused * 4;
/* Find the smallest table size > minused. */
/* XXX speed-up with intrinsics */
* that there will be no (or few) overlapping keys.
*/
if ((so->fill + other->used)*3 >= so->mask*2) {
- if (set_table_resize(so, so->used + other->used) != 0)
- return -1;
+ if (set_table_resize(so, (so->used + other->used)*2) != 0)
+ return -1;
}
so_entry = so->table;
other_entry = other->table;
if (dictsize < 0)
return -1;
if ((so->fill + dictsize)*3 >= so->mask*2) {
- if (set_table_resize(so, so->used + dictsize) != 0)
+ if (set_table_resize(so, (so->used + dictsize)*2) != 0)
return -1;
}
while (_PyDict_Next(other, &pos, &key, &value, &hash)) {
/* If more than 1/4th are dummies, then resize them away. */
if ((size_t)(so->fill - so->used) <= (size_t)so->mask / 4)
return 0;
- return set_table_resize(so, so->used);
+ return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
}
static PyObject *
PyObject *key;
Py_hash_t hash;
setentry *entry;
- Py_ssize_t pos = 0;
+ Py_ssize_t pos = 0, other_size;
int rv;
if (PySet_GET_SIZE(so) == 0) {
return set_copy(so);
}
- if (!PyAnySet_Check(other) && !PyDict_CheckExact(other)) {
+ if (PyAnySet_Check(other)) {
+ other_size = PySet_GET_SIZE(other);
+ }
+ else if (PyDict_CheckExact(other)) {
+ other_size = PyDict_Size(other);
+ }
+ else {
return set_copy_and_difference(so, other);
}
/* If len(so) much more than len(other), it's more efficient to simply copy
* so and then iterate other looking for common elements. */
- if ((PySet_GET_SIZE(so) >> 2) > PyObject_Size(other)) {
+ if ((PySet_GET_SIZE(so) >> 2) > other_size) {
return set_copy_and_difference(so, other);
}
PySliceObject *r = (PySliceObject*)_r;
/* this is harder to get right than you might think */
+ Py_BUILD_ASSERT(PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX);
+
if (r->step == Py_None) {
*step = 1;
}
}
if (r->start == Py_None) {
- *start = *step < 0 ? PY_SSIZE_T_MAX-1 : 0;;
+ *start = *step < 0 ? PY_SSIZE_T_MAX : 0;
}
else {
if (!_PyEval_SliceIndex(r->start, start)) return -1;
}
if (r->stop == Py_None) {
- *stop = *step < 0 ? -PY_SSIZE_T_MAX : PY_SSIZE_T_MAX;
+ *stop = *step < 0 ? PY_SSIZE_T_MIN : PY_SSIZE_T_MAX;
}
else {
if (!_PyEval_SliceIndex(r->stop, stop)) return -1;
*stop = (step < 0) ? -1 : 0;
}
}
- else if (*stop >= length) {
+ else if (*stop >= length) {
*stop = (step < 0) ? length - 1 : length;
}
PyObject *v;
if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
- _PyEval_SliceIndex, &start,
- _PyEval_SliceIndex, &stop))
+ _PyEval_SliceIndexNotNone, &start,
+ _PyEval_SliceIndexNotNone, &stop))
return NULL;
if (start < 0) {
start += Py_SIZE(self);
PyObject* it;
PyObject **src, **dest;
- if (PySlice_GetIndicesEx(item,
- PyTuple_GET_SIZE(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start,
+ &stop, step);
if (slicelength <= 0) {
return PyTuple_New(0);
static int
type_setattro(PyTypeObject *type, PyObject *name, PyObject *value)
{
+ int res;
if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
PyErr_Format(
PyExc_TypeError,
type->tp_name);
return -1;
}
- if (PyObject_GenericSetAttr((PyObject *)type, name, value) < 0)
- return -1;
- return update_slot(type, name);
+ if (PyUnicode_Check(name)) {
+ if (PyUnicode_CheckExact(name)) {
+ if (PyUnicode_READY(name) == -1)
+ return -1;
+ Py_INCREF(name);
+ }
+ else {
+ name = _PyUnicode_Copy(name);
+ if (name == NULL)
+ return -1;
+ }
+ PyUnicode_InternInPlace(&name);
+ if (!PyUnicode_CHECK_INTERNED(name)) {
+ PyErr_SetString(PyExc_MemoryError,
+ "Out of memory interning an attribute name");
+ Py_DECREF(name);
+ return -1;
+ }
+ }
+ else {
+ /* Will fail in _PyObject_GenericSetAttrWithDict. */
+ Py_INCREF(name);
+ }
+ res = PyObject_GenericSetAttr((PyObject *)type, name, value);
+ if (res == 0) {
+ res = update_slot(type, name);
+ }
+ Py_DECREF(name);
+ return res;
}
extern void
/* Slots must be ordered by their offset in the PyHeapTypeObject. */
assert(!p[1].name || p->offset <= p[1].offset);
p->name_strobj = PyUnicode_InternFromString(p->name);
- if (!p->name_strobj)
+ if (!p->name_strobj || !PyUnicode_CHECK_INTERNED(p->name_strobj))
Py_FatalError("Out of memory interning slotdef names");
}
slotdefs_initialized = 1;
slotdef **pp;
int offset;
+ assert(PyUnicode_CheckExact(name));
+ assert(PyUnicode_CHECK_INTERNED(name));
+
/* Clear the VALID_VERSION flag of 'type' and all its
subclasses. This could possibly be unified with the
update_subclasses() recursion below, but carefully:
init_slotdefs();
pp = ptrs;
for (p = slotdefs; p->name; p++) {
- /* XXX assume name is interned! */
if (p->name_strobj == name)
*pp++ = p;
}
PyObject *output = NULL;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
+ *(PyObject**)addr = NULL;
return 1;
}
PyDoc_STRVAR(index__doc__,
"S.index(sub[, start[, end]]) -> int\n\
\n\
-Like S.find() but raise ValueError when the substring is not found.");
+Return the lowest index in S where substring sub is found, \n\
+such that sub is contained within S[start:end]. Optional\n\
+arguments start and end are interpreted as in slice notation.\n\
+\n\
+Raises ValueError when the substring is not found.");
static PyObject *
unicode_index(PyObject *self, PyObject *args)
PyDoc_STRVAR(rindex__doc__,
"S.rindex(sub[, start[, end]]) -> int\n\
\n\
-Like S.rfind() but raise ValueError when the substring is not found.");
+Return the highest index in S where substring sub is found,\n\
+such that sub is contained within S[start:end]. Optional\n\
+arguments start and end are interpreted as in slice notation.\n\
+\n\
+Raises ValueError when the substring is not found.");
static PyObject *
unicode_rindex(PyObject *self, PyObject *args)
int src_kind, dest_kind;
Py_UCS4 ch, max_char, kind_limit;
- if (PySlice_GetIndicesEx(item, PyUnicode_GET_LENGTH(self),
- &start, &stop, &step, &slicelength) < 0) {
+ if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
return NULL;
}
+ slicelength = PySlice_AdjustIndices(PyUnicode_GET_LENGTH(self),
+ &start, &stop, step);
if (slicelength <= 0) {
_Py_RETURN_UNICODE_EMPTY();
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>
- <RootNamespace>wininst</RootNamespace>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="..\..\PCBuild\python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\PCBuild\pyproject.props" />
- </ImportGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir>$(PySourcePath)lib\distutils\command\</OutDir>
- <LinkIncremental>false</LinkIncremental>
- <TargetName>wininst-$(VisualStudioVersion)</TargetName>
- <TargetName Condition="$(Platform) == 'x64'">$(TargetName)-amd64</TargetName>
- <TargetExt>.exe</TargetExt>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Midl>
- <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
- </Midl>
- <ClCompile>
- <Optimization>MinSpace</Optimization>
- <AdditionalIncludeDirectories>$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary Condition="'$(Configuration)'=='Debug'">MultiThreadedDebug</RuntimeLibrary>
- <RuntimeLibrary Condition="'$(Configuration)'=='Release'">MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="extract.c" />
- <ClCompile Include="install.c" />
- <ClCompile Include="..\..\Modules\zlib\adler32.c" />
- <ClCompile Include="..\..\Modules\zlib\crc32.c" />
- <ClCompile Include="..\..\Modules\zlib\inffast.c" />
- <ClCompile Include="..\..\Modules\zlib\inflate.c" />
- <ClCompile Include="..\..\Modules\zlib\inftrees.c" />
- <ClCompile Include="..\..\Modules\zlib\zutil.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="archive.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="install.rc" />
- </ItemGroup>
- <ItemGroup>
- <None Include="PythonPowered.bmp" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>\r
+ <RootNamespace>wininst</RootNamespace>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="..\..\PCBuild\python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="..\..\PCBuild\pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <OutDir>$(PySourcePath)lib\distutils\command\</OutDir>\r
+ <LinkIncremental>false</LinkIncremental>\r
+ <TargetName>wininst-$(VisualStudioVersion)</TargetName>\r
+ <TargetName Condition="$(PlatformToolset) == 'v140'">wininst-14.0</TargetName>\r
+ <TargetName Condition="$(PlatformToolset) == 'v120'">wininst-12.0</TargetName>\r
+ <TargetName Condition="$(PlatformToolset) == 'v110'">wininst-11.0</TargetName>\r
+ <TargetName Condition="$(PlatformToolset) == 'v100'">wininst-10.0</TargetName>\r
+ <TargetName Condition="$(Platform) == 'x64'">$(TargetName)-amd64</TargetName>\r
+ <TargetExt>.exe</TargetExt>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Midl>\r
+ <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>MinSpace</Optimization>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary Condition="'$(Configuration)'=='Debug'">MultiThreadedDebug</RuntimeLibrary>\r
+ <RuntimeLibrary Condition="'$(Configuration)'=='Release'">MultiThreaded</RuntimeLibrary>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="extract.c" />\r
+ <ClCompile Include="install.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\adler32.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\crc32.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\inffast.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\inflate.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\inftrees.c" />\r
+ <ClCompile Include="..\..\Modules\zlib\zutil.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="archive.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="install.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="PythonPowered.bmp" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{293b1092-03ad-4b7c-acb9-c4ab62e52f55}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Source Files\zlib">
- <UniqueIdentifier>{0edc0406-282f-4dbc-b60e-a867c34a2a31}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ea0c0f0e-3b73-474e-a999-e9689d032ccc}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{0c77c1cf-3f87-4f87-bd86-b425211c2181}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\bdist_wininst\extract.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\bdist_wininst\install.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\adler32.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\crc32.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inffast.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inflate.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inftrees.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\zutil.c">
- <Filter>Source Files\zlib</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\PC\bdist_wininst\archive.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\bdist_wininst\install.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\bdist_wininst\PythonPowered.bmp">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{293b1092-03ad-4b7c-acb9-c4ab62e52f55}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>\r
+ </Filter>\r
+ <Filter Include="Source Files\zlib">\r
+ <UniqueIdentifier>{0edc0406-282f-4dbc-b60e-a867c34a2a31}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{ea0c0f0e-3b73-474e-a999-e9689d032ccc}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{0c77c1cf-3f87-4f87-bd86-b425211c2181}</UniqueIdentifier>\r
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\bdist_wininst\extract.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\bdist_wininst\install.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\adler32.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\crc32.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inffast.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inflate.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inftrees.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\zutil.c">\r
+ <Filter>Source Files\zlib</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\PC\bdist_wininst\archive.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\bdist_wininst\install.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\bdist_wininst\PythonPowered.bmp">\r
+ <Filter>Resource Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
\r
echo Building Lib\distutils\command\wininst-xx.0.exe\r
\r
-call "%PCBUILD%env.bat" x86\r
-if errorlevel 1 goto :eof\r
+call "%PCBUILD%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
\r
-msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32\r
+%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32\r
if errorlevel 1 goto :eof\r
\r
\r
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe\r
\r
-call "%PCBUILD%env.bat" x86_amd64\r
-if errorlevel 1 goto :eof\r
-\r
-msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64\r
+%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64\r
may extend 'filename' by one character.
*/
static int
-ismodule(wchar_t *filename, int update_filename) /* Is module -- check for .pyc/.pyo too */
+ismodule(wchar_t *filename, int update_filename) /* Is module -- check for .pyc too */
{
size_t n;
n = wcsnlen_s(filename, MAXPATHLEN+1);
if (n < MAXPATHLEN) {
int exist = 0;
- filename[n] = Py_OptimizeFlag ? L'o' : L'c';
+ filename[n] = L'c';
filename[n + 1] = L'\0';
exist = exists(filename);
if (!update_filename)
-Welcome to the "PC" subdirectory of the Python distribution
-***********************************************************
-
-This "PC" subdirectory contains complete project files to make
-several older PC ports of Python, as well as all the PC-specific
-Python source files. It should be located in the root of the
-Python distribution, and there should be directories "Modules",
-"Objects", "Python", etc. in the parent directory of this "PC"
-subdirectory. Be sure to read the documentation in the Python
-distribution.
-
-Python requires library files such as string.py to be available in
-one or more library directories. The search path of libraries is
-set up when Python starts. To see the current Python library search
-path, start Python and enter "import sys" and "print sys.path".
-
-All PC ports use this scheme to try to set up a module search path:
-
- 1) The script location; the current directory without script.
- 2) The PYTHONPATH variable, if set.
- 3) For Win32 platforms (NT/95), paths specified in the Registry.
- 4) Default directories lib, lib/win, lib/test, lib/tkinter;
- these are searched relative to the environment variable
- PYTHONHOME, if set, or relative to the executable and its
- ancestors, if a landmark file (Lib/string.py) is found ,
- or the current directory (not useful).
- 5) The directory containing the executable.
-
-The best installation strategy is to put the Python executable (and
-DLL, for Win32 platforms) in some convenient directory such as
-C:/python, and copy all library files and subdirectories (using XCOPY)
-to C:/python/lib. Then you don't need to set PYTHONPATH. Otherwise,
-set the environment variable PYTHONPATH to your Python search path.
-For example,
- set PYTHONPATH=.;d:\python\lib;d:\python\lib\win;d:\python\lib\dos-8x3
-
-There are several add-in modules to build Python programs which use
-the native Windows operating environment. The ports here just make
-"QuickWin" and DOS Python versions which support a character-mode
-(console) environment. Look in www.python.org for Tkinter, PythonWin,
-WPY and wxPython.
-
-To make a Python port, start the Integrated Development Environment
-(IDE) of your compiler, and read in the native "project file"
-(or makefile) provided. This will enable you to change any source
-files or build settings so you can make custom builds.
-
-pyconfig.h An important configuration file specific to PC's.
-
-config.c The list of C modules to include in the Python PC
- version. Manually edit this file to add or
- remove Python modules.
-
-testpy.py A Python test program. Run this to test your
- Python port. It should produce copious output,
- ending in a report on how many tests were OK, how many
- failed, and how many were skipped. Don't worry about
- skipped tests (these test unavailable optional features).
-
-
-Additional files and subdirectories for 32-bit Windows
-======================================================
-
-python_nt.rc Resource compiler input for python15.dll.
-
-dl_nt.c
- Additional sources used for 32-bit Windows features.
-
-getpathp.c Default sys.path calculations (for all PC platforms).
-
-dllbase_nt.txt A (manually maintained) list of base addresses for
- various DLLs, to avoid run-time relocation.
-
-
-Note for Windows 3.x and DOS users
-==================================
-
-Neither Windows 3.x nor DOS is supported any more. The last Python
-version that supported these was Python 1.5.2; the support files were
-present in Python 2.0 but weren't updated, and it is not our intention
-to support these platforms for Python 2.x.
+Welcome to the "PC" subdirectory of the Python distribution\r
+***********************************************************\r
+\r
+This "PC" subdirectory contains complete project files to make\r
+several older PC ports of Python, as well as all the PC-specific\r
+Python source files. It should be located in the root of the\r
+Python distribution, and there should be directories "Modules",\r
+"Objects", "Python", etc. in the parent directory of this "PC"\r
+subdirectory. Be sure to read the documentation in the Python\r
+distribution.\r
+\r
+Python requires library files such as string.py to be available in\r
+one or more library directories. The search path of libraries is\r
+set up when Python starts. To see the current Python library search\r
+path, start Python and enter "import sys" and "print sys.path".\r
+\r
+All PC ports use this scheme to try to set up a module search path:\r
+\r
+ 1) The script location; the current directory without script.\r
+ 2) The PYTHONPATH variable, if set.\r
+ 3) For Win32 platforms (NT/95), paths specified in the Registry.\r
+ 4) Default directories lib, lib/win, lib/test, lib/tkinter;\r
+ these are searched relative to the environment variable\r
+ PYTHONHOME, if set, or relative to the executable and its\r
+ ancestors, if a landmark file (Lib/string.py) is found ,\r
+ or the current directory (not useful).\r
+ 5) The directory containing the executable.\r
+\r
+The best installation strategy is to put the Python executable (and\r
+DLL, for Win32 platforms) in some convenient directory such as\r
+C:/python, and copy all library files and subdirectories (using XCOPY)\r
+to C:/python/lib. Then you don't need to set PYTHONPATH. Otherwise,\r
+set the environment variable PYTHONPATH to your Python search path.\r
+For example,\r
+ set PYTHONPATH=.;d:\python\lib;d:\python\lib\win;d:\python\lib\dos-8x3\r
+\r
+There are several add-in modules to build Python programs which use\r
+the native Windows operating environment. The ports here just make\r
+"QuickWin" and DOS Python versions which support a character-mode\r
+(console) environment. Look in www.python.org for Tkinter, PythonWin,\r
+WPY and wxPython.\r
+\r
+To make a Python port, start the Integrated Development Environment\r
+(IDE) of your compiler, and read in the native "project file"\r
+(or makefile) provided. This will enable you to change any source\r
+files or build settings so you can make custom builds.\r
+\r
+pyconfig.h An important configuration file specific to PC's.\r
+\r
+config.c The list of C modules to include in the Python PC\r
+ version. Manually edit this file to add or\r
+ remove Python modules.\r
+\r
+testpy.py A Python test program. Run this to test your\r
+ Python port. It should produce copious output,\r
+ ending in a report on how many tests were OK, how many\r
+ failed, and how many were skipped. Don't worry about\r
+ skipped tests (these test unavailable optional features).\r
+\r
+\r
+Additional files and subdirectories for 32-bit Windows\r
+======================================================\r
+\r
+python_nt.rc Resource compiler input for python15.dll.\r
+\r
+dl_nt.c\r
+ Additional sources used for 32-bit Windows features.\r
+\r
+getpathp.c Default sys.path calculations (for all PC platforms).\r
+\r
+dllbase_nt.txt A (manually maintained) list of base addresses for\r
+ various DLLs, to avoid run-time relocation.\r
+\r
+\r
+Note for Windows 3.x and DOS users\r
+==================================\r
+\r
+Neither Windows 3.x nor DOS is supported any more. The last Python\r
+version that supported these was Python 1.5.2; the support files were\r
+present in Python 2.0 but weren't updated, and it is not our intention\r
+to support these platforms for Python 2.x.\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{384C224A-7474-476E-A01B-750EA7DE918C}</ProjectGuid>
- <RootNamespace>_asyncio</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_asynciomodule.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{384C224A-7474-476E-A01B-750EA7DE918C}</ProjectGuid>\r
+ <RootNamespace>_asyncio</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_asynciomodule.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{2422278e-eeeb-4241-8182-433e2bc5a7fc}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_asynciomodule.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{2422278e-eeeb-4241-8182-433e2bc5a7fc}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_asynciomodule.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}</ProjectGuid>
- <RootNamespace>bz2</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_bz2module.c" />
- <ClCompile Include="$(bz2Dir)\blocksort.c" />
- <ClCompile Include="$(bz2Dir)\bzlib.c" />
- <ClCompile Include="$(bz2Dir)\compress.c" />
- <ClCompile Include="$(bz2Dir)\crctable.c" />
- <ClCompile Include="$(bz2Dir)\decompress.c" />
- <ClCompile Include="$(bz2Dir)\huffman.c" />
- <ClCompile Include="$(bz2Dir)\randtable.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(bz2Dir)\bzlib.h" />
- <ClInclude Include="$(bz2Dir)\bzlib_private.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}</ProjectGuid>\r
+ <RootNamespace>bz2</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Label="Configuration" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <BaseAddress>0x1D170000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_bz2module.c" />\r
+ <ClCompile Include="$(bz2Dir)\blocksort.c" />\r
+ <ClCompile Include="$(bz2Dir)\bzlib.c" />\r
+ <ClCompile Include="$(bz2Dir)\compress.c" />\r
+ <ClCompile Include="$(bz2Dir)\crctable.c" />\r
+ <ClCompile Include="$(bz2Dir)\decompress.c" />\r
+ <ClCompile Include="$(bz2Dir)\huffman.c" />\r
+ <ClCompile Include="$(bz2Dir)\randtable.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="$(bz2Dir)\bzlib.h" />\r
+ <ClInclude Include="$(bz2Dir)\bzlib_private.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{f53a859d-dad2-4d5b-ae41-f28d8b571f5a}</UniqueIdentifier>
- </Filter>
- <Filter Include="bzip2 1.0.6 Header Files">
- <UniqueIdentifier>{7e0bed05-ae33-43b7-8797-656455bbb7f3}</UniqueIdentifier>
- </Filter>
- <Filter Include="bzip2 1.0.6 Source Files">
- <UniqueIdentifier>{ed574b89-6983-4cdf-9f98-fe7048d9e89c}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_bz2module.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\blocksort.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\bzlib.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\compress.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\crctable.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\decompress.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\huffman.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- <ClCompile Include="$(bz2Dir)\randtable.c">
- <Filter>bzip2 1.0.6 Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(bz2Dir)\bzlib.h">
- <Filter>bzip2 1.0.6 Header Files</Filter>
- </ClInclude>
- <ClInclude Include="$(bz2Dir)\bzlib_private.h">
- <Filter>bzip2 1.0.6 Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{f53a859d-dad2-4d5b-ae41-f28d8b571f5a}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="bzip2 1.0.6 Header Files">\r
+ <UniqueIdentifier>{7e0bed05-ae33-43b7-8797-656455bbb7f3}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="bzip2 1.0.6 Source Files">\r
+ <UniqueIdentifier>{ed574b89-6983-4cdf-9f98-fe7048d9e89c}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_bz2module.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\blocksort.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\bzlib.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\compress.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\crctable.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\decompress.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\huffman.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="$(bz2Dir)\randtable.c">\r
+ <Filter>bzip2 1.0.6 Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="$(bz2Dir)\bzlib.h">\r
+ <Filter>bzip2 1.0.6 Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="$(bz2Dir)\bzlib_private.h">\r
+ <Filter>bzip2 1.0.6 Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0E9791DB-593A-465F-98BC-681011311618}</ProjectGuid>
- <RootNamespace>_ctypes</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D1A0000</BaseAddress>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_ctypes\ctypes.h" />
- <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h" />
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h" />
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h" />
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h" />
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ctypes\_ctypes.c" />
- <ClCompile Include="..\Modules\_ctypes\callbacks.c" />
- <ClCompile Include="..\Modules\_ctypes\callproc.c" />
- <ClCompile Include="..\Modules\_ctypes\cfield.c" />
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c" />
- <ClCompile Include="..\Modules\_ctypes\malloc_closure.c" />
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c" />
- <ClCompile Include="..\Modules\_ctypes\stgdict.c" />
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">
- <ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">
- <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
- <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)win64.obj" "%(FullPath)"</Command>
- <Outputs>$(IntDir)win64.obj;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{0E9791DB-593A-465F-98BC-681011311618}</ProjectGuid>\r
+ <RootNamespace>_ctypes</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ <Link>\r
+ <BaseAddress>0x1D1A0000</BaseAddress>\r
+ <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_ctypes\ctypes.h" />\r
+ <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h" />\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h" />\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h" />\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h" />\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ctypes\_ctypes.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\callbacks.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\callproc.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\cfield.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\malloc_closure.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\stgdict.c" />\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">\r
+ <ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">\r
+ <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>\r
+ <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)win64.obj" "%(FullPath)"</Command>\r
+ <Outputs>$(IntDir)win64.obj;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{806081ee-2af0-48d0-a83e-ee02a74baa0f}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{dbdea1f2-ad8b-44ca-b782-fcf65d91559b}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_ctypes\ctypes.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ctypes\_ctypes.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\callbacks.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\callproc.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\cfield.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\malloc_closure.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\stgdict.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">
- <Filter>Source Files</Filter>
- </CustomBuild>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{806081ee-2af0-48d0-a83e-ee02a74baa0f}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{dbdea1f2-ad8b-44ca-b782-fcf65d91559b}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_ctypes\ctypes.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ctypes\_ctypes.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\callbacks.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\callproc.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\cfield.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\malloc_closure.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\stgdict.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">\r
+ <Filter>Source Files</Filter>\r
+ </CustomBuild>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{9EC7190A-249F-4180-A900-548FDCF3055F}</ProjectGuid>
- <RootNamespace>_ctypes_test</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{9EC7190A-249F-4180-A900-548FDCF3055F}</ProjectGuid>\r
+ <RootNamespace>_ctypes_test</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8fd70119-5481-4e5d-b187-d0b14eb27e38}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{38abc486-e143-49dc-8cf0-8aefab0e0d3d}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{8fd70119-5481-4e5d-b187-d0b14eb27e38}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{38abc486-e143-49dc-8cf0-8aefab0e0d3d}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0E9791DB-593A-465F-98BC-681011311617}</ProjectGuid>
- <RootNamespace>_decimal</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Platform)' == 'Win32'">CONFIG_32;PPRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">CONFIG_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_decimal\libmpdec\basearith.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\bits.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\constants.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\convolute.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\crt.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\difradix2.h" />
- <ClInclude Include="..\Modules\_decimal\docstrings.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\fnt.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\fourstep.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\mpdecimal.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\numbertheory.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\sixstep.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\transpose.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\typearith.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\umodarith.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\vccompat.h" />
- <ClInclude Include="..\Modules\_decimal\libmpdec\vcstdint.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_decimal\_decimal.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\basearith.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\constants.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\context.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\convolute.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\crt.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\difradix2.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\fnt.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\fourstep.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\io.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\memory.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\mpdecimal.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\numbertheory.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\sixstep.c" />
- <ClCompile Include="..\Modules\_decimal\libmpdec\transpose.c" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">
- <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
- <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"</Command>
- <Outputs>$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{0E9791DB-593A-465F-98BC-681011311617}</ProjectGuid>\r
+ <RootNamespace>_decimal</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions Condition="'$(Platform)' == 'Win32'">CONFIG_32;PPRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">CONFIG_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ <Link>\r
+ <BaseAddress>0x1D1A0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\basearith.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\bits.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\constants.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\convolute.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\crt.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\difradix2.h" />\r
+ <ClInclude Include="..\Modules\_decimal\docstrings.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\fnt.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\fourstep.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\mpdecimal.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\numbertheory.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\sixstep.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\transpose.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\typearith.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\umodarith.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\vccompat.h" />\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\vcstdint.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_decimal\_decimal.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\basearith.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\constants.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\context.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\convolute.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\crt.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\difradix2.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\fnt.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\fourstep.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\io.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\memory.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\mpdecimal.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\numbertheory.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\sixstep.c" />\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\transpose.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">\r
+ <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>\r
+ <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"</Command>\r
+ <Outputs>$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{f35a78a6-3ef0-4e36-bd8b-afaef22fbb7c}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{138089f8-faba-494f-b6ed-051f31fbaf2d}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_decimal\libmpdec\basearith.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\bits.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\constants.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\convolute.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\crt.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\difradix2.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\docstrings.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\fnt.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\fourstep.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\mpdecimal.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\numbertheory.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\sixstep.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\transpose.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\typearith.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\umodarith.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\vccompat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_decimal\libmpdec\vcstdint.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_decimal\_decimal.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\basearith.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\constants.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\context.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\convolute.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\crt.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\difradix2.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\fnt.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\fourstep.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\io.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\memory.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\mpdecimal.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\numbertheory.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\sixstep.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_decimal\libmpdec\transpose.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">
- <Filter>Source Files</Filter>
- </CustomBuild>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{f35a78a6-3ef0-4e36-bd8b-afaef22fbb7c}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{138089f8-faba-494f-b6ed-051f31fbaf2d}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\basearith.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\bits.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\constants.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\convolute.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\crt.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\difradix2.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\docstrings.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\fnt.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\fourstep.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\mpdecimal.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\numbertheory.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\sixstep.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\transpose.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\typearith.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\umodarith.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\vccompat.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_decimal\libmpdec\vcstdint.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_decimal\_decimal.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\basearith.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\constants.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\context.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\convolute.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\crt.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\difradix2.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\fnt.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\fourstep.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\io.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\memory.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\mpdecimal.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\numbertheory.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\sixstep.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_decimal\libmpdec\transpose.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">\r
+ <Filter>Source Files</Filter>\r
+ </CustomBuild>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{17E1E049-C309-4D79-843F-AE483C264AEA}</ProjectGuid>
- <RootNamespace>_elementtree</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\expat\ascii.h" />
- <ClInclude Include="..\Modules\expat\asciitab.h" />
- <ClInclude Include="..\Modules\expat\expat.h" />
- <ClInclude Include="..\Modules\expat\expat_config.h" />
- <ClInclude Include="..\Modules\expat\expat_external.h" />
- <ClInclude Include="..\Modules\expat\iasciitab.h" />
- <ClInclude Include="..\Modules\expat\internal.h" />
- <ClInclude Include="..\Modules\expat\latin1tab.h" />
- <ClInclude Include="..\Modules\expat\macconfig.h" />
- <ClInclude Include="..\Modules\expat\nametab.h" />
- <ClInclude Include="..\Modules\expat\pyexpatns.h" />
- <ClInclude Include="..\Modules\expat\utf8tab.h" />
- <ClInclude Include="..\Modules\expat\winconfig.h" />
- <ClInclude Include="..\Modules\expat\xmlrole.h" />
- <ClInclude Include="..\Modules\expat\xmltok.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_elementtree.c" />
- <ClCompile Include="..\Modules\expat\xmlparse.c" />
- <ClCompile Include="..\Modules\expat\xmlrole.c" />
- <ClCompile Include="..\Modules\expat\xmltok.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{17E1E049-C309-4D79-843F-AE483C264AEA}</ProjectGuid>\r
+ <RootNamespace>_elementtree</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <BaseAddress>0x1D100000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\expat\ascii.h" />\r
+ <ClInclude Include="..\Modules\expat\asciitab.h" />\r
+ <ClInclude Include="..\Modules\expat\expat.h" />\r
+ <ClInclude Include="..\Modules\expat\expat_config.h" />\r
+ <ClInclude Include="..\Modules\expat\expat_external.h" />\r
+ <ClInclude Include="..\Modules\expat\iasciitab.h" />\r
+ <ClInclude Include="..\Modules\expat\internal.h" />\r
+ <ClInclude Include="..\Modules\expat\latin1tab.h" />\r
+ <ClInclude Include="..\Modules\expat\macconfig.h" />\r
+ <ClInclude Include="..\Modules\expat\nametab.h" />\r
+ <ClInclude Include="..\Modules\expat\pyexpatns.h" />\r
+ <ClInclude Include="..\Modules\expat\utf8tab.h" />\r
+ <ClInclude Include="..\Modules\expat\winconfig.h" />\r
+ <ClInclude Include="..\Modules\expat\xmlrole.h" />\r
+ <ClInclude Include="..\Modules\expat\xmltok.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_elementtree.c" />\r
+ <ClCompile Include="..\Modules\expat\xmlparse.c" />\r
+ <ClCompile Include="..\Modules\expat\xmlrole.c" />\r
+ <ClCompile Include="..\Modules\expat\xmltok.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{643d8607-d024-40fe-8583-1823c96430f0}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{7b5335ad-059f-486f-85e4-f4757e26a9bf}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\expat\ascii.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\asciitab.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\expat.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\expat_config.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\expat_external.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\iasciitab.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\internal.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\latin1tab.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\macconfig.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\nametab.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\pyexpatns.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\utf8tab.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\winconfig.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\xmlrole.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\xmltok.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_elementtree.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmlparse.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmlrole.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmltok.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{643d8607-d024-40fe-8583-1823c96430f0}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{7b5335ad-059f-486f-85e4-f4757e26a9bf}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\expat\ascii.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\asciitab.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\expat.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\expat_config.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\expat_external.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\iasciitab.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\internal.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\latin1tab.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\macconfig.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\nametab.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\pyexpatns.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\utf8tab.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\winconfig.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\xmlrole.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\xmltok.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_elementtree.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmlparse.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmlrole.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmltok.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{19C0C13F-47CA-4432-AFF3-799A296A4DDC}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>_freeze_importlib</RootNamespace>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\_freeze_importlib.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <Private>true</Private>
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\Lib\importlib\_bootstrap.py">
- <IntFile>$(IntDir)importlib.g.h</IntFile>
- <OutFile>$(PySourcePath)Python\importlib.h</OutFile>
- </None>
- <None Include="..\Lib\importlib\_bootstrap_external.py">
- <IntFile>$(IntDir)importlib_external.g.h</IntFile>
- <OutFile>$(PySourcePath)Python\importlib_external.h</OutFile>
- </None>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
- <Target Name="_RebuildImportLib">
- <Exec Command='"$(TargetPath)" "%(None.FullPath)" "%(None.IntFile)"' />
-
- <PropertyGroup>
- <_OldContent Condition="Exists($(OutTargetPath))"></_OldContent>
- <_NewContent Condition="Exists($(IntTargetPath))">$([System.IO.File]::ReadAllText($(IntTargetPath)).Replace(`
`, `
`))</_NewContent>
- </PropertyGroup>
-
- <Copy SourceFiles="%(None.IntFile)"
- DestinationFiles="%(None.OutFile)"
- Condition="!Exists(%(None.OutFile)) or (Exists(%(None.IntFile)) and '$([System.IO.File]::ReadAllText(%(None.OutFile)).Replace(`
`, `
`))' != '$([System.IO.File]::ReadAllText(%(None.IntFile)).Replace(`
`, `
`))')">
- <Output TaskParameter="CopiedFiles" ItemName="_Updated" />
- </Copy>
-
- <Warning Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."
- Condition="'@(_Updated)' != '' and $(Configuration) == 'Debug'" />
- <Error Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."
- Condition="'@(_Updated)' != '' and $(Configuration) == 'Release'" />
- </Target>
- <Target Name="RebuildImportLib" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug' or $(Configuration) == 'Release'"
- DependsOnTargets="_RebuildImportLib">
- </Target>
- <Target Name="_CleanImportLib" BeforeTargets="CoreClean">
- <ItemGroup>
- <Clean Include="$(IntDir)importlib.g.h" />
- <Clean Include="$(IntDir)importlib_external.g.h" />
- </ItemGroup>
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{19C0C13F-47CA-4432-AFF3-799A296A4DDC}</ProjectGuid>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <RootNamespace>_freeze_importlib</RootNamespace>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\_freeze_importlib.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <Private>true</Private>\r
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>\r
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>\r
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>\r
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\Lib\importlib\_bootstrap.py">\r
+ <IntFile>$(IntDir)importlib.g.h</IntFile>\r
+ <OutFile>$(PySourcePath)Python\importlib.h</OutFile>\r
+ </None>\r
+ <None Include="..\Lib\importlib\_bootstrap_external.py">\r
+ <IntFile>$(IntDir)importlib_external.g.h</IntFile>\r
+ <OutFile>$(PySourcePath)Python\importlib_external.h</OutFile>\r
+ </None>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+ <Target Name="_RebuildImportLib">\r
+ <Exec Command='"$(TargetPath)" "%(None.FullPath)" "%(None.IntFile)"' />\r
+ \r
+ <PropertyGroup>\r
+ <_OldContent Condition="Exists($(OutTargetPath))"></_OldContent>\r
+ <_NewContent Condition="Exists($(IntTargetPath))">$([System.IO.File]::ReadAllText($(IntTargetPath)).Replace(`
`, `
`))</_NewContent>\r
+ </PropertyGroup>\r
+ \r
+ <Copy SourceFiles="%(None.IntFile)"\r
+ DestinationFiles="%(None.OutFile)"\r
+ Condition="!Exists(%(None.OutFile)) or (Exists(%(None.IntFile)) and '$([System.IO.File]::ReadAllText(%(None.OutFile)).Replace(`
`, `
`))' != '$([System.IO.File]::ReadAllText(%(None.IntFile)).Replace(`
`, `
`))')">\r
+ <Output TaskParameter="CopiedFiles" ItemName="_Updated" />\r
+ </Copy>\r
+ \r
+ <Warning Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."\r
+ Condition="'@(_Updated)' != '' and $(Configuration) == 'Debug'" />\r
+ <Error Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."\r
+ Condition="'@(_Updated)' != '' and $(Configuration) == 'Release'" />\r
+ </Target>\r
+ <Target Name="RebuildImportLib" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug' or $(Configuration) == 'Release'"\r
+ DependsOnTargets="_RebuildImportLib">\r
+ </Target>\r
+ <Target Name="_CleanImportLib" BeforeTargets="CoreClean">\r
+ <ItemGroup>\r
+ <Clean Include="$(IntDir)importlib.g.h" />\r
+ <Clean Include="$(IntDir)importlib_external.g.h" />\r
+ </ItemGroup>\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\_freeze_importlib.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\Lib\importlib\_bootstrap.py">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\_freeze_importlib.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\Lib\importlib\_bootstrap.py">\r
+ <Filter>Source Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{447F05A8-F581-4CAC-A466-5AC7936E207E}</ProjectGuid>
- <RootNamespace>_hashlib</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_hashopenssl.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="ssleay.vcxproj">
- <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="libeay.vcxproj">
- <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{447F05A8-F581-4CAC-A466-5AC7936E207E}</ProjectGuid>\r
+ <RootNamespace>_hashlib</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_hashopenssl.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="ssleay.vcxproj">\r
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="libeay.vcxproj">\r
+ <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{cc45963d-bd25-4eb8-bdba-a5507090bca4}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_hashopenssl.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{cc45963d-bd25-4eb8-bdba-a5507090bca4}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_hashopenssl.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F9D71780-F393-11E0-BE50-0800200C9A66}</ProjectGuid>
- <RootNamespace>lzma</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(OutDir)/liblzma$(PyDebugExt).lib</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_lzmamodule.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="liblzma.vcxproj">
- <Project>{12728250-16eC-4dc6-94d7-e21dd88947f8}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{F9D71780-F393-11E0-BE50-0800200C9A66}</ProjectGuid>\r
+ <RootNamespace>lzma</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>$(OutDir)/liblzma$(PyDebugExt).lib</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_lzmamodule.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="liblzma.vcxproj">\r
+ <Project>{12728250-16eC-4dc6-94d7-e21dd88947f8}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{53e68eda-39fc-4336-a658-dc5f5d598760}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_lzmamodule.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{53e68eda-39fc-4336-a658-dc5f5d598760}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_lzmamodule.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{31FFC478-7B4A-43E8-9954-8D03E2187E9C}</ProjectGuid>
- <RootNamespace>_msi</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\_msi.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{31FFC478-7B4A-43E8-9954-8D03E2187E9C}</ProjectGuid>\r
+ <RootNamespace>_msi</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1D160000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\_msi.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{bdef7710-e433-4ac0-84e0-14f34454bd3e}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\_msi.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{bdef7710-e433-4ac0-84e0-14f34454bd3e}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\_msi.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{9E48B300-37D1-11DD-8C41-005056C00008}</ProjectGuid>
- <RootNamespace>_multiprocessing</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c" />
- <ClCompile Include="..\Modules\_multiprocessing\semaphore.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{9E48B300-37D1-11DD-8C41-005056C00008}</ProjectGuid>\r
+ <RootNamespace>_multiprocessing</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1e1D0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c" />\r
+ <ClCompile Include="..\Modules\_multiprocessing\semaphore.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{623c956c-1893-43d9-a7dc-96e4fef20f93}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{34615a62-f999-4659-83f5-19d17a644530}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_multiprocessing\semaphore.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{623c956c-1893-43d9-a7dc-96e4fef20f93}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{34615a62-f999-4659-83f5-19d17a644530}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_multiprocessing\semaphore.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}</ProjectGuid>
- <RootNamespace>_overlapped</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\overlapped.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}</ProjectGuid>\r
+ <RootNamespace>_overlapped</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1D110000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\overlapped.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6f67c8db-7de7-4714-a967-2b0d4bc71f2e}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\overlapped.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{6f67c8db-7de7-4714-a967-2b0d4bc71f2e}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\overlapped.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{86937F53-C189-40EF-8CE8-8759D8E7D480}</ProjectGuid>
- <RootNamespace>_socket</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\socketmodule.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\socketmodule.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{86937F53-C189-40EF-8CE8-8759D8E7D480}</ProjectGuid>\r
+ <RootNamespace>_socket</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1e1D0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\socketmodule.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\socketmodule.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{1452207f-707c-4e84-b532-307193a0fd85}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1edfe0d0-7b9d-4dc8-a335-b21fef7cc77a}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\socketmodule.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\socketmodule.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{1452207f-707c-4e84-b532-307193a0fd85}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{1edfe0d0-7b9d-4dc8-a335-b21fef7cc77a}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\socketmodule.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\socketmodule.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{13CECB97-4119-4316-9D42-8534019A5A44}</ProjectGuid>
- <RootNamespace>_sqlite3</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_sqlite\cache.h" />
- <ClInclude Include="..\Modules\_sqlite\connection.h" />
- <ClInclude Include="..\Modules\_sqlite\cursor.h" />
- <ClInclude Include="..\Modules\_sqlite\microprotocols.h" />
- <ClInclude Include="..\Modules\_sqlite\module.h" />
- <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h" />
- <ClInclude Include="..\Modules\_sqlite\row.h" />
- <ClInclude Include="..\Modules\_sqlite\statement.h" />
- <ClInclude Include="..\Modules\_sqlite\util.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_sqlite\cache.c" />
- <ClCompile Include="..\Modules\_sqlite\connection.c" />
- <ClCompile Include="..\Modules\_sqlite\cursor.c" />
- <ClCompile Include="..\Modules\_sqlite\microprotocols.c" />
- <ClCompile Include="..\Modules\_sqlite\module.c" />
- <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c" />
- <ClCompile Include="..\Modules\_sqlite\row.c" />
- <ClCompile Include="..\Modules\_sqlite\statement.c" />
- <ClCompile Include="..\Modules\_sqlite\util.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="sqlite3.vcxproj">
- <Project>{a1a295e5-463c-437f-81ca-1f32367685da}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{13CECB97-4119-4316-9D42-8534019A5A44}</ProjectGuid>\r
+ <RootNamespace>_sqlite3</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <BaseAddress>0x1e180000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_sqlite\cache.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\connection.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\cursor.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\microprotocols.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\module.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\row.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\statement.h" />\r
+ <ClInclude Include="..\Modules\_sqlite\util.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_sqlite\cache.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\connection.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\cursor.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\microprotocols.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\module.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\row.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\statement.c" />\r
+ <ClCompile Include="..\Modules\_sqlite\util.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="sqlite3.vcxproj">\r
+ <Project>{a1a295e5-463c-437f-81ca-1f32367685da}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{dac8ab3b-ce16-4bef-bef9-76463a01f5c4}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{814b187d-44ad-4f2b-baa7-18ca8a8a6a77}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\_sqlite\cache.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\connection.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\cursor.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\microprotocols.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\module.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\row.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\statement.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_sqlite\util.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_sqlite\cache.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\connection.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\cursor.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\microprotocols.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\module.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\row.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\statement.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sqlite\util.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{dac8ab3b-ce16-4bef-bef9-76463a01f5c4}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{814b187d-44ad-4f2b-baa7-18ca8a8a6a77}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\_sqlite\cache.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\connection.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\cursor.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\microprotocols.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\module.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\row.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\statement.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_sqlite\util.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_sqlite\cache.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\connection.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\cursor.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\microprotocols.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\module.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\row.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\statement.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sqlite\util.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C6E20F84-3247-4AD6-B051-B073268F73BA}</ProjectGuid>
- <RootNamespace>_ssl</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ssl.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="libeay.vcxproj">
- <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="ssleay.vcxproj">
- <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="_socket.vcxproj">
- <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{C6E20F84-3247-4AD6-B051-B073268F73BA}</ProjectGuid>\r
+ <RootNamespace>_ssl</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ssl.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="libeay.vcxproj">\r
+ <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="ssleay.vcxproj">\r
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="_socket.vcxproj">\r
+ <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{695348f7-e9f6-4fe1-bc03-5f08ffc8095b}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_ssl.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{695348f7-e9f6-4fe1-bc03-5f08ffc8095b}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_ssl.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{A2697BD3-28C1-4AEC-9106-8B748639FD16}</ProjectGuid>
- <RootNamespace>_testbuffer</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testbuffer.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{A2697BD3-28C1-4AEC-9106-8B748639FD16}</ProjectGuid>\r
+ <RootNamespace>_testbuffer</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <BaseAddress>0x1e1F0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testbuffer.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8d232240-921a-4bc2-87c3-93ffd3462f0a}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testbuffer.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{8d232240-921a-4bc2-87c3-93ffd3462f0a}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testbuffer.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}</ProjectGuid>
- <RootNamespace>_testcapi</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testcapimodule.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}</ProjectGuid>\r
+ <RootNamespace>_testcapi</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <BaseAddress>0x1e1F0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testcapimodule.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testcapimodule.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testcapimodule.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{B244E787-C445-441C-BDF4-5A4F1A3A1E51}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>_testconsole</RootNamespace>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\_testconsole.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{B244E787-C445-441C-BDF4-5A4F1A3A1E51}</ProjectGuid>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <RootNamespace>_testconsole</RootNamespace>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\_testconsole.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testmultiphase.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testmultiphase.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{6DAC66D9-E703-4624-BE03-49112AB5AA62}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>_testembed</RootNamespace>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\_testembed.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{6DAC66D9-E703-4624-BE03-49112AB5AA62}</ProjectGuid>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <RootNamespace>_testembed</RootNamespace>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\_testembed.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\_testembed.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\_testembed.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}</ProjectGuid>
- <RootNamespace>_testimportmultiple</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testimportmultiple.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}</ProjectGuid>\r
+ <RootNamespace>_testimportmultiple</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <BaseAddress>0x1e1F0000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testimportmultiple.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1ec38ad9-1abf-4b80-8628-ac43ccba324b}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testimportmultiple.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{1ec38ad9-1abf-4b80-8628-ac43ccba324b}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testimportmultiple.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{16BFE6F0-22EF-40B5-B831-7E937119EF10}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>_testmultiphase</RootNamespace>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testmultiphase.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{16BFE6F0-22EF-40B5-B831-7E937119EF10}</ProjectGuid>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <RootNamespace>_testmultiphase</RootNamespace>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testmultiphase.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_testmultiphase.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_testmultiphase.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}</ProjectGuid>
- <RootNamespace>_tkinter</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="tcltk.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltkDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(BuildForRelease)' != 'true'">Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_tkinter.c" />
- <ClCompile Include="..\Modules\tkappinit.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="tcl.vcxproj">
- <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
- </ProjectReference>
- <ProjectReference Include="tk.vcxproj">
- <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}</ProjectGuid>\r
+ <RootNamespace>_tkinter</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="tcltk.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(tcltkDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions Condition="'$(BuildForRelease)' != 'true'">Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_tkinter.c" />\r
+ <ClCompile Include="..\Modules\tkappinit.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="tcl.vcxproj">\r
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>\r
+ </ProjectReference>\r
+ <ProjectReference Include="tk.vcxproj">\r
+ <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{b9ce64dd-cb95-472d-bbe8-5583b2cd375b}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_tkinter.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\tkappinit.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{b9ce64dd-cb95-472d-bbe8-5583b2cd375b}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_tkinter.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\tkappinit.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
:Run\r
setlocal\r
set platf=Win32\r
-set vs_platf=x86\r
set conf=Release\r
set target=Build\r
set dir=%~dp0\r
set kill=\r
set do_pgo=\r
set pgo_job=-m test --pgo\r
-set on_64_bit=true\r
-\r
-rem This may not be 100% accurate, but close enough.\r
-if "%ProgramFiles(x86)%"=="" (set on_64_bit=false)\r
\r
:CheckOpts\r
if "%~1"=="-h" goto Usage\r
\r
if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"\r
\r
-if "%platf%"=="x64" (\r
- if "%on_64_bit%"=="true" (\r
- rem This ought to always be correct these days...\r
- set vs_platf=amd64\r
- ) else (\r
- if "%do_pgo%"=="true" (\r
- echo.ERROR: Cannot cross-compile with PGO\r
- echo. 32bit operating system detected, if this is incorrect,\r
- echo. make sure the ProgramFiles(x86^) environment variable is set\r
- exit /b 1\r
- )\r
- set vs_platf=x86_amd64\r
+if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" (\r
+ if "%PROCESSOR_ARCHITEW6432%" NEQ "AMD64" if "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" (\r
+ echo.ERROR: Cannot cross-compile with PGO \r
+ echo. 32bit operating system detected. Ensure your PROCESSOR_ARCHITECTURE\r
+ echo. and PROCESSOR_ARCHITEW6432 environment variables are correct.\r
+ exit /b 1 \r
)\r
)\r
\r
if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty=\r
\r
rem Setup the environment\r
-call "%dir%env.bat" %vs_platf% >nul\r
+call "%dir%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
\r
if "%kill%"=="true" call :Kill\r
\r
goto Build\r
:Kill\r
echo on\r
-msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^\r
+%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^\r
/p:Configuration=%conf% /p:Platform=%platf%^\r
/p:KillPython=true\r
\r
rem Passing %1-9 is not the preferred option, but argument parsing in\r
rem batch is, shall we say, "lackluster"\r
echo on\r
-msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^\r
+%MSBUILD% "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^\r
/p:Configuration=%conf% /p:Platform=%platf%^\r
/p:IncludeExternals=%IncludeExternals%^\r
/p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^\r
\r
:Version\r
rem Display the current build version information\r
-msbuild "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+%MSBUILD% "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9\r
--- /dev/null
+@rem\r
+@rem Searches for MSBuild.exe. This is the only tool we need to initiate\r
+@rem a build, so we no longer search for the full VC toolset.\r
+@rem\r
+@rem This file is supposed to modify the state of the caller (specifically\r
+@rem the MSBUILD variable), so we do not use setlocal or echo, and avoid\r
+@rem changing any other persistent state.\r
+@rem\r
+\r
+@rem No arguments provided means do full search\r
+@if '%1' EQU '' goto :begin_search\r
+\r
+@rem One argument may be the full path. Use a goto so we don't try to\r
+@rem parse the next if statement - incorrect quoting in the multi-arg\r
+@rem case can cause us to break immediately.\r
+@if '%2' EQU '' goto :one_arg\r
+\r
+@rem Entire command line may represent the full path if quoting failed.\r
+@if exist "%*" (set MSBUILD="%*") & (set _Py_MSBuild_Source=environment) & goto :found\r
+@goto :begin_search\r
+\r
+:one_arg\r
+@if exist "%~1" (set MSBUILD="%~1") & (set _Py_MSBuild_Source=environment) & goto :found\r
+\r
+:begin_search\r
+@set MSBUILD=\r
+\r
+@rem If msbuild.exe is on the PATH, assume that the user wants that one.\r
+@where msbuild > "%TEMP%\msbuild.loc" 2> nul && set /P MSBUILD= < "%TEMP%\msbuild.loc" & del "%TEMP%\msbuild.loc"\r
+@if exist "%MSBUILD%" set MSBUILD="%MSBUILD%" & (set _Py_MSBuild_Source=PATH) & goto :found\r
+\r
+@rem VS 2017 sets exactly one install as the "main" install, so we may find MSBuild in there.\r
+@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32 >nul 2>nul\r
+@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32') DO @(\r
+ @if "%%i"=="15.0" @if exist "%%k\MSBuild\15.0\Bin\msbuild.exe" @(set MSBUILD="%%k\MSBuild\15.0\Bin\msbuild.exe")\r
+)\r
+@if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio 2017 registry) & goto :found\r
+\r
+@rem VS 2015 and earlier register MSBuild separately, so we can find it.\r
+@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32 >nul 2>nul\r
+@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32') DO @(\r
+ @if "%%i"=="MSBuildToolsPath" @if exist "%%k\msbuild.exe" @(set MSBUILD="%%k\msbuild.exe")\r
+)\r
+@if exist %MSBUILD% (set _Py_MSBuild_Source=registry) & goto :found\r
+\r
+\r
+@exit /b 1\r
+\r
+:found\r
+@echo Using %MSBUILD% (found in the %_Py_MSBuild_Source%)\r
+@set _Py_MSBuild_Source=\r
--- /dev/null
+#!/usr/bin/env python3
+
+import argparse
+import os
+import pathlib
+import zipfile
+from urllib.request import urlretrieve
+
+
+def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose):
+ repo = f'cpython-{"bin" if binary else "source"}-deps'
+ url = f'https://github.com/{org}/{repo}/archive/{commit_hash}.zip'
+ reporthook = None
+ if verbose:
+ reporthook = print
+ zip_dir.mkdir(parents=True, exist_ok=True)
+ filename, headers = urlretrieve(
+ url,
+ zip_dir / f'{commit_hash}.zip',
+ reporthook=reporthook,
+ )
+ return filename
+
+
+def extract_zip(externals_dir, zip_path):
+ with zipfile.ZipFile(os.fspath(zip_path)) as zf:
+ zf.extractall(os.fspath(externals_dir))
+ return externals_dir / zf.namelist()[0].split('/')[0]
+
+
+def parse_args():
+ p = argparse.ArgumentParser()
+ p.add_argument('-v', '--verbose', action='store_true')
+ p.add_argument('-b', '--binary', action='store_true',
+ help='Is the dependency in the binary repo?')
+ p.add_argument('-O', '--organization',
+ help='Organization owning the deps repos', default='python')
+ p.add_argument('-e', '--externals-dir', type=pathlib.Path,
+ help='Directory in which to store dependencies',
+ default=pathlib.Path(__file__).parent.parent / 'externals')
+ p.add_argument('tag',
+ help='tag of the dependency')
+ return p.parse_args()
+
+
+def main():
+ args = parse_args()
+ zip_path = fetch_zip(
+ args.tag,
+ args.externals_dir / 'zips',
+ org=args.organization,
+ binary=args.binary,
+ verbose=args.verbose,
+ )
+ final_name = args.externals_dir / args.tag
+ extract_zip(args.externals_dir, zip_path).replace(final_name)
+
+
+if __name__ == '__main__':
+ main()
setlocal\r
rem Simple script to fetch source for external libraries\r
\r
-if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"\r
-pushd "%~dp0..\externals"\r
+if "%PCBUILD%"=="" (set PCBUILD=%~dp0)\r
+if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)\r
+if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\nuget.exe)\r
+if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)\r
\r
-if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
+set DO_FETCH=true\r
+set DO_CLEAN=false\r
\r
-rem Optionally clean up first. Be warned that this can be very destructive!\r
-if not "%1"=="" (\r
- for %%c in (-c --clean --clean-only) do (\r
- if "%1"=="%%c" goto clean\r
- )\r
- goto usage\r
-)\r
-goto fetch\r
+:CheckOpts\r
+if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts\r
+if "%~1"=="--no-openssl" (set IncludeSSL=false) & shift & goto CheckOpts\r
+if "%~1"=="--python" (set PYTHON_FOR_BUILD=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts\r
+if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts\r
+if "%~1"=="--clean-only" (set DO_FETCH=false) & goto clean\r
+if "x%~1" NEQ "x" goto usage\r
\r
+if "%DO_CLEAN%"=="false" goto fetch\r
:clean\r
echo.Cleaning up external libraries.\r
-for /D %%d in (\r
- bzip2-*\r
- db-*\r
- nasm-*\r
- openssl-*\r
- tcl-*\r
- tcltk*\r
- tk-*\r
- tix-*\r
- sqlite-*\r
- xz-*\r
- ) do (\r
- echo.Removing %%d\r
- rmdir /s /q %%d\r
-)\r
-if "%1"=="--clean-only" (\r
- goto end\r
+if exist "%EXTERNALS_DIR%" (\r
+ rem Sometimes this fails the first time; try it twice\r
+ rmdir /s /q "%EXTERNALS_DIR%" || rmdir /s /q "%EXTERNALS_DIR%"\r
)\r
\r
+if "%DO_FETCH%"=="false" goto end\r
:fetch\r
-rem Fetch current versions\r
-\r
-svn --version > nul 2>&1\r
-if ERRORLEVEL 9009 (\r
- echo.svn.exe must be on your PATH.\r
- echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the\r
- echo.command line tools option.\r
- popd\r
- exit /b 1\r
+\r
+if "%ORG%"=="" (set ORG=python)\r
+\r
+if "%PYTHON_FOR_BUILD%"=="" (\r
+ echo Checking for installed python...\r
+ py -3.6 -V >nul 2>&1 && (set PYTHON_FOR_BUILD=py -3.6)\r
+)\r
+if "%PYTHON_FOR_BUILD%"=="" (\r
+ if NOT exist "%EXTERNALS_DIR%" mkdir "%EXTERNALS_DIR%"\r
+ if NOT exist "%NUGET%" (\r
+ echo Downloading nuget...\r
+ rem NB: Must use single quotes around NUGET here, NOT double!\r
+ rem Otherwise, a space in the path would break things\r
+ powershell.exe -Command Invoke-WebRequest %NUGET_URL% -OutFile '%NUGET%'\r
+ )\r
+ echo Installing Python via nuget...\r
+ "%NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%EXTERNALS_DIR%"\r
+ rem Quote it here; it's not quoted later because "py -3.6" wouldn't work\r
+ set PYTHON_FOR_BUILD="%EXTERNALS_DIR%\pythonx86\tools\python.exe"\r
)\r
\r
echo.Fetching external libraries...\r
\r
set libraries=\r
set libraries=%libraries% bzip2-1.0.6\r
-if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06\r
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k\r
set libraries=%libraries% sqlite-3.14.2.0\r
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0\r
set libraries=%libraries% xz-5.2.2\r
\r
for %%e in (%libraries%) do (\r
- if exist %%e (\r
+ if exist "%EXTERNALS_DIR%\%%e" (\r
echo.%%e already exists, skipping.\r
) else (\r
echo.Fetching %%e...\r
- svn export %SVNROOT%%%e\r
+ %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -O %ORG% %%e\r
+ )\r
+)\r
+\r
+echo.Fetching external binaries...\r
+\r
+set binaries=\r
+set binaries=%binaries%\r
+if NOT "%IncludeSSL%"=="false" set binaries=%binaries% nasm-2.11.06\r
+\r
+for %%b in (%binaries%) do (\r
+ if exist "%EXTERNALS_DIR%\%%b" (\r
+ echo.%%b already exists, skipping.\r
+ ) else (\r
+ echo.Fetching %%b...\r
+ %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -b -O %ORG% %%b\r
)\r
)\r
\r
+echo Finished.\r
goto end\r
\r
:usage\r
-echo.invalid argument: %1\r
-echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]\r
+echo.Valid options: -c, --clean, --clean-only, --organization, --python,\r
+echo.--no-tkinter, --no-openssl\r
echo.\r
-echo.Pull all sources necessary for compiling optional extension modules\r
-echo.that rely on external libraries. Requires svn.exe to be on your PATH\r
-echo.and pulls sources from %SVNROOT%.\r
+echo.Pull all sources and binaries necessary for compiling optional extension\r
+echo.modules that rely on external libraries.\r
echo.\r
-echo.Use the -c or --clean option to clean up all external library sources\r
-echo.before pulling in the current versions.\r
+echo.The --organization option determines which github organization to download\r
+echo.from, the --python option determines which Python 3.6+ interpreter to use\r
+echo.with PCbuild\get_external.py.\r
+echo.\r
+echo.Use the -c or --clean option to remove the entire externals directory.\r
echo.\r
echo.Use the --clean-only option to do the same cleaning, without pulling in\r
echo.anything new.\r
echo.\r
-echo.Only the first argument is checked, all others are ignored.\r
-echo.\r
-echo.**WARNING**: the cleaning options unconditionally remove any directory\r
-echo.that is a child of\r
-echo. %CD%\r
-echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,\r
-echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential\r
-echo.to be very destructive if you are not aware of what it is doing. Use with\r
-echo.caution!\r
-popd\r
exit /b -1\r
\r
-\r
:end\r
-echo Finished.\r
-popd\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}</ProjectGuid>
- <RootNamespace>libeay</RootNamespace>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- </PropertyGroup>
-
- <Import Project="openssl.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <Target Name="CreateBuildinfH" Inputs="$(MSBuildProjectFullPath)" Outputs="$(IntDir)\buildinf.h" AfterTargets="PrepareForBuild">
- <PropertyGroup>
- <_DATEValue>#define DATE "$([System.DateTime]::Now.ToString(`ddd MMM dd HH':'mm':'ss yyyy`))"</_DATEValue>
- <_CFLAGSValue>#define CFLAGS "cl /MD /Ox -W3 -Gs0 -Gy -nologo @(PreprocessorDefinitions->'-D%(Identity)',' ')"</_CFLAGSValue>
- <_PLATFORMValue Condition="$(Platform)=='Win32'">#define PLATFORM "VC-WIN32"</_PLATFORMValue>
- <_PLATFORMValue Condition="$(Platform)=='x64'">#define PLATFORM "VC-WIN64A"</_PLATFORMValue>
- </PropertyGroup>
- <WriteLinesToFile File="$(IntDir)\buildinf.h"
- Lines="$(_DATEValue);$(_CFLAGSValue);$(_PLATFORMValue)"
- Overwrite="true" />
- <Message Text="Updating buildinf.h:
- $(_DATEValue)
- $(_CFLAGSValue)
- $(_PLATFORMValue)" Importance="normal" />
- </Target>
-
- <Target Name="SuppressOriginalBuildinfH" Condition="Exists('$(opensslDir)crypto\buildinf.h')" BeforeTargets="PrepareForBuild">
- <Move SourceFiles="$(opensslDir)crypto\buildinf.h" DestinationFiles="$(opensslDir)crypto\buildinf.h.orig" />
- </Target>
-
- <ItemGroup>
- <ClCompile Include="$(opensslDir)crypto\cversion.c">
- <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemGroup>
-
- <ItemGroup>
- <!--
- <ClCompile Include="$(opensslDir)apps\errstr.c" />
- <ClCompile Include="$(opensslDir)crypto\aes\aes_cfb.c" />
- <ClCompile Include="$(opensslDir)crypto\aes\aes_ctr.c" />
- <ClCompile Include="$(opensslDir)crypto\aes\aes_ecb.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\aes\aes_ige.c" />
- <ClCompile Include="$(opensslDir)crypto\aes\aes_misc.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\aes\aes_ofb.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\aes\aes_wrap.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_bitstr.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_bool.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_bytes.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_d2i_fp.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_digest.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_dup.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_enum.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_gentm.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_i2d_fp.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_int.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_mbstr.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_object.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_octet.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_print.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_set.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_strex.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_strnid.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_time.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_type.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_utctm.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_utf8.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\a_verify.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\ameth_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn_mime.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn_moid.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn_pack.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn1_err.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn1_gen.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn1_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\asn1_par.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\bio_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\bio_ndef.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pr.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pu.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\asn1\evp_asn1.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\asn1\f_enum.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\asn1\f_int.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\f_string.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pr.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pu.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\asn1\n_pkey.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\nsseq.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbe.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbev2.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\p8_pkey.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\asn1\t_bitst.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\t_crl.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\asn1\t_pkey.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\asn1\t_req.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\t_spki.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\asn1\t_x509.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\t_x509a.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_dec.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_fre.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_new.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_prn.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_typ.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\tasn_utl.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_algor.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_attrib.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_bignum.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_crl.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_exten.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_info.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_long.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_name.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_nx509.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_pkey.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_pubkey.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_req.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_sig.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_spki.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_val.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_x509.c" />
- <ClCompile Include="$(opensslDir)crypto\asn1\x_x509a.c" />
- <ClCompile Include="$(opensslDir)crypto\bf\bf_cfb64.c" />
- <ClCompile Include="$(opensslDir)crypto\bf\bf_ecb.c" />
- <ClCompile Include="$(opensslDir)crypto\bf\bf_ofb64.c" />
- <ClCompile Include="$(opensslDir)crypto\bf\bf_skey.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\b_dump.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\b_print.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\b_sock.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bf_buff.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bio\bf_nbio.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bf_null.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bio_cb.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bio\bio_err.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bio_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bio\bss_acpt.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bss_bio.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bio\bss_conn.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bio\bss_dgram.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bss_fd.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bio\bss_file.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bio\bss_log.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bio\bss_mem.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bss_null.c" />
- <ClCompile Include="$(opensslDir)crypto\bio\bss_sock.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_add.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_blind.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bn\bn_const.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bn\bn_ctx.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bn\bn_depr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bn\bn_div.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_err.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_exp.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_exp2.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_gcd.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_gf2m.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_kron.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_mod.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_mont.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bn\bn_mpi.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\bn\bn_mul.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_nist.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_prime.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_print.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_rand.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_recp.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_shift.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_sqr.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_sqrt.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_word.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\bn\bn_x931p.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\buffer\buf_err.c" />
- <ClCompile Include="$(opensslDir)crypto\buffer\buf_str.c" />
- <ClCompile Include="$(opensslDir)crypto\buffer\buffer.c" />
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_cfb.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ctr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ecb.c" />
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ofb.c" />
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_utl.c" />
- <ClCompile Include="$(opensslDir)crypto\cast\c_cfb64.c" />
- <ClCompile Include="$(opensslDir)crypto\cast\c_ecb.c" />
- <ClCompile Include="$(opensslDir)crypto\cast\c_ofb64.c" />
- <ClCompile Include="$(opensslDir)crypto\cast\c_skey.c" />
- <ClCompile Include="$(opensslDir)crypto\cmac\cm_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\cmac\cm_pmeth.c" />
- <ClCompile Include="$(opensslDir)crypto\cmac\cmac.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_att.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\cms\cms_cd.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\cms\cms_dd.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_env.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_err.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\cms\cms_ess.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\cms\cms_io.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_kari.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_pwri.c" />
- <ClCompile Include="$(opensslDir)crypto\cms\cms_sd.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\cms\cms_smime.c" />
- <ClCompile Include="$(opensslDir)crypto\comp\c_rle.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\comp\c_zlib.c" />
- <ClCompile Include="$(opensslDir)crypto\comp\comp_err.c" />
- <ClCompile Include="$(opensslDir)crypto\comp\comp_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_api.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_def.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_err.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_mall.c" />
- <ClCompile Include="$(opensslDir)crypto\conf\conf_mod.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\conf\conf_sap.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\cpt_err.c" />
- <ClCompile Include="$(opensslDir)crypto\cryptlib.c" />
- <ClCompile Include="$(opensslDir)crypto\des\cbc_cksm.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\des\cbc_enc.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\des\cfb_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\cfb64ede.c" />
- <ClCompile Include="$(opensslDir)crypto\des\cfb64enc.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\des\des_old.c" />
- <ClCompile Include="$(opensslDir)crypto\des\des_old2.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\des\ecb_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\ecb3_enc.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\des\ede_cbcm_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\enc_read.c" />
- <ClCompile Include="$(opensslDir)crypto\des\enc_writ.c" />
- <ClCompile Include="$(opensslDir)crypto\des\fcrypt.c" />
- <ClCompile Include="$(opensslDir)crypto\des\ofb_enc.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\des\ofb64ede.c" />
- <ClCompile Include="$(opensslDir)crypto\des\ofb64enc.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\des\pcbc_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\qud_cksm.c" />
- <ClCompile Include="$(opensslDir)crypto\des\rand_key.c" />
- <ClCompile Include="$(opensslDir)crypto\des\read2pwd.c" />
- <ClCompile Include="$(opensslDir)crypto\des\rpc_enc.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\des\set_key.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\des\str2key.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\des\xcbc_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_check.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dh\dh_depr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dh\dh_err.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_gen.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_kdf.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_key.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\dh\dh_pmeth.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dh\dh_prn.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dh\dh_rfc5114.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_asn1.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_depr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_err.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_gen.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_key.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ossl.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_pmeth.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_prn.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\dsa\dsa_vrf.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dso\dso_beos.c" />
- <ClCompile Include="$(opensslDir)crypto\dso\dso_dl.c" />
- <ClCompile Include="$(opensslDir)crypto\dso\dso_dlfcn.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dso\dso_err.c" />
- <ClCompile Include="$(opensslDir)crypto\dso\dso_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dso\dso_null.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dso\dso_openssl.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\dso\dso_vms.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\dso\dso_win32.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ebcdic.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ec\ec_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_asn1.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ec\ec_check.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ec\ec_curve.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_cvt.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_err.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_key.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_mult.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_oct.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_pmeth.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec_print.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec2_mult.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec2_oct.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ec2_smpl.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\eck_prn.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_mont.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_nist.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp224.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp256.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp521.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistputil.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_oct.c" />
- <ClCompile Include="$(opensslDir)crypto\ec\ecp_smpl.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdh\ech_err.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdh\ech_kdf.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdh\ech_key.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdh\ech_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdh\ech_ossl.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_err.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_ossl.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_vrf.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_all.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_cnf.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\engine\eng_cryptodev.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\engine\eng_ctrl.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_dyn.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_err.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_fat.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_init.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_list.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\engine\eng_openssl.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\engine\eng_pkey.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\engine\eng_rdrand.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\eng_rsax.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\engine\eng_table.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_asnmth.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_cipher.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_dh.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_digest.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_dsa.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdh.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdsa.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_pkmeth.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_rand.c" />
- <ClCompile Include="$(opensslDir)crypto\engine\tb_rsa.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\engine\tb_store.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\err\err.c" />
- <ClCompile Include="$(opensslDir)crypto\err\err_all.c" />
- <ClCompile Include="$(opensslDir)crypto\err\err_prn.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\bio_b64.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\bio_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\bio_md.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\bio_ok.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\c_all.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\c_allc.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\c_alld.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\digest.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_aes.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha1.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha256.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_bf.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_camellia.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_cast.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_des.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_des3.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\e_idea.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\e_null.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\e_old.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\e_rc2.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_rc4.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_rc4_hmac_md5.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\e_rc5.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\e_seed.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\e_xcbc_d.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\encode.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\evp_acnf.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\evp_cnf.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\evp_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\evp_err.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\evp_fips.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\evp_key.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\evp_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\evp_pbe.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\evp_pkey.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_dss.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_dss1.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_ecdsa.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_md4.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_md5.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\m_null.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\m_ripemd.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_sha.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_sha1.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_sigver.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\m_wp.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\names.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\p_dec.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\p_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\evp\p_open.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\p_seal.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\evp\p_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\p_verify.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt2.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\pmeth_fn.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\pmeth_gn.c" />
- <ClCompile Include="$(opensslDir)crypto\evp\pmeth_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ex_data.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\fips_ers.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\hmac\hm_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\hmac\hm_pmeth.c" />
- <ClCompile Include="$(opensslDir)crypto\hmac\hmac.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\krb5\krb5_asn.c" />
- <ClCompile Include="$(opensslDir)crypto\lhash\lh_stats.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\lhash\lhash.c" />
- <ClCompile Include="$(opensslDir)crypto\md4\md4_dgst.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\md4\md4_one.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\md5\md5_dgst.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\md5\md5_one.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\mem.c" />
- <ClCompile Include="$(opensslDir)crypto\mem_dbg.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\cbc128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\ccm128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\cfb128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\ctr128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\cts128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\gcm128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\ofb128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\wrap128.c" />
- <ClCompile Include="$(opensslDir)crypto\modes\xts128.c" />
- <ClCompile Include="$(opensslDir)crypto\o_dir.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\o_fips.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\o_init.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\o_str.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\o_time.c" />
- <ClCompile Include="$(opensslDir)crypto\objects\o_names.c" />
- <ClCompile Include="$(opensslDir)crypto\objects\obj_dat.c" />
- <ClCompile Include="$(opensslDir)crypto\objects\obj_err.c" />
- <ClCompile Include="$(opensslDir)crypto\objects\obj_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\objects\obj_xref.c" />
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_asn.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_cl.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_err.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ext.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ht.c" />
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_prn.c" />
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_srv.c" />
- <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_vfy.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pem\pem_all.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_err.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_info.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_oth.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_pk8.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_pkey.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pem\pem_seal.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_sign.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pem\pem_x509.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pem_xaux.c" />
- <ClCompile Include="$(opensslDir)crypto\pem\pvkfmt.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_add.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_asn.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_attr.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crpt.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crt.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_decr.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_init.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_key.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_kiss.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_mutl.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_npas.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8d.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8e.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_utl.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs12\pk12err.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pkcs7\bio_pk7.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_attr.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_doit.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_mime.c" />
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_smime.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\pkcs7\pkcs7err.c" />
- <ClCompile Include="$(opensslDir)crypto\pqueue\pqueue.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\md_rand.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\rand_egd.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\rand_err.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\rand_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rand\rand_nw.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\rand_os2.c" />
- <ClCompile Include="$(opensslDir)crypto\rand\rand_unix.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rand\rand_win.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rand\randfile.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rc2\rc2_cbc.c" />
- <ClCompile Include="$(opensslDir)crypto\rc2\rc2_ecb.c" />
- <ClCompile Include="$(opensslDir)crypto\rc2\rc2_skey.c" />
- <ClCompile Include="$(opensslDir)crypto\rc2\rc2cfb64.c" />
- <ClCompile Include="$(opensslDir)crypto\rc2\rc2ofb64.c" />
- <ClCompile Include="$(opensslDir)crypto\rc4\rc4_utl.c" />
- <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_dgst.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_one.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ameth.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_asn1.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_chk.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_crpt.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_depr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_eay.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_err.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_gen.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_none.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_null.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_oaep.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pk1.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pmeth.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_prn.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pss.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_saos.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ssl.c" />
- <ClCompile Include="$(opensslDir)crypto\rsa\rsa_x931.c" />
- <ClCompile Include="$(opensslDir)crypto\seed\seed.c" />
- <ClCompile Include="$(opensslDir)crypto\seed\seed_cbc.c" />
- <ClCompile Include="$(opensslDir)crypto\seed\seed_cfb.c" />
- <ClCompile Include="$(opensslDir)crypto\seed\seed_ecb.c" />
- <ClCompile Include="$(opensslDir)crypto\seed\seed_ofb.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha_dgst.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha_one.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha1_one.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha1dgst.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha256.c" />
- <ClCompile Include="$(opensslDir)crypto\sha\sha512.c" />
- <ClCompile Include="$(opensslDir)crypto\srp\srp_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\srp\srp_vfy.c" />
- <ClCompile Include="$(opensslDir)crypto\stack\stack.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ts\ts_asn1.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_conf.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ts\ts_err.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ts\ts_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_req_print.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_req_utils.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_print.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_sign.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_utils.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_verify.c" />
- <ClCompile Include="$(opensslDir)crypto\ts\ts_verify_ctx.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\txt_db\txt_db.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\ui\ui_compat.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\ui\ui_err.c" />
- <ClCompile Include="$(opensslDir)crypto\ui\ui_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\ui\ui_openssl.c" />
- <ClCompile Include="$(opensslDir)crypto\ui\ui_util.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\uid.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_dgst.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\by_dir.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\by_file.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x_all.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_att.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_cmp.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_d2.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_def.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_err.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_ext.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_lu.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_obj.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\x509\x509_r2x.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\x509\x509_req.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\x509\x509_set.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\x509\x509_trs.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_txt.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_v3.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_vfy.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509_vpm.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509cset.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509name.c" />
- <ClCompile Include="$(opensslDir)crypto\x509\x509rset.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\x509\x509spki.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\x509\x509type.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_cache.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_data.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_map.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_node.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_tree.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_addr.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akey.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akeya.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_alt.c" />
- <!--
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_asid.c" />
- -->
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bcons.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bitst.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_conf.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_cpols.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_crld.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_enum.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_extku.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_genn.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ia5.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_info.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_int.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_lib.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ncons.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ocsp.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pci.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcia.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcons.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pku.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pmaps.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_prn.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_purp.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_scts.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_skey.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_sxnet.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3_utl.c" />
- <ClCompile Include="$(opensslDir)crypto\x509v3\v3err.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\e_gost_err.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_ameth.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_asn1.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_crypt.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_ctl.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_eng.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_keywrap.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_md.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_params.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_pmeth.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost_sign.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost2001.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost2001_keyx.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost89.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gost94_keyx.c" />
- <ClCompile Include="$(opensslDir)engines\ccgost\gosthash.c" />
- <ClCompile Include="$(opensslDir)engines\e_4758cca.c" />
- <ClCompile Include="$(opensslDir)engines\e_aep.c" />
- <ClCompile Include="$(opensslDir)engines\e_atalla.c" />
- <ClCompile Include="$(opensslDir)engines\e_capi.c" />
- <ClCompile Include="$(opensslDir)engines\e_chil.c" />
- <ClCompile Include="$(opensslDir)engines\e_cswift.c" />
- <ClCompile Include="$(opensslDir)engines\e_gmp.c" />
- <ClCompile Include="$(opensslDir)engines\e_nuron.c" />
- <ClCompile Include="$(opensslDir)engines\e_padlock.c" />
- <ClCompile Include="$(opensslDir)engines\e_sureware.c" />
- <ClCompile Include="$(opensslDir)engines\e_ubsec.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_ext.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
- </ItemGroup>
- <ItemGroup Condition="$(Platform) == 'Win32'">
- <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_block.c" />
- </ItemGroup>
- <ItemGroup Condition="$(Platform) == 'x64'">
- <ClCompile Include="$(opensslDir)crypto\bf\bf_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\bn\bn_asm.c" />
- <ClCompile Include="$(opensslDir)crypto\camellia\cmll_misc.c" />
- <ClCompile Include="$(opensslDir)crypto\cast\c_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\des_enc.c" />
- <ClCompile Include="$(opensslDir)crypto\des\fcrypt_b.c" />
- </ItemGroup>
-
- <ItemGroup Condition="$(Platform) == 'Win32'">
- <NasmCompile Include="$(opensslDir)tmp32\aes-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\aesni-x86.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\bf-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\bn-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\cast-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\cmll-x86.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\co-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\crypt586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\des-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\ghash-x86.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\md5-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\rc4-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\rmd-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\sha1-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\sha256-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\sha512-586.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\vpaes-x86.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\wp-mmx.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\x86cpuid.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\x86-gf2m.asm" />
- <NasmCompile Include="$(opensslDir)tmp32\x86-mont.asm" />
- </ItemGroup>
- <ItemGroup Condition="$(Platform) == 'x64'">
- <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aesni-gcm-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aesni-mb-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aesni-sha256-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aesni-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\aes-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\bsaes-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\cmll-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\ghash-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\md5-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\rc4-md5-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\rc4-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\sha1-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\sha1-mb-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\sha256-mb-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\sha256-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\sha512-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\vpaes-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\wp-x86_64.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\x86_64cpuid.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\x86_64-gf2m.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont.asm" />
- <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont5.asm" />
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <Target Name="Clean" />
- <Target Name="CleanAll">
- <Delete Files="$(TargetPath)" />
- <RemoveDir Directories="$(IntDir)" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}</ProjectGuid>\r
+ <RootNamespace>libeay</RootNamespace>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>StaticLibrary</ConfigurationType>\r
+ </PropertyGroup>\r
+ \r
+ <Import Project="openssl.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+\r
+ <Target Name="CreateBuildinfH" Inputs="$(MSBuildProjectFullPath)" Outputs="$(IntDir)\buildinf.h" AfterTargets="PrepareForBuild">\r
+ <PropertyGroup>\r
+ <_DATEValue>#define DATE "$([System.DateTime]::Now.ToString(`ddd MMM dd HH':'mm':'ss yyyy`))"</_DATEValue>\r
+ <_CFLAGSValue>#define CFLAGS "cl /MD /Ox -W3 -Gs0 -Gy -nologo @(PreprocessorDefinitions->'-D%(Identity)',' ')"</_CFLAGSValue>\r
+ <_PLATFORMValue Condition="$(Platform)=='Win32'">#define PLATFORM "VC-WIN32"</_PLATFORMValue>\r
+ <_PLATFORMValue Condition="$(Platform)=='x64'">#define PLATFORM "VC-WIN64A"</_PLATFORMValue>\r
+ </PropertyGroup>\r
+ <WriteLinesToFile File="$(IntDir)\buildinf.h"\r
+ Lines="$(_DATEValue);$(_CFLAGSValue);$(_PLATFORMValue)"\r
+ Overwrite="true" />\r
+ <Message Text="Updating buildinf.h:\r
+ $(_DATEValue)\r
+ $(_CFLAGSValue)\r
+ $(_PLATFORMValue)" Importance="normal" />\r
+ </Target>\r
+\r
+ <Target Name="SuppressOriginalBuildinfH" Condition="Exists('$(opensslDir)crypto\buildinf.h')" BeforeTargets="PrepareForBuild">\r
+ <Move SourceFiles="$(opensslDir)crypto\buildinf.h" DestinationFiles="$(opensslDir)crypto\buildinf.h.orig" />\r
+ </Target>\r
+\r
+ <ItemGroup>\r
+ <ClCompile Include="$(opensslDir)crypto\cversion.c">\r
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ \r
+ <ItemGroup>\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)apps\errstr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_cfb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ctr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ecb.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ige.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_misc.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ofb.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_wrap.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bitstr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bool.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bytes.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_d2i_fp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_digest.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_dup.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_enum.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_gentm.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_i2d_fp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_int.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_mbstr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_object.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_octet.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_set.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_strex.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_strnid.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_time.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_type.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_utctm.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_utf8.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_verify.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\ameth_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_mime.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_moid.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_pack.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_gen.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_par.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\bio_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\bio_ndef.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pr.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pu.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\evp_asn1.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_enum.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_int.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_string.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pr.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pu.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\n_pkey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\nsseq.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbe.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbev2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\p8_pkey.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_bitst.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_crl.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_pkey.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_req.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_spki.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_x509.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_x509a.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_dec.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_fre.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_new.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_prn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_typ.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_utl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_algor.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_attrib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_bignum.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_crl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_exten.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_info.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_long.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_name.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_nx509.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_pkey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_pubkey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_req.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_sig.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_spki.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_val.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_x509.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_x509a.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_cfb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_ecb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_ofb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_skey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\b_dump.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\b_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\b_sock.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_buff.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_nbio.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_null.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_cb.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_acpt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_bio.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_conn.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_dgram.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_fd.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_file.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_log.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_mem.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_null.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_sock.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_add.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_blind.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_const.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_ctx.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_depr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_div.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_exp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_exp2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_gcd.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_gf2m.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_kron.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mod.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mont.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mpi.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mul.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_nist.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_prime.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_rand.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_recp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_shift.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_sqr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_sqrt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_word.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_x931p.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\buffer\buf_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\buffer\buf_str.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\buffer\buffer.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_cfb.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ctr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ecb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ofb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_utl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cast\c_cfb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cast\c_ecb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cast\c_ofb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cast\c_skey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cmac\cm_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cmac\cm_pmeth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cmac\cmac.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_att.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_cd.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_dd.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_env.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_err.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_ess.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_io.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_kari.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_pwri.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_sd.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_smime.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\comp\c_rle.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\comp\c_zlib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\comp\comp_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\comp\comp_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_api.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_def.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_mall.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_mod.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_sap.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\cpt_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cryptlib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\cbc_cksm.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\des\cbc_enc.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\des\cfb_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\cfb64ede.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\cfb64enc.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\des\des_old.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\des_old2.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\des\ecb_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\ecb3_enc.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\des\ede_cbcm_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\enc_read.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\enc_writ.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\fcrypt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\ofb_enc.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\des\ofb64ede.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\ofb64enc.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\des\pcbc_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\qud_cksm.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\rand_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\read2pwd.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\rpc_enc.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\des\set_key.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\des\str2key.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\des\xcbc_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_check.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_depr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_gen.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_kdf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_pmeth.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_prn.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_rfc5114.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_asn1.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_depr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_gen.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ossl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_pmeth.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_prn.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_vrf.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_beos.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_dl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_dlfcn.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_null.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_openssl.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_vms.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_win32.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ebcdic.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_asn1.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_check.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_curve.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_cvt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_mult.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_oct.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_pmeth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_mult.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_oct.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_smpl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\eck_prn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_mont.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nist.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp224.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp256.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp521.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistputil.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_oct.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_smpl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_kdf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_ossl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_ossl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_vrf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_all.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_cnf.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_cryptodev.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_ctrl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_dyn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_fat.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_init.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_list.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_openssl.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_pkey.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_rdrand.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_rsax.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_table.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_asnmth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_cipher.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_dh.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_digest.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_dsa.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdh.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdsa.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_pkmeth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_rand.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_rsa.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_store.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\err\err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\err\err_all.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\err\err_prn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_b64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_md.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_ok.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\c_all.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\c_allc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\c_alld.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\digest.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha256.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_bf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_camellia.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_cast.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_des.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_des3.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_idea.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_null.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_old.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc4.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc4_hmac_md5.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc5.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_seed.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\e_xcbc_d.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\encode.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_acnf.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_cnf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_err.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_fips.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_pbe.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_pkey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_dss.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_dss1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_ecdsa.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_md4.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_md5.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_null.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_ripemd.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sha.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sha1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sigver.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\m_wp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\names.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_dec.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_open.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_seal.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p_verify.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_fn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_gn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ex_data.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\fips_ers.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\hmac\hm_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\hmac\hm_pmeth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\hmac\hmac.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\krb5\krb5_asn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\lhash\lh_stats.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\lhash\lhash.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\md4\md4_dgst.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\md4\md4_one.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\md5\md5_dgst.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\md5\md5_one.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\mem.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\mem_dbg.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\cbc128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\ccm128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\cfb128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\ctr128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\cts128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\gcm128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\ofb128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\wrap128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\modes\xts128.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\o_dir.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\o_fips.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\o_init.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\o_str.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\o_time.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\objects\o_names.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_dat.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_xref.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_asn.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_cl.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_err.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ext.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ht.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_prn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_srv.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_vfy.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_all.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_info.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_oth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_pk8.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_pkey.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_seal.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_sign.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_x509.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_xaux.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pem\pvkfmt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_add.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_asn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_attr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crpt.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crt.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_decr.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_init.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_key.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_kiss.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_mutl.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_npas.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8d.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8e.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_utl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\pk12err.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\bio_pk7.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_attr.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_doit.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_mime.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_smime.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pkcs7err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\pqueue\pqueue.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\md_rand.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_egd.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_nw.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_os2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_unix.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_win.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rand\randfile.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_cbc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_ecb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_skey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2cfb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2ofb64.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rc4\rc4_utl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_dgst.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_one.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_asn1.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_chk.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_crpt.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_depr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_eay.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_gen.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_none.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_null.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_oaep.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pk1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pmeth.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_prn.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pss.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_saos.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ssl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_x931.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\seed\seed.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_cbc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_cfb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_ecb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_ofb.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha_dgst.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha_one.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha1_one.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha1dgst.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha256.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\sha\sha512.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\srp\srp_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\srp\srp_vfy.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\stack\stack.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_conf.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_err.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_req_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_req_utils.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_print.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_sign.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_utils.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_verify.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_verify_ctx.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\txt_db\txt_db.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_compat.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_openssl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_util.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\uid.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_dgst.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\by_dir.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\by_file.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x_all.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_att.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_cmp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_d2.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_def.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_err.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_ext.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_lu.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_obj.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_r2x.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_req.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_set.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_trs.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_txt.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_v3.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_vfy.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_vpm.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509cset.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509name.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509rset.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509spki.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\x509\x509type.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_cache.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_data.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_map.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_node.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_tree.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_addr.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akeya.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_alt.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_asid.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bcons.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bitst.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_conf.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_cpols.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_crld.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_enum.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_extku.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_genn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ia5.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_info.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_int.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_lib.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ncons.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ocsp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pci.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcia.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcons.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pku.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pmaps.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_prn.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_purp.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_scts.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_skey.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_sxnet.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_utl.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3err.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\e_gost_err.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_ameth.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_crypt.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_ctl.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_eng.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_keywrap.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_md.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_params.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_pmeth.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_sign.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost2001.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost2001_keyx.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost89.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost94_keyx.c" />\r
+ <ClCompile Include="$(opensslDir)engines\ccgost\gosthash.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_4758cca.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_aep.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_atalla.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_capi.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_chil.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_cswift.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_gmp.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_nuron.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_padlock.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_sureware.c" />\r
+ <ClCompile Include="$(opensslDir)engines\e_ubsec.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_ext.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />\r
+ </ItemGroup>\r
+ <ItemGroup Condition="$(Platform) == 'Win32'">\r
+ <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_block.c" />\r
+ </ItemGroup>\r
+ <ItemGroup Condition="$(Platform) == 'x64'">\r
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_asm.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_misc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\cast\c_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\des_enc.c" />\r
+ <ClCompile Include="$(opensslDir)crypto\des\fcrypt_b.c" />\r
+ </ItemGroup>\r
+ \r
+ <ItemGroup Condition="$(Platform) == 'Win32'">\r
+ <NasmCompile Include="$(opensslDir)tmp32\aes-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\aesni-x86.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\bf-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\bn-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\cast-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\cmll-x86.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\co-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\crypt586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\des-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\ghash-x86.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\md5-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\rc4-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\rmd-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\sha1-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\sha256-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\sha512-586.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\vpaes-x86.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\wp-mmx.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\x86cpuid.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\x86-gf2m.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp32\x86-mont.asm" />\r
+ </ItemGroup>\r
+ <ItemGroup Condition="$(Platform) == 'x64'">\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-gcm-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-mb-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha256-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\aes-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\bsaes-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\cmll-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\ghash-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\md5-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\rc4-md5-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\rc4-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\sha1-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\sha1-mb-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\sha256-mb-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\sha256-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\sha512-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\vpaes-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\wp-x86_64.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64cpuid.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-gf2m.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont.asm" />\r
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont5.asm" />\r
+ </ItemGroup>\r
+\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <Target Name="Clean" />\r
+ <Target Name="CleanAll">\r
+ <Delete Files="$(TargetPath)" />\r
+ <RemoveDir Directories="$(IntDir)" />\r
+ </Target>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{12728250-16EC-4DC6-94D7-E21DD88947F8}</ProjectGuid>
- <RootNamespace>liblzma</RootNamespace>
- <SupportPGO>true</SupportPGO>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(lzmaDir)windows;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="$(lzmaDir)src\common\tuklib_cpucores.c" />
- <ClCompile Include="$(lzmaDir)src\common\tuklib_physmem.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\check.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\crc32_fast.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\crc32_table.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\crc64_fast.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\crc64_table.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\check\sha256.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\alone_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\alone_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\auto_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_buffer_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_buffer_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_header_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_header_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\block_util.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\common.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_buffer_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_decoder_memusage.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_encoder_memusage.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_preset.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_buffer_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_buffer_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_common.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_flags_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_flags_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\hardware_cputhreads.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\hardware_physmem.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\index.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\index_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\index_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\index_hash.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\outqueue.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_buffer_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_buffer_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_encoder_mt.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_common.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_size.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_common.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\fastpos_table.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma2_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma2_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_presets.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_encoder_mf.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\rangecoder\price_table.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\arm.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\armthumb.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\ia64.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\powerpc.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_coder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_decoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_encoder.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\sparc.c" />
- <ClCompile Include="$(lzmaDir)src\liblzma\simple\x86.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(lzmaDir)src\common\mythread.h" />
- <ClInclude Include="$(lzmaDir)src\common\sysdefs.h" />
- <ClInclude Include="$(lzmaDir)src\common\tuklib_common.h" />
- <ClInclude Include="$(lzmaDir)src\common\tuklib_config.h" />
- <ClInclude Include="$(lzmaDir)src\common\tuklib_cpucores.h" />
- <ClInclude Include="$(lzmaDir)src\common\tuklib_integer.h" />
- <ClInclude Include="$(lzmaDir)src\common\tuklib_physmem.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\base.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\bcj.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\block.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\check.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\container.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\delta.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\filter.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\hardware.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\index.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\index_hash.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\lzma12.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\stream_flags.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\version.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\vli.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\check.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\crc32_table_be.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\crc32_table_le.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\crc64_table_be.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\crc64_table_le.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\check\crc_macros.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\alone_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\block_buffer_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\block_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\block_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\easy_preset.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\index.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\index_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\memcmplen.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\outqueue.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\stream_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\common\stream_flags_common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_private.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\fastpos.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma2_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma2_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_private.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder_hash.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder_hash_table.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\price.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_common.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_coder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_decoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_encoder.h" />
- <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_private.h" />
- <ClInclude Include="$(lzmaDir)windows\config.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{12728250-16EC-4DC6-94D7-E21DD88947F8}</ProjectGuid>\r
+ <RootNamespace>liblzma</RootNamespace>\r
+ <SupportPGO>true</SupportPGO>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>StaticLibrary</ConfigurationType>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(lzmaDir)windows;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="$(lzmaDir)src\common\tuklib_cpucores.c" />\r
+ <ClCompile Include="$(lzmaDir)src\common\tuklib_physmem.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\check.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\crc32_fast.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\crc32_table.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\crc64_fast.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\crc64_table.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\check\sha256.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\alone_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\alone_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\auto_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_buffer_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_buffer_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_header_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_header_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\block_util.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\common.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_buffer_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_decoder_memusage.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_encoder_memusage.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\easy_preset.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_buffer_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_buffer_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_common.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_flags_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\filter_flags_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\hardware_cputhreads.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\hardware_physmem.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\index.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\index_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\index_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\index_hash.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\outqueue.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_buffer_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_buffer_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_encoder_mt.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_common.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\stream_flags_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\common\vli_size.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_common.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\delta\delta_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\fastpos_table.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma2_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma2_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_optimum_fast.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_optimum_normal.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_presets.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\lz\lz_encoder_mf.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\rangecoder\price_table.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\arm.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\armthumb.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\ia64.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\powerpc.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_coder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_decoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\simple_encoder.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\sparc.c" />\r
+ <ClCompile Include="$(lzmaDir)src\liblzma\simple\x86.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="$(lzmaDir)src\common\mythread.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\sysdefs.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\tuklib_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\tuklib_config.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\tuklib_cpucores.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\tuklib_integer.h" />\r
+ <ClInclude Include="$(lzmaDir)src\common\tuklib_physmem.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\base.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\bcj.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\block.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\check.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\container.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\delta.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\filter.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\hardware.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\index.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\index_hash.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\lzma12.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\stream_flags.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\version.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\api\lzma\vli.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\check.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\crc32_table_be.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\crc32_table_le.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\crc64_table_be.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\crc64_table_le.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\check\crc_macros.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\alone_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\block_buffer_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\block_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\block_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\easy_preset.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\filter_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\index.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\index_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\memcmplen.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\outqueue.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\stream_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\common\stream_flags_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\delta\delta_private.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\fastpos.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma2_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma2_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lzma\lzma_encoder_private.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder_hash.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\lz\lz_encoder_hash_table.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\price.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_common.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\rangecoder\range_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_coder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_decoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_encoder.h" />\r
+ <ClInclude Include="$(lzmaDir)src\liblzma\simple\simple_private.h" />\r
+ <ClInclude Include="$(lzmaDir)windows\config.h" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(opensslDir)tmp\</Py_IntDir>
- </PropertyGroup>
-
- <Import Project="pyproject.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- </PropertyGroup>
-
- <ItemGroup>
- <PreprocessorDefinitions Include="DSO_WIN32" />
- <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
- <PreprocessorDefinitions Include="L_ENDIAN" />
- <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
- <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
- <PreprocessorDefinitions Include="OPENSSL_THREADS" />
- <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
- <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
- <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
- <PreprocessorDefinitions Include="SHA1_ASM" />
- <PreprocessorDefinitions Include="SHA256_ASM" />
- <PreprocessorDefinitions Include="SHA512_ASM" />
- <PreprocessorDefinitions Include="MD5_ASM" />
- <PreprocessorDefinitions Include="AES_ASM" />
- <PreprocessorDefinitions Include="VPAES_ASM" />
- <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
- <PreprocessorDefinitions Include="GHASH_ASM" />
- <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
- <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
- <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
- <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
- <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
- <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
- <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
- <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
- <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
- </ItemGroup>
- <ItemGroup Condition="'$(Platform)'=='Win32'">
- <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
- <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
- <PreprocessorDefinitions Include="RMD160_ASM" />
- </ItemGroup>
-
- <PropertyGroup>
- <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
- </PropertyGroup>
-
- <ItemDefinitionGroup>
- <ClCompile>
- <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
- <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
- <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
-
- <Target Name="FindNasm">
- <PropertyGroup>
- <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
- <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
- </PropertyGroup>
- </Target>
-
- <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
- <Exec Command='setlocal
-set PATH=$(nasmDir);%PATH%
-$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
- <ItemGroup>
- <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
- <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
- </ItemGroup>
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(opensslDir)tmp\</Py_IntDir>\r
+ </PropertyGroup>\r
+ \r
+ <Import Project="pyproject.props" />\r
+\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>StaticLibrary</ConfigurationType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <PreprocessorDefinitions Include="DSO_WIN32" />\r
+ <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />\r
+ <PreprocessorDefinitions Include="L_ENDIAN" />\r
+ <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />\r
+ <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />\r
+ <PreprocessorDefinitions Include="OPENSSL_THREADS" />\r
+ <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->\r
+ <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />\r
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />\r
+ <PreprocessorDefinitions Include="SHA1_ASM" />\r
+ <PreprocessorDefinitions Include="SHA256_ASM" />\r
+ <PreprocessorDefinitions Include="SHA512_ASM" />\r
+ <PreprocessorDefinitions Include="MD5_ASM" />\r
+ <PreprocessorDefinitions Include="AES_ASM" />\r
+ <PreprocessorDefinitions Include="VPAES_ASM" />\r
+ <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />\r
+ <PreprocessorDefinitions Include="GHASH_ASM" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />\r
+ <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />\r
+ </ItemGroup>\r
+ <ItemGroup Condition="'$(Platform)'=='Win32'">\r
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />\r
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />\r
+ <PreprocessorDefinitions Include="RMD160_ASM" />\r
+ </ItemGroup>\r
+ \r
+ <PropertyGroup>\r
+ <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>\r
+ </PropertyGroup>\r
+ \r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->\r
+ <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>\r
+ <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ </ItemDefinitionGroup>\r
+ \r
+ <Target Name="FindNasm">\r
+ <PropertyGroup>\r
+ <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>\r
+ <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>\r
+ </PropertyGroup>\r
+ </Target>\r
+\r
+ <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">\r
+ <Exec Command='setlocal\r
+set PATH=$(nasmDir);%PATH%\r
+$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />\r
+ <ItemGroup>\r
+ <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />\r
+ <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />\r
+ </ItemGroup>\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="Globals">
- <ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>
- <Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
- <IncludeExtensions Condition="'$(IncludeExtensions)' == ''">true</IncludeExtensions>
- <IncludeExternals Condition="'$(IncludeExternals)' == ''">true</IncludeExternals>
- <IncludeTests Condition="'$(IncludeTest)' == ''">true</IncludeTests>
- <IncludeSSL Condition="'$(IncludeSSL)' == ''">true</IncludeSSL>
- <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter>
- </PropertyGroup>
-
- <ItemDefinitionGroup>
- <Projects>
- <Platform>$(Platform)</Platform>
- <Configuration>$(Configuration)</Configuration>
- <Properties></Properties>
- <BuildTarget>Build</BuildTarget>
- <CleanTarget>Clean</CleanTarget>
- <CleanAllTarget>CleanAll</CleanAllTarget>
- <BuildInParallel>true</BuildInParallel>
- </Projects>
- <Projects2>
- <Platform>$(Platform)</Platform>
- <Configuration>$(Configuration)</Configuration>
- <Properties></Properties>
- <BuildTarget>Build</BuildTarget>
- <CleanTarget>Clean</CleanTarget>
- <CleanAllTarget>CleanAll</CleanAllTarget>
- <BuildInParallel>false</BuildInParallel>
- </Projects2>
- </ItemDefinitionGroup>
- <ItemGroup>
- <!-- pythonXY.dll -->
- <!--
- Parallel build is explicitly disabled for this project because it
- causes many conflicts between pythoncore and projects that depend
- on pythoncore. Once the core DLL has been built, subsequent
- projects will be built in parallel.
- -->
- <Projects Include="pythoncore.vcxproj">
- <BuildInParallel>false</BuildInParallel>
- </Projects>
- <!-- python3.dll -->
- <Projects Include="python3dll.vcxproj" />
- <!-- py[w].exe -->
- <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
- <!-- pyshellext.dll -->
- <Projects Include="pyshellext.vcxproj" />
- <!-- Extension modules -->
- <ExtensionModules Include="_asyncio;_ctypes;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;select;unicodedata;winsound" />
- <!-- Extension modules that require external sources -->
- <ExternalModules Include="_bz2;_lzma;_sqlite3" />
- <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
- <ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
- <ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
- <ExternalModules Include="_tkinter;tix" Condition="$(IncludeTkinter)" />
- <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
- <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
- <!-- Test modules -->
- <TestModules Include="_ctypes_test;_testbuffer;_testcapi;_testembed;_testimportmultiple;_testmultiphase;_testconsole" />
- <TestModules Include="xxlimited" Condition="'$(Configuration)' == 'Release'" />
- <Projects Include="@(TestModules->'%(Identity).vcxproj')" Condition="$(IncludeTests)">
- <!-- Disable parallel build for test modules -->
- <BuildInParallel>false</BuildInParallel>
- </Projects>
-
- <!-- _freeze_importlib -->
- <Projects2 Include="_freeze_importlib.vcxproj" />
- <!-- python[w].exe -->
- <Projects2 Include="python.vcxproj;pythonw.vcxproj" />
- </ItemGroup>
-
- <Target Name="Build">
- <MSBuild Projects="@(Projects)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="true"
- Targets="%(BuildTarget)" />
- <MSBuild Projects="@(Projects2)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="true"
- Targets="%(BuildTarget)" />
- </Target>
-
- <Target Name="Clean">
- <MSBuild Projects="@(Projects2)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="false"
- Condition="%(CleanTarget) != ''"
- Targets="%(CleanTarget)" />
- <MSBuild Projects="@(Projects)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="false"
- Condition="%(CleanTarget) != ''"
- Targets="%(CleanTarget)" />
- </Target>
-
- <Target Name="CleanAll">
- <MSBuild Projects="@(Projects2)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="false"
- Condition="%(CleanAllTarget) != ''"
- Targets="%(CleanAllTarget)" />
- <MSBuild Projects="@(Projects)"
- Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
- BuildInParallel="%(BuildInParallel)"
- StopOnFirstFailure="false"
- Condition="%(CleanAllTarget) != ''"
- Targets="%(CleanAllTarget)" />
- </Target>
-
- <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
- <Target Name="RebuildAll" DependsOnTargets="CleanAll;Build" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>\r
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>\r
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>\r
+ <IncludeExtensions Condition="'$(IncludeExtensions)' == ''">true</IncludeExtensions>\r
+ <IncludeExternals Condition="'$(IncludeExternals)' == ''">true</IncludeExternals>\r
+ <IncludeTests Condition="'$(IncludeTest)' == ''">true</IncludeTests>\r
+ <IncludeSSL Condition="'$(IncludeSSL)' == ''">true</IncludeSSL>\r
+ <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter>\r
+ </PropertyGroup>\r
+\r
+ <ItemDefinitionGroup>\r
+ <Projects>\r
+ <Platform>$(Platform)</Platform>\r
+ <Configuration>$(Configuration)</Configuration>\r
+ <Properties></Properties>\r
+ <BuildTarget>Build</BuildTarget>\r
+ <CleanTarget>Clean</CleanTarget>\r
+ <CleanAllTarget>CleanAll</CleanAllTarget>\r
+ <BuildInParallel>true</BuildInParallel>\r
+ </Projects>\r
+ <Projects2>\r
+ <Platform>$(Platform)</Platform>\r
+ <Configuration>$(Configuration)</Configuration>\r
+ <Properties></Properties>\r
+ <BuildTarget>Build</BuildTarget>\r
+ <CleanTarget>Clean</CleanTarget>\r
+ <CleanAllTarget>CleanAll</CleanAllTarget>\r
+ <BuildInParallel>false</BuildInParallel>\r
+ </Projects2>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <!-- pythonXY.dll -->\r
+ <!--\r
+ Parallel build is explicitly disabled for this project because it\r
+ causes many conflicts between pythoncore and projects that depend\r
+ on pythoncore. Once the core DLL has been built, subsequent\r
+ projects will be built in parallel.\r
+ -->\r
+ <Projects Include="pythoncore.vcxproj">\r
+ <BuildInParallel>false</BuildInParallel>\r
+ </Projects>\r
+ <!-- python3.dll -->\r
+ <Projects Include="python3dll.vcxproj" />\r
+ <!-- py[w].exe -->\r
+ <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />\r
+ <!-- pyshellext.dll -->\r
+ <Projects Include="pyshellext.vcxproj" />\r
+ <!-- Extension modules -->\r
+ <ExtensionModules Include="_asyncio;_ctypes;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;select;unicodedata;winsound" />\r
+ <!-- Extension modules that require external sources -->\r
+ <ExternalModules Include="_bz2;_lzma;_sqlite3" />\r
+ <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->\r
+ <ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />\r
+ <ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />\r
+ <ExternalModules Include="_tkinter;tix" Condition="$(IncludeTkinter)" />\r
+ <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />\r
+ <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />\r
+ <!-- Test modules -->\r
+ <TestModules Include="_ctypes_test;_testbuffer;_testcapi;_testembed;_testimportmultiple;_testmultiphase;_testconsole" />\r
+ <TestModules Include="xxlimited" Condition="'$(Configuration)' == 'Release'" />\r
+ <Projects Include="@(TestModules->'%(Identity).vcxproj')" Condition="$(IncludeTests)">\r
+ <!-- Disable parallel build for test modules -->\r
+ <BuildInParallel>false</BuildInParallel>\r
+ </Projects>\r
+ \r
+ <!-- _freeze_importlib -->\r
+ <Projects2 Include="_freeze_importlib.vcxproj" />\r
+ <!-- python[w].exe -->\r
+ <Projects2 Include="python.vcxproj;pythonw.vcxproj" />\r
+ </ItemGroup>\r
+\r
+ <Target Name="Build">\r
+ <MSBuild Projects="@(Projects)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="true"\r
+ Targets="%(BuildTarget)" />\r
+ <MSBuild Projects="@(Projects2)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="true"\r
+ Targets="%(BuildTarget)" />\r
+ </Target>\r
+\r
+ <Target Name="Clean">\r
+ <MSBuild Projects="@(Projects2)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="false"\r
+ Condition="%(CleanTarget) != ''"\r
+ Targets="%(CleanTarget)" />\r
+ <MSBuild Projects="@(Projects)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="false"\r
+ Condition="%(CleanTarget) != ''"\r
+ Targets="%(CleanTarget)" />\r
+ </Target>\r
+\r
+ <Target Name="CleanAll">\r
+ <MSBuild Projects="@(Projects2)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="false"\r
+ Condition="%(CleanAllTarget) != ''"\r
+ Targets="%(CleanAllTarget)" />\r
+ <MSBuild Projects="@(Projects)"\r
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"\r
+ BuildInParallel="%(BuildInParallel)"\r
+ StopOnFirstFailure="false"\r
+ Condition="%(CleanAllTarget) != ''"\r
+ Targets="%(CleanAllTarget)" />\r
+ </Target>\r
+\r
+ <Target Name="Rebuild" DependsOnTargets="Clean;Build" />\r
+ <Target Name="RebuildAll" DependsOnTargets="CleanAll;Build" />\r
</Project>
\ No newline at end of file
EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_asyncio", "_asyncio.vcxproj", "{384C224A-7474-476E-A01B-750EA7DE918C}"\r
EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"\r
+EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Debug|Win32 = Debug|Win32\r
{B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|Win32.Build.0 = Release|Win32\r
{B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|x64.ActiveCfg = Release|x64\r
{B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|x64.Build.0 = Release|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|Win32.Build.0 = Debug|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|x64.ActiveCfg = Debug|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|x64.Build.0 = Debug|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Release|Win32.ActiveCfg = Release|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Release|Win32.Build.0 = Release|Win32\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Release|x64.ActiveCfg = Release|x64\r
+ {384C224A-7474-476E-A01B-750EA7DE918C}.Release|x64.Build.0 = Release|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.Build.0 = Debug|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.ActiveCfg = Release|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64\r
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <ProjectGuid>{D06B6426-4762-44CC-8BAD-D79052507F2F}</ProjectGuid>
- <RootNamespace>pyexpat</RootNamespace>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\expat\xmlrole.h" />
- <ClInclude Include="..\Modules\expat\xmltok.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\pyexpat.c" />
- <ClCompile Include="..\Modules\expat\xmlparse.c" />
- <ClCompile Include="..\Modules\expat\xmlrole.c" />
- <ClCompile Include="..\Modules\expat\xmltok.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <ProjectGuid>{D06B6426-4762-44CC-8BAD-D79052507F2F}</ProjectGuid>\r
+ <RootNamespace>pyexpat</RootNamespace>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\expat\xmlrole.h" />\r
+ <ClInclude Include="..\Modules\expat\xmltok.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\pyexpat.c" />\r
+ <ClCompile Include="..\Modules\expat\xmlparse.c" />\r
+ <ClCompile Include="..\Modules\expat\xmlrole.c" />\r
+ <ClCompile Include="..\Modules\expat\xmltok.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ddae77a6-7ca0-4a1b-b71c-deea5f4025de}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{5af9d40c-fc46-4640-ad84-3d1dd34a71d7}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\expat\xmlrole.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\expat\xmltok.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\pyexpat.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmlparse.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmlrole.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\expat\xmltok.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{ddae77a6-7ca0-4a1b-b71c-deea5f4025de}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{5af9d40c-fc46-4640-ad84-3d1dd34a71d7}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\expat\xmlrole.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\expat\xmltok.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\pyexpat.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmlparse.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmlrole.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\expat\xmltok.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{7B2727B5-5A3F-40EE-A866-43A13CD31446}</ProjectGuid>
- <RootNamespace>pylauncher</RootNamespace>
- <TargetName>py</TargetName>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <PropertyGroup>
- <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\launcher.c" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\launcher.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pylauncher.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{7B2727B5-5A3F-40EE-A866-43A13CD31446}</ProjectGuid>\r
+ <RootNamespace>pylauncher</RootNamespace>\r
+ <TargetName>py</TargetName>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <PropertyGroup>\r
+ <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\launcher.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\launcher.ico" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pylauncher.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\launcher.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\launcher.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pylauncher.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\launcher.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\launcher.ico">\r
+ <Filter>Resource Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pylauncher.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Py_IntDir">
- <PropertyGroup Label="Globals">
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
- <OutDir>$(BuildPath)</OutDir>
- <OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
- <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(MSBuildThisFileDirectory)obj\</Py_IntDir>
- <IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
- <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
- <TargetName>$(TargetName)$(PyDebugExt)</TargetName>
- <GenerateManifest>false</GenerateManifest>
- <EmbedManifest>false</EmbedManifest>
- <SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>
- <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>
- <SupportSigning Condition="'$(Configuration)' == 'Debug'">false</SupportSigning>
- <SupportSigning Condition="'$(ConfigurationType)' == 'StaticLibrary'">false</SupportSigning>
- </PropertyGroup>
-
- <PropertyGroup>
- <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition>
- <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG;</_DebugPreprocessorDefinition>
- <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>
- <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition>
- <_PydPreprocessorDefinition Condition="$(TargetExt) == '.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
-
- <Optimization>MaxSpeed</Optimization>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling></ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
- </ClCompile>
- <ClCompile Condition="$(Configuration) == 'Debug'">
- <Optimization>Disabled</Optimization>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <ClCompile Condition="$(ICCBuild) == 'true'">
- <FloatingPointModel>Strict</FloatingPointModel>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>true</RandomizedBaseAddress>
- <DataExecutionPrevention>true</DataExecutionPrevention>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <TargetMachine>MachineX86</TargetMachine>
- <TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine>
- <ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>
- <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">PGInstrument</LinkTimeCodeGeneration>
- <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration>
- <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">true</LinkTimeCodeGeneration>
- <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration>
- </Lib>
- <ResourceCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Midl>
- <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
- <OutputDirectory>$(IntDir)</OutputDirectory>
- <InterfaceIdentifierFileName>$(MSBuildProjectName)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>$(MSBuildProjectName)_p.c</ProxyFileName>
- </Midl>
- </ItemDefinitionGroup>
-
- <Target Name="GeneratePythonNtRcH"
- BeforeTargets="ClCompile"
- Inputs="$(PySourcePath)Include\patchlevel.h"
- Outputs="$(IntDir)pythonnt_rc.h">
- <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"
- Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */
-#define FIELD3 $(Field3Value)
-#define MS_DLL_ID "$(SysWinVer)"
-#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
-' />
- <ItemGroup>
- <FileWrites Include="$(IntDir)pythonnt_rc.h" />
- </ItemGroup>
- </Target>
-
- <UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
- <ParameterGroup>
- <FileName Required="true" />
- </ParameterGroup>
- <Task>
- <Code Type="Fragment" Language="cs">
-<![CDATA[
-string fullPath = System.IO.Path.GetFullPath(FileName);
-Log.LogMessage("Looking for " + fullPath, MessageImportance.Normal);
-foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()) {
- try {
- Log.LogMessage("Found running process: " + p.MainModule.FileName, MessageImportance.Low);
- if (fullPath.Equals(System.IO.Path.GetFullPath(p.MainModule.FileName), StringComparison.OrdinalIgnoreCase)) {
- Log.LogMessage("Terminating " + p.MainModule.FileName, MessageImportance.High);
- p.Kill();
- }
- } catch {
- }
-}
-]]>
- </Code>
- </Task>
- </UsingTask>
-
- <Target Name="KillPython" BeforeTargets="PrepareForBuild" Condition="'$(KillPython)' == 'true'">
- <Message Text="Killing any running python$(PyDebugExt)$(PyTestExt).exe instances..." Importance="high" />
- <KillPython FileName="$(OutDir)python$(PyDebugExt)$(PyTestExt).exe" />
- </Target>
-
- <!--
- A default target to handle msbuild pcbuild.proj /t:CleanAll.
-
- Some externals projects don't respond to /t:Clean, so we invoke
- CleanAll on them when we really want to clean up.
- -->
- <Target Name="CleanAll" DependsOnTargets="Clean">
- <MSBuild Projects="@(ProjectReference->'%(FullPath)')"
- Properties="Configuration=$(Configuration);Platform=$(Platform)"
- BuildInParallel="true"
- StopOnFirstFailure="false"
- Condition="Exists(%(FullPath))"
- Targets="CleanAll" />
- </Target>
-
- <PropertyGroup>
- <SdkBinPath Condition="'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86</SdkBinPath>
- <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86</SdkBinPath>
- <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86</SdkBinPath>
- <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\</SdkBinPath>
- <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificate)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /q /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
- <_MakeCatCommand Condition="Exists($(SdkBinPath))">"$(SdkBinPath)\makecat.exe"</_MakeCatCommand>
- </PropertyGroup>
-
- <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
- <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
- <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Py_IntDir">\r
+ <PropertyGroup Label="Globals">\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>\r
+ <OutDir>$(BuildPath)</OutDir>\r
+ <OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>\r
+ <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(MSBuildThisFileDirectory)obj\</Py_IntDir>\r
+ <IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>\r
+ <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>\r
+ <TargetName>$(TargetName)$(PyDebugExt)</TargetName>\r
+ <GenerateManifest>false</GenerateManifest>\r
+ <EmbedManifest>false</EmbedManifest>\r
+ <SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>\r
+ <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>\r
+ <SupportSigning Condition="'$(Configuration)' == 'Debug'">false</SupportSigning>\r
+ <SupportSigning Condition="'$(ConfigurationType)' == 'StaticLibrary'">false</SupportSigning>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup>\r
+ <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition>\r
+ <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG;</_DebugPreprocessorDefinition>\r
+ <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>\r
+ <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition>\r
+ <_PydPreprocessorDefinition Condition="$(TargetExt) == '.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ \r
+ <Optimization>MaxSpeed</Optimization>\r
+ <IntrinsicFunctions>true</IntrinsicFunctions>\r
+ <StringPooling>true</StringPooling>\r
+ <ExceptionHandling></ExceptionHandling>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <FunctionLevelLinking>true</FunctionLevelLinking>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ <CompileAs>Default</CompileAs>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>\r
+ </ClCompile>\r
+ <ClCompile Condition="$(Configuration) == 'Debug'">\r
+ <Optimization>Disabled</Optimization>\r
+ <WholeProgramOptimization>false</WholeProgramOptimization>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ </ClCompile>\r
+ <ClCompile Condition="$(ICCBuild) == 'true'">\r
+ <FloatingPointModel>Strict</FloatingPointModel>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>\r
+ <SubSystem>Windows</SubSystem>\r
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>\r
+ <DataExecutionPrevention>true</DataExecutionPrevention>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\r
+ <TargetMachine>MachineX86</TargetMachine>\r
+ <TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine>\r
+ <ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>\r
+ <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\r
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">PGInstrument</LinkTimeCodeGeneration>\r
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration>\r
+ </Link>\r
+ <Lib>\r
+ <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration>\r
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">true</LinkTimeCodeGeneration>\r
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration>\r
+ </Lib>\r
+ <ResourceCompile>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <Culture>0x0409</Culture>\r
+ </ResourceCompile>\r
+ <Midl>\r
+ <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MkTypLibCompatible>true</MkTypLibCompatible>\r
+ <SuppressStartupBanner>true</SuppressStartupBanner>\r
+ <TargetEnvironment>Win32</TargetEnvironment>\r
+ <TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>\r
+ <OutputDirectory>$(IntDir)</OutputDirectory>\r
+ <InterfaceIdentifierFileName>$(MSBuildProjectName)_i.c</InterfaceIdentifierFileName>\r
+ <ProxyFileName>$(MSBuildProjectName)_p.c</ProxyFileName>\r
+ </Midl>\r
+ </ItemDefinitionGroup>\r
+\r
+ <Target Name="GeneratePythonNtRcH"\r
+ BeforeTargets="ClCompile"\r
+ Inputs="$(PySourcePath)Include\patchlevel.h"\r
+ Outputs="$(IntDir)pythonnt_rc.h">\r
+ <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"\r
+ Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */\r
+#define FIELD3 $(Field3Value)\r
+#define MS_DLL_ID "$(SysWinVer)"\r
+#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"\r
+' />\r
+ <ItemGroup>\r
+ <FileWrites Include="$(IntDir)pythonnt_rc.h" />\r
+ </ItemGroup>\r
+ </Target>\r
+\r
+ <UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">\r
+ <ParameterGroup>\r
+ <FileName Required="true" />\r
+ </ParameterGroup>\r
+ <Task>\r
+ <Code Type="Fragment" Language="cs">\r
+<![CDATA[\r
+string fullPath = System.IO.Path.GetFullPath(FileName);\r
+Log.LogMessage("Looking for " + fullPath, MessageImportance.Normal);\r
+foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()) {\r
+ try {\r
+ Log.LogMessage("Found running process: " + p.MainModule.FileName, MessageImportance.Low);\r
+ if (fullPath.Equals(System.IO.Path.GetFullPath(p.MainModule.FileName), StringComparison.OrdinalIgnoreCase)) {\r
+ Log.LogMessage("Terminating " + p.MainModule.FileName, MessageImportance.High);\r
+ p.Kill();\r
+ }\r
+ } catch {\r
+ }\r
+}\r
+]]>\r
+ </Code>\r
+ </Task>\r
+ </UsingTask>\r
+ \r
+ <Target Name="KillPython" BeforeTargets="PrepareForBuild" Condition="'$(KillPython)' == 'true'">\r
+ <Message Text="Killing any running python$(PyDebugExt)$(PyTestExt).exe instances..." Importance="high" />\r
+ <KillPython FileName="$(OutDir)python$(PyDebugExt)$(PyTestExt).exe" />\r
+ </Target>\r
+ \r
+ <!--\r
+ A default target to handle msbuild pcbuild.proj /t:CleanAll.\r
+ \r
+ Some externals projects don't respond to /t:Clean, so we invoke\r
+ CleanAll on them when we really want to clean up.\r
+ -->\r
+ <Target Name="CleanAll" DependsOnTargets="Clean">\r
+ <MSBuild Projects="@(ProjectReference->'%(FullPath)')"\r
+ Properties="Configuration=$(Configuration);Platform=$(Platform)"\r
+ BuildInParallel="true"\r
+ StopOnFirstFailure="false"\r
+ Condition="Exists(%(FullPath))"\r
+ Targets="CleanAll" />\r
+ </Target>\r
+\r
+ <PropertyGroup>\r
+ <SdkBinPath Condition="'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86</SdkBinPath>\r
+ <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86</SdkBinPath>\r
+ <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86</SdkBinPath>\r
+ <SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\</SdkBinPath>\r
+ <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificate)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /q /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>\r
+ <_MakeCatCommand Condition="Exists($(SdkBinPath))">"$(SdkBinPath)\makecat.exe"</_MakeCatCommand>\r
+ </PropertyGroup>\r
+ \r
+ <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">\r
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />\r
+ <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />\r
+ </Target>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}</ProjectGuid>
- <RootNamespace>pyshellext</RootNamespace>
- <TargetName>pyshellext</TargetName>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <PropertyGroup>
- <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>version.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <ModuleDefinitionFile>..\PC\pyshellext$(PyDebugExt).def</ModuleDefinitionFile>
- </Link>
- <Midl>
- <CompileInterface>true</CompileInterface>
- </Midl>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\pyshellext.cpp" />
- <Midl Include="..\PC\pyshellext.idl" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\pyshellext.def" />
- <None Include="..\PC\pyshellext_d.def" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pyshellext.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}</ProjectGuid>\r
+ <RootNamespace>pyshellext</RootNamespace>\r
+ <TargetName>pyshellext</TargetName>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <PropertyGroup>\r
+ <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>version.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <SubSystem>Console</SubSystem>\r
+ <ModuleDefinitionFile>..\PC\pyshellext$(PyDebugExt).def</ModuleDefinitionFile>\r
+ </Link>\r
+ <Midl>\r
+ <CompileInterface>true</CompileInterface>\r
+ </Midl>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\pyshellext.cpp" />\r
+ <Midl Include="..\PC\pyshellext.idl" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\pyshellext.def" />\r
+ <None Include="..\PC\pyshellext_d.def" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pyshellext.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\pyshellext.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <Midl Include="..\PC\pyshellext.idl">
- <Filter>Source Files</Filter>
- </Midl>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pyshellext.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\pyshellext.def">
- <Filter>Source Files</Filter>
- </None>
- <None Include="..\PC\pyshellext_d.def">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\pyshellext.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Midl Include="..\PC\pyshellext.idl">\r
+ <Filter>Source Files</Filter>\r
+ </Midl>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pyshellext.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\pyshellext.def">\r
+ <Filter>Source Files</Filter>\r
+ </None>\r
+ <None Include="..\PC\pyshellext_d.def">\r
+ <Filter>Source Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
- <!--
- Use the latest available version of Visual Studio to build. To override
- this and build with an earlier version, pass "/p:PlatformToolset=v100"
- (for example) when building.
-
- We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
- -->
- <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
- <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
- <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>
- <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath10)' != ''">v100</BasePlatformToolset>
-
- <PlatformToolset Condition="'$(PlatformToolset)' == ''">$(BasePlatformToolset)</PlatformToolset>
- <ICCBuild>false</ICCBuild>
- <ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++ Compiler`))">true</ICCBuild>
-
- <!--
- Convincing MSVC/MSBuild to prefer our platform names is too difficult,
- so we define our own constant ArchName and use wherever we need it.
- -->
- <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName>
- <ArchName Condition="'$(ArchName)' == ''">win32</ArchName>
-
- <!-- Root directory of the repository -->
- <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>
- <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
-
- <!-- Directory where build outputs are put -->
- <BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\win32\</BuildPath32>
- <BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32>
- <BuildPath64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\amd64\</BuildPath64>
- <BuildPath64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64\</BuildPath64>
- <BuildPath Condition="'$(ArchName)' == 'win32'">$(BuildPath32)</BuildPath>
- <BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath>
- <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
- <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
-
- <!-- Directories of external projects. tcltk is handled in tcltk.props -->
- <ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>
- <sqlite3Dir>$(ExternalsDir)sqlite-3.14.2.0\</sqlite3Dir>
- <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
- <lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
- <opensslDir>$(ExternalsDir)openssl-1.0.2k\</opensslDir>
- <opensslIncludeDir>$(opensslDir)include32</opensslIncludeDir>
- <opensslIncludeDir Condition="'$(ArchName)' == 'amd64'">$(opensslDir)include64</opensslIncludeDir>
- <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
-
- <!-- Suffix for all binaries when building for debug -->
- <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>
-
- <!-- Suffix for versions/keys when building with test markers -->
- <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt>
-
- <!-- Suffix for versions/keys when building for particular platforms -->
- <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt>
-
- <!-- Full path of the resulting python.exe binary -->
- <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(OverrideVersion)' == ''">
- <!--
- Read version information from Include\patchlevel.h. The following properties are set:
-
- MajorVersionNumber - the '3' in '3.5.2a1'
- MinorVersionNumber - the '5' in '3.5.2a1'
- MicroVersionNumber - the '2' in '3.5.2a1'
- ReleaseSerial - the '1' in '3.5.2a1'
- ReleaseLevelName - the 'a1' in '3.5.2a1'
- PythonVersionNumber - '3.5.2' for '3.5.2a1'
- PythonVersion - '3.5.2a1'
- PythonVersionHex - 0x030502a1 for '3.5.2a1'
- ReleaseLevelNumber - 10 for alpha, 11 for beta, 12 for RC (gamma), and 15 for final
- Field3Value - 2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') + 1)
- -->
- <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent>
- <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber>
- <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber>
- <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber>
- <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel>
- <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial>
- <ReleaseLevelNumber>15</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'ALPHA'">10</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'BETA'">11</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'GAMMA'">12</ReleaseLevelNumber>
- <ReleaseLevelName Condition="$(_ReleaseLevel) == 'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName>
- <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName>
- <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(OverrideVersion)' != ''">
- <!--
- Override the version number when building by specifying OverrideVersion.
- For example:
-
- PCBuild\build.bat "/p:OverrideVersion=3.5.2a1"
-
- Use the -V option to check your version is valid:
-
- PCBuild\build.bat -V "/p:OverrideVersion=3.5.2a1"
- PythonVersionNumber: 3.5.2
- PythonVersion: 3.5.2a1
- PythonVersionHex: 0x030502A1
- Field3Value: 2101
-
- Note that this only affects the version numbers embedded in resources and
- installers, but not sys.version.
- -->
- <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value)</MajorVersionNumber>
- <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value)</MinorVersionNumber>
- <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value)</MicroVersionNumber>
- <ReleaseLevelName>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value)</ReleaseLevelName>
- <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value)</_ReleaseLevel>
- <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value)</ReleaseSerial>
- <ReleaseSerial Condition="'$(ReleaseSerial)' == ''">0</ReleaseSerial>
- <ReleaseLevelNumber>15</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'a'">10</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'b'">11</ReleaseLevelNumber>
- <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'rc'">12</ReleaseLevelNumber>
- </PropertyGroup>
-
- <PropertyGroup>
- <PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>
- <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>
- <PythonVersionHex>$([msbuild]::BitwiseOr(
- $([msbuild]::Multiply($(MajorVersionNumber), 16777216)),
- $([msbuild]::BitwiseOr(
- $([msbuild]::Multiply($(MinorVersionNumber), 65536)),
- $([msbuild]::BitwiseOr(
- $([msbuild]::Multiply($(MicroVersionNumber), 256)),
- $([msbuild]::BitwiseOr(
- $([msbuild]::Multiply($(ReleaseLevelNumber), 16)),
- $(ReleaseSerial)
- ))
- ))
- ))
- ))</PythonVersionHex>
- <Field3Value>$([msbuild]::Add(
- $(ReleaseSerial),
- $([msbuild]::Add(
- $([msbuild]::Multiply($(ReleaseLevelNumber), 10)),
- $([msbuild]::Multiply($(MicroVersionNumber), 1000))
- ))
- ))</Field3Value>
- <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value>
-
- <!-- The name of the resulting pythonXY.dll (without the extension) -->
- <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>
-
- <!-- The version and platform tag to include in .pyd filenames -->
- <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>
- <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag>
-
- <!-- The version number for sys.winver -->
- <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer>
- </PropertyGroup>
-
- <!-- Displays the calculated version info -->
- <Target Name="ShowVersionInfo">
- <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" />
- <Message Importance="high" Text="PythonVersion: $(PythonVersion)" />
- <Message Importance="high" Text="PythonVersionHex: 0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" />
- <Message Importance="high" Text="Field3Value: $(Field3Value)" />
- <Message Importance="high" Text="SysWinVer: $(SysWinVer)" />
- <Message Importance="high" Text="PyDllName: $(PyDllName)" />
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>\r
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>\r
+ <!--\r
+ Use the latest available version of Visual Studio to build. To override\r
+ this and build with an earlier version, pass "/p:PlatformToolset=v100"\r
+ (for example) when building.\r
+\r
+ We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.\r
+ -->\r
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>\r
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>\r
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>\r
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath10)' != ''">v100</BasePlatformToolset>\r
+\r
+ <PlatformToolset Condition="'$(PlatformToolset)' == ''">$(BasePlatformToolset)</PlatformToolset>\r
+ <ICCBuild>false</ICCBuild>\r
+ <ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++ Compiler`))">true</ICCBuild>\r
+\r
+ <!--\r
+ Convincing MSVC/MSBuild to prefer our platform names is too difficult,\r
+ so we define our own constant ArchName and use wherever we need it.\r
+ -->\r
+ <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName>\r
+ <ArchName Condition="'$(ArchName)' == ''">win32</ArchName>\r
+ \r
+ <!-- Root directory of the repository -->\r
+ <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>\r
+ <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>\r
+ \r
+ <!-- Directory where build outputs are put -->\r
+ <BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\win32\</BuildPath32>\r
+ <BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32>\r
+ <BuildPath64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\amd64\</BuildPath64>\r
+ <BuildPath64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64\</BuildPath64>\r
+ <BuildPath Condition="'$(ArchName)' == 'win32'">$(BuildPath32)</BuildPath>\r
+ <BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath>\r
+ <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>\r
+ <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>\r
+ \r
+ <!-- Directories of external projects. tcltk is handled in tcltk.props -->\r
+ <ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>\r
+ <sqlite3Dir>$(ExternalsDir)sqlite-3.14.2.0\</sqlite3Dir>\r
+ <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>\r
+ <lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>\r
+ <opensslDir>$(ExternalsDir)openssl-1.0.2k\</opensslDir>\r
+ <opensslIncludeDir>$(opensslDir)include32</opensslIncludeDir>\r
+ <opensslIncludeDir Condition="'$(ArchName)' == 'amd64'">$(opensslDir)include64</opensslIncludeDir>\r
+ <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>\r
+ \r
+ <!-- Suffix for all binaries when building for debug -->\r
+ <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>\r
+ \r
+ <!-- Suffix for versions/keys when building with test markers -->\r
+ <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt>\r
+ \r
+ <!-- Suffix for versions/keys when building for particular platforms -->\r
+ <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt>\r
+ \r
+ <!-- Full path of the resulting python.exe binary -->\r
+ <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe>\r
+ </PropertyGroup>\r
+ \r
+ <PropertyGroup Condition="'$(OverrideVersion)' == ''">\r
+ <!--\r
+ Read version information from Include\patchlevel.h. The following properties are set:\r
+ \r
+ MajorVersionNumber - the '3' in '3.5.2a1'\r
+ MinorVersionNumber - the '5' in '3.5.2a1'\r
+ MicroVersionNumber - the '2' in '3.5.2a1'\r
+ ReleaseSerial - the '1' in '3.5.2a1'\r
+ ReleaseLevelName - the 'a1' in '3.5.2a1'\r
+ PythonVersionNumber - '3.5.2' for '3.5.2a1'\r
+ PythonVersion - '3.5.2a1'\r
+ PythonVersionHex - 0x030502a1 for '3.5.2a1'\r
+ ReleaseLevelNumber - 10 for alpha, 11 for beta, 12 for RC (gamma), and 15 for final\r
+ Field3Value - 2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') + 1)\r
+ -->\r
+ <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent>\r
+ <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber>\r
+ <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber>\r
+ <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber>\r
+ <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel>\r
+ <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial>\r
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'ALPHA'">10</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'BETA'">11</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'GAMMA'">12</ReleaseLevelNumber>\r
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName>\r
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName>\r
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName>\r
+ </PropertyGroup>\r
+ \r
+ <PropertyGroup Condition="'$(OverrideVersion)' != ''">\r
+ <!--\r
+ Override the version number when building by specifying OverrideVersion.\r
+ For example:\r
+ \r
+ PCBuild\build.bat "/p:OverrideVersion=3.5.2a1"\r
+ \r
+ Use the -V option to check your version is valid:\r
+ \r
+ PCBuild\build.bat -V "/p:OverrideVersion=3.5.2a1"\r
+ PythonVersionNumber: 3.5.2\r
+ PythonVersion: 3.5.2a1\r
+ PythonVersionHex: 0x030502A1\r
+ Field3Value: 2101\r
+ \r
+ Note that this only affects the version numbers embedded in resources and\r
+ installers, but not sys.version.\r
+ -->\r
+ <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value)</MajorVersionNumber>\r
+ <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value)</MinorVersionNumber>\r
+ <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value)</MicroVersionNumber>\r
+ <ReleaseLevelName>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value)</ReleaseLevelName>\r
+ <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value)</_ReleaseLevel>\r
+ <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value)</ReleaseSerial>\r
+ <ReleaseSerial Condition="'$(ReleaseSerial)' == ''">0</ReleaseSerial>\r
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'a'">10</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'b'">11</ReleaseLevelNumber>\r
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'rc'">12</ReleaseLevelNumber>\r
+ </PropertyGroup>\r
+ \r
+ <PropertyGroup>\r
+ <PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>\r
+ <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>\r
+ <PythonVersionHex>$([msbuild]::BitwiseOr(\r
+ $([msbuild]::Multiply($(MajorVersionNumber), 16777216)),\r
+ $([msbuild]::BitwiseOr(\r
+ $([msbuild]::Multiply($(MinorVersionNumber), 65536)),\r
+ $([msbuild]::BitwiseOr(\r
+ $([msbuild]::Multiply($(MicroVersionNumber), 256)),\r
+ $([msbuild]::BitwiseOr(\r
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 16)),\r
+ $(ReleaseSerial)\r
+ ))\r
+ ))\r
+ ))\r
+ ))</PythonVersionHex>\r
+ <Field3Value>$([msbuild]::Add(\r
+ $(ReleaseSerial),\r
+ $([msbuild]::Add(\r
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 10)),\r
+ $([msbuild]::Multiply($(MicroVersionNumber), 1000))\r
+ ))\r
+ ))</Field3Value>\r
+ <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value>\r
+ \r
+ <!-- The name of the resulting pythonXY.dll (without the extension) -->\r
+ <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>\r
+\r
+ <!-- The version and platform tag to include in .pyd filenames -->\r
+ <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>\r
+ <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag>\r
+ \r
+ <!-- The version number for sys.winver -->\r
+ <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer>\r
+ </PropertyGroup>\r
+ \r
+ <!-- Displays the calculated version info -->\r
+ <Target Name="ShowVersionInfo">\r
+ <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" />\r
+ <Message Importance="high" Text="PythonVersion: $(PythonVersion)" />\r
+ <Message Importance="high" Text="PythonVersionHex: 0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" />\r
+ <Message Importance="high" Text="Field3Value: $(Field3Value)" />\r
+ <Message Importance="high" Text="SysWinVer: $(SysWinVer)" />\r
+ <Message Importance="high" Text="PyDllName: $(PyDllName)" />\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <None Include="..\PC\pycon.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_exe.rc" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\python.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
- <Target Name="ValidateUcrtbase" AfterTargets="AfterBuild">
- <PropertyGroup>
- <UcrtName>ucrtbase</UcrtName>
- <UcrtName Condition="'$(Configuration)' == 'Debug'">ucrtbased</UcrtName>
- </PropertyGroup>
- <Exec Command='setlocal
-set PYTHONPATH=$(PySourcePath)Lib
-"$(OutDir)python$(PyDebugExt).exe" "$(PySourcePath)PC\validate_ucrtbase.py" $(UcrtName)' ContinueOnError="true" />
- </Target>
- <Target Name="GeneratePythonBat" AfterTargets="AfterBuild">
- <PropertyGroup>
- <_Content>@rem This script invokes the most recently built Python with all arguments
-@rem passed through to the interpreter. This file is generated by the
-@rem build process and any changes *will* be thrown away by the next
-@rem rebuild.
-@rem This is only meant as a convenience for developing CPython
-@rem and using it outside of that context is ill-advised.
-@echo Running $(Configuration)^|$(Platform) interpreter...
-@setlocal
-@set PYTHONHOME=$(PySourcePath)
-@"$(OutDir)python$(PyDebugExt).exe" %*
-</_Content>
- <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat'))</_ExistingContent>
- </PropertyGroup>
- <WriteLinesToFile File="$(PySourcePath)python.bat" Lines="$(_Content)" Overwrite="true" Condition="'$(_Content)' != '$(_ExistingContent)'" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <SubSystem>Console</SubSystem>\r
+ <StackReserveSize>2000000</StackReserveSize>\r
+ <BaseAddress>0x1d000000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\pycon.ico" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_exe.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\python.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+ <Target Name="ValidateUcrtbase" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGInstrument'">\r
+ <PropertyGroup>\r
+ <UcrtName>ucrtbase</UcrtName>\r
+ <UcrtName Condition="'$(Configuration)' == 'Debug'">ucrtbased</UcrtName>\r
+ </PropertyGroup>\r
+ <Exec Command='setlocal\r
+set PYTHONPATH=$(PySourcePath)Lib\r
+"$(OutDir)python$(PyDebugExt).exe" "$(PySourcePath)PC\validate_ucrtbase.py" $(UcrtName)' ContinueOnError="true" />\r
+ </Target>\r
+ <Target Name="GeneratePythonBat" AfterTargets="AfterBuild">\r
+ <PropertyGroup>\r
+ <_PGOPath Condition="$(Configuration) == 'PGInstrument' and $(Platform) == 'Win32'">@set PATH=%PATH%%3B$(VCInstallDir)bin</_PGOPath>\r
+ <_PGOPath Condition="$(Configuration) == 'PGInstrument' and $(Platform) == 'x64'">@set PATH=%PATH%%3B$(VCInstallDir)bin\amd64</_PGOPath>\r
+ <_Content>@rem This script invokes the most recently built Python with all arguments\r
+@rem passed through to the interpreter. This file is generated by the\r
+@rem build process and any changes *will* be thrown away by the next\r
+@rem rebuild.\r
+@rem This is only meant as a convenience for developing CPython\r
+@rem and using it outside of that context is ill-advised.\r
+@echo Running $(Configuration)^|$(Platform) interpreter...\r
+@setlocal\r
+@set PYTHONHOME=$(PySourcePath)\r
+$(_PGOPath)\r
+@"$(OutDir)python$(PyDebugExt).exe" %*\r
+</_Content>\r
+ <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat'))</_ExistingContent>\r
+ </PropertyGroup>\r
+ <WriteLinesToFile File="$(PySourcePath)python.bat" Lines="$(_Content)" Overwrite="true" Condition="'$(_Content)' != '$(_ExistingContent)'" />\r
+ </Target>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{2d690795-de83-4a33-8235-3c5dafe45efa}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8b010a19-5b29-45f1-a8a0-f672e2bbb11a}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\pycon.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_exe.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Programs\python.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{2d690795-de83-4a33-8235-3c5dafe45efa}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{8b010a19-5b29-45f1-a8a0-f672e2bbb11a}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\pycon.ico">\r
+ <Filter>Resource Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_exe.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Programs\python.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>
- <RootNamespace>python3dll</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <TargetName>python3</TargetName>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <_Machine>X86</_Machine>
- <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>
- <ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);$(IntDir)python3_d.def;$(IntDir)python3stub.def</ExtensionsToDeleteOnClean>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>
- <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>
- <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>
- <EntryPointSymbol>DllMain</EntryPointSymbol>
- </Link>
- <PreLinkEvent>
- <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>
- <Message>Rebuilding $(TargetName)stub.lib</Message>
- <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>
- </PreLinkEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <None Include="..\PC\python3.def" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\python3dll.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-
- <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3_d.def" Condition="$(Configuration) == 'Debug'">
- <ItemGroup>
- <_DefLines Remove="@(_DefLines)" />
- <_Lines Remove="@(_Lines)" />
- </ItemGroup>
- <ReadLinesFromFile File="..\PC\python3.def">
- <Output TaskParameter="Lines" ItemName="_DefLines" />
- </ReadLinesFromFile>
- <PropertyGroup>
- <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>
- <_Sub1>$1_d.</_Sub1>
- <_Pattern2>"python3"</_Pattern2>
- <_Sub2>"python3_d"</_Sub2>
- </PropertyGroup>
- <ItemGroup>
- <_Lines Include="@(_DefLines)">
- <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>
- </_Lines>
- </ItemGroup>
- <MakeDir Directories="$(IntDir)" />
- <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" Overwrite="true" />
- </Target>
-
- <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3stub.def">
- <ItemGroup>
- <_DefLines Remove="@(_DefLines)" />
- <_Lines Remove="@(_Lines)" />
- </ItemGroup>
- <ReadLinesFromFile File="..\PC\python3.def">
- <Output TaskParameter="Lines" ItemName="_DefLines" />
- </ReadLinesFromFile>
- <PropertyGroup>
- <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>
- <_Sub>$1</_Sub>
- </PropertyGroup>
- <ItemGroup>
- <_Lines Include="EXPORTS" />
- <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">
- <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>
- </_Symbols>
- <_Lines Include="@(_Symbols->'%(Symbol)')" />
- </ItemGroup>
- <MakeDir Directories="$(IntDir)" />
- <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" Overwrite="true" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>\r
+ <RootNamespace>python3dll</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ <TargetName>python3</TargetName>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <_Machine>X86</_Machine>\r
+ <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>\r
+ <ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);$(IntDir)python3_d.def;$(IntDir)python3stub.def</ExtensionsToDeleteOnClean>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <BufferSecurityCheck>false</BufferSecurityCheck>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>\r
+ <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>\r
+ <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>\r
+ <EntryPointSymbol>DllMain</EntryPointSymbol>\r
+ </Link>\r
+ <PreLinkEvent>\r
+ <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>\r
+ <Message>Rebuilding $(TargetName)stub.lib</Message>\r
+ <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>\r
+ </PreLinkEvent>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\python3.def" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\python3dll.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+ \r
+ <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3_d.def" Condition="$(Configuration) == 'Debug'">\r
+ <ItemGroup>\r
+ <_DefLines Remove="@(_DefLines)" />\r
+ <_Lines Remove="@(_Lines)" />\r
+ </ItemGroup>\r
+ <ReadLinesFromFile File="..\PC\python3.def">\r
+ <Output TaskParameter="Lines" ItemName="_DefLines" />\r
+ </ReadLinesFromFile>\r
+ <PropertyGroup>\r
+ <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>\r
+ <_Sub1>$1_d.</_Sub1>\r
+ <_Pattern2>"python3"</_Pattern2>\r
+ <_Sub2>"python3_d"</_Sub2>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <_Lines Include="@(_DefLines)">\r
+ <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>\r
+ </_Lines>\r
+ </ItemGroup>\r
+ <MakeDir Directories="$(IntDir)" />\r
+ <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" Overwrite="true" />\r
+ </Target>\r
+ \r
+ <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3stub.def">\r
+ <ItemGroup>\r
+ <_DefLines Remove="@(_DefLines)" />\r
+ <_Lines Remove="@(_Lines)" />\r
+ </ItemGroup>\r
+ <ReadLinesFromFile File="..\PC\python3.def">\r
+ <Output TaskParameter="Lines" ItemName="_DefLines" />\r
+ </ReadLinesFromFile>\r
+ <PropertyGroup>\r
+ <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>\r
+ <_Sub>$1</_Sub>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <_Lines Include="EXPORTS" />\r
+ <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">\r
+ <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>\r
+ </_Symbols>\r
+ <_Lines Include="@(_Symbols->'%(Symbol)')" />\r
+ </ItemGroup>\r
+ <MakeDir Directories="$(IntDir)" />\r
+ <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" Overwrite="true" />\r
+ </Target>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\python3.def">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\python3dll.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\python3.def">\r
+ <Filter>Source Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\python3dll.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}</ProjectGuid>
- <RootNamespace>pythoncore</RootNamespace>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <PropertyGroup>
- <KillPython>true</KillPython>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <TargetName>$(PyDllName)</TargetName>
- </PropertyGroup>
- <PropertyGroup>
- <CustomBuildBeforeTargets>Link</CustomBuildBeforeTargets>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Include\abstract.h" />
- <ClInclude Include="..\Include\accu.h" />
- <ClInclude Include="..\Include\asdl.h" />
- <ClInclude Include="..\Include\ast.h" />
- <ClInclude Include="..\Include\bitset.h" />
- <ClInclude Include="..\Include\boolobject.h" />
- <ClInclude Include="..\Include\bytes_methods.h" />
- <ClInclude Include="..\Include\bytearrayobject.h" />
- <ClInclude Include="..\Include\bytesobject.h" />
- <ClInclude Include="..\Include\cellobject.h" />
- <ClInclude Include="..\Include\ceval.h" />
- <ClInclude Include="..\Include\classobject.h" />
- <ClInclude Include="..\Include\code.h" />
- <ClInclude Include="..\Include\codecs.h" />
- <ClInclude Include="..\Include\compile.h" />
- <ClInclude Include="..\Include\complexobject.h" />
- <ClInclude Include="..\Include\datetime.h" />
- <ClInclude Include="..\Include\descrobject.h" />
- <ClInclude Include="..\Include\dictobject.h" />
- <ClInclude Include="..\Include\dynamic_annotations.h" />
- <ClInclude Include="..\Include\enumobject.h" />
- <ClInclude Include="..\Include\errcode.h" />
- <ClInclude Include="..\Include\eval.h" />
- <ClInclude Include="..\Include\fileobject.h" />
- <ClInclude Include="..\Include\fileutils.h" />
- <ClInclude Include="..\Include\floatobject.h" />
- <ClInclude Include="..\Include\frameobject.h" />
- <ClInclude Include="..\Include\funcobject.h" />
- <ClInclude Include="..\Include\genobject.h" />
- <ClInclude Include="..\Include\graminit.h" />
- <ClInclude Include="..\Include\grammar.h" />
- <ClInclude Include="..\Include\import.h" />
- <ClInclude Include="..\Include\intrcheck.h" />
- <ClInclude Include="..\Include\iterobject.h" />
- <ClInclude Include="..\Include\listobject.h" />
- <ClInclude Include="..\Include\longintrepr.h" />
- <ClInclude Include="..\Include\longobject.h" />
- <ClInclude Include="..\Include\marshal.h" />
- <ClInclude Include="..\Include\memoryobject.h" />
- <ClInclude Include="..\Include\metagrammar.h" />
- <ClInclude Include="..\Include\methodobject.h" />
- <ClInclude Include="..\Include\modsupport.h" />
- <ClInclude Include="..\Include\moduleobject.h" />
- <ClInclude Include="..\Include\namespaceobject.h" />
- <ClInclude Include="..\Include\node.h" />
- <ClInclude Include="..\Include\object.h" />
- <ClInclude Include="..\Include\objimpl.h" />
- <ClInclude Include="..\Include\odictobject.h" />
- <ClInclude Include="..\Include\opcode.h" />
- <ClInclude Include="..\Include\osdefs.h" />
- <ClInclude Include="..\Include\osmodule.h" />
- <ClInclude Include="..\Include\parsetok.h" />
- <ClInclude Include="..\Include\patchlevel.h" />
- <ClInclude Include="..\Include\pgen.h" />
- <ClInclude Include="..\Include\pgenheaders.h" />
- <ClInclude Include="..\Include\pyhash.h" />
- <ClInclude Include="..\Include\py_curses.h" />
- <ClInclude Include="..\Include\pyarena.h" />
- <ClInclude Include="..\Include\pycapsule.h" />
- <ClInclude Include="..\Include\pyctype.h" />
- <ClInclude Include="..\Include\pydebug.h" />
- <ClInclude Include="..\Include\pyerrors.h" />
- <ClInclude Include="..\Include\pyexpat.h" />
- <ClInclude Include="..\Include\pyfpe.h" />
- <ClInclude Include="..\Include\pygetopt.h" />
- <ClInclude Include="..\Include\pylifecycle.h" />
- <ClInclude Include="..\Include\pymath.h" />
- <ClInclude Include="..\Include\pytime.h" />
- <ClInclude Include="..\Include\pymacro.h" />
- <ClInclude Include="..\Include\pymem.h" />
- <ClInclude Include="..\Include\pyport.h" />
- <ClInclude Include="..\Include\pystate.h" />
- <ClInclude Include="..\Include\pystrcmp.h" />
- <ClInclude Include="..\Include\pystrtod.h" />
- <ClInclude Include="..\Include\pystrhex.h" />
- <ClInclude Include="..\Include\dtoa.h" />
- <ClInclude Include="..\Include\Python-ast.h" />
- <ClInclude Include="..\Include\Python.h" />
- <ClInclude Include="..\Include\pythonrun.h" />
- <ClInclude Include="..\Include\pythread.h" />
- <ClInclude Include="..\Include\rangeobject.h" />
- <ClInclude Include="..\Include\setobject.h" />
- <ClInclude Include="..\Include\sliceobject.h" />
- <ClInclude Include="..\Include\structmember.h" />
- <ClInclude Include="..\Include\structseq.h" />
- <ClInclude Include="..\Include\symtable.h" />
- <ClInclude Include="..\Include\sysmodule.h" />
- <ClInclude Include="..\Include\token.h" />
- <ClInclude Include="..\Include\traceback.h" />
- <ClInclude Include="..\Include\tupleobject.h" />
- <ClInclude Include="..\Include\ucnhash.h" />
- <ClInclude Include="..\Include\unicodeobject.h" />
- <ClInclude Include="..\Include\weakrefobject.h" />
- <ClInclude Include="..\Modules\_math.h" />
- <ClInclude Include="..\Modules\hashtable.h" />
- <ClInclude Include="..\Modules\rotatingtree.h" />
- <ClInclude Include="..\Modules\sre.h" />
- <ClInclude Include="..\Modules\sre_constants.h" />
- <ClInclude Include="..\Modules\sre_lib.h" />
- <ClInclude Include="..\Modules\_io\_iomodule.h" />
- <ClInclude Include="..\Modules\zlib\crc32.h" />
- <ClInclude Include="..\Modules\zlib\deflate.h" />
- <ClInclude Include="..\Modules\zlib\inffast.h" />
- <ClInclude Include="..\Modules\zlib\inffixed.h" />
- <ClInclude Include="..\Modules\zlib\inflate.h" />
- <ClInclude Include="..\Modules\zlib\inftrees.h" />
- <ClInclude Include="..\Modules\zlib\trees.h" />
- <ClInclude Include="..\Modules\zlib\zconf.h" />
- <ClInclude Include="..\Modules\zlib\zconf.in.h" />
- <ClInclude Include="..\Modules\zlib\zlib.h" />
- <ClInclude Include="..\Modules\zlib\zutil.h" />
- <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h" />
- <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h" />
- <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h" />
- <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h" />
- <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h" />
- <ClInclude Include="..\Objects\stringlib\count.h" />
- <ClInclude Include="..\Objects\stringlib\fastsearch.h" />
- <ClInclude Include="..\Objects\stringlib\find.h" />
- <ClInclude Include="..\Objects\stringlib\partition.h" />
- <ClInclude Include="..\Objects\stringlib\replace.h" />
- <ClInclude Include="..\Objects\stringlib\split.h" />
- <ClInclude Include="..\Objects\unicodetype_db.h" />
- <ClInclude Include="..\Parser\parser.h" />
- <ClInclude Include="..\Parser\tokenizer.h" />
- <ClInclude Include="..\PC\errmap.h" />
- <ClInclude Include="..\PC\pyconfig.h" />
- <ClInclude Include="..\Python\ceval_gil.h" />
- <ClInclude Include="..\Python\condvar.h" />
- <ClInclude Include="..\Python\importdl.h" />
- <ClInclude Include="..\Python\thread_nt.h" />
- <ClInclude Include="..\Python\wordcode_helpers.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_bisectmodule.c" />
- <ClCompile Include="..\Modules\_blake2\blake2module.c" />
- <ClCompile Include="..\Modules\_blake2\blake2b_impl.c" />
- <ClCompile Include="..\Modules\_blake2\blake2s_impl.c" />
- <ClCompile Include="..\Modules\_codecsmodule.c" />
- <ClCompile Include="..\Modules\_collectionsmodule.c" />
- <ClCompile Include="..\Modules\_csv.c" />
- <ClCompile Include="..\Modules\_functoolsmodule.c" />
- <ClCompile Include="..\Modules\_heapqmodule.c" />
- <ClCompile Include="..\Modules\_json.c" />
- <ClCompile Include="..\Modules\_localemodule.c" />
- <ClCompile Include="..\Modules\_lsprof.c" />
- <ClCompile Include="..\Modules\_math.c" />
- <ClCompile Include="..\Modules\_pickle.c" />
- <ClCompile Include="..\Modules\_randommodule.c" />
- <ClCompile Include="..\Modules\_sha3\sha3module.c" />
- <ClCompile Include="..\Modules\_sre.c" />
- <ClCompile Include="..\Modules\_stat.c" />
- <ClCompile Include="..\Modules\_struct.c" />
- <ClCompile Include="..\Modules\_weakref.c" />
- <ClCompile Include="..\Modules\arraymodule.c" />
- <ClCompile Include="..\Modules\atexitmodule.c" />
- <ClCompile Include="..\Modules\audioop.c" />
- <ClCompile Include="..\Modules\binascii.c" />
- <ClCompile Include="..\Modules\cmathmodule.c" />
- <ClCompile Include="..\Modules\_datetimemodule.c" />
- <ClCompile Include="..\Modules\errnomodule.c" />
- <ClCompile Include="..\Modules\faulthandler.c" />
- <ClCompile Include="..\Modules\gcmodule.c" />
- <ClCompile Include="..\Modules\hashtable.c" />
- <ClCompile Include="..\Modules\itertoolsmodule.c" />
- <ClCompile Include="..\Modules\main.c" />
- <ClCompile Include="..\Modules\mathmodule.c" />
- <ClCompile Include="..\Modules\md5module.c" />
- <ClCompile Include="..\Modules\mmapmodule.c" />
- <ClCompile Include="..\Modules\_opcode.c" />
- <ClCompile Include="..\Modules\_operator.c" />
- <ClCompile Include="..\Modules\parsermodule.c" />
- <ClCompile Include="..\Modules\posixmodule.c" />
- <ClCompile Include="..\Modules\rotatingtree.c" />
- <ClCompile Include="..\Modules\sha1module.c" />
- <ClCompile Include="..\Modules\sha256module.c" />
- <ClCompile Include="..\Modules\sha512module.c" />
- <ClCompile Include="..\Modules\signalmodule.c" />
- <ClCompile Include="..\Modules\symtablemodule.c" />
- <ClCompile Include="..\Modules\_threadmodule.c" />
- <ClCompile Include="..\Modules\_tracemalloc.c" />
- <ClCompile Include="..\Modules\timemodule.c" />
- <ClCompile Include="..\Modules\xxsubtype.c" />
- <ClCompile Include="..\Modules\zipimport.c" />
- <ClCompile Include="..\Modules\zlibmodule.c" />
- <ClCompile Include="..\Modules\_io\fileio.c" />
- <ClCompile Include="..\Modules\_io\bytesio.c" />
- <ClCompile Include="..\Modules\_io\stringio.c" />
- <ClCompile Include="..\Modules\_io\bufferedio.c" />
- <ClCompile Include="..\Modules\_io\iobase.c" />
- <ClCompile Include="..\Modules\_io\textio.c" />
- <ClCompile Include="..\Modules\_io\winconsoleio.c" />
- <ClCompile Include="..\Modules\_io\_iomodule.c" />
- <ClCompile Include="..\Modules\zlib\adler32.c" />
- <ClCompile Include="..\Modules\zlib\compress.c" />
- <ClCompile Include="..\Modules\zlib\crc32.c" />
- <ClCompile Include="..\Modules\zlib\deflate.c" />
- <ClCompile Include="..\Modules\zlib\infback.c" />
- <ClCompile Include="..\Modules\zlib\inffast.c" />
- <ClCompile Include="..\Modules\zlib\inflate.c" />
- <ClCompile Include="..\Modules\zlib\inftrees.c" />
- <ClCompile Include="..\Modules\zlib\trees.c" />
- <ClCompile Include="..\Modules\zlib\uncompr.c" />
- <ClCompile Include="..\Modules\zlib\zutil.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c" />
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c" />
- <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c" />
- <ClCompile Include="..\Modules\_winapi.c" />
- <ClCompile Include="..\Objects\abstract.c" />
- <ClCompile Include="..\Objects\accu.c" />
- <ClCompile Include="..\Objects\boolobject.c" />
- <ClCompile Include="..\Objects\bytes_methods.c" />
- <ClCompile Include="..\Objects\bytearrayobject.c" />
- <ClCompile Include="..\Objects\bytesobject.c" />
- <ClCompile Include="..\Objects\capsule.c" />
- <ClCompile Include="..\Objects\cellobject.c" />
- <ClCompile Include="..\Objects\classobject.c" />
- <ClCompile Include="..\Objects\codeobject.c" />
- <ClCompile Include="..\Objects\complexobject.c" />
- <ClCompile Include="..\Objects\descrobject.c" />
- <ClCompile Include="..\Objects\dictobject.c" />
- <ClCompile Include="..\Objects\enumobject.c" />
- <ClCompile Include="..\Objects\exceptions.c" />
- <ClCompile Include="..\Objects\fileobject.c" />
- <ClCompile Include="..\Objects\floatobject.c" />
- <ClCompile Include="..\Objects\frameobject.c" />
- <ClCompile Include="..\Objects\funcobject.c" />
- <ClCompile Include="..\Objects\genobject.c" />
- <ClCompile Include="..\Objects\iterobject.c" />
- <ClCompile Include="..\Objects\listobject.c" />
- <ClCompile Include="..\Objects\longobject.c" />
- <ClCompile Include="..\Objects\memoryobject.c" />
- <ClCompile Include="..\Objects\methodobject.c" />
- <ClCompile Include="..\Objects\moduleobject.c" />
- <ClCompile Include="..\Objects\namespaceobject.c" />
- <ClCompile Include="..\Objects\object.c" />
- <ClCompile Include="..\Objects\obmalloc.c" />
- <ClCompile Include="..\Objects\odictobject.c" />
- <ClCompile Include="..\Objects\rangeobject.c" />
- <ClCompile Include="..\Objects\setobject.c" />
- <ClCompile Include="..\Objects\sliceobject.c" />
- <ClCompile Include="..\Objects\structseq.c" />
- <ClCompile Include="..\Objects\tupleobject.c" />
- <ClCompile Include="..\Objects\typeobject.c" />
- <ClCompile Include="..\Objects\unicodectype.c" />
- <ClCompile Include="..\Objects\unicodeobject.c" />
- <ClCompile Include="..\Objects\weakrefobject.c" />
- <ClCompile Include="..\Parser\acceler.c" />
- <ClCompile Include="..\Parser\bitset.c" />
- <ClCompile Include="..\Parser\firstsets.c" />
- <ClCompile Include="..\Parser\grammar.c" />
- <ClCompile Include="..\Parser\grammar1.c" />
- <ClCompile Include="..\Parser\listnode.c" />
- <ClCompile Include="..\Parser\metagrammar.c" />
- <ClCompile Include="..\Parser\myreadline.c" />
- <ClCompile Include="..\Parser\node.c" />
- <ClCompile Include="..\Parser\parser.c" />
- <ClCompile Include="..\Parser\parsetok.c" />
- <ClCompile Include="..\Parser\tokenizer.c" />
- <ClCompile Include="..\PC\invalid_parameter_handler.c" />
- <ClCompile Include="..\PC\winreg.c" />
- <ClCompile Include="..\PC\config.c" />
- <ClCompile Include="..\PC\getpathp.c" />
- <ClCompile Include="..\PC\msvcrtmodule.c" />
- <ClCompile Include="..\Python\pyhash.c" />
- <ClCompile Include="..\Python\random.c" />
- <ClCompile Include="..\Python\_warnings.c" />
- <ClCompile Include="..\Python\asdl.c" />
- <ClCompile Include="..\Python\ast.c" />
- <ClCompile Include="..\Python\bltinmodule.c" />
- <ClCompile Include="..\Python\ceval.c" />
- <ClCompile Include="..\Python\codecs.c" />
- <ClCompile Include="..\Python\compile.c" />
- <ClCompile Include="..\Python\dynamic_annotations.c" />
- <ClCompile Include="..\Python\dynload_win.c" />
- <ClCompile Include="..\Python\errors.c" />
- <ClCompile Include="..\Python\fileutils.c" />
- <ClCompile Include="..\Python\formatter_unicode.c" />
- <ClCompile Include="..\Python\frozen.c" />
- <ClCompile Include="..\Python\future.c" />
- <ClCompile Include="..\Python\getargs.c" />
- <ClCompile Include="..\Python\getcompiler.c" />
- <ClCompile Include="..\Python\getcopyright.c" />
- <ClCompile Include="..\Python\getopt.c" />
- <ClCompile Include="..\Python\getplatform.c" />
- <ClCompile Include="..\Python\getversion.c" />
- <ClCompile Include="..\Python\graminit.c" />
- <ClCompile Include="..\Python\import.c" />
- <ClCompile Include="..\Python\importdl.c" />
- <ClCompile Include="..\Python\marshal.c" />
- <ClCompile Include="..\Python\modsupport.c" />
- <ClCompile Include="..\Python\mysnprintf.c" />
- <ClCompile Include="..\Python\mystrtoul.c" />
- <ClCompile Include="..\Python\peephole.c" />
- <ClCompile Include="..\Python\pyarena.c" />
- <ClCompile Include="..\Python\pyctype.c" />
- <ClCompile Include="..\Python\pyfpe.c" />
- <ClCompile Include="..\Python\pylifecycle.c" />
- <ClCompile Include="..\Python\pymath.c" />
- <ClCompile Include="..\Python\pytime.c" />
- <ClCompile Include="..\Python\pystate.c" />
- <ClCompile Include="..\Python\pystrcmp.c" />
- <ClCompile Include="..\Python\pystrhex.c" />
- <ClCompile Include="..\Python\pystrtod.c" />
- <ClCompile Include="..\Python\dtoa.c" />
- <ClCompile Include="..\Python\Python-ast.c" />
- <ClCompile Include="..\Python\pythonrun.c" />
- <ClCompile Include="..\Python\structmember.c" />
- <ClCompile Include="..\Python\symtable.c" />
- <ClCompile Include="..\Python\sysmodule.c" />
- <ClCompile Include="..\Python\thread.c" />
- <ClCompile Include="..\Python\traceback.c" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\dl_nt.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
- <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
- <PropertyGroup>
- <GIT Condition="$(GIT) == ''">git</GIT>
- <_GIT>$(GIT)</_GIT>
- <_GIT Condition="$(GIT.Contains(` `))">"$(GIT)"</_GIT>
- </PropertyGroup>
- <Message Text="Getting build info from $(_GIT)" Importance="high" />
- <MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />
- <Exec Command="$(_GIT) name-rev --name-only HEAD > "$(IntDir)gitbranch.txt"" ContinueOnError="true" />
- <Exec Command="$(_GIT) rev-parse --short HEAD > "$(IntDir)gitversion.txt"" ContinueOnError="true" />
- <Exec Command="$(_GIT) describe --all --always --dirty > "$(IntDir)gittag.txt"" ContinueOnError="true" />
- <PropertyGroup>
- <GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>
- <GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>
- <GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>
- </PropertyGroup>
- <Message Text="Building $(GitTag):$(GitVersion) $(GitBranch)" Importance="high" />
- <ItemGroup>
- <ClCompile Include="..\Modules\getbuildinfo.c">
- <PreprocessorDefinitions>GITVERSION="$(GitVersion)";GITTAG="$(GitTag)";GITBRANCH="$(GitBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemGroup>
- </Target>
- <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140'">
- <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}</ProjectGuid>\r
+ <RootNamespace>pythoncore</RootNamespace>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <PropertyGroup>\r
+ <KillPython>true</KillPython>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <TargetName>$(PyDllName)</TargetName>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <CustomBuildBeforeTargets>Link</CustomBuildBeforeTargets>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>\r
+ <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1e000000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Include\abstract.h" />\r
+ <ClInclude Include="..\Include\accu.h" />\r
+ <ClInclude Include="..\Include\asdl.h" />\r
+ <ClInclude Include="..\Include\ast.h" />\r
+ <ClInclude Include="..\Include\bitset.h" />\r
+ <ClInclude Include="..\Include\boolobject.h" />\r
+ <ClInclude Include="..\Include\bytes_methods.h" />\r
+ <ClInclude Include="..\Include\bytearrayobject.h" />\r
+ <ClInclude Include="..\Include\bytesobject.h" />\r
+ <ClInclude Include="..\Include\cellobject.h" />\r
+ <ClInclude Include="..\Include\ceval.h" />\r
+ <ClInclude Include="..\Include\classobject.h" />\r
+ <ClInclude Include="..\Include\code.h" />\r
+ <ClInclude Include="..\Include\codecs.h" />\r
+ <ClInclude Include="..\Include\compile.h" />\r
+ <ClInclude Include="..\Include\complexobject.h" />\r
+ <ClInclude Include="..\Include\datetime.h" />\r
+ <ClInclude Include="..\Include\descrobject.h" />\r
+ <ClInclude Include="..\Include\dictobject.h" />\r
+ <ClInclude Include="..\Include\dynamic_annotations.h" />\r
+ <ClInclude Include="..\Include\enumobject.h" />\r
+ <ClInclude Include="..\Include\errcode.h" />\r
+ <ClInclude Include="..\Include\eval.h" />\r
+ <ClInclude Include="..\Include\fileobject.h" />\r
+ <ClInclude Include="..\Include\fileutils.h" />\r
+ <ClInclude Include="..\Include\floatobject.h" />\r
+ <ClInclude Include="..\Include\frameobject.h" />\r
+ <ClInclude Include="..\Include\funcobject.h" />\r
+ <ClInclude Include="..\Include\genobject.h" />\r
+ <ClInclude Include="..\Include\graminit.h" />\r
+ <ClInclude Include="..\Include\grammar.h" />\r
+ <ClInclude Include="..\Include\import.h" />\r
+ <ClInclude Include="..\Include\intrcheck.h" />\r
+ <ClInclude Include="..\Include\iterobject.h" />\r
+ <ClInclude Include="..\Include\listobject.h" />\r
+ <ClInclude Include="..\Include\longintrepr.h" />\r
+ <ClInclude Include="..\Include\longobject.h" />\r
+ <ClInclude Include="..\Include\marshal.h" />\r
+ <ClInclude Include="..\Include\memoryobject.h" />\r
+ <ClInclude Include="..\Include\metagrammar.h" />\r
+ <ClInclude Include="..\Include\methodobject.h" />\r
+ <ClInclude Include="..\Include\modsupport.h" />\r
+ <ClInclude Include="..\Include\moduleobject.h" />\r
+ <ClInclude Include="..\Include\namespaceobject.h" />\r
+ <ClInclude Include="..\Include\node.h" />\r
+ <ClInclude Include="..\Include\object.h" />\r
+ <ClInclude Include="..\Include\objimpl.h" />\r
+ <ClInclude Include="..\Include\odictobject.h" />\r
+ <ClInclude Include="..\Include\opcode.h" />\r
+ <ClInclude Include="..\Include\osdefs.h" />\r
+ <ClInclude Include="..\Include\osmodule.h" />\r
+ <ClInclude Include="..\Include\parsetok.h" />\r
+ <ClInclude Include="..\Include\patchlevel.h" />\r
+ <ClInclude Include="..\Include\pgen.h" />\r
+ <ClInclude Include="..\Include\pgenheaders.h" />\r
+ <ClInclude Include="..\Include\pyhash.h" />\r
+ <ClInclude Include="..\Include\py_curses.h" />\r
+ <ClInclude Include="..\Include\pyarena.h" />\r
+ <ClInclude Include="..\Include\pycapsule.h" />\r
+ <ClInclude Include="..\Include\pyctype.h" />\r
+ <ClInclude Include="..\Include\pydebug.h" />\r
+ <ClInclude Include="..\Include\pyerrors.h" />\r
+ <ClInclude Include="..\Include\pyexpat.h" />\r
+ <ClInclude Include="..\Include\pyfpe.h" />\r
+ <ClInclude Include="..\Include\pygetopt.h" />\r
+ <ClInclude Include="..\Include\pylifecycle.h" />\r
+ <ClInclude Include="..\Include\pymath.h" />\r
+ <ClInclude Include="..\Include\pytime.h" />\r
+ <ClInclude Include="..\Include\pymacro.h" />\r
+ <ClInclude Include="..\Include\pymem.h" />\r
+ <ClInclude Include="..\Include\pyport.h" />\r
+ <ClInclude Include="..\Include\pystate.h" />\r
+ <ClInclude Include="..\Include\pystrcmp.h" />\r
+ <ClInclude Include="..\Include\pystrtod.h" />\r
+ <ClInclude Include="..\Include\pystrhex.h" />\r
+ <ClInclude Include="..\Include\dtoa.h" />\r
+ <ClInclude Include="..\Include\Python-ast.h" />\r
+ <ClInclude Include="..\Include\Python.h" />\r
+ <ClInclude Include="..\Include\pythonrun.h" />\r
+ <ClInclude Include="..\Include\pythread.h" />\r
+ <ClInclude Include="..\Include\rangeobject.h" />\r
+ <ClInclude Include="..\Include\setobject.h" />\r
+ <ClInclude Include="..\Include\sliceobject.h" />\r
+ <ClInclude Include="..\Include\structmember.h" />\r
+ <ClInclude Include="..\Include\structseq.h" />\r
+ <ClInclude Include="..\Include\symtable.h" />\r
+ <ClInclude Include="..\Include\sysmodule.h" />\r
+ <ClInclude Include="..\Include\token.h" />\r
+ <ClInclude Include="..\Include\traceback.h" />\r
+ <ClInclude Include="..\Include\tupleobject.h" />\r
+ <ClInclude Include="..\Include\ucnhash.h" />\r
+ <ClInclude Include="..\Include\unicodeobject.h" />\r
+ <ClInclude Include="..\Include\weakrefobject.h" />\r
+ <ClInclude Include="..\Modules\_math.h" />\r
+ <ClInclude Include="..\Modules\hashtable.h" />\r
+ <ClInclude Include="..\Modules\rotatingtree.h" />\r
+ <ClInclude Include="..\Modules\sre.h" />\r
+ <ClInclude Include="..\Modules\sre_constants.h" />\r
+ <ClInclude Include="..\Modules\sre_lib.h" />\r
+ <ClInclude Include="..\Modules\_io\_iomodule.h" />\r
+ <ClInclude Include="..\Modules\zlib\crc32.h" />\r
+ <ClInclude Include="..\Modules\zlib\deflate.h" />\r
+ <ClInclude Include="..\Modules\zlib\inffast.h" />\r
+ <ClInclude Include="..\Modules\zlib\inffixed.h" />\r
+ <ClInclude Include="..\Modules\zlib\inflate.h" />\r
+ <ClInclude Include="..\Modules\zlib\inftrees.h" />\r
+ <ClInclude Include="..\Modules\zlib\trees.h" />\r
+ <ClInclude Include="..\Modules\zlib\zconf.h" />\r
+ <ClInclude Include="..\Modules\zlib\zconf.in.h" />\r
+ <ClInclude Include="..\Modules\zlib\zlib.h" />\r
+ <ClInclude Include="..\Modules\zlib\zutil.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h" />\r
+ <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h" />\r
+ <ClInclude Include="..\Objects\stringlib\count.h" />\r
+ <ClInclude Include="..\Objects\stringlib\fastsearch.h" />\r
+ <ClInclude Include="..\Objects\stringlib\find.h" />\r
+ <ClInclude Include="..\Objects\stringlib\partition.h" />\r
+ <ClInclude Include="..\Objects\stringlib\replace.h" />\r
+ <ClInclude Include="..\Objects\stringlib\split.h" />\r
+ <ClInclude Include="..\Objects\unicodetype_db.h" />\r
+ <ClInclude Include="..\Parser\parser.h" />\r
+ <ClInclude Include="..\Parser\tokenizer.h" />\r
+ <ClInclude Include="..\PC\errmap.h" />\r
+ <ClInclude Include="..\PC\pyconfig.h" />\r
+ <ClInclude Include="..\Python\ceval_gil.h" />\r
+ <ClInclude Include="..\Python\condvar.h" />\r
+ <ClInclude Include="..\Python\importdl.h" />\r
+ <ClInclude Include="..\Python\thread_nt.h" />\r
+ <ClInclude Include="..\Python\wordcode_helpers.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_bisectmodule.c" />\r
+ <ClCompile Include="..\Modules\_blake2\blake2module.c" />\r
+ <ClCompile Include="..\Modules\_blake2\blake2b_impl.c" />\r
+ <ClCompile Include="..\Modules\_blake2\blake2s_impl.c" />\r
+ <ClCompile Include="..\Modules\_codecsmodule.c" />\r
+ <ClCompile Include="..\Modules\_collectionsmodule.c" />\r
+ <ClCompile Include="..\Modules\_csv.c" />\r
+ <ClCompile Include="..\Modules\_functoolsmodule.c" />\r
+ <ClCompile Include="..\Modules\_heapqmodule.c" />\r
+ <ClCompile Include="..\Modules\_json.c" />\r
+ <ClCompile Include="..\Modules\_localemodule.c" />\r
+ <ClCompile Include="..\Modules\_lsprof.c" />\r
+ <ClCompile Include="..\Modules\_math.c" />\r
+ <ClCompile Include="..\Modules\_pickle.c" />\r
+ <ClCompile Include="..\Modules\_randommodule.c" />\r
+ <ClCompile Include="..\Modules\_sha3\sha3module.c" />\r
+ <ClCompile Include="..\Modules\_sre.c" />\r
+ <ClCompile Include="..\Modules\_stat.c" />\r
+ <ClCompile Include="..\Modules\_struct.c" />\r
+ <ClCompile Include="..\Modules\_weakref.c" />\r
+ <ClCompile Include="..\Modules\arraymodule.c" />\r
+ <ClCompile Include="..\Modules\atexitmodule.c" />\r
+ <ClCompile Include="..\Modules\audioop.c" />\r
+ <ClCompile Include="..\Modules\binascii.c" />\r
+ <ClCompile Include="..\Modules\cmathmodule.c" />\r
+ <ClCompile Include="..\Modules\_datetimemodule.c" />\r
+ <ClCompile Include="..\Modules\errnomodule.c" />\r
+ <ClCompile Include="..\Modules\faulthandler.c" />\r
+ <ClCompile Include="..\Modules\gcmodule.c" />\r
+ <ClCompile Include="..\Modules\hashtable.c" />\r
+ <ClCompile Include="..\Modules\itertoolsmodule.c" />\r
+ <ClCompile Include="..\Modules\main.c" />\r
+ <ClCompile Include="..\Modules\mathmodule.c" />\r
+ <ClCompile Include="..\Modules\md5module.c" />\r
+ <ClCompile Include="..\Modules\mmapmodule.c" />\r
+ <ClCompile Include="..\Modules\_opcode.c" />\r
+ <ClCompile Include="..\Modules\_operator.c" />\r
+ <ClCompile Include="..\Modules\parsermodule.c" />\r
+ <ClCompile Include="..\Modules\posixmodule.c" />\r
+ <ClCompile Include="..\Modules\rotatingtree.c" />\r
+ <ClCompile Include="..\Modules\sha1module.c" />\r
+ <ClCompile Include="..\Modules\sha256module.c" />\r
+ <ClCompile Include="..\Modules\sha512module.c" />\r
+ <ClCompile Include="..\Modules\signalmodule.c" />\r
+ <ClCompile Include="..\Modules\symtablemodule.c" />\r
+ <ClCompile Include="..\Modules\_threadmodule.c" />\r
+ <ClCompile Include="..\Modules\_tracemalloc.c" />\r
+ <ClCompile Include="..\Modules\timemodule.c" />\r
+ <ClCompile Include="..\Modules\xxsubtype.c" />\r
+ <ClCompile Include="..\Modules\zipimport.c" />\r
+ <ClCompile Include="..\Modules\zlibmodule.c" />\r
+ <ClCompile Include="..\Modules\_io\fileio.c" />\r
+ <ClCompile Include="..\Modules\_io\bytesio.c" />\r
+ <ClCompile Include="..\Modules\_io\stringio.c" />\r
+ <ClCompile Include="..\Modules\_io\bufferedio.c" />\r
+ <ClCompile Include="..\Modules\_io\iobase.c" />\r
+ <ClCompile Include="..\Modules\_io\textio.c" />\r
+ <ClCompile Include="..\Modules\_io\winconsoleio.c" />\r
+ <ClCompile Include="..\Modules\_io\_iomodule.c" />\r
+ <ClCompile Include="..\Modules\zlib\adler32.c" />\r
+ <ClCompile Include="..\Modules\zlib\compress.c" />\r
+ <ClCompile Include="..\Modules\zlib\crc32.c" />\r
+ <ClCompile Include="..\Modules\zlib\deflate.c" />\r
+ <ClCompile Include="..\Modules\zlib\infback.c" />\r
+ <ClCompile Include="..\Modules\zlib\inffast.c" />\r
+ <ClCompile Include="..\Modules\zlib\inflate.c" />\r
+ <ClCompile Include="..\Modules\zlib\inftrees.c" />\r
+ <ClCompile Include="..\Modules\zlib\trees.c" />\r
+ <ClCompile Include="..\Modules\zlib\uncompr.c" />\r
+ <ClCompile Include="..\Modules\zlib\zutil.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c" />\r
+ <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c" />\r
+ <ClCompile Include="..\Modules\_winapi.c" />\r
+ <ClCompile Include="..\Objects\abstract.c" />\r
+ <ClCompile Include="..\Objects\accu.c" />\r
+ <ClCompile Include="..\Objects\boolobject.c" />\r
+ <ClCompile Include="..\Objects\bytes_methods.c" />\r
+ <ClCompile Include="..\Objects\bytearrayobject.c" />\r
+ <ClCompile Include="..\Objects\bytesobject.c" />\r
+ <ClCompile Include="..\Objects\capsule.c" />\r
+ <ClCompile Include="..\Objects\cellobject.c" />\r
+ <ClCompile Include="..\Objects\classobject.c" />\r
+ <ClCompile Include="..\Objects\codeobject.c" />\r
+ <ClCompile Include="..\Objects\complexobject.c" />\r
+ <ClCompile Include="..\Objects\descrobject.c" />\r
+ <ClCompile Include="..\Objects\dictobject.c" />\r
+ <ClCompile Include="..\Objects\enumobject.c" />\r
+ <ClCompile Include="..\Objects\exceptions.c" />\r
+ <ClCompile Include="..\Objects\fileobject.c" />\r
+ <ClCompile Include="..\Objects\floatobject.c" />\r
+ <ClCompile Include="..\Objects\frameobject.c" />\r
+ <ClCompile Include="..\Objects\funcobject.c" />\r
+ <ClCompile Include="..\Objects\genobject.c" />\r
+ <ClCompile Include="..\Objects\iterobject.c" />\r
+ <ClCompile Include="..\Objects\listobject.c" />\r
+ <ClCompile Include="..\Objects\longobject.c" />\r
+ <ClCompile Include="..\Objects\memoryobject.c" />\r
+ <ClCompile Include="..\Objects\methodobject.c" />\r
+ <ClCompile Include="..\Objects\moduleobject.c" />\r
+ <ClCompile Include="..\Objects\namespaceobject.c" />\r
+ <ClCompile Include="..\Objects\object.c" />\r
+ <ClCompile Include="..\Objects\obmalloc.c" />\r
+ <ClCompile Include="..\Objects\odictobject.c" />\r
+ <ClCompile Include="..\Objects\rangeobject.c" />\r
+ <ClCompile Include="..\Objects\setobject.c" />\r
+ <ClCompile Include="..\Objects\sliceobject.c" />\r
+ <ClCompile Include="..\Objects\structseq.c" />\r
+ <ClCompile Include="..\Objects\tupleobject.c" />\r
+ <ClCompile Include="..\Objects\typeobject.c" />\r
+ <ClCompile Include="..\Objects\unicodectype.c" />\r
+ <ClCompile Include="..\Objects\unicodeobject.c" />\r
+ <ClCompile Include="..\Objects\weakrefobject.c" />\r
+ <ClCompile Include="..\Parser\acceler.c" />\r
+ <ClCompile Include="..\Parser\bitset.c" />\r
+ <ClCompile Include="..\Parser\firstsets.c" />\r
+ <ClCompile Include="..\Parser\grammar.c" />\r
+ <ClCompile Include="..\Parser\grammar1.c" />\r
+ <ClCompile Include="..\Parser\listnode.c" />\r
+ <ClCompile Include="..\Parser\metagrammar.c" />\r
+ <ClCompile Include="..\Parser\myreadline.c" />\r
+ <ClCompile Include="..\Parser\node.c" />\r
+ <ClCompile Include="..\Parser\parser.c" />\r
+ <ClCompile Include="..\Parser\parsetok.c" />\r
+ <ClCompile Include="..\Parser\tokenizer.c" />\r
+ <ClCompile Include="..\PC\invalid_parameter_handler.c" />\r
+ <ClCompile Include="..\PC\winreg.c" />\r
+ <ClCompile Include="..\PC\config.c" />\r
+ <ClCompile Include="..\PC\getpathp.c" />\r
+ <ClCompile Include="..\PC\msvcrtmodule.c" />\r
+ <ClCompile Include="..\Python\pyhash.c" />\r
+ <ClCompile Include="..\Python\random.c" />\r
+ <ClCompile Include="..\Python\_warnings.c" />\r
+ <ClCompile Include="..\Python\asdl.c" />\r
+ <ClCompile Include="..\Python\ast.c" />\r
+ <ClCompile Include="..\Python\bltinmodule.c" />\r
+ <ClCompile Include="..\Python\ceval.c" />\r
+ <ClCompile Include="..\Python\codecs.c" />\r
+ <ClCompile Include="..\Python\compile.c" />\r
+ <ClCompile Include="..\Python\dynamic_annotations.c" />\r
+ <ClCompile Include="..\Python\dynload_win.c" />\r
+ <ClCompile Include="..\Python\errors.c" />\r
+ <ClCompile Include="..\Python\fileutils.c" />\r
+ <ClCompile Include="..\Python\formatter_unicode.c" />\r
+ <ClCompile Include="..\Python\frozen.c" />\r
+ <ClCompile Include="..\Python\future.c" />\r
+ <ClCompile Include="..\Python\getargs.c" />\r
+ <ClCompile Include="..\Python\getcompiler.c" />\r
+ <ClCompile Include="..\Python\getcopyright.c" />\r
+ <ClCompile Include="..\Python\getopt.c" />\r
+ <ClCompile Include="..\Python\getplatform.c" />\r
+ <ClCompile Include="..\Python\getversion.c" />\r
+ <ClCompile Include="..\Python\graminit.c" />\r
+ <ClCompile Include="..\Python\import.c" />\r
+ <ClCompile Include="..\Python\importdl.c" />\r
+ <ClCompile Include="..\Python\marshal.c" />\r
+ <ClCompile Include="..\Python\modsupport.c" />\r
+ <ClCompile Include="..\Python\mysnprintf.c" />\r
+ <ClCompile Include="..\Python\mystrtoul.c" />\r
+ <ClCompile Include="..\Python\peephole.c" />\r
+ <ClCompile Include="..\Python\pyarena.c" />\r
+ <ClCompile Include="..\Python\pyctype.c" />\r
+ <ClCompile Include="..\Python\pyfpe.c" />\r
+ <ClCompile Include="..\Python\pylifecycle.c" />\r
+ <ClCompile Include="..\Python\pymath.c" />\r
+ <ClCompile Include="..\Python\pytime.c" />\r
+ <ClCompile Include="..\Python\pystate.c" />\r
+ <ClCompile Include="..\Python\pystrcmp.c" />\r
+ <ClCompile Include="..\Python\pystrhex.c" />\r
+ <ClCompile Include="..\Python\pystrtod.c" />\r
+ <ClCompile Include="..\Python\dtoa.c" />\r
+ <ClCompile Include="..\Python\Python-ast.c" />\r
+ <ClCompile Include="..\Python\pythonrun.c" />\r
+ <ClCompile Include="..\Python\structmember.c" />\r
+ <ClCompile Include="..\Python\symtable.c" />\r
+ <ClCompile Include="..\Python\sysmodule.c" />\r
+ <ClCompile Include="..\Python\thread.c" />\r
+ <ClCompile Include="..\Python\traceback.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\dl_nt.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+ <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">\r
+ <PropertyGroup>\r
+ <GIT Condition="$(GIT) == ''">git</GIT>\r
+ <_GIT>$(GIT)</_GIT>\r
+ <_GIT Condition="$(GIT.Contains(` `))">"$(GIT)"</_GIT>\r
+ </PropertyGroup>\r
+ <Message Text="Getting build info from $(_GIT)" Importance="high" />\r
+ <MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />\r
+ <Exec Command="$(_GIT) name-rev --name-only HEAD > "$(IntDir)gitbranch.txt"" ContinueOnError="true" />\r
+ <Exec Command="$(_GIT) rev-parse --short HEAD > "$(IntDir)gitversion.txt"" ContinueOnError="true" />\r
+ <Exec Command="$(_GIT) describe --all --always --dirty > "$(IntDir)gittag.txt"" ContinueOnError="true" />\r
+ <PropertyGroup>\r
+ <GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>\r
+ <GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>\r
+ <GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>\r
+ </PropertyGroup>\r
+ <Message Text="Building $(GitTag):$(GitVersion) $(GitBranch)" Importance="high" />\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\getbuildinfo.c">\r
+ <PreprocessorDefinitions>GITVERSION="$(GitVersion)";GITTAG="$(GitTag)";GITBRANCH="$(GitBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ </Target>\r
+ <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140'">\r
+ <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Include">
- <UniqueIdentifier>{086b0afb-270c-4603-a02a-63d46f0b2b92}</UniqueIdentifier>
- </Filter>
- <Filter Include="Modules">
- <UniqueIdentifier>{8e81609f-13ca-4eae-9fdb-f8af20c710c7}</UniqueIdentifier>
- </Filter>
- <Filter Include="Modules\_io">
- <UniqueIdentifier>{8787c5bb-bab6-4586-a42e-4a27c7b3ffb6}</UniqueIdentifier>
- </Filter>
- <Filter Include="Modules\zlib">
- <UniqueIdentifier>{5d6d2d6c-9e61-4a1d-b0b2-5cc2f446d69e}</UniqueIdentifier>
- </Filter>
- <Filter Include="Modules\cjkcodecs">
- <UniqueIdentifier>{9f12c4b1-322e-431e-abf1-e02550f50032}</UniqueIdentifier>
- </Filter>
- <Filter Include="Objects">
- <UniqueIdentifier>{ab29a558-143d-4fe7-a039-b431fb429856}</UniqueIdentifier>
- </Filter>
- <Filter Include="Parser">
- <UniqueIdentifier>{97349fee-0abf-48b0-a8f5-771bf39b8aee}</UniqueIdentifier>
- </Filter>
- <Filter Include="PC">
- <UniqueIdentifier>{ea21fc98-de89-4746-a979-c5616964329a}</UniqueIdentifier>
- </Filter>
- <Filter Include="Python">
- <UniqueIdentifier>{f2696406-14bc-48bd-90c5-e93ab82a21ac}</UniqueIdentifier>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{c3e03a5c-56c7-45fd-8543-e5d2326b907d}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Include\abstract.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\accu.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\asdl.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\ast.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\bitset.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\boolobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\bytes_methods.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\bytearrayobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\bytesobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\cellobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\ceval.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\classobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\code.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\codecs.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\compile.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\complexobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\datetime.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\descrobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\dictobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\dynamic_annotations.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\enumobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\errcode.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\eval.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\fileobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\fileutils.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\floatobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\frameobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\funcobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\genobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\graminit.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\grammar.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\import.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\intrcheck.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\iterobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\listobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\longintrepr.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\longobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\marshal.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\memoryobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\metagrammar.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\methodobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\modsupport.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\moduleobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\node.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\object.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\objimpl.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\opcode.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\osdefs.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\osmodule.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\parsetok.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\patchlevel.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pgen.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pgenheaders.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\py_curses.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyarena.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pycapsule.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyctype.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pydebug.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyerrors.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyexpat.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyfpe.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pygetopt.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pylifecycle.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pymath.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pytime.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pymacro.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pymem.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyport.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pystate.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pystrcmp.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pystrtod.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pystrhex.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\dtoa.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\Python-ast.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\Python.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pythonrun.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pythread.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\rangeobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\setobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\sliceobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\structmember.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\structseq.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\symtable.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\sysmodule.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\token.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\traceback.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\tupleobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\ucnhash.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\unicodeobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\weakrefobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_math.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\rotatingtree.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\sre.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\sre_constants.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\sre_lib.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\_io\_iomodule.h">
- <Filter>Modules\_io</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\crc32.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\deflate.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\inffast.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\inffixed.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\inflate.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\inftrees.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\trees.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\zconf.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\zconf.in.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\zlib.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\zlib\zutil.h">
- <Filter>Modules\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h">
- <Filter>Modules\cjkcodecs</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\count.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\fastsearch.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\find.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\partition.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\replace.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\stringlib\split.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Objects\unicodetype_db.h">
- <Filter>Objects</Filter>
- </ClInclude>
- <ClInclude Include="..\Parser\parser.h">
- <Filter>Parser</Filter>
- </ClInclude>
- <ClInclude Include="..\Parser\tokenizer.h">
- <Filter>Parser</Filter>
- </ClInclude>
- <ClInclude Include="..\PC\errmap.h">
- <Filter>PC</Filter>
- </ClInclude>
- <ClInclude Include="..\PC\pyconfig.h">
- <Filter>PC</Filter>
- </ClInclude>
- <ClInclude Include="..\Python\importdl.h">
- <Filter>Python</Filter>
- </ClInclude>
- <ClInclude Include="..\Python\thread_nt.h">
- <Filter>Python</Filter>
- </ClInclude>
- <ClInclude Include="..\Python\wordcode_helpers.h">
- <Filter>Python</Filter>
- </ClInclude>
- <ClInclude Include="..\Python\condvar.h">
- <Filter>Python</Filter>
- </ClInclude>
- <ClInclude Include="..\Python\ceval_gil.h">
- <Filter>Python</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\pyhash.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\namespaceobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\hashtable.h">
- <Filter>Modules</Filter>
- </ClInclude>
- <ClInclude Include="..\Include\odictobject.h">
- <Filter>Include</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\_asynciomodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_bisectmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_blake2\blake2module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_blake2\blake2b_impl.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_blake2\blake2s_impl.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_codecsmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_collectionsmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_csv.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_functoolsmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_heapqmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_json.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_localemodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_lsprof.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_math.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_pickle.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_randommodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sha3\sha3module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_sre.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_struct.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_weakref.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\arraymodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\atexitmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\audioop.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\binascii.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cmathmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_datetimemodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\errnomodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\faulthandler.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\gcmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\itertoolsmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\main.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\mathmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\md5module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\mmapmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_operator.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\parsermodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\posixmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\rotatingtree.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\sha1module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\sha256module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\sha512module.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\signalmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\symtablemodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_threadmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\timemodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\xxsubtype.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zipimport.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlibmodule.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\fileio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\bytesio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\stringio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\bufferedio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\iobase.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\textio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\winconsoleio.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_io\_iomodule.c">
- <Filter>Modules\_io</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\adler32.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\compress.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\crc32.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\deflate.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\infback.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inffast.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inflate.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\inftrees.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\trees.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\uncompr.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\zlib\zutil.c">
- <Filter>Modules\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c">
- <Filter>Modules\cjkcodecs</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\abstract.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\accu.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\boolobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\bytes_methods.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\bytearrayobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\bytesobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\capsule.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\cellobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\classobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\codeobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\complexobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\descrobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\dictobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\enumobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\exceptions.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\fileobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\floatobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\frameobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\funcobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\genobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\iterobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\listobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\longobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\memoryobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\methodobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\moduleobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\object.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\obmalloc.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\rangeobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\setobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\sliceobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\structseq.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\tupleobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\typeobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\unicodectype.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\unicodeobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\weakrefobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\acceler.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\bitset.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\firstsets.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\grammar.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\grammar1.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\listnode.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\metagrammar.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\myreadline.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\node.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\parser.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\parsetok.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\Parser\tokenizer.c">
- <Filter>Parser</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\winreg.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\config.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\dl_nt.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\getpathp.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\msvcrtmodule.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\_warnings.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\asdl.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\ast.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\bltinmodule.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\ceval.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\codecs.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\compile.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\dynamic_annotations.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\dynload_win.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\errors.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\fileutils.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\formatter_unicode.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\frozen.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\future.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getargs.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getcompiler.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getcopyright.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getopt.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getplatform.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\getversion.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\graminit.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\import.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\importdl.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\marshal.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\modsupport.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\mysnprintf.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\mystrtoul.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\peephole.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pyarena.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pyctype.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pyfpe.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pylifecycle.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pymath.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pytime.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pystate.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pystrcmp.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pystrhex.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pystrtod.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\dtoa.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\Python-ast.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pythonrun.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\structmember.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\symtable.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\sysmodule.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\thread.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\traceback.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\random.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_winapi.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_stat.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Python\pyhash.c">
- <Filter>Python</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\namespaceobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_opcode.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\_tracemalloc.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\hashtable.c">
- <Filter>Modules</Filter>
- </ClCompile>
- <ClCompile Include="..\PC\invalid_parameter_handler.c">
- <Filter>PC</Filter>
- </ClCompile>
- <ClCompile Include="..\Objects\odictobject.c">
- <Filter>Objects</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Include">\r
+ <UniqueIdentifier>{086b0afb-270c-4603-a02a-63d46f0b2b92}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Modules">\r
+ <UniqueIdentifier>{8e81609f-13ca-4eae-9fdb-f8af20c710c7}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Modules\_io">\r
+ <UniqueIdentifier>{8787c5bb-bab6-4586-a42e-4a27c7b3ffb6}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Modules\zlib">\r
+ <UniqueIdentifier>{5d6d2d6c-9e61-4a1d-b0b2-5cc2f446d69e}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Modules\cjkcodecs">\r
+ <UniqueIdentifier>{9f12c4b1-322e-431e-abf1-e02550f50032}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Objects">\r
+ <UniqueIdentifier>{ab29a558-143d-4fe7-a039-b431fb429856}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Parser">\r
+ <UniqueIdentifier>{97349fee-0abf-48b0-a8f5-771bf39b8aee}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="PC">\r
+ <UniqueIdentifier>{ea21fc98-de89-4746-a979-c5616964329a}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Python">\r
+ <UniqueIdentifier>{f2696406-14bc-48bd-90c5-e93ab82a21ac}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{c3e03a5c-56c7-45fd-8543-e5d2326b907d}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Include\abstract.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\accu.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\asdl.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\ast.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\bitset.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\boolobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\bytes_methods.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\bytearrayobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\bytesobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\cellobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\ceval.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\classobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\code.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\codecs.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\compile.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\complexobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\datetime.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\descrobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\dictobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\dynamic_annotations.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\enumobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\errcode.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\eval.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\fileobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\fileutils.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\floatobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\frameobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\funcobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\genobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\graminit.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\grammar.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\import.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\intrcheck.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\iterobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\listobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\longintrepr.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\longobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\marshal.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\memoryobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\metagrammar.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\methodobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\modsupport.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\moduleobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\node.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\object.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\objimpl.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\opcode.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\osdefs.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\osmodule.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\parsetok.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\patchlevel.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pgen.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pgenheaders.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\py_curses.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyarena.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pycapsule.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyctype.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pydebug.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyerrors.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyexpat.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyfpe.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pygetopt.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pylifecycle.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pymath.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pytime.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pymacro.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pymem.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyport.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pystate.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pystrcmp.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pystrtod.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pystrhex.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\dtoa.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\Python-ast.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\Python.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pythonrun.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pythread.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\rangeobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\setobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\sliceobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\structmember.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\structseq.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\symtable.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\sysmodule.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\token.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\traceback.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\tupleobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\ucnhash.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\unicodeobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\weakrefobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_math.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\rotatingtree.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\sre.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\sre_constants.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\sre_lib.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\_io\_iomodule.h">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\crc32.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\deflate.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\inffast.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\inffixed.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\inflate.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\inftrees.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\trees.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\zconf.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\zconf.in.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\zlib.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\zlib\zutil.h">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\count.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\fastsearch.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\find.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\partition.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\replace.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\stringlib\split.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Objects\unicodetype_db.h">\r
+ <Filter>Objects</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Parser\parser.h">\r
+ <Filter>Parser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Parser\tokenizer.h">\r
+ <Filter>Parser</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\PC\errmap.h">\r
+ <Filter>PC</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\PC\pyconfig.h">\r
+ <Filter>PC</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Python\importdl.h">\r
+ <Filter>Python</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Python\thread_nt.h">\r
+ <Filter>Python</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Python\wordcode_helpers.h">\r
+ <Filter>Python</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Python\condvar.h">\r
+ <Filter>Python</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Python\ceval_gil.h">\r
+ <Filter>Python</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\pyhash.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\namespaceobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\hashtable.h">\r
+ <Filter>Modules</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Include\odictobject.h">\r
+ <Filter>Include</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\_asynciomodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_bisectmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_blake2\blake2module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_blake2\blake2b_impl.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_blake2\blake2s_impl.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_codecsmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_collectionsmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_csv.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_functoolsmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_heapqmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_json.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_localemodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_lsprof.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_math.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_pickle.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_randommodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sha3\sha3module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_sre.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_struct.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_weakref.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\arraymodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\atexitmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\audioop.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\binascii.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cmathmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_datetimemodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\errnomodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\faulthandler.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\gcmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\itertoolsmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\main.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\mathmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\md5module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\mmapmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_operator.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\parsermodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\posixmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\rotatingtree.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\sha1module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\sha256module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\sha512module.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\signalmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\symtablemodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_threadmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\timemodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\xxsubtype.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zipimport.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlibmodule.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\fileio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\bytesio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\stringio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\bufferedio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\iobase.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\textio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\winconsoleio.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_io\_iomodule.c">\r
+ <Filter>Modules\_io</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\adler32.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\compress.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\crc32.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\deflate.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\infback.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inffast.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inflate.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\inftrees.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\trees.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\uncompr.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\zlib\zutil.c">\r
+ <Filter>Modules\zlib</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c">\r
+ <Filter>Modules\cjkcodecs</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\abstract.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\accu.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\boolobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\bytes_methods.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\bytearrayobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\bytesobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\capsule.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\cellobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\classobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\codeobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\complexobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\descrobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\dictobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\enumobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\exceptions.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\fileobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\floatobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\frameobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\funcobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\genobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\iterobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\listobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\longobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\memoryobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\methodobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\moduleobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\object.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\obmalloc.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\rangeobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\setobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\sliceobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\structseq.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\tupleobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\typeobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\unicodectype.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\unicodeobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\weakrefobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\acceler.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\bitset.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\firstsets.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\grammar.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\grammar1.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\listnode.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\metagrammar.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\myreadline.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\node.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\parser.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\parsetok.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Parser\tokenizer.c">\r
+ <Filter>Parser</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\winreg.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\config.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\dl_nt.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\getpathp.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\msvcrtmodule.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\_warnings.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\asdl.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\ast.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\bltinmodule.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\ceval.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\codecs.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\compile.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\dynamic_annotations.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\dynload_win.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\errors.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\fileutils.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\formatter_unicode.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\frozen.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\future.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getargs.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getcompiler.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getcopyright.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getopt.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getplatform.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\getversion.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\graminit.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\import.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\importdl.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\marshal.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\modsupport.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\mysnprintf.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\mystrtoul.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\peephole.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pyarena.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pyctype.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pyfpe.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pylifecycle.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pymath.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pytime.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pystate.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pystrcmp.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pystrhex.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pystrtod.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\dtoa.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\Python-ast.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pythonrun.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\structmember.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\symtable.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\sysmodule.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\thread.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\traceback.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\random.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_winapi.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_stat.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Python\pyhash.c">\r
+ <Filter>Python</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\namespaceobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_opcode.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\_tracemalloc.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Modules\hashtable.c">\r
+ <Filter>Modules</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\PC\invalid_parameter_handler.c">\r
+ <Filter>PC</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\Objects\odictobject.c">\r
+ <Filter>Objects</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F4229CC3-873C-49AE-9729-DD308ED4CD4A}</ProjectGuid>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pythonw_exe.rc" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\WinMain.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{F4229CC3-873C-49AE-9729-DD308ED4CD4A}</ProjectGuid>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <StackReserveSize>2000000</StackReserveSize>\r
+ <BaseAddress>0x1d000000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pythonw_exe.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\WinMain.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{0434cf11-a311-4a92-8a6c-4164aa79a7f2}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{e1d8ea6b-c65d-42f4-9eed-6010846ed378}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_exe.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\WinMain.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{0434cf11-a311-4a92-8a6c-4164aa79a7f2}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{e1d8ea6b-c65d-42f4-9eed-6010846ed378}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_exe.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\WinMain.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}</ProjectGuid>
- <RootNamespace>pywlauncher</RootNamespace>
- <TargetName>pyw</TargetName>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <PropertyGroup>
- <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Windows</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\launcher.c" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\launcher.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pylauncher.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}</ProjectGuid>\r
+ <RootNamespace>pywlauncher</RootNamespace>\r
+ <TargetName>pyw</TargetName>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <PropertyGroup>\r
+ <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <SubSystem>Windows</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\launcher.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\launcher.ico" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pylauncher.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\launcher.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\launcher.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\pylauncher.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="Resource Files">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\launcher.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="..\PC\launcher.ico">\r
+ <Filter>Resource Files</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\pylauncher.rc">\r
+ <Filter>Resource Files</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-----------------\r
\r
1. Install Microsoft Visual Studio 2015, any edition.\r
-2. Install Subversion, and make sure 'svn.exe' is on your PATH.\r
-3. Run "build.bat -e" to build Python in 32-bit Release configuration.\r
-4. (Optional, but recommended) Run the test suite with "rt.bat -q".\r
+1a. Optionally install Python 3.6 or later. If not installed,\r
+ get_externals.bat (build.bat -e) will download and use Python via\r
+ NuGet.\r
+2. Run "build.bat -e" to build Python in 32-bit Release configuration.\r
+3. (Optional, but recommended) Run the test suite with "rt.bat -q".\r
\r
\r
Building Python using Microsoft Visual C++\r
Homepage:\r
http://www.bzip.org/\r
_lzma\r
- Python wrapper for the liblzma compression library, using pre-built\r
- binaries of XZ Utils version 5.0.5\r
+ Python wrapper for version 5.2.2 of the liblzma compression library\r
Homepage:\r
http://tukaani.org/xz/\r
_ssl\r
can be built. However, a simple script is provided to make this as\r
painless as possible, called "get_externals.bat" and located in this\r
directory. This script extracts all the external sub-projects from\r
- http://svn.python.org/projects/external\r
-via Subversion (so you'll need svn.exe on your PATH) and places them\r
-in ..\externals (relative to this directory).\r
+ https://github.com/python/cpython-source-deps\r
+and\r
+ https://github.com/python/cpython-bin-deps\r
+via a Python script called "get_external.py", located in this directory.\r
+If Python 3.6 or later is not available via the "py.exe" launcher, the\r
+path or command to use for Python can be provided in the PYTHON_FOR_BUILD\r
+environment variable, or get_externals.bat will download the latest\r
+version of NuGet and use it to download the latest "pythonx86" package\r
+for use with get_external.py. Everything downloaded by these scripts is\r
+stored in ..\externals (relative to this directory).\r
\r
It is also possible to download sources from each project's homepage,\r
though you may have to change folder names or pass the names to MSBuild\r
-# Remove all the .pyc and .pyo files under ../Lib.
+# Remove all the .pyc files under ../Lib.
def deltree(root):
import os
from os.path import join
- npyc = npyo = 0
+ npyc = 0
for root, dirs, files in os.walk(root):
for name in files:
- delete = False
- if name.endswith('.pyc'):
- delete = True
+ # to be thorough
+ if name.endswith(('.pyc', '.pyo')):
npyc += 1
- elif name.endswith('.pyo'):
- delete = True
- npyo += 1
-
- if delete:
os.remove(join(root, name))
- return npyc, npyo
+ return npyc
-npyc, npyo = deltree("../Lib")
-print(npyc, ".pyc deleted,", npyo, ".pyo deleted")
+npyc = deltree("../Lib")
+print(npyc, ".pyc deleted")
rem -d Run Debug build (python_d.exe). Else release build.\r
rem -O Run python.exe or python_d.exe (see -d) with -O.\r
rem -q "quick" -- normally the tests are run twice, the first time\r
-rem after deleting all the .py[co] files reachable from Lib/.\r
-rem -q runs the tests just once, and without deleting .py[co] files.\r
+rem after deleting all the .pyc files reachable from Lib/.\r
+rem -q runs the tests just once, and without deleting .pyc files.\r
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)\r
rem from the 'amd64' dir instead of the 32-bit build in this dir.\r
rem All leading instances of these switches are shifted off, and\r
set cmd="%exe%" %dashO% -Wd -E -bb -m test %regrtestargs%\r
if defined qmode goto Qmode\r
\r
-echo Deleting .pyc/.pyo files ...\r
+echo Deleting .pyc files ...\r
"%exe%" "%pcbuild%rmpyc.py"\r
\r
echo Cleaning _pth files ...\r
%cmd%\r
@echo off\r
\r
-echo About to run again without deleting .pyc/.pyo first:\r
+echo About to run again without deleting .pyc first:\r
pause\r
\r
:Qmode\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{18CAE28C-B454-46C1-87A0-493D91D97F03}</ProjectGuid>
- <RootNamespace>select</RootNamespace>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\selectmodule.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{18CAE28C-B454-46C1-87A0-493D91D97F03}</ProjectGuid>\r
+ <RootNamespace>select</RootNamespace>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1D110000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\selectmodule.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{98346077-900c-4c7a-852f-a23470e37b40}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\selectmodule.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{98346077-900c-4c7a-852f-a23470e37b40}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\selectmodule.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{A1A295E5-463C-437F-81CA-1F32367685DA}</ProjectGuid>
- <RootNamespace>sqlite3</RootNamespace>
- <TargetExt>.pyd</TargetExt>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups)</_SqliteVersion>
- <SqliteVersion>$(_SqliteVersion.Split(`;`)[1])</SqliteVersion>
- <SqliteMajorVersion>$(_SqliteVersion.Split(`;`)[2])</SqliteMajorVersion>
- <SqliteMinorVersion>$(_SqliteVersion.Split(`;`)[3])</SqliteMinorVersion>
- <SqliteMicroVersion>$(_SqliteVersion.Split(`;`)[4])</SqliteMicroVersion>
- <SqlitePatchVersion>$(_SqliteVersion.Split(`;`)[5])</SqlitePatchVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>SQLITE_ENABLE_FTS4;SQLITE_ENABLE_FTS5;SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level1</WarningLevel>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="$(sqlite3Dir)\sqlite3.h" />
- <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="$(sqlite3Dir)\sqlite3.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\sqlite3.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{A1A295E5-463C-437F-81CA-1F32367685DA}</ProjectGuid>\r
+ <RootNamespace>sqlite3</RootNamespace>\r
+ <TargetExt>.pyd</TargetExt>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups)</_SqliteVersion>\r
+ <SqliteVersion>$(_SqliteVersion.Split(`;`)[1])</SqliteVersion>\r
+ <SqliteMajorVersion>$(_SqliteVersion.Split(`;`)[2])</SqliteMajorVersion>\r
+ <SqliteMinorVersion>$(_SqliteVersion.Split(`;`)[3])</SqliteMinorVersion>\r
+ <SqliteMicroVersion>$(_SqliteVersion.Split(`;`)[4])</SqliteMicroVersion>\r
+ <SqlitePatchVersion>$(_SqliteVersion.Split(`;`)[5])</SqlitePatchVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>SQLITE_ENABLE_FTS4;SQLITE_ENABLE_FTS5;SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <WarningLevel>Level1</WarningLevel>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="$(sqlite3Dir)\sqlite3.h" />\r
+ <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="$(sqlite3Dir)\sqlite3.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\sqlite3.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ce5b649d-a6f7-4459-9425-c883795d79df}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0e842fe2-176b-4e83-9d1f-0ad13a859efd}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="$(sqlite3Dir)\sqlite3.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="$(sqlite3Dir)\sqlite3.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{ce5b649d-a6f7-4459-9425-c883795d79df}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{0e842fe2-176b-4e83-9d1f-0ad13a859efd}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="$(sqlite3Dir)\sqlite3.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="$(sqlite3Dir)\sqlite3.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{10615B24-73BF-4EFA-93AA-236916321317}</ProjectGuid>
- <RootNamespace>ssleay</RootNamespace>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- </PropertyGroup>
-
- <Import Project="openssl.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <ItemGroup>
- <!--
- <ClCompile Include="$(opensslDir)ssl\bio_ssl.c" />
- -->
- <ClCompile Include="$(opensslDir)ssl\d1_both.c" />
- <!--
- <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_enc.c" />
- -->
- <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
- <!--
- <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
- -->
- <ClCompile Include="$(opensslDir)ssl\d1_pkt.c" />
- <ClCompile Include="$(opensslDir)ssl\d1_srtp.c" />
- <!--
- <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\kssl.c" />
- -->
- <ClCompile Include="$(opensslDir)ssl\s2_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_enc.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_meth.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_pkt.c" />
- <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\s23_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\s23_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\s23_meth.c" />
- <ClCompile Include="$(opensslDir)ssl\s23_pkt.c" />
- <ClCompile Include="$(opensslDir)ssl\s23_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_both.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_cbc.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_enc.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_meth.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_pkt.c" />
- <ClCompile Include="$(opensslDir)ssl\s3_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_algs.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_asn1.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_cert.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_ciph.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_err.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_err2.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_rsa.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_sess.c" />
- <!--
- <ClCompile Include="$(opensslDir)ssl\ssl_stat.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_txt.c" />
- <ClCompile Include="$(opensslDir)ssl\ssl_utst.c" />
- -->
- <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_enc.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_lib.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_meth.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_reneg.c" />
- <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
- <ClCompile Include="$(opensslDir)ssl\tls_srp.c" />
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <Target Name="Clean" />
- <Target Name="CleanAll">
- <Delete Files="$(TargetPath)" />
- <RemoveDir Directories="$(IntDir)" />
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{10615B24-73BF-4EFA-93AA-236916321317}</ProjectGuid>\r
+ <RootNamespace>ssleay</RootNamespace>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>StaticLibrary</ConfigurationType>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="openssl.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+\r
+ <ItemGroup>\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)ssl\bio_ssl.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)ssl\d1_both.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_enc.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)ssl\d1_pkt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\d1_srtp.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\kssl.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)ssl\s2_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_enc.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_meth.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_pkt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s23_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s23_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s23_meth.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s23_pkt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s23_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_both.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_cbc.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_enc.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_meth.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_pkt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\s3_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_algs.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_asn1.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_cert.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_ciph.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_err.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_err2.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_rsa.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_sess.c" />\r
+ <!--\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_stat.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_txt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\ssl_utst.c" />\r
+ -->\r
+ <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_enc.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_lib.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_meth.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_reneg.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />\r
+ <ClCompile Include="$(opensslDir)ssl\tls_srp.c" />\r
+ </ItemGroup>\r
+ \r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <Target Name="Clean" />\r
+ <Target Name="CleanAll">\r
+ <Delete Files="$(TargetPath)" />\r
+ <RemoveDir Directories="$(IntDir)" />\r
+ </Target>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="tcltk.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <OutDir>$(tcltkDir)</OutDir>
- <TargetPath>$(OutDir)bin\$(tclDLLName)</TargetPath>
- </PropertyGroup>
-
- <ItemGroup>
- <ExpectedOutputs Include="
- $(OutDir)\bin\$(tclDLLName);
- $(OutDir)\bin\$(tclShExeName);
- $(OutDir)\include\tcl.h;
- $(OutDir)\lib\tcl$(TclMajorVersion);
- $(OutDir)\lib\tcl$(TclMajorVersion).$(TclMinorVersion);
- $(OutDir)\lib\$(tclLibName)" />
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <PropertyGroup>
- <TclOpts>msvcrt</TclOpts>
- <TclOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TclOpts>
- <TclDirs>INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TclDirs>
- <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
- <NMakeBuildCommandLine>setlocal
-@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
-')
-goto :eof
-:build
-set VCINSTALLDIR=$(VCInstallDir)
-cd /D "$(tclDir)win"
-nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls
-nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries
-</NMakeBuildCommandLine>
- </PropertyGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-
- <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tclDLLName)" Outputs="$(BuildPath)$(tclDLLName)" AfterTargets="Build">
- <Copy SourceFiles="$(OutDir)\bin\$(tclDLLName)" DestinationFiles="$(BuildPath)$(tclDLLName)" />
- </Target>
-
- <Target Name="Clean" />
- <Target Name="CleanAll">
- <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
- <RemoveDir Directories="$(IntDir)" />
- </Target>
-
- <Target Name="ResolveAssemblyReferences" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <Import Project="tcltk.props" />\r
+ \r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Makefile</ConfigurationType>\r
+ <OutDir>$(tcltkDir)</OutDir>\r
+ <TargetPath>$(OutDir)bin\$(tclDLLName)</TargetPath>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <ExpectedOutputs Include="\r
+ $(OutDir)\bin\$(tclDLLName);\r
+ $(OutDir)\bin\$(tclShExeName);\r
+ $(OutDir)\include\tcl.h;\r
+ $(OutDir)\lib\tcl$(TclMajorVersion);\r
+ $(OutDir)\lib\tcl$(TclMajorVersion).$(TclMinorVersion);\r
+ $(OutDir)\lib\$(tclLibName)" />\r
+ </ItemGroup>\r
+ \r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ \r
+ <PropertyGroup>\r
+ <TclOpts>msvcrt</TclOpts>\r
+ <TclOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TclOpts>\r
+ <TclDirs>INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TclDirs>\r
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>\r
+ <NMakeBuildCommandLine>setlocal\r
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','\r
+')\r
+goto :eof\r
+:build\r
+set VCINSTALLDIR=$(VCInstallDir)\r
+cd /D "$(tclDir)win"\r
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls\r
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries\r
+</NMakeBuildCommandLine>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ \r
+ <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tclDLLName)" Outputs="$(BuildPath)$(tclDLLName)" AfterTargets="Build">\r
+ <Copy SourceFiles="$(OutDir)\bin\$(tclDLLName)" DestinationFiles="$(BuildPath)$(tclDLLName)" />\r
+ </Target>\r
+ \r
+ <Target Name="Clean" />\r
+ <Target Name="CleanAll">\r
+ <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />\r
+ <RemoveDir Directories="$(IntDir)" />\r
+ </Target>\r
+ \r
+ <Target Name="ResolveAssemblyReferences" />\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="pyproject.props" />
- <PropertyGroup>
- <TclMajorVersion>8</TclMajorVersion>
- <TclMinorVersion>6</TclMinorVersion>
- <TclPatchLevel>6</TclPatchLevel>
- <TclRevision>0</TclRevision>
- <TkMajorVersion>$(TclMajorVersion)</TkMajorVersion>
- <TkMinorVersion>$(TclMinorVersion)</TkMinorVersion>
- <TkPatchLevel>$(TclPatchLevel)</TkPatchLevel>
- <TkRevision>$(TclRevision)</TkRevision>
- <TixMajorVersion>8</TixMajorVersion>
- <TixMinorVersion>4</TixMinorVersion>
- <TixPatchLevel>3</TixPatchLevel>
- <TixRevision>6</TixRevision>
- <tclDir>$(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir>
- <tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir>
- <tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir>
- <tcltkDir>$(ExternalsDir)tcltk\</tcltkDir>
- <tcltkDir Condition="'$(Platform)' == 'x64'">$(ExternalsDir)tcltk64\</tcltkDir>
- <TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>
- <tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll</tclDLLName>
- <tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib</tclLibName>
- <tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe</tclShExeName>
- <tkDLLName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).dll</tkDLLName>
- <tkLibName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tkLibName>
- <tixDLLName>tix$(TixMajorVersion)$(TixMinorVersion)$(TclDebugExt).dll</tixDLLName>
- <tixDLLPath>$(tcltkDir)lib\tix$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel)\$(tixDLLName)</tixDLLPath>
- <tcltkLib>$(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tcltkLib>
- <TclMachine>IX86</TclMachine>
- <TclMachine Condition="'$(Platform)' == 'x64'">AMD64</TclMachine>
- <TclVersions>TCL_MAJOR_VERSION=$(TclMajorVersion) TCL_MINOR_VERSION=$(TclMinorVersion) TCL_PATCH_LEVEL=$(TclPatchLevel)</TclVersions>
- <TclShortVersions>TCL_MAJOR=$(TclMajorVersion) TCL_MINOR=$(TclMinorVersion) TCL_PATCH=$(TclPatchLevel)</TclShortVersions>
- <TkVersions>TK_MAJOR_VERSION=$(TkMajorVersion) TK_MINOR_VERSION=$(TkMinorVersion) TK_PATCH_LEVEL=$(TkPatchLevel)</TkVersions>
-
- <BuildDirTop>Release</BuildDirTop>
- <BuildDirTop Condition="$(Configuration) == 'Debug'">Debug</BuildDirTop>
- <BuildDirTop Condition="$(TclMachine) != 'IX86'">$(BuildDirTop)_$(TclMachine)</BuildDirTop>
- <BuildDirTop Condition="$(PlatformToolset) == 'v140'">$(BuildDirTop)_VC13</BuildDirTop>
- <BuildDirTop Condition="$(PlatformToolset) == 'v120'">$(BuildDirTop)_VC12</BuildDirTop>
- <BuildDirTop Condition="$(PlatformToolset) == 'v110'">$(BuildDirTop)_VC11</BuildDirTop>
- <BuildDirTop Condition="$(PlatformToolset) == 'v100'">$(BuildDirTop)_VC10</BuildDirTop>
- </PropertyGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="pyproject.props" />\r
+ <PropertyGroup>\r
+ <TclMajorVersion>8</TclMajorVersion>\r
+ <TclMinorVersion>6</TclMinorVersion>\r
+ <TclPatchLevel>6</TclPatchLevel>\r
+ <TclRevision>0</TclRevision>\r
+ <TkMajorVersion>$(TclMajorVersion)</TkMajorVersion>\r
+ <TkMinorVersion>$(TclMinorVersion)</TkMinorVersion>\r
+ <TkPatchLevel>$(TclPatchLevel)</TkPatchLevel>\r
+ <TkRevision>$(TclRevision)</TkRevision>\r
+ <TixMajorVersion>8</TixMajorVersion>\r
+ <TixMinorVersion>4</TixMinorVersion>\r
+ <TixPatchLevel>3</TixPatchLevel>\r
+ <TixRevision>6</TixRevision>\r
+ <tclDir>$(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir>\r
+ <tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir>\r
+ <tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir>\r
+ <tcltkDir>$(ExternalsDir)tcltk\</tcltkDir>\r
+ <tcltkDir Condition="'$(Platform)' == 'x64'">$(ExternalsDir)tcltk64\</tcltkDir>\r
+ <TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>\r
+ <tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll</tclDLLName>\r
+ <tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib</tclLibName>\r
+ <tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe</tclShExeName>\r
+ <tkDLLName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).dll</tkDLLName>\r
+ <tkLibName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tkLibName>\r
+ <tixDLLName>tix$(TixMajorVersion)$(TixMinorVersion)$(TclDebugExt).dll</tixDLLName>\r
+ <tixDLLPath>$(tcltkDir)lib\tix$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel)\$(tixDLLName)</tixDLLPath>\r
+ <tcltkLib>$(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tcltkLib>\r
+ <TclMachine>IX86</TclMachine>\r
+ <TclMachine Condition="'$(Platform)' == 'x64'">AMD64</TclMachine>\r
+ <TclVersions>TCL_MAJOR_VERSION=$(TclMajorVersion) TCL_MINOR_VERSION=$(TclMinorVersion) TCL_PATCH_LEVEL=$(TclPatchLevel)</TclVersions>\r
+ <TclShortVersions>TCL_MAJOR=$(TclMajorVersion) TCL_MINOR=$(TclMinorVersion) TCL_PATCH=$(TclPatchLevel)</TclShortVersions>\r
+ <TkVersions>TK_MAJOR_VERSION=$(TkMajorVersion) TK_MINOR_VERSION=$(TkMinorVersion) TK_PATCH_LEVEL=$(TkPatchLevel)</TkVersions>\r
+\r
+ <BuildDirTop>Release</BuildDirTop>\r
+ <BuildDirTop Condition="$(Configuration) == 'Debug'">Debug</BuildDirTop>\r
+ <BuildDirTop Condition="$(TclMachine) != 'IX86'">$(BuildDirTop)_$(TclMachine)</BuildDirTop>\r
+ <BuildDirTop Condition="$(PlatformToolset) == 'v140'">$(BuildDirTop)_VC13</BuildDirTop>\r
+ <BuildDirTop Condition="$(PlatformToolset) == 'v120'">$(BuildDirTop)_VC12</BuildDirTop>\r
+ <BuildDirTop Condition="$(PlatformToolset) == 'v110'">$(BuildDirTop)_VC11</BuildDirTop>\r
+ <BuildDirTop Condition="$(PlatformToolset) == 'v100'">$(BuildDirTop)_VC10</BuildDirTop>\r
+ </PropertyGroup>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid>
- <RootNamespace>tix</RootNamespace>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="tcltk.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <OutDir>$(tcltkDir)</OutDir>
- <TargetPath>$(tixDLLPath)</TargetPath>
- </PropertyGroup>
-
- <ItemGroup>
- <ExpectedOutputs Include="$(TargetPath)" />
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <PropertyGroup>
- <TixDirs>BUILDDIRTOP="$(BuildDirTop)" TCL_DIR="$(tclDir.TrimEnd(`\`))" TK_DIR="$(tkDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TixDirs>
- <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUG=1 NODEBUG=0 TCL_DBGX=g TK_DBGX=g</DebugFlags>
- <DebugFlags Condition="'$(Configuration)' != 'Debug'">DEBUG=0 NODEBUG=1</DebugFlags>
- <NMakeBuildCommandLine>setlocal
-@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
-')
-goto :eof
-:build
-set VCINSTALLDIR=$(VCInstallDir)
-cd /D "$(tixDir)win"
-nmake /nologo -f makefile.vc MACHINE=$(TclMachine) $(DebugFlags) $(TclShortVersions) $(TixDirs) all install
-</NMakeBuildCommandLine>
- <NMakeCleanCommandLine>rmdir /q/s "$(OutDir.TrimEnd(`\`))"</NMakeCleanCommandLine>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="tcl.vcxproj">
- <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="tk.vcxproj">
- <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-
- <Target Name="Clean" />
- <Target Name="CleanAll">
- <RemoveDir Directories="$(OutDir)" />
- <RemoveDir Directories="$(IntDir)" />
- </Target>
-
- <Target Name="ResolveAssemblyReferences" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid>\r
+ <RootNamespace>tix</RootNamespace>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <Import Project="tcltk.props" />\r
+ \r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Makefile</ConfigurationType>\r
+ <OutDir>$(tcltkDir)</OutDir>\r
+ <TargetPath>$(tixDLLPath)</TargetPath>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <ExpectedOutputs Include="$(TargetPath)" />\r
+ </ItemGroup>\r
+ \r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ \r
+ <PropertyGroup>\r
+ <TixDirs>BUILDDIRTOP="$(BuildDirTop)" TCL_DIR="$(tclDir.TrimEnd(`\`))" TK_DIR="$(tkDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TixDirs>\r
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUG=1 NODEBUG=0 TCL_DBGX=g TK_DBGX=g</DebugFlags>\r
+ <DebugFlags Condition="'$(Configuration)' != 'Debug'">DEBUG=0 NODEBUG=1</DebugFlags>\r
+ <NMakeBuildCommandLine>setlocal\r
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','\r
+')\r
+goto :eof\r
+:build\r
+set VCINSTALLDIR=$(VCInstallDir)\r
+cd /D "$(tixDir)win"\r
+nmake /nologo -f makefile.vc MACHINE=$(TclMachine) $(DebugFlags) $(TclShortVersions) $(TixDirs) all install\r
+</NMakeBuildCommandLine>\r
+ <NMakeCleanCommandLine>rmdir /q/s "$(OutDir.TrimEnd(`\`))"</NMakeCleanCommandLine>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <ProjectReference Include="tcl.vcxproj">\r
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="tk.vcxproj">\r
+ <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+\r
+ <Target Name="Clean" />\r
+ <Target Name="CleanAll">\r
+ <RemoveDir Directories="$(OutDir)" />\r
+ <RemoveDir Directories="$(IntDir)" />\r
+ </Target>\r
+ \r
+ <Target Name="ResolveAssemblyReferences" />\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}</ProjectGuid>
- <RootNamespace>tk</RootNamespace>
- </PropertyGroup>
-
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="tcltk.props" />
-
- <PropertyGroup Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <OutDir>$(tcltkDir)</OutDir>
- <TargetPath>$(OutDir)bin\$(tkDLLName)</TargetPath>
- </PropertyGroup>
-
- <ItemGroup>
- <ExpectedOutputs Include="
- $(OutDir)bin\$(tkDLLName);
- $(OutDir)include\tk.h;
- $(OutDir)lib\$(tkLibName);
- $(OutDir)lib\tk$(TkMajorVersion).$(TkMinorVersion)" />
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <PropertyGroup>
- <TkOpts>msvcrt</TkOpts>
- <TkOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TkOpts>
- <TkDirs>TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))"</TkDirs>
- <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
- <NMakeBuildCommandLine>setlocal
-@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
-')
-goto :eof
-:build
-set VCINSTALLDIR=$(VCInstallDir)
-cd /D "$(tkDir)win"
-nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all
-nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries
-</NMakeBuildCommandLine>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="tcl.vcxproj">
- <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-
- <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tkDLLName)" Outputs="$(BuildPath)$(tkDLLName)" AfterTargets="Build">
- <Copy SourceFiles="$(OutDir)\bin\$(tkDLLName)" DestinationFiles="$(BuildPath)$(tkDLLName)" />
- </Target>
-
- <Target Name="Clean" />
- <Target Name="CleanAll">
- <Delete Files="$(TargetPath);$(BuildPath)$(tkDLLName)" />
- <RemoveDir Directories="$(IntDir)" />
- </Target>
-
- <Target Name="ResolveAssemblyReferences" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}</ProjectGuid>\r
+ <RootNamespace>tk</RootNamespace>\r
+ </PropertyGroup>\r
+ \r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <Import Project="tcltk.props" />\r
+ \r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>Makefile</ConfigurationType>\r
+ <OutDir>$(tcltkDir)</OutDir>\r
+ <TargetPath>$(OutDir)bin\$(tkDLLName)</TargetPath>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <ExpectedOutputs Include="\r
+ $(OutDir)bin\$(tkDLLName);\r
+ $(OutDir)include\tk.h;\r
+ $(OutDir)lib\$(tkLibName);\r
+ $(OutDir)lib\tk$(TkMajorVersion).$(TkMinorVersion)" />\r
+ </ItemGroup>\r
+ \r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ \r
+ <PropertyGroup>\r
+ <TkOpts>msvcrt</TkOpts>\r
+ <TkOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TkOpts>\r
+ <TkDirs>TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))"</TkDirs>\r
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>\r
+ <NMakeBuildCommandLine>setlocal\r
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','\r
+')\r
+goto :eof\r
+:build\r
+set VCINSTALLDIR=$(VCInstallDir)\r
+cd /D "$(tkDir)win"\r
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all\r
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries\r
+</NMakeBuildCommandLine>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="tcl.vcxproj">\r
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ \r
+ <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tkDLLName)" Outputs="$(BuildPath)$(tkDLLName)" AfterTargets="Build">\r
+ <Copy SourceFiles="$(OutDir)\bin\$(tkDLLName)" DestinationFiles="$(BuildPath)$(tkDLLName)" />\r
+ </Target>\r
+ \r
+ <Target Name="Clean" />\r
+ <Target Name="CleanAll">\r
+ <Delete Files="$(TargetPath);$(BuildPath)$(tkDLLName)" />\r
+ <RemoveDir Directories="$(IntDir)" />\r
+ </Target>\r
+ \r
+ <Target Name="ResolveAssemblyReferences" />\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}</ProjectGuid>
- <RootNamespace>unicodedata</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\unicodedata_db.h" />
- <ClInclude Include="..\Modules\unicodename_db.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\unicodedata.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}</ProjectGuid>\r
+ <RootNamespace>unicodedata</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <BaseAddress>0x1D120000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\unicodedata_db.h" />\r
+ <ClInclude Include="..\Modules\unicodename_db.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\unicodedata.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{b939a8f1-ccd7-420a-974a-243606dccd74}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{e2c055bb-ec62-4bbc-aa1c-d88da4d4ad1c}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Modules\unicodedata_db.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\unicodename_db.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\unicodedata.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Header Files">\r
+ <UniqueIdentifier>{b939a8f1-ccd7-420a-974a-243606dccd74}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{e2c055bb-ec62-4bbc-aa1c-d88da4d4ad1c}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="..\Modules\unicodedata_db.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\Modules\unicodename_db.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\unicodedata.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{28B5D777-DDF2-4B6B-B34F-31D938813856}</ProjectGuid>
- <RootNamespace>winsound</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\winsound.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="pythoncore.vcxproj">
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{28B5D777-DDF2-4B6B-B34F-31D938813856}</ProjectGuid>\r
+ <RootNamespace>winsound</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <Link>\r
+ <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\winsound.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="..\PC\python_nt.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="pythoncore.vcxproj">\r
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\winsound.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\PC\winsound.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F749B822-B489-4CA5-A3AD-CE078F5F338A}</ProjectGuid>
- <RootNamespace>xxlimited</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <SupportPGO>false</SupportPGO>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <PropertyGroup>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03060000</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\xxlimited.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="python3dll.vcxproj">
- <Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|Win32">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGInstrument|x64">\r
+ <Configuration>PGInstrument</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|Win32">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="PGUpdate|x64">\r
+ <Configuration>PGUpdate</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{F749B822-B489-4CA5-A3AD-CE078F5F338A}</ProjectGuid>\r
+ <RootNamespace>xxlimited</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>NotSet</CharacterSet>\r
+ <SupportPGO>false</SupportPGO>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <PropertyGroup>\r
+ <TargetExt>.pyd</TargetExt>\r
+ </PropertyGroup>\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ <Import Project="pyproject.props" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03060000</PreprocessorDefinitions>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <BaseAddress>0x1D110000</BaseAddress>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\xxlimited.c" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="python3dll.vcxproj">\r
+ <Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{eb5eebc7-3787-4f8f-b282-204db2962cc3}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Modules\xxlimited.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="Source Files">\r
+ <UniqueIdentifier>{eb5eebc7-3787-4f8f-b282-204db2962cc3}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="..\Modules\xxlimited.c">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
while (s < end) {
if (*s == '\\') {
*p++ = *s++;
- if (*s & 0x80) {
+ if (s >= end || *s & 0x80) {
strcpy(p, "u005c");
p += 5;
+ if (s >= end)
+ break;
}
}
if (*s & 0x80) { /* XXX inefficient */
struct compiling *c, const node *n)
{
- int all_whitespace = 1;
- int kind;
- void *data;
PyCompilerFlags cf;
mod_ty mod;
char *str;
- PyObject *o;
Py_ssize_t len;
- Py_ssize_t i;
+ const char *s;
assert(expr_end >= expr_start);
assert(*(expr_start-1) == '{');
assert(*expr_end == '}' || *expr_end == '!' || *expr_end == ':');
- /* We know there are no escapes here, because backslashes are not allowed,
- and we know it's utf-8 encoded (per PEP 263). But, in order to check
- that each char is not whitespace, we need to decode it to unicode.
- Which is unfortunate, but such is life. */
-
/* If the substring is all whitespace, it's an error. We need to catch
this here, and not when we call PyParser_ASTFromString, because turning
the expression '' in to '()' would go from being invalid to valid. */
- /* Note that this code says an empty string is all whitespace. That's
- important. There's a test for it: f'{}'. */
- o = PyUnicode_DecodeUTF8(expr_start, expr_end-expr_start, NULL);
- if (o == NULL)
- return NULL;
- len = PyUnicode_GET_LENGTH(o);
- kind = PyUnicode_KIND(o);
- data = PyUnicode_DATA(o);
- for (i = 0; i < len; i++) {
- if (!Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, i))) {
- all_whitespace = 0;
+ for (s = expr_start; s != expr_end; s++) {
+ char c = *s;
+ /* The Python parser ignores only the following whitespace
+ characters (\r already is converted to \n). */
+ if (!(c == ' ' || c == '\t' || c == '\n' || c == '\f')) {
break;
}
}
- Py_DECREF(o);
- if (all_whitespace) {
+ if (s == expr_end) {
ast_error(c, n, "f-string: empty expression not allowed");
return NULL;
}
- /* Reuse len to be the length of the utf-8 input string. */
len = expr_end - expr_start;
/* Allocate 3 extra bytes: open paren, close paren, null byte. */
str = PyMem_RawMalloc(len + 3);
brace (which isn't part of a unicode name escape such as
"\N{EULER CONSTANT}"), or the end of the string. */
- const char *literal_start = *str;
- const char *literal_end;
- int in_named_escape = 0;
+ const char *s = *str;
+ const char *literal_start = s;
int result = 0;
assert(*literal == NULL);
- for (; *str < end; (*str)++) {
- char ch = **str;
- if (!in_named_escape && ch == '{' && (*str)-literal_start >= 2 &&
- *(*str-2) == '\\' && *(*str-1) == 'N') {
- in_named_escape = 1;
- } else if (in_named_escape && ch == '}') {
- in_named_escape = 0;
- } else if (ch == '{' || ch == '}') {
+ while (s < end) {
+ char ch = *s++;
+ if (!raw && ch == '\\' && s < end) {
+ ch = *s++;
+ if (ch == 'N') {
+ if (s < end && *s++ == '{') {
+ while (s < end && *s++ != '}') {
+ }
+ continue;
+ }
+ break;
+ }
+ if (ch == '{' && warn_invalid_escape_sequence(c, n, ch) < 0) {
+ return -1;
+ }
+ }
+ if (ch == '{' || ch == '}') {
/* Check for doubled braces, but only at the top level. If
we checked at every level, then f'{0:{3}}' would fail
with the two closing braces. */
if (recurse_lvl == 0) {
- if (*str+1 < end && *(*str+1) == ch) {
+ if (s < end && *s == ch) {
/* We're going to tell the caller that the literal ends
here, but that they should continue scanning. But also
skip over the second brace when we resume scanning. */
- literal_end = *str+1;
- *str += 2;
+ *str = s + 1;
result = 1;
goto done;
}
/* Where a single '{' is the start of a new expression, a
single '}' is not allowed. */
if (ch == '}') {
+ *str = s - 1;
ast_error(c, n, "f-string: single '}' is not allowed");
return -1;
}
/* We're either at a '{', which means we're starting another
expression; or a '}', which means we're at the end of this
f-string (for a nested format_spec). */
+ s--;
break;
}
}
- literal_end = *str;
- assert(*str <= end);
- assert(*str == end || **str == '{' || **str == '}');
+ *str = s;
+ assert(s <= end);
+ assert(s == end || *s == '{' || *s == '}');
done:
- if (literal_start != literal_end) {
+ if (literal_start != s) {
if (raw)
*literal = PyUnicode_DecodeUTF8Stateful(literal_start,
- literal_end-literal_start,
+ s - literal_start,
NULL, NULL);
else
*literal = decode_unicode_with_escapes(c, n, literal_start,
- literal_end-literal_start);
+ s - literal_start);
if (!*literal)
return -1;
}
/* Do nothing. Just leave last_str alone (and possibly
NULL). */
} else if (!state->last_str) {
+ /* Note that the literal can be zero length, if the
+ input string is "\\\n" or "\\\r", among others. */
state->last_str = literal;
literal = NULL;
} else {
return -1;
literal = NULL;
}
- assert(!state->last_str ||
- PyUnicode_GET_LENGTH(state->last_str) != 0);
/* We've dealt with the literal now. It can't be leaked on further
errors. */
PyObject *result;
size_t len;
+ /* stdin is a text stream, so it must have an encoding. */
stdin_encoding = _PyObject_GetAttrId(fin, &PyId_encoding);
stdin_errors = _PyObject_GetAttrId(fin, &PyId_errors);
- if (!stdin_encoding || !stdin_errors)
- /* stdin is a text stream, so it must have an
- encoding. */
+ if (!stdin_encoding || !stdin_errors ||
+ !PyUnicode_Check(stdin_encoding) ||
+ !PyUnicode_Check(stdin_errors)) {
+ tty = 0;
goto _readline_errors;
+ }
stdin_encoding_str = PyUnicode_AsUTF8(stdin_encoding);
stdin_errors_str = PyUnicode_AsUTF8(stdin_errors);
if (!stdin_encoding_str || !stdin_errors_str)
PyObject *stringpo;
stdout_encoding = _PyObject_GetAttrId(fout, &PyId_encoding);
stdout_errors = _PyObject_GetAttrId(fout, &PyId_errors);
- if (!stdout_encoding || !stdout_errors)
+ if (!stdout_encoding || !stdout_errors ||
+ !PyUnicode_Check(stdout_encoding) ||
+ !PyUnicode_Check(stdout_errors)) {
+ tty = 0;
goto _readline_errors;
+ }
stdout_encoding_str = PyUnicode_AsUTF8(stdout_encoding);
stdout_errors_str = PyUnicode_AsUTF8(stdout_errors);
if (!stdout_encoding_str || !stdout_errors_str)
Py_XDECREF(po);
PyMem_FREE(s);
return result;
+
_readline_errors:
Py_XDECREF(stdin_encoding);
Py_XDECREF(stdout_encoding);
Py_XDECREF(stdin_errors);
Py_XDECREF(stdout_errors);
Py_XDECREF(po);
- return NULL;
+ if (tty)
+ return NULL;
+
+ PyErr_Clear();
}
/* Fallback if we're not interactive */
Py_MakePendingCalls() above. */
if (_Py_atomic_load_relaxed(&eval_breaker)) {
- if (_Py_OPCODE(*next_instr) == SETUP_FINALLY) {
- /* Make the last opcode before
- a try: finally: block uninterruptible. */
+ if (_Py_OPCODE(*next_instr) == SETUP_FINALLY ||
+ _Py_OPCODE(*next_instr) == YIELD_FROM) {
+ /* Two cases where we skip running signal handlers and other
+ pending calls:
+ - If we're about to enter the try: of a try/finally (not
+ *very* useful, but might help in some cases and it's
+ traditional)
+ - If we're resuming a chain of nested 'yield from' or
+ 'await' calls, then each frame is parked with YIELD_FROM
+ as its next opcode. If the user hit control-C we want to
+ wait until we've reached the innermost frame before
+ running the signal handler and raising KeyboardInterrupt
+ (see bpo-30039).
+ */
goto fast_next_opcode;
}
if (_Py_atomic_load_relaxed(&pendingcalls_to_do)) {
/* Extract a slice index from a PyLong or an object with the
nb_index slot defined, and store in *pi.
Silently reduce values larger than PY_SSIZE_T_MAX to PY_SSIZE_T_MAX,
- and silently boost values less than -PY_SSIZE_T_MAX-1 to -PY_SSIZE_T_MAX-1.
+ and silently boost values less than PY_SSIZE_T_MIN to PY_SSIZE_T_MIN.
Return 0 on error, 1 on success.
*/
-/* Note: If v is NULL, return success without storing into *pi. This
- is because_PyEval_SliceIndex() is called by apply_slice(), which can be
- called by the SLICE opcode with v and/or w equal to NULL.
-*/
int
_PyEval_SliceIndex(PyObject *v, Py_ssize_t *pi)
{
- if (v != NULL) {
+ if (v != Py_None) {
Py_ssize_t x;
if (PyIndex_Check(v)) {
x = PyNumber_AsSsize_t(v, NULL);
return 1;
}
+int
+_PyEval_SliceIndexNotNone(PyObject *v, Py_ssize_t *pi)
+{
+ Py_ssize_t x;
+ if (PyIndex_Check(v)) {
+ x = PyNumber_AsSsize_t(v, NULL);
+ if (x == -1 && PyErr_Occurred())
+ return 0;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "slice indices must be integers or "
+ "have an __index__ method");
+ return 0;
+ }
+ *pi = x;
+ return 1;
+}
+
+
#define CANNOT_CATCH_MSG "catching classes that do not inherit from "\
"BaseException is not allowed"
Py_ssize_t
_PyEval_RequestCodeExtraIndex(freefunc free)
{
- PyThreadState *tstate = PyThreadState_Get();
+ __PyCodeExtraState *state = __PyCodeExtraState_Get();
Py_ssize_t new_index;
- if (tstate->co_extra_user_count == MAX_CO_EXTRA_USERS - 1) {
+ if (state->co_extra_user_count == MAX_CO_EXTRA_USERS - 1) {
return -1;
}
- new_index = tstate->co_extra_user_count++;
- tstate->co_extra_freefuncs[new_index] = free;
+ new_index = state->co_extra_user_count++;
+ state->co_extra_freefuncs[new_index] = free;
return new_index;
}
FILE_TIME_to_time_t_nsec(&info->ftLastWriteTime, &result->st_mtime, &result->st_mtime_nsec);
FILE_TIME_to_time_t_nsec(&info->ftLastAccessTime, &result->st_atime, &result->st_atime_nsec);
result->st_nlink = info->nNumberOfLinks;
- result->st_ino = (((__int64)info->nFileIndexHigh)<<32) + info->nFileIndexLow;
+ result->st_ino = (((uint64_t)info->nFileIndexHigh) << 32) + info->nFileIndexLow;
if (reparse_tag == IO_REPARSE_TAG_SYMLINK) {
/* first clear the S_IFMT bits */
result->st_mode ^= (result->st_mode & S_IFMT);
_Py_attribute_data_to_stat(&info, 0, status);
/* specific to fstat() */
- status->st_ino = (((__int64)info.nFileIndexHigh)<<32) + info.nFileIndexLow;
+ status->st_ino = (((uint64_t)info.nFileIndexHigh) << 32) + info.nFileIndexLow;
return 0;
#else
return fstat(fd, status);
Py_DECREF(r);
modules = PyImport_GetModuleDict();
- r = PyDict_GetItem(modules, module_name);
- if (r != NULL)
+ r = PyDict_GetItemWithError(modules, module_name);
+ if (r != NULL) {
Py_INCREF(r);
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetObject(PyExc_KeyError, module_name);
+ }
err:
Py_XDECREF(globals);
w_object(co->co_lnotab, p);
}
else if (PyObject_CheckBuffer(v)) {
- /* Write unknown bytes-like objects as a byte string */
+ /* Write unknown bytes-like objects as a bytes object */
Py_buffer view;
if (PyObject_GetBuffer(v, &view, PyBUF_SIMPLE) != 0) {
w_byte(TYPE_UNKNOWN, p);
if (PyErr_Occurred())
break;
if (n < 0 || n > SIZE32_MAX) {
- PyErr_SetString(PyExc_ValueError, "bad marshal data (string size out of range)");
+ PyErr_SetString(PyExc_ValueError, "bad marshal data (bytes object size out of range)");
break;
}
v = PyBytes_FromStringAndSize((char *)NULL, n);
if (PyErr_Occurred())
break;
if (n < 0 || n > SIZE32_MAX) {
- PyErr_SetString(PyExc_ValueError, "bad marshal data (unicode size out of range)");
+ PyErr_SetString(PyExc_ValueError, "bad marshal data (string size out of range)");
break;
}
goto _read_ascii;
if (PyErr_Occurred())
break;
if (n < 0 || n > SIZE32_MAX) {
- PyErr_SetString(PyExc_ValueError, "bad marshal data (unicode size out of range)");
+ PyErr_SetString(PyExc_ValueError, "bad marshal data (string size out of range)");
break;
}
if (n != 0) {
if (wf.ptr - base > PY_SSIZE_T_MAX) {
Py_DECREF(wf.str);
PyErr_SetString(PyExc_OverflowError,
- "too much marshal data for a string");
+ "too much marshal data for a bytes object");
return NULL;
}
if (_PyBytes_Resize(&wf.str, (Py_ssize_t)(wf.ptr - base)) < 0)
"dump(value, file[, version])\n\
\n\
Write the value on the open file. The value must be a supported type.\n\
-The file must be an open file object such as sys.stdout or returned by\n\
-open() or os.popen(). It must be opened in binary mode ('wb' or 'w+b').\n\
+The file must be a writeable binary file.\n\
\n\
If the value has (or contains an object that has) an unsupported type, a\n\
ValueError exception is raised - but garbage data will also be written\n\
Read one value from the open file and return it. If no valid value is\n\
read (e.g. because the data has a different Python version's\n\
incompatible marshal format), raise EOFError, ValueError or TypeError.\n\
-The file must be an open file object opened in binary mode ('rb' or\n\
-'r+b').\n\
+The file must be a readable binary file.\n\
\n\
Note: If an object containing an unsupported type was marshalled with\n\
dump(), load() will substitute None for the unmarshallable type.");
PyDoc_STRVAR(dumps_doc,
"dumps(value[, version])\n\
\n\
-Return the string that would be written to a file by dump(value, file).\n\
+Return the bytes object that would be written to a file by dump(value, file).\n\
The value must be a supported type. Raise a ValueError exception if\n\
value has (or contains an object that has) an unsupported type.\n\
\n\
PyDoc_STRVAR(loads_doc,
"loads(bytes)\n\
\n\
-Convert the bytes object to a value. If no valid value is found, raise\n\
-EOFError, ValueError or TypeError. Extra characters in the input are\n\
+Convert the bytes-like object to a value. If no valid value is found,\n\
+raise EOFError, ValueError or TypeError. Extra bytes in the input are\n\
ignored.");
static PyMethodDef marshal_methods[] = {
\n\
dump() -- write value to a file\n\
load() -- read value from a file\n\
-dumps() -- write value to a string\n\
-loads() -- read value from a string");
+dumps() -- marshal value as a bytes object\n\
+loads() -- read value from a bytes-like object");
int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
int Py_FrozenFlag; /* Needed by getpath.c */
int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
+int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.pyc) */
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
static int
is_valid_fd(int fd)
{
+#ifdef __APPLE__
+ /* bpo-30225: On macOS Tiger, when stdout is redirected to a pipe
+ and the other side of the pipe is closed, dup(1) succeed, whereas
+ fstat(1, &st) fails with EBADF. Prefer fstat() over dup() to detect
+ such error. */
+ struct stat st;
+ return (fstat(fd, &st) == 0);
+#else
int fd2;
if (fd < 0)
return 0;
close(fd2);
_Py_END_SUPPRESS_IPH
return fd2 >= 0;
+#endif
}
/* returns Py_None if the fd is not valid */
#endif
static PyInterpreterState *interp_head = NULL;
+static __PyCodeExtraState *coextra_head = NULL;
/* Assuming the current thread holds the GIL, this is the
PyThreadState for the current thread. */
PyMem_RawMalloc(sizeof(PyInterpreterState));
if (interp != NULL) {
+ __PyCodeExtraState* coextra = PyMem_RawMalloc(sizeof(__PyCodeExtraState));
+ if (coextra == NULL) {
+ PyMem_RawFree(interp);
+ return NULL;
+ }
+
HEAD_INIT();
#ifdef WITH_THREAD
if (head_mutex == NULL)
interp->importlib = NULL;
interp->import_func = NULL;
interp->eval_frame = _PyEval_EvalFrameDefault;
+ coextra->co_extra_user_count = 0;
+ coextra->interp = interp;
#ifdef HAVE_DLOPEN
#if HAVE_DECL_RTLD_NOW
interp->dlopenflags = RTLD_NOW;
HEAD_LOCK();
interp->next = interp_head;
interp_head = interp;
+ coextra->next = coextra_head;
+ coextra_head = coextra;
HEAD_UNLOCK();
}
PyInterpreterState_Delete(PyInterpreterState *interp)
{
PyInterpreterState **p;
+ __PyCodeExtraState **pextra;
zapthreads(interp);
HEAD_LOCK();
- for (p = &interp_head; ; p = &(*p)->next) {
+ for (p = &interp_head; /* N/A */; p = &(*p)->next) {
if (*p == NULL)
Py_FatalError(
"PyInterpreterState_Delete: invalid interp");
if (interp->tstate_head != NULL)
Py_FatalError("PyInterpreterState_Delete: remaining threads");
*p = interp->next;
+
+ for (pextra = &coextra_head; ; pextra = &(*pextra)->next) {
+ if (*pextra == NULL)
+ Py_FatalError(
+ "PyInterpreterState_Delete: invalid extra");
+ __PyCodeExtraState* extra = *pextra;
+ if (extra->interp == interp) {
+ *pextra = extra->next;
+ PyMem_RawFree(extra);
+ break;
+ }
+ }
HEAD_UNLOCK();
PyMem_RawFree(interp);
#ifdef WITH_THREAD
tstate->coroutine_wrapper = NULL;
tstate->in_coroutine_wrapper = 0;
- tstate->co_extra_user_count = 0;
tstate->async_gen_firstiter = NULL;
tstate->async_gen_finalizer = NULL;
return oldts;
}
+__PyCodeExtraState*
+__PyCodeExtraState_Get(void) {
+ PyInterpreterState* interp = PyThreadState_Get()->interp;
+
+ HEAD_LOCK();
+ for (__PyCodeExtraState* cur = coextra_head; cur != NULL; cur = cur->next) {
+ if (cur->interp == interp) {
+ HEAD_UNLOCK();
+ return cur;
+ }
+ }
+ HEAD_UNLOCK();
+
+ Py_FatalError("__PyCodeExtraState_Get: no code state for interpreter");
+ return NULL;
+}
+
/* An extension mechanism to store arbitrary additional per-thread state.
PyThreadState_GetDict() returns a dictionary that can be used to hold such
state; the caller should pick a unique key and store its state there. If
void
_PyGILState_Reinit(void)
{
+#ifdef WITH_THREAD
+ head_mutex = NULL;
+ HEAD_INIT();
+#endif
PyThreadState *tstate = PyGILState_GetThisThreadState();
PyThread_delete_key(autoTLSkey);
if ((autoTLSkey = PyThread_create_key()) == -1)
}
PyMem_RawFree(verblock);
}
- PyStructSequence_SET_ITEM(version, pos++, PyTuple_Pack(3,
- PyLong_FromLong(realMajor),
- PyLong_FromLong(realMinor),
- PyLong_FromLong(realBuild)
+ PyStructSequence_SET_ITEM(version, pos++, Py_BuildValue("(kkk)",
+ realMajor,
+ realMinor,
+ realBuild
));
if (PyErr_Occurred()) {
} pthread_lock;
#define CHECK_STATUS(name) if (status != 0) { perror(name); error = 1; }
+#define CHECK_STATUS_PTHREAD(name) if (status != 0) { fprintf(stderr, \
+ "%s: %s\n", name, strerror(status)); error = 1; }
/*
* Initialization.
status = pthread_mutex_init(&lock->mut,
pthread_mutexattr_default);
- CHECK_STATUS("pthread_mutex_init");
+ CHECK_STATUS_PTHREAD("pthread_mutex_init");
/* Mark the pthread mutex underlying a Python mutex as
pure happens-before. We can't simply mark the
Python-level mutex as a mutex because it can be
status = pthread_cond_init(&lock->lock_released,
pthread_condattr_default);
- CHECK_STATUS("pthread_cond_init");
+ CHECK_STATUS_PTHREAD("pthread_cond_init");
if (error) {
PyMem_RawFree((void *)lock);
* and must have the cond destroyed first.
*/
status = pthread_cond_destroy( &thelock->lock_released );
- CHECK_STATUS("pthread_cond_destroy");
+ CHECK_STATUS_PTHREAD("pthread_cond_destroy");
status = pthread_mutex_destroy( &thelock->mut );
- CHECK_STATUS("pthread_mutex_destroy");
+ CHECK_STATUS_PTHREAD("pthread_mutex_destroy");
PyMem_RawFree((void *)thelock);
}
lock, microseconds, intr_flag));
status = pthread_mutex_lock( &thelock->mut );
- CHECK_STATUS("pthread_mutex_lock[1]");
+ CHECK_STATUS_PTHREAD("pthread_mutex_lock[1]");
if (thelock->locked == 0) {
success = PY_LOCK_ACQUIRED;
&thelock->mut, &ts);
if (status == ETIMEDOUT)
break;
- CHECK_STATUS("pthread_cond_timed_wait");
+ CHECK_STATUS_PTHREAD("pthread_cond_timed_wait");
}
else {
status = pthread_cond_wait(
&thelock->lock_released,
&thelock->mut);
- CHECK_STATUS("pthread_cond_wait");
+ CHECK_STATUS_PTHREAD("pthread_cond_wait");
}
if (intr_flag && status == 0 && thelock->locked) {
}
if (success == PY_LOCK_ACQUIRED) thelock->locked = 1;
status = pthread_mutex_unlock( &thelock->mut );
- CHECK_STATUS("pthread_mutex_unlock[1]");
+ CHECK_STATUS_PTHREAD("pthread_mutex_unlock[1]");
if (error) success = PY_LOCK_FAILURE;
dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n",
dprintf(("PyThread_release_lock(%p) called\n", lock));
status = pthread_mutex_lock( &thelock->mut );
- CHECK_STATUS("pthread_mutex_lock[3]");
+ CHECK_STATUS_PTHREAD("pthread_mutex_lock[3]");
thelock->locked = 0;
/* wake up someone (anyone, if any) waiting on the lock */
status = pthread_cond_signal( &thelock->lock_released );
- CHECK_STATUS("pthread_cond_signal");
+ CHECK_STATUS_PTHREAD("pthread_cond_signal");
status = pthread_mutex_unlock( &thelock->mut );
- CHECK_STATUS("pthread_mutex_unlock[3]");
+ CHECK_STATUS_PTHREAD("pthread_mutex_unlock[3]");
}
#endif /* USE_SEMAPHORES */
-This is Python version 3.6.1
+This is Python version 3.6.2
============================
.. image:: https://travis-ci.org/python/cpython.svg?branch=3.6
:alt: CPython build status on Travis CI
:target: https://travis-ci.org/python/cpython
+.. image:: https://ci.appveyor.com/api/projects/status/4mew1a93xdkbf5ua/branch/3.6?svg=true
+ :alt: CPython build status on Appveyor
+ :target: https://ci.appveyor.com/project/python/cpython/branch/3.6
+
.. image:: https://codecov.io/gh/python/cpython/branch/3.6/graph/badge.svg
:alt: CPython code coverage on Codecov
:target: https://codecov.io/gh/python/cpython
'set' : PySetObjectPtr,
'frozenset' : PySetObjectPtr,
'builtin_function_or_method' : PyCFunctionObjectPtr,
+ 'method-wrapper': wrapperobject,
}
if tp_name in name_map:
return name_map[tp_name]
try:
# <= Python 3.5
return keys['dk_entries'], dk_size
- except gdb.error:
+ except RuntimeError:
# >= Python 3.6
pass
out.write(quote)
+class wrapperobject(PyObjectPtr):
+ _typename = 'wrapperobject'
+
+ def safe_name(self):
+ try:
+ name = self.field('descr')['d_base']['name'].string()
+ return repr(name)
+ except (NullPyObjectPtr, RuntimeError):
+ return '<unknown name>'
+
+ def safe_tp_name(self):
+ try:
+ return self.field('self')['ob_type']['tp_name'].string()
+ except (NullPyObjectPtr, RuntimeError):
+ return '<unknown tp_name>'
+
+ def safe_self_addresss(self):
+ try:
+ address = long(self.field('self'))
+ return '%#x' % address
+ except (NullPyObjectPtr, RuntimeError):
+ return '<failed to get self address>'
+
+ def proxyval(self, visited):
+ name = self.safe_name()
+ tp_name = self.safe_tp_name()
+ self_address = self.safe_self_addresss()
+ return ("<method-wrapper %s of %s object at %s>"
+ % (name, tp_name, self_address))
+
+ def write_repr(self, out, visited):
+ proxy = self.proxyval(visited)
+ out.write(proxy)
def int_from_int(gdbval):
def pretty_printer_lookup(gdbval):
type = gdbval.type.unqualified()
- if type.code == gdb.TYPE_CODE_PTR:
- type = type.target().unqualified()
- t = str(type)
- if t in ("PyObject", "PyFrameObject", "PyUnicodeObject"):
- return PyObjectPtrPrinter(gdbval)
+ if type.code != gdb.TYPE_CODE_PTR:
+ return None
+
+ type = type.target().unqualified()
+ t = str(type)
+ if t in ("PyObject", "PyFrameObject", "PyUnicodeObject", "wrapperobject"):
+ return PyObjectPtrPrinter(gdbval)
"""
During development, I've been manually invoking the code in this way:
return 'Garbage-collecting'
# Detect invocations of PyCFunction instances:
- older = self.older()
- if not older:
- return False
-
- caller = older._gdbframe.name()
+ frame = self._gdbframe
+ caller = frame.name()
if not caller:
return False
# "self" is the (PyObject*) of the 'self'
try:
# Use the prettyprinter for the func:
- func = older._gdbframe.read_var('func')
+ func = frame.read_var('func')
return str(func)
except RuntimeError:
return 'PyCFunction invocation (unable to read "func")'
elif caller == '_PyCFunction_FastCallDict':
try:
- func = older._gdbframe.read_var('func_obj')
+ func = frame.read_var('func_obj')
return str(func)
except RuntimeError:
return 'PyCFunction invocation (unable to read "func_obj")'
+ if caller == 'wrapper_call':
+ try:
+ func = frame.read_var('wp')
+ return str(func)
+ except RuntimeError:
+ return '<wrapper_call invocation>'
+
# This frame isn't worth reporting:
return False
+++ /dev/null
-"""Bring time stamps of generated checked-in files into the right order
-
-A versioned configuration file .hgtouch specifies generated files, in the
-syntax of make rules.
-
- output: input1 input2
-
-In addition to the dependency syntax, #-comments are supported.
-"""
-import errno
-import os
-import time
-
-def parse_config(repo):
- try:
- fp = repo.wfile(".hgtouch")
- except IOError, e:
- if e.errno != errno.ENOENT:
- raise
- return {}
- result = {}
- with fp:
- for line in fp:
- # strip comments
- line = line.split('#')[0].strip()
- if ':' not in line:
- continue
- outputs, inputs = line.split(':', 1)
- outputs = outputs.split()
- inputs = inputs.split()
- for o in outputs:
- try:
- result[o].extend(inputs)
- except KeyError:
- result[o] = inputs
- return result
-
-def check_rule(ui, repo, modified, basedir, output, inputs):
- """Verify that the output is newer than any of the inputs.
- Return (status, stamp), where status is True if the update succeeded,
- and stamp is the newest time stamp assigned to any file (might be in
- the future).
-
- If basedir is nonempty, it gives a directory in which the tree is to
- be checked.
- """
- f_output = repo.wjoin(os.path.join(basedir, output))
- try:
- o_time = os.stat(f_output).st_mtime
- except OSError:
- ui.warn("Generated file %s does not exist\n" % output)
- return False, 0
- youngest = 0 # youngest dependency
- backdate = None
- backdate_source = None
- for i in inputs:
- f_i = repo.wjoin(os.path.join(basedir, i))
- try:
- i_time = os.stat(f_i).st_mtime
- except OSError:
- ui.warn(".hgtouch input file %s does not exist\n" % i)
- return False, 0
- if i in modified:
- # input is modified. Need to backdate at least to i_time
- if backdate is None or backdate > i_time:
- backdate = i_time
- backdate_source = i
- continue
- youngest = max(i_time, youngest)
- if backdate is not None:
- ui.warn("Input %s for file %s locally modified\n" % (backdate_source, output))
- # set to 1s before oldest modified input
- backdate -= 1
- os.utime(f_output, (backdate, backdate))
- return False, 0
- if youngest >= o_time:
- ui.note("Touching %s\n" % output)
- youngest += 1
- os.utime(f_output, (youngest, youngest))
- return True, youngest
- else:
- # Nothing to update
- return True, 0
-
-def do_touch(ui, repo, basedir):
- if basedir:
- if not os.path.isdir(repo.wjoin(basedir)):
- ui.warn("Abort: basedir %r does not exist\n" % basedir)
- return
- modified = []
- else:
- modified = repo.status()[0]
- dependencies = parse_config(repo)
- success = True
- tstamp = 0 # newest time stamp assigned
- # try processing all rules in topological order
- hold_back = {}
- while dependencies:
- output, inputs = dependencies.popitem()
- # check whether any of the inputs is generated
- for i in inputs:
- if i in dependencies:
- hold_back[output] = inputs
- continue
- _success, _tstamp = check_rule(ui, repo, modified, basedir, output, inputs)
- success = success and _success
- tstamp = max(tstamp, _tstamp)
- # put back held back rules
- dependencies.update(hold_back)
- hold_back = {}
- now = time.time()
- if tstamp > now:
- # wait until real time has passed the newest time stamp, to
- # avoid having files dated in the future
- time.sleep(tstamp-now)
- if hold_back:
- ui.warn("Cyclic dependency involving %s\n" % (' '.join(hold_back.keys())))
- return False
- return success
-
-def touch(ui, repo, basedir):
- "touch generated files that are older than their sources after an update."
- do_touch(ui, repo, basedir)
-
-cmdtable = {
- "touch": (touch,
- [('b', 'basedir', '', 'base dir of the tree to apply touching')],
- "hg touch [-b BASEDIR]")
-}
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)\r
\r
call "%D%get_externals.bat"\r
-\r
-call "%PCBUILD%env.bat" x86\r
+call "%PCBUILD%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
\r
if defined BUILDX86 (\r
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%\r
)\r
\r
rem Build the launcher MSI separately\r
-msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86\r
+%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86\r
\r
set BUILD_CMD="%D%bundle\snapshot.wixproj"\r
if defined BUILDTEST (\r
)\r
\r
if defined BUILDX86 (\r
- msbuild %BUILD_CMD%\r
+ %MSBUILD% %BUILD_CMD%\r
if errorlevel 1 goto :eof\r
)\r
if defined BUILDX64 (\r
- msbuild /p:Platform=x64 %BUILD_CMD%\r
+ %MSBUILD% /p:Platform=x64 %BUILD_CMD%\r
if errorlevel 1 goto :eof\r
)\r
\r
if not exist "%GIT%" echo Cannot find Git on PATH && exit /B 1\r
\r
call "%D%get_externals.bat"\r
+call "%PCBUILD%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
\r
:builddoc\r
if "%SKIPBUILD%" EQU "1" goto skipdoc\r
@echo off\r
)\r
\r
-call "%PCBUILD%env.bat"\r
if "%OUTDIR_PLAT%" EQU "win32" (\r
- msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%\r
+ %MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%\r
if errorlevel 1 exit /B\r
) else if not exist "%PCBUILD%win32\en-us\launcher.msi" (\r
- msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%\r
+ %MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%\r
if errorlevel 1 exit /B\r
)\r
\r
set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%\r
-msbuild "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true\r
+%MSBUILD% "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true\r
if errorlevel 1 exit /B\r
-msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false\r
+%MSBUILD% "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false\r
if errorlevel 1 exit /B\r
\r
if defined BUILDZIP (\r
- msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"\r
+ %MSBUILD% "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"\r
if errorlevel 1 exit /B\r
)\r
\r
if defined BUILDNUGET (\r
- msbuild "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"\r
+ %MSBUILD% "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"\r
if errorlevel 1 exit /B\r
)\r
\r
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.30501.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonba", "pythonba.vcxproj", "{7A09B132-B3EE-499B-A700-A4B2157FEA3D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.ActiveCfg = Debug|Win32
- {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.Build.0 = Debug|Win32
- {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.ActiveCfg = Release|Win32
- {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 2013\r
+VisualStudioVersion = 12.0.30501.0\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonba", "pythonba.vcxproj", "{7A09B132-B3EE-499B-A700-A4B2157FEA3D}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Win32 = Debug|Win32\r
+ Release|Win32 = Release|Win32\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.Build.0 = Debug|Win32\r
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.ActiveCfg = Release|Win32\r
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.Build.0 = Release|Win32\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- <copyright file="wixstdba.vcxproj" company="Outercurve Foundation">
- Copyright (c) 2004, Outercurve Foundation.
- This software is released under Microsoft Reciprocal License (MS-RL).
- The license and further copyright text can be found in the file
- LICENSE.TXT at the root directory of the distribution.
- </copyright>
--->
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
- <Platform Condition="'$(Platform)' == ''">Win32</Platform>
- <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</PlatformToolset>
- <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</PlatformToolset>
- <ProjectGuid>{7A09B132-B3EE-499B-A700-A4B2157FEA3D}</ProjectGuid>
- <TargetName>PythonBA</TargetName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\..\wix.props" />
- <PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <IntDir>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\Bootstrap\</IntDir>
- <OutDir>$(IntDir)</OutDir>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(WixInstallPath)sdk\inc</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <AdditionalDependencies>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v140'">$(WixInstallPath)sdk\vs2015\lib\x86</AdditionalLibraryDirectories>
- <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v120'">$(WixInstallPath)sdk\vs2013\lib\x86</AdditionalLibraryDirectories>
- <ModuleDefinitionFile>pythonba.def</ModuleDefinitionFile>
- <GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="PythonBootstrapperApplication.cpp" />
- <ClCompile Include="pythonba.cpp" />
- <ClCompile Include="pch.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="pch.h" />
- <ClInclude Include="resource.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="pythonba.def" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<!--\r
+ <copyright file="wixstdba.vcxproj" company="Outercurve Foundation">\r
+ Copyright (c) 2004, Outercurve Foundation.\r
+ This software is released under Microsoft Reciprocal License (MS-RL).\r
+ The license and further copyright text can be found in the file\r
+ LICENSE.TXT at the root directory of the distribution.\r
+ </copyright>\r
+-->\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>\r
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>\r
+ <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</PlatformToolset>\r
+ <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</PlatformToolset>\r
+ <ProjectGuid>{7A09B132-B3EE-499B-A700-A4B2157FEA3D}</ProjectGuid>\r
+ <TargetName>PythonBA</TargetName>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <Import Project="..\..\wix.props" />\r
+ <PropertyGroup Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ <IntDir>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\Bootstrap\</IntDir>\r
+ <OutDir>$(IntDir)</OutDir>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <AdditionalIncludeDirectories>$(WixInstallPath)sdk\inc</AdditionalIncludeDirectories>\r
+ <PrecompiledHeader>Use</PrecompiledHeader>\r
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v140'">$(WixInstallPath)sdk\vs2015\lib\x86</AdditionalLibraryDirectories>\r
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v120'">$(WixInstallPath)sdk\vs2013\lib\x86</AdditionalLibraryDirectories>\r
+ <ModuleDefinitionFile>pythonba.def</ModuleDefinitionFile>\r
+ <GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="PythonBootstrapperApplication.cpp" />\r
+ <ClCompile Include="pythonba.cpp" />\r
+ <ClCompile Include="pch.cpp">\r
+ <PrecompiledHeader>Create</PrecompiledHeader>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="pch.h" />\r
+ <ClInclude Include="resource.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="pythonba.def" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
</Project>
\ No newline at end of file
@echo off\r
setlocal\r
-rem Simple script to fetch source for external tools\r
-\r
-where /Q svn\r
-if ERRORLEVEL 1 (\r
- echo.svn.exe must be on your PATH to get external tools.\r
- echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the\r
- echo.command line tools option.\r
- popd\r
- exit /b 1\r
+rem Simple script to fetch source for external libraries\r
+\r
+set HERE=%~dp0\r
+if "%PCBUILD%"=="" (set PCBUILD=%HERE%..\..\PCbuild\)\r
+if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%HERE%..\..\externals\windows-installer)\r
+if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\..\nuget.exe)\r
+if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)\r
+\r
+set DO_FETCH=true\r
+set DO_CLEAN=false\r
+\r
+:CheckOpts\r
+if "%~1"=="--python" (set PYTHON_FOR_BUILD=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts\r
+if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts\r
+if "%~1"=="--clean-only" (set DO_FETCH=false) & goto clean\r
+if "x%~1" NEQ "x" goto usage\r
+\r
+if "%DO_CLEAN%"=="false" goto fetch\r
+:clean\r
+echo.Cleaning up external libraries.\r
+if exist "%EXTERNALS_DIR%" (\r
+ rem Sometimes this fails the first time; try it twice\r
+ rmdir /s /q "%EXTERNALS_DIR%" || rmdir /s /q "%EXTERNALS_DIR%"\r
)\r
\r
-if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"\r
-pushd "%~dp0..\..\externals"\r
+if "%DO_FETCH%"=="false" goto end\r
+:fetch\r
\r
-if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
+if "%ORG%"=="" (set ORG=python)\r
\r
-if not exist "windows-installer\.svn" (\r
- echo.Checking out installer dependencies to %CD%\windows-installer\r
- svn co %SVNROOT%windows-installer\r
-) else (\r
- echo.Updating installer dependencies in %CD%\windows-installer\r
- svn up windows-installer\r
+if "%PYTHON_FOR_BUILD%"=="" (\r
+ echo Checking for installed python...\r
+ py -3.6 -V >nul 2>&1 && (set PYTHON_FOR_BUILD=py -3.6)\r
)\r
+if "%PYTHON_FOR_BUILD%"=="" (\r
+ if NOT exist "%EXTERNALS_DIR%" mkdir "%EXTERNALS_DIR%"\r
+ if NOT exist "%NUGET%" (\r
+ echo Downloading nuget...\r
+ rem NB: Must use single quotes around NUGET here, NOT double!\r
+ rem Otherwise, a space in the path would break things\r
+ powershell.exe -Command Invoke-WebRequest %NUGET_URL% -OutFile '%NUGET%'\r
+ )\r
+ echo Installing Python via nuget...\r
+ "%NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%EXTERNALS_DIR%"\r
+ rem Quote it here; it's not quoted later because "py -3.6" wouldn't work\r
+ set PYTHON_FOR_BUILD="%EXTERNALS_DIR%\pythonx86\tools\python.exe"\r
+)\r
+\r
+echo.Fetching external libraries...\r
+\r
+set libraries=\r
+\r
+for %%e in (%libraries%) do (\r
+ if exist "%EXTERNALS_DIR%\%%e" (\r
+ echo.%%e already exists, skipping.\r
+ ) else (\r
+ echo.Fetching %%e...\r
+ %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e\r
+ )\r
+)\r
+\r
+echo.Fetching external tools...\r
+\r
+set binaries=\r
+rem We always use whatever's latest in the repo for these\r
+set binaries=%binaries% binutils\r
+set binaries=%binaries% gpg\r
+set binaries=%binaries% htmlhelp\r
+set binaries=%binaries% nuget\r
+set binaries=%binaries% redist\r
+set binaries=%binaries% wix\r
+\r
+for %%b in (%binaries%) do (\r
+ if exist "%EXTERNALS_DIR%\%%b" (\r
+ echo.%%b already exists, skipping.\r
+ ) else (\r
+ echo.Fetching %%b...\r
+ %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b\r
+ )\r
+)\r
+\r
+echo Finished.\r
+goto end\r
+\r
+:usage\r
+echo.Valid options: -c, --clean, --clean-only, --organization, --python,\r
+echo.--no-tkinter, --no-openssl\r
+echo.\r
+echo.Pull all sources and binaries necessary for compiling optional extension\r
+echo.modules that rely on external libraries.\r
+echo.\r
+echo.The --organization option determines which github organization to download\r
+echo.from, the --python option determines which Python 3.6+ interpreter to use\r
+echo.with PCbuild\get_external.py.\r
+echo.\r
+echo.Use the -c or --clean option to remove the entire externals directory.\r
+echo.\r
+echo.Use the --clean-only option to do the same cleaning, without pulling in\r
+echo.anything new.\r
+echo.\r
+exit /b -1\r
\r
-popd\r
+:end\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
- <OutputName>python</OutputName>
- <OutputSuffix></OutputSuffix>
- <SupportSigning>false</SupportSigning>
- </PropertyGroup>
-
- <Import Project="msi.props" />
-
- <PropertyGroup>
- <SignOutput>false</SignOutput>
- <TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
- <TargetExt>.zip</TargetExt>
- <TargetPath>$(OutputPath)\$(TargetName)$(TargetExt)</TargetPath>
- <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
- <Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
- <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>
- <Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>
- <Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>
- </PropertyGroup>
-
- <Target Name="_Build">
- <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(CleanCommand)%0D%0A$(Arguments)" />
- </Target>
-
- <Target Name="AfterBuild" />
- <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
-
- <Target Name="ShowHashes">
- <ItemGroup>
- <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
- </ItemGroup>
-
- <Exec Command=""$(PythonExe)" generate_md5.py @(UserFiles->'"%(FullPath)"',' ')" />
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>\r
+ <OutputName>python</OutputName>\r
+ <OutputSuffix></OutputSuffix>\r
+ <SupportSigning>false</SupportSigning>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="msi.props" />\r
+\r
+ <PropertyGroup>\r
+ <SignOutput>false</SignOutput>\r
+ <TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>\r
+ <TargetExt>.zip</TargetExt>\r
+ <TargetPath>$(OutputPath)\$(TargetName)$(TargetExt)</TargetPath>\r
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>\r
+ <Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>\r
+ <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>\r
+ <Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>\r
+ <Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>\r
+ </PropertyGroup>\r
+\r
+ <Target Name="_Build">\r
+ <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(CleanCommand)%0D%0A$(Arguments)" />\r
+ </Target>\r
+\r
+ <Target Name="AfterBuild" />\r
+ <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />\r
+\r
+ <Target Name="ShowHashes">\r
+ <ItemGroup>\r
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />\r
+ </ItemGroup>\r
+\r
+ <Exec Command=""$(PythonExe)" generate_md5.py @(UserFiles->'"%(FullPath)"',' ')" />\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">
- <PropertyGroup>
- <TargetName>$(OutputName)</TargetName>
- <DefineSolutionProperties>false</DefineSolutionProperties>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces>
- <CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings>
- <BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease>
- <SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput>
- <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
- <Platform Condition="'$(Platform)' == ''">x86</Platform>
- <InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope>
- <_MakeCatCommand Condition="'$(_MakeCatCommand)' == ''">makecat</_MakeCatCommand>
- </PropertyGroup>
-
- <Import Project="wix.props" />
- <Import Project="..\..\PCBuild\tcltk.props" />
-
- <PropertyGroup>
- <!--
- This URI is used to generate the various GUIDs used by the installer.
- Installers built with the same URI will upgrade each other or block
- when attempting to downgrade.
-
- By default, this is the local computer name, which will produce
- installers that do not interfere with other installers. Products
- that intend to bundle Python should rebuild these modules with their
- own URI to avoid conflicting with the official releases.
-
- The official releases use "http://www.python.org/$(ArchName)"
-
- This is not the same as the DownloadUrl property used in the bundle
- projects.
- -->
- <ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri>
- <ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
- </PropertyGroup>
-
-
- <ItemGroup>
- <Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
- <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
- <WixExtension Include="WixUtilExtension">
- <HintPath>WixUtilExtension</HintPath>
- <Name>WixUtilExtension</Name>
- </WixExtension>
- </ItemGroup>
-
- <PropertyGroup>
- <IntermediateOutputPath>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>
- <IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
- <OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
- <OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
- <OutDir>$(OutputPath)</OutDir>
- <ReuseCabinetCache>true</ReuseCabinetCache>
- <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist>
- <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>
- <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
-
- <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>
- </PropertyGroup>
-
- <PropertyGroup Condition="!$(BuildForRelease)">
- <RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
- <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>
- <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>
- </PropertyGroup>
-
- <PropertyGroup>
- <Bitness>32-bit</Bitness>
- <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
- <PlatformArchitecture>32bit</PlatformArchitecture>
- <PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture>
- <DefineConstants>
- $(DefineConstants);
- Version=$(InstallerVersion);
- ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);
- LongVersion=$(PythonVersion);
- MajorVersionNumber=$(MajorVersionNumber);
- MinorVersionNumber=$(MinorVersionNumber);
- UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
- NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
- Bitness=$(Bitness);
- PlatformArchitecture=$(PlatformArchitecture);
- PyDebugExt=$(PyDebugExt);
- PyArchExt=$(PyArchExt);
- PyTestExt=$(PyTestExt);
- OptionalFeatureName=$(OutputName);
- </DefineConstants>
- <DefineConstants Condition="'$(CRTRedist)' != ''">
- $(DefineConstants);CRTRedist=$(CRTRedist);
- </DefineConstants>
- <DefineConstants Condition="$(Platform) != 'x64'">
- $(DefineConstants);Suffix32=-32;
- </DefineConstants>
- <DefineConstants Condition="$(Platform) == 'x64'">
- $(DefineConstants);Suffix32=;
- </DefineConstants>
- </PropertyGroup>
-
- <ItemDefinitionGroup>
- <InstallFiles>
- <Group>generated_filelist</Group>
- <Condition></Condition>
- <DiskId></DiskId>
- <IncludeInCat>false</IncludeInCat>
- </InstallFiles>
- <LinkerBindInputPaths>
- <Visible>false</Visible>
- </LinkerBindInputPaths>
- </ItemDefinitionGroup>
- <ItemGroup>
- <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">
- <BindName></BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">
- <BindName></BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(PySourcePath)">
- <BindName>src</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(tcltkDir)">
- <BindName>tcltk</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">
- <BindName>redist</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
- <BindName>redist</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(BuildPath32)">
- <BindName>build32</BindName>
- </LinkerBindInputPaths>
- <LinkerBindInputPaths Include="$(BuildPath64)">
- <BindName>build64</BindName>
- </LinkerBindInputPaths>
- </ItemGroup>
-
- <Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
- <Error Text="Platform '$(Platform)' is not supported. Use 'x86' or 'x64'." Condition="$(Platform) != 'x86' and $(Platform) != 'x64'" />
- </Target>
-
- <ItemGroup>
- <_Uuid Include="CoreUpgradeCode">
- <Uri>upgradecode</Uri>
- </_Uuid>
- <_Uuid Include="UpgradeCode">
- <Uri>upgradecode/$(OutputName)</Uri>
- </_Uuid>
- <_Uuid Include="InstallDirectoryGuidSeed">
- <Uri>installdirectoryseed</Uri>
- </_Uuid>
- <_Uuid Include="PythonExeComponentGuid">
- <Uri>python.exe</Uri>
- </_Uuid>
- <_Uuid Include="PythonwExeComponentGuid">
- <Uri>pythonw.exe</Uri>
- </_Uuid>
- <_Uuid Include="RemoveLib2to3PickleComponentGuid">
- <Uri>lib2to3/pickles</Uri>
- </_Uuid>
- <_Uuid Include="CommonPythonRegComponentGuid">
- <Uri>registry</Uri>
- </_Uuid>
- <_Uuid Include="PythonRegComponentGuid">
- <Uri>registry/$(OutputName)</Uri>
- </_Uuid>
- </ItemGroup>
- <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
- <PropertyGroup>
- <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
- <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
- </PropertyGroup>
-
- <Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"'
- WorkingDirectory="$(MSBuildThisFileDirectory)"
- IgnoreExitCode="false" />
-
- <ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
- <Output TaskParameter="Lines" ItemName="_UuidValue" />
- </ReadLinesFromFile>
-
- <PropertyGroup>
- <DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
- </PropertyGroup>
- </Target>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">\r
+ <PropertyGroup>\r
+ <TargetName>$(OutputName)</TargetName>\r
+ <DefineSolutionProperties>false</DefineSolutionProperties>\r
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>\r
+ <SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces>\r
+ <CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings>\r
+ <BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease>\r
+ <SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput>\r
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>\r
+ <Platform Condition="'$(Platform)' == ''">x86</Platform>\r
+ <InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope>\r
+ <_MakeCatCommand Condition="'$(_MakeCatCommand)' == ''">makecat</_MakeCatCommand>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="wix.props" />\r
+ <Import Project="..\..\PCBuild\tcltk.props" />\r
+\r
+ <PropertyGroup>\r
+ <!--\r
+ This URI is used to generate the various GUIDs used by the installer.\r
+ Installers built with the same URI will upgrade each other or block\r
+ when attempting to downgrade.\r
+ \r
+ By default, this is the local computer name, which will produce\r
+ installers that do not interfere with other installers. Products\r
+ that intend to bundle Python should rebuild these modules with their\r
+ own URI to avoid conflicting with the official releases.\r
+ \r
+ The official releases use "http://www.python.org/$(ArchName)"\r
+ \r
+ This is not the same as the DownloadUrl property used in the bundle\r
+ projects.\r
+ -->\r
+ <ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri>\r
+ <ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>\r
+ </PropertyGroup>\r
+\r
+ \r
+ <ItemGroup>\r
+ <Compile Include="$(MSBuildThisFileDirectory)common.wxs" />\r
+ <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />\r
+ <WixExtension Include="WixUtilExtension">\r
+ <HintPath>WixUtilExtension</HintPath>\r
+ <Name>WixUtilExtension</Name>\r
+ </WixExtension>\r
+ </ItemGroup>\r
+\r
+ <PropertyGroup>\r
+ <IntermediateOutputPath>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>\r
+ <IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>\r
+ <OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>\r
+ <OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>\r
+ <OutDir>$(OutputPath)</OutDir>\r
+ <ReuseCabinetCache>true</ReuseCabinetCache>\r
+ <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist>\r
+ <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>\r
+ <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>\r
+\r
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>\r
+ </PropertyGroup>\r
+ \r
+ <PropertyGroup Condition="!$(BuildForRelease)">\r
+ <RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>\r
+ <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>\r
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>\r
+ </PropertyGroup>\r
+ \r
+ <PropertyGroup>\r
+ <Bitness>32-bit</Bitness>\r
+ <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>\r
+ <PlatformArchitecture>32bit</PlatformArchitecture>\r
+ <PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture>\r
+ <DefineConstants>\r
+ $(DefineConstants);\r
+ Version=$(InstallerVersion);\r
+ ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);\r
+ LongVersion=$(PythonVersion);\r
+ MajorVersionNumber=$(MajorVersionNumber);\r
+ MinorVersionNumber=$(MinorVersionNumber);\r
+ UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;\r
+ NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;\r
+ Bitness=$(Bitness);\r
+ PlatformArchitecture=$(PlatformArchitecture);\r
+ PyDebugExt=$(PyDebugExt);\r
+ PyArchExt=$(PyArchExt);\r
+ PyTestExt=$(PyTestExt);\r
+ OptionalFeatureName=$(OutputName);\r
+ </DefineConstants>\r
+ <DefineConstants Condition="'$(CRTRedist)' != ''">\r
+ $(DefineConstants);CRTRedist=$(CRTRedist);\r
+ </DefineConstants>\r
+ <DefineConstants Condition="$(Platform) != 'x64'">\r
+ $(DefineConstants);Suffix32=-32;\r
+ </DefineConstants>\r
+ <DefineConstants Condition="$(Platform) == 'x64'">\r
+ $(DefineConstants);Suffix32=;\r
+ </DefineConstants>\r
+ </PropertyGroup>\r
+\r
+ <ItemDefinitionGroup>\r
+ <InstallFiles>\r
+ <Group>generated_filelist</Group>\r
+ <Condition></Condition>\r
+ <DiskId></DiskId>\r
+ <IncludeInCat>false</IncludeInCat>\r
+ </InstallFiles>\r
+ <LinkerBindInputPaths>\r
+ <Visible>false</Visible>\r
+ </LinkerBindInputPaths>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">\r
+ <BindName></BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">\r
+ <BindName></BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(PySourcePath)">\r
+ <BindName>src</BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(tcltkDir)">\r
+ <BindName>tcltk</BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">\r
+ <BindName>redist</BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">\r
+ <BindName>redist</BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(BuildPath32)">\r
+ <BindName>build32</BindName>\r
+ </LinkerBindInputPaths>\r
+ <LinkerBindInputPaths Include="$(BuildPath64)">\r
+ <BindName>build64</BindName>\r
+ </LinkerBindInputPaths>\r
+ </ItemGroup>\r
+\r
+ <Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">\r
+ <Error Text="Platform '$(Platform)' is not supported. Use 'x86' or 'x64'." Condition="$(Platform) != 'x86' and $(Platform) != 'x64'" />\r
+ </Target>\r
+ \r
+ <ItemGroup>\r
+ <_Uuid Include="CoreUpgradeCode">\r
+ <Uri>upgradecode</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="UpgradeCode">\r
+ <Uri>upgradecode/$(OutputName)</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="InstallDirectoryGuidSeed">\r
+ <Uri>installdirectoryseed</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="PythonExeComponentGuid">\r
+ <Uri>python.exe</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="PythonwExeComponentGuid">\r
+ <Uri>pythonw.exe</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="RemoveLib2to3PickleComponentGuid">\r
+ <Uri>lib2to3/pickles</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="CommonPythonRegComponentGuid">\r
+ <Uri>registry</Uri>\r
+ </_Uuid>\r
+ <_Uuid Include="PythonRegComponentGuid">\r
+ <Uri>registry/$(OutputName)</Uri>\r
+ </_Uuid>\r
+ </ItemGroup>\r
+ <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">\r
+ <PropertyGroup>\r
+ <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>\r
+ <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>\r
+ </PropertyGroup>\r
+ \r
+ <Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"'\r
+ WorkingDirectory="$(MSBuildThisFileDirectory)"\r
+ IgnoreExitCode="false" />\r
+ \r
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">\r
+ <Output TaskParameter="Lines" ItemName="_UuidValue" />\r
+ </ReadLinesFromFile>\r
+ \r
+ <PropertyGroup>\r
+ <DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>\r
+ </PropertyGroup>\r
+ </Target>\r
</Project>
\ No newline at end of file
echo Found gpg2.exe at %GPG%\r
)\r
\r
-call "%PCBUILD%env.bat" > nul 2> nul\r
+call "%PCBUILD%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
pushd "%D%"\r
-msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%\r
-msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%\r
+%MSBUILD% /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%\r
+%MSBUILD% /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%\r
if not defined NOTEST (\r
- msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86\r
- msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64\r
+ %MSBUILD% /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86\r
+ %MSBUILD% /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64\r
)\r
-msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86\r
-msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false\r
+%MSBUILD% /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86\r
+%MSBUILD% /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false\r
popd\r
exit /B 0\r
\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9}</ProjectGuid>
- <OutputName>python</OutputName>
- <OutputSuffix></OutputSuffix>
-
- <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">$(TARGET)</DownloadUrlBase>
- <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">/srv/www.python.org/ftp/python</DownloadUrlBase>
- <IncludeDoc Condition="'$(IncludeDoc)' == ''">true</IncludeDoc>
- <BuildForRelease Condition="'$(BuildForRelease)' == ''">true</BuildForRelease>
- <DryRun Condition="'$(DryRun)' == ''">false</DryRun>
- <Purge Condition="'$(Purge)' == ''">false</Purge>
- </PropertyGroup>
-
- <Import Project="msi.props" />
- <Import Project="bundle\bundle.targets" />
-
- <PropertyGroup>
- <EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget>
- <MSITarget>$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, ``).TrimEnd(`/`))</MSITarget>
- </PropertyGroup>
-
- <ItemGroup>
- <File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu">
- <CopyTo>$(MSITarget)</CopyTo>
- </File>
- <File Include="$(OutputPath)\*.exe;$(OutputPath)\*.zip">
- <CopyTo>$(EXETarget)</CopyTo>
- </File>
- <File Include="$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm" Condition="$(IncludeDoc)">
- <CopyTo>$(EXETarget)</CopyTo>
- </File>
- </ItemGroup>
-
- <Target Name="_ValidateProperties">
- <Error Text="No value for Host provided" Condition="'$(Host)' == ''" />
- <Error Text="No value for User provided" Condition="'$(User)' == ''" />
- <Error Text="No path for PSCP provided" Condition="'$(PSCP)' == ''" />
- <Error Text="No path for PLINK provided" Condition="'$(PLINK)' == ''" />
- </Target>
-
- <Target Name="_RunGpg" Condition="'$(GPG)' != ''" Inputs="@(File)" Outputs="$(IntermediateOutputPath)\gpg\%(FileName)%(Extension).asc">
- <MakeDir Directories="$(IntermediateOutputPath)gpg" />
- <Delete Files="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" Condition="Exists('$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc')" />
- <Exec Command=""$(GPG)" -ba -o "$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" "%(File.FullPath)"" />
- <ItemGroup>
- <File Include="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc">
- <CopyTo>%(File.CopyTo)</CopyTo>
- </File>
- </ItemGroup>
- </Target>
-
- <Target Name="_Upload" Condition="!$(DryRun)">
- <Exec Command=""$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)
-"$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)
-"$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
-" />
- </Target>
-
- <Target Name="_PrintNames" Condition="$(DryRun)">
- <Exec Command="echo "$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)
-echo "$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)
-echo "$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
-echo.
-echo." />
- </Target>
-
- <Target Name="_Purge" Condition="$(Purge) and !$(DryRun)">
- <Error Condition="!Exists('$(PythonExe)')" Text="No Python executable available at $(PythonExe)" />
- <Exec Command=""$(PythonExe)" purge.py $(PythonVersion)" />
- </Target>
-
- <Target Name="_TestLayout">
- <ItemGroup>
- <WebInstaller Include="$(OutputPath)\*-webinstall.exe" />
- <WebInstaller>
- <SourceDir>$(TEMP)\%(Filename)_source</SourceDir>
- <SourceExe>$(TEMP)\%(Filename)_source\%(Filename)%(Extension)</SourceExe>
- <LayoutDir>$(TEMP)\%(Filename)_layout</LayoutDir>
- <LogDir>$(OutputPath)\%(Filename)_layoutlog</LogDir>
- <LogFile>$(OutputPath)\%(Filename)_layoutlog\%(Filename).log</LogFile>
- </WebInstaller>
- </ItemGroup>
- <RemoveDir Directories="%(WebInstaller.SourceDir)" Condition="Exists('%(WebInstaller.SourceDir)')" />
- <RemoveDir Directories="%(WebInstaller.LayoutDir)" Condition="Exists('%(WebInstaller.LayoutDir)')" />
- <RemoveDir Directories="%(WebInstaller.LogDir)" Condition="Exists('%(WebInstaller.LogDir)')" />
- <MakeDir Directories="%(WebInstaller.SourceDir)" />
- <Copy SourceFiles="@(WebInstaller)" DestinationFiles="%(WebInstaller.SourceExe)" />
- <Exec Command="start "Install test" /wait "%(WebInstaller.SourceExe)" /layout "%(WebInstaller.LayoutDir)" /passive /log "%(WebInstaller.LogFile)""
- IgnoreExitCode="false" />
- <RemoveDir Directories="%(WebInstaller.LayoutDir)" />
- <RemoveDir Directories="%(WebInstaller.SourceDir)" />
- <RemoveDir Directories="%(WebInstaller.LogDir)" />
- <Message Text="Successfully downloaded %(WebInstaller.Filename)%(WebInstaller.Extension) layout" Importance="high" />
- </Target>
-
- <Target Name="Upload" DependsOnTargets="_ValidateProperties;_RunGpg;_PrintNames;_Upload;_Purge" />
- <Target Name="Test" DependsOnTargets="_TestLayout" />
-
- <Target Name="ShowHashes">
- <ItemGroup>
- <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
- </ItemGroup>
-
- <Exec Command=""$(PythonExe)" generate_md5.py @(UserFiles->'"%(FullPath)"',' ')" />
- </Target>
-
- <Target Name="Build">
- <Error Text="This script should be invoked using uploadrelease.bat." />
- </Target>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <ProjectGuid>{2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9}</ProjectGuid>\r
+ <OutputName>python</OutputName>\r
+ <OutputSuffix></OutputSuffix>\r
+ \r
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">$(TARGET)</DownloadUrlBase>\r
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">/srv/www.python.org/ftp/python</DownloadUrlBase>\r
+ <IncludeDoc Condition="'$(IncludeDoc)' == ''">true</IncludeDoc>\r
+ <BuildForRelease Condition="'$(BuildForRelease)' == ''">true</BuildForRelease>\r
+ <DryRun Condition="'$(DryRun)' == ''">false</DryRun>\r
+ <Purge Condition="'$(Purge)' == ''">false</Purge>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="msi.props" />\r
+ <Import Project="bundle\bundle.targets" />\r
+ \r
+ <PropertyGroup>\r
+ <EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget>\r
+ <MSITarget>$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, ``).TrimEnd(`/`))</MSITarget>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu">\r
+ <CopyTo>$(MSITarget)</CopyTo>\r
+ </File>\r
+ <File Include="$(OutputPath)\*.exe;$(OutputPath)\*.zip">\r
+ <CopyTo>$(EXETarget)</CopyTo>\r
+ </File>\r
+ <File Include="$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm" Condition="$(IncludeDoc)">\r
+ <CopyTo>$(EXETarget)</CopyTo>\r
+ </File>\r
+ </ItemGroup>\r
+ \r
+ <Target Name="_ValidateProperties">\r
+ <Error Text="No value for Host provided" Condition="'$(Host)' == ''" />\r
+ <Error Text="No value for User provided" Condition="'$(User)' == ''" />\r
+ <Error Text="No path for PSCP provided" Condition="'$(PSCP)' == ''" />\r
+ <Error Text="No path for PLINK provided" Condition="'$(PLINK)' == ''" />\r
+ </Target>\r
+ \r
+ <Target Name="_RunGpg" Condition="'$(GPG)' != ''" Inputs="@(File)" Outputs="$(IntermediateOutputPath)\gpg\%(FileName)%(Extension).asc">\r
+ <MakeDir Directories="$(IntermediateOutputPath)gpg" />\r
+ <Delete Files="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" Condition="Exists('$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc')" />\r
+ <Exec Command=""$(GPG)" -ba -o "$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" "%(File.FullPath)"" />\r
+ <ItemGroup>\r
+ <File Include="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc">\r
+ <CopyTo>%(File.CopyTo)</CopyTo>\r
+ </File>\r
+ </ItemGroup>\r
+ </Target>\r
+ \r
+ <Target Name="_Upload" Condition="!$(DryRun)">\r
+ <Exec Command=""$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)\r
+"$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)\r
+"$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*\r
+" />\r
+ </Target>\r
+ \r
+ <Target Name="_PrintNames" Condition="$(DryRun)">\r
+ <Exec Command="echo "$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)\r
+echo "$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)\r
+echo "$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*\r
+echo.\r
+echo." />\r
+ </Target>\r
+ \r
+ <Target Name="_Purge" Condition="$(Purge) and !$(DryRun)">\r
+ <Error Condition="!Exists('$(PythonExe)')" Text="No Python executable available at $(PythonExe)" />\r
+ <Exec Command=""$(PythonExe)" purge.py $(PythonVersion)" />\r
+ </Target>\r
+ \r
+ <Target Name="_TestLayout">\r
+ <ItemGroup>\r
+ <WebInstaller Include="$(OutputPath)\*-webinstall.exe" />\r
+ <WebInstaller>\r
+ <SourceDir>$(TEMP)\%(Filename)_source</SourceDir>\r
+ <SourceExe>$(TEMP)\%(Filename)_source\%(Filename)%(Extension)</SourceExe>\r
+ <LayoutDir>$(TEMP)\%(Filename)_layout</LayoutDir>\r
+ <LogDir>$(OutputPath)\%(Filename)_layoutlog</LogDir>\r
+ <LogFile>$(OutputPath)\%(Filename)_layoutlog\%(Filename).log</LogFile>\r
+ </WebInstaller>\r
+ </ItemGroup>\r
+ <RemoveDir Directories="%(WebInstaller.SourceDir)" Condition="Exists('%(WebInstaller.SourceDir)')" />\r
+ <RemoveDir Directories="%(WebInstaller.LayoutDir)" Condition="Exists('%(WebInstaller.LayoutDir)')" />\r
+ <RemoveDir Directories="%(WebInstaller.LogDir)" Condition="Exists('%(WebInstaller.LogDir)')" />\r
+ <MakeDir Directories="%(WebInstaller.SourceDir)" />\r
+ <Copy SourceFiles="@(WebInstaller)" DestinationFiles="%(WebInstaller.SourceExe)" />\r
+ <Exec Command="start "Install test" /wait "%(WebInstaller.SourceExe)" /layout "%(WebInstaller.LayoutDir)" /passive /log "%(WebInstaller.LogFile)""\r
+ IgnoreExitCode="false" />\r
+ <RemoveDir Directories="%(WebInstaller.LayoutDir)" />\r
+ <RemoveDir Directories="%(WebInstaller.SourceDir)" />\r
+ <RemoveDir Directories="%(WebInstaller.LogDir)" />\r
+ <Message Text="Successfully downloaded %(WebInstaller.Filename)%(WebInstaller.Extension) layout" Importance="high" />\r
+ </Target>\r
+ \r
+ <Target Name="Upload" DependsOnTargets="_ValidateProperties;_RunGpg;_PrintNames;_Upload;_Purge" />\r
+ <Target Name="Test" DependsOnTargets="_TestLayout" />\r
+ \r
+ <Target Name="ShowHashes">\r
+ <ItemGroup>\r
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />\r
+ </ItemGroup>\r
+ \r
+ <Exec Command=""$(PythonExe)" generate_md5.py @(UserFiles->'"%(FullPath)"',' ')" />\r
+ </Target>\r
+ \r
+ <Target Name="Build">\r
+ <Error Text="This script should be invoked using uploadrelease.bat." />\r
+ </Target>\r
+</Project>\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\..\PCBuild\python.props" />
-
- <PropertyGroup>
- <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(MSBuildThisFileDirectory)\Wix')">$(MSBuildThisFileDirectory)\Wix\</WixInstallPath>
- <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(ExternalsDir)\windows-installer\wix')">$(ExternalsDir)\windows-installer\wix\</WixInstallPath>
- <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
- <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
- <WixTargetsPath>$(WixInstallPath)\Wix.targets</WixTargetsPath>
- </PropertyGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="..\..\PCBuild\python.props" />\r
+ \r
+ <PropertyGroup>\r
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(MSBuildThisFileDirectory)\Wix')">$(MSBuildThisFileDirectory)\Wix\</WixInstallPath>\r
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(ExternalsDir)\windows-installer\wix')">$(ExternalsDir)\windows-installer\wix\</WixInstallPath>\r
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>\r
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>\r
+ <WixTargetsPath>$(WixInstallPath)\Wix.targets</WixTargetsPath>\r
+ </PropertyGroup>\r
</Project>
\ No newline at end of file
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)\r
\r
call "%D%..\msi\get_externals.bat"\r
-call "%PCBUILD%env.bat" x86\r
+call "%PCBUILD%find_msbuild.bat" %MSBUILD%\r
+if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)\r
\r
if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"\r
\r
) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e\r
if errorlevel 1 goto :eof\r
\r
- msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%\r
+ %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%\r
if errorlevel 1 goto :eof\r
)\r
\r
) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e\r
if errorlevel 1 goto :eof\r
\r
- msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%\r
+ %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%\r
if errorlevel 1 goto :eof\r
)\r
\r
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
- <OutputName>python</OutputName>
- <OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName>
- <OutputSuffix></OutputSuffix>
- <SupportSigning>false</SupportSigning>
- <BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease>
- </PropertyGroup>
-
- <Import Project="..\msi\msi.props" />
-
- <PropertyGroup>
- <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>
- <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
- <NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>
- <SignOutput>false</SignOutput>
- <TargetName>$(OutputName).$(NuspecVersion)</TargetName>
- <TargetExt>.nupkg</TargetExt>
- <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)</IntermediateOutputPath>
-
- <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>
-
- <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
- <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
-
- <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append(r'$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
- <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)\python.exe" -B -m pip install -U $(Packages)</PackageArguments>
-
- <NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>
- <NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>
- <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>
- <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>
- <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>
-
- <Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>
- <Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>
- </PropertyGroup>
-
- <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">
- <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." />
- </Target>
-
- <Target Name="_Build">
- <Exec Command="$(CleanCommand)" />
- <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)" />
- <Exec Command="$(PipArguments)" />
- <Exec Command="$(PackageArguments)" Condition="$(PackageArguments) != ''" />
- <Exec Command="$(NugetArguments)" />
- </Target>
-
- <Target Name="AfterBuild" />
- <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>\r
+ <OutputName>python</OutputName>\r
+ <OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName>\r
+ <OutputSuffix></OutputSuffix>\r
+ <SupportSigning>false</SupportSigning>\r
+ <BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease>\r
+ </PropertyGroup>\r
+\r
+ <Import Project="..\msi\msi.props" />\r
+\r
+ <PropertyGroup>\r
+ <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>\r
+ <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>\r
+ <NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>\r
+ <SignOutput>false</SignOutput>\r
+ <TargetName>$(OutputName).$(NuspecVersion)</TargetName>\r
+ <TargetExt>.nupkg</TargetExt>\r
+ <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)</IntermediateOutputPath>\r
+ \r
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>\r
+ \r
+ <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>\r
+ <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>\r
+ \r
+ <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append(r'$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>\r
+ <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)\python.exe" -B -m pip install -U $(Packages)</PackageArguments>\r
+ \r
+ <NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>\r
+ <NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>\r
+ <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>\r
+ <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>\r
+ <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>\r
+ \r
+ <Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>\r
+ <Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>\r
+ </PropertyGroup>\r
+\r
+ <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">\r
+ <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." />\r
+ </Target>\r
+\r
+ <Target Name="_Build">\r
+ <Exec Command="$(CleanCommand)" />\r
+ <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)" />\r
+ <Exec Command="$(PipArguments)" />\r
+ <Exec Command="$(PackageArguments)" Condition="$(PackageArguments) != ''" />\r
+ <Exec Command="$(NugetArguments)" />\r
+ </Target>\r
+\r
+ <Target Name="AfterBuild" />\r
+ <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />\r
+</Project>\r
SRCDIR = sysconfig.get_config_var('srcdir')
-
def n_files_str(count):
"""Return 'N file(s)' with the proper plurality on 'file'."""
return "{} file{}".format(count, "s" if count != 1 else "")
return st.returncode == 0 and bstdout
+def get_git_branch():
+ """Get the symbolic name for the current git branch"""
+ cmd = "git rev-parse --abbrev-ref HEAD".split()
+ try:
+ return subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
+ except subprocess.CalledProcessError:
+ return None
+
+
+def get_git_upstream_remote():
+ """Get the remote name to use for upstream branches
+
+ Uses "upstream" if it exists, "origin" otherwise
+ """
+ cmd = "git remote get-url upstream".split()
+ try:
+ subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
+ except subprocess.CalledProcessError:
+ return "origin"
+ return "upstream"
+
+
+@status("Getting base branch for PR",
+ info=lambda x: x if x is not None else "not a PR branch")
+def get_base_branch():
+ if not os.path.exists(os.path.join(SRCDIR, '.git')):
+ # Not a git checkout, so there's no base branch
+ return None
+ version = sys.version_info
+ if version.releaselevel == 'alpha':
+ base_branch = "master"
+ else:
+ base_branch = "{0.major}.{0.minor}".format(version)
+ this_branch = get_git_branch()
+ if this_branch is None or this_branch == base_branch:
+ # Not on a git PR branch, so there's no base branch
+ return None
+ upstream_remote = get_git_upstream_remote()
+ return upstream_remote + "/" + base_branch
+
+
@status("Getting the list of files that have been added/changed",
info=lambda x: n_files_str(len(x)))
-def changed_files():
+def changed_files(base_branch=None):
"""Get the list of changed or added files from Mercurial or git."""
if os.path.isdir(os.path.join(SRCDIR, '.hg')):
+ if base_branch is not None:
+ sys.exit('need a git checkout to check PR status')
cmd = 'hg status --added --modified --no-status'
if mq_patches_applied():
cmd += ' --rev qparent'
with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) as st:
return [x.decode().rstrip() for x in st.stdout]
- elif os.path.isdir(os.path.join(SRCDIR, '.git')):
- cmd = 'git status --porcelain'
+ elif os.path.exists(os.path.join(SRCDIR, '.git')):
+ # We just use an existence check here as:
+ # directory = normal git checkout/clone
+ # file = git worktree directory
+ if base_branch:
+ cmd = 'git diff --name-status ' + base_branch
+ else:
+ cmd = 'git status --porcelain'
filenames = []
with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) as st:
for line in st.stdout:
line = line.decode().rstrip()
- status = set(line[:2])
+ status_text, filename = line.split(maxsplit=1)
+ status = set(status_text)
# modified, added or unmerged files
if not status.intersection('MAU'):
continue
- filename = line[3:]
if ' -> ' in filename:
# file is renamed
filename = filename.split(' -> ', 2)[1].strip()
return "not needed"
def main():
- file_paths = changed_files()
+ base_branch = get_base_branch()
+ file_paths = changed_files(base_branch)
python_files = [fn for fn in file_paths if fn.endswith('.py')]
c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
doc_files = [fn for fn in file_paths if fn.startswith('Doc') and
if verbose:
print("checking", file, "...", end=' ')
with open(file, 'rb') as f:
- encoding, _ = tokenize.detect_encoding(f.readline)
+ try:
+ encoding, _ = tokenize.detect_encoding(f.readline)
+ except SyntaxError as se:
+ errprint("%s: SyntaxError: %s" % (file, str(se)))
+ return
try:
with open(file, encoding=encoding) as f:
r = Reindenter(f)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
-
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F068BCCF-C0D6-478D-A2C5-26BA3237C992}</ProjectGuid>
- <RootNamespace>sslspeed</RootNamespace>
- </PropertyGroup>
-
- <Import Project="..\..\PCBuild\python.props" />
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <Import Project="..\..\PCBuild\openssl.props" />
-
- <PropertyGroup Label="Configuration">
- <OriginalOutDir>$(OutDir)</OriginalOutDir>
- <OutDir>$(MSBuildProjectDirectory)\$(ArchName)\</OutDir>
- <IntDir>$(MSBuildProjectDirectory)\$(ArchName)\obj\</IntDir>
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-
- <ItemGroup>
- <ClCompile Include="$(opensslDir)apps\speed.c" />
- <ClCompile Include="$(opensslDir)apps\apps.c" />
- </ItemGroup>
-
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(opensslIncDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;libeay$(PyDebugExt).lib;ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(OriginalOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\PCBuild\ssleay.vcxproj">
- <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\..\PCBuild\libeay.vcxproj">
- <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ \r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{F068BCCF-C0D6-478D-A2C5-26BA3237C992}</ProjectGuid>\r
+ <RootNamespace>sslspeed</RootNamespace>\r
+ </PropertyGroup>\r
+ \r
+ <Import Project="..\..\PCBuild\python.props" />\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <Import Project="..\..\PCBuild\openssl.props" />\r
+ \r
+ <PropertyGroup Label="Configuration">\r
+ <OriginalOutDir>$(OutDir)</OriginalOutDir>\r
+ <OutDir>$(MSBuildProjectDirectory)\$(ArchName)\</OutDir>\r
+ <IntDir>$(MSBuildProjectDirectory)\$(ArchName)\obj\</IntDir>\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ \r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ \r
+ <ItemGroup>\r
+ <ClCompile Include="$(opensslDir)apps\speed.c" />\r
+ <ClCompile Include="$(opensslDir)apps\apps.c" />\r
+ </ItemGroup>\r
+ \r
+ <ItemDefinitionGroup>\r
+ <ClCompile>\r
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <AdditionalIncludeDirectories>$(opensslIncDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;libeay$(PyDebugExt).lib;ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <AdditionalLibraryDirectories>$(OriginalOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+ <SubSystem>Console</SubSystem>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\..\PCBuild\ssleay.vcxproj">\r
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ <ProjectReference Include="..\..\PCBuild\libeay.vcxproj">\r
+ <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
</Project>
\ No newline at end of file
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29)
+dnl serial 11 (pkg-config-0.29.1)
dnl
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29])
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2014-03-23'
+timestamp='2017-05-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
- SUN_ARCH="i386"
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
+ NEO-*:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
+ NSR-*:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk${UNAME_RELEASE}
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2014 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2014-05-01'
+timestamp='2017-04-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | wasm32 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
c6x)
basic_machine=tic6x-unknown
;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=a29k-wrs
os=-vxworks
;;
+ wasm32)
+ basic_machine=wasm32-unknown
+ ;;
w65*)
basic_machine=w65-wdc
os=-none
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
UNIVERSAL_ARCH_FLAGS
CFLAGS_NODIST
BASECFLAGS
+CFLAGS_ALIASING
OPT
LLVM_PROF_FOUND
target_os
CONFIG_ARGS
SOVERSION
VERSION
-GENERATED_COMMENT
PYTHON_FOR_BUILD
-PYTHON_FOR_GEN
+PYTHON_FOR_REGEN
host_os
host_vendor
host_cpu
enable_shared
enable_profiling
with_pydebug
+with_assertions
enable_optimizations
with_lto
with_hash_algorithm
Build (MacOSX|Darwin) framework
--enable-shared disable/enable building shared python library
--enable-profiling enable C-level code profiling
- --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
- by default.
+ --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
+ Disabled by default.
--enable-loadable-sqlite-extensions
support loadable extensions in _sqlite module
--enable-ipv6 Enable ipv6 (with ipv4) support
compiler
--with-suffix=.exe set executable suffix
--with-pydebug build with Py_DEBUG defined
+ --with-assertions build with C assertions enabled
--with-lto Enable Link Time Optimization in PGO builds.
Disabled by default.
--with-hash-algorithm=[fnv|siphash24]
-if test -e $srcdir/.git/HEAD
+if test -e $srcdir/.git
then
# Extract the first word of "git", so it can be a program name with args.
set dummy git; ac_word=$2
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
+if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$PYTHON_FOR_GEN"; then
- ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
+ if test -n "$PYTHON_FOR_REGEN"; then
+ ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
+ ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
fi
fi
-PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
-if test -n "$PYTHON_FOR_GEN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
-$as_echo "$PYTHON_FOR_GEN" >&6; }
+PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
+if test -n "$PYTHON_FOR_REGEN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
+$as_echo "$PYTHON_FOR_REGEN" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- test -n "$PYTHON_FOR_GEN" && break
+ test -n "$PYTHON_FOR_REGEN" && break
done
-test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
+test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
-if test "$PYTHON_FOR_GEN" = not-found; then
- PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
- echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
- echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
-fi
if test "$cross_compiling" = yes; then
$as_echo "$interp" >&6; }
PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
fi
- # Used to comment out stuff for rebuilding generated files
- GENERATED_COMMENT='#'
elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
- GENERATED_COMMENT=''
fi
-
if test "$prefix" != "/"; then
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
fi
fi
+# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
+# the ABI. This allows enabling assertions without changing the ABI.
+assertions='false'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
+$as_echo_n "checking for --with-assertions... " >&6; }
+
+# Check whether --with-assertions was given.
+if test "${with_assertions+set}" = set; then :
+ withval=$with_assertions;
+if test "$withval" != no
+then
+ assertions='true'
+fi
+fi
+
+if test "$assertions" = 'true'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+elif test "$Py_DEBUG" = 'true'; then
+ assertions='true'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
+$as_echo "implied by --with-pydebug" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
# Enable optimization flags
# Check whether --enable-optimizations was given.
if test "${enable_optimizations+set}" = set; then :
enableval=$enable_optimizations;
-if test "$withval" != no
+if test "$enableval" != no
then
Py_OPT='true'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
+
if test "${OPT-unset}" = "unset"
then
case $GCC in
WRAP="-fwrapv"
fi
- # Clang also needs -fwrapv
case $CC in
- *clang*) WRAP="-fwrapv"
- ;;
+ *clang*)
+ cc_is_clang=1
+ ;;
+ *)
+ if $CC --version 2>&1 | grep -q clang
+ then
+ cc_is_clang=1
+ else
+ cc_is_clang=
+ fi
esac
+ if test -n "${cc_is_clang}"
+ then
+ # Clang also needs -fwrapv
+ WRAP="-fwrapv"
+ # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
+ # see Makefile.pre.in for more information
+ CFLAGS_ALIASING="-fno-strict-aliasing"
+ fi
+
case $ac_cv_prog_cc_g in
yes)
if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
- OPT="-g -Og -Wall $STRICT_PROTO"
+ OPT="-g -Og -Wall"
else
- OPT="-g -O0 -Wall $STRICT_PROTO"
+ OPT="-g -O0 -Wall"
fi
else
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
+ OPT="-g $WRAP -O3 -Wall"
fi
;;
*)
- OPT="-O3 -Wall $STRICT_PROTO"
+ OPT="-O3 -Wall"
;;
esac
+
+ OPT="$OPT $STRICT_PROTO"
+
case $ac_sys_system in
SCO_SV*) OPT="$OPT -m486 -DSCO5"
;;
;;
esac
-if test "$Py_DEBUG" = 'true'; then
+if test "$assertions" = 'true'; then
:
else
OPT="-DNDEBUG $OPT"
# check for systems that require aligned memory access
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
$as_echo_n "checking aligned memory access is required... " >&6; }
-if test "$cross_compiling" = yes; then :
- aligned_required=yes
+if ${ac_cv_aligned_required+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_aligned_required=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
return 1;
return 0;
}
-
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- aligned_required=no
+ ac_cv_aligned_required=no
else
- aligned_required=yes
+ ac_cv_aligned_required=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-if test "$aligned_required" = yes ; then
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
+$as_echo "$ac_cv_aligned_required" >&6; }
+if test "$ac_cv_aligned_required" = yes ; then
$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
-$as_echo "$aligned_required" >&6; }
-
# str, bytes and memoryview hash algorithm
if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
echo "" >&6
echo "" >&6
- echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
+ echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
echo "please run ./configure --enable-optimizations" >&6
echo "" >&6
echo "" >&6
AC_SUBST(GITTAG)
AC_SUBST(GITBRANCH)
-if test -e $srcdir/.git/HEAD
+if test -e $srcdir/.git
then
AC_CHECK_PROG(HAS_GIT, git, found, not-found)
else
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
rm -f pybuilddir.txt
-AC_CHECK_PROGS(PYTHON_FOR_GEN, python$PACKAGE_VERSION python3 python, not-found)
-if test "$PYTHON_FOR_GEN" = not-found; then
- PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
- echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
- echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
-fi
-AC_SUBST(PYTHON_FOR_GEN)
+AC_CHECK_PROGS(PYTHON_FOR_REGEN, python$PACKAGE_VERSION python3 python, python3)
+AC_SUBST(PYTHON_FOR_REGEN)
if test "$cross_compiling" = yes; then
AC_MSG_CHECKING([for python interpreter for cross build])
AC_MSG_RESULT($interp)
PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
fi
- # Used to comment out stuff for rebuilding generated files
- GENERATED_COMMENT='#'
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
else
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
- GENERATED_COMMENT=''
fi
AC_SUBST(PYTHON_FOR_BUILD)
-AC_SUBST(GENERATED_COMMENT)
dnl Ensure that if prefix is specified, it does not end in a slash. If
dnl it does, we get path names containing '//' which is both ugly and
fi],
[AC_MSG_RESULT(no)])
+# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
+# the ABI. This allows enabling assertions without changing the ABI.
+assertions='false'
+AC_MSG_CHECKING(for --with-assertions)
+AC_ARG_WITH(assertions,
+ AC_HELP_STRING([--with-assertions], [build with C assertions enabled]),
+[
+if test "$withval" != no
+then
+ assertions='true'
+fi],
+[])
+if test "$assertions" = 'true'; then
+ AC_MSG_RESULT(yes)
+elif test "$Py_DEBUG" = 'true'; then
+ assertions='true'
+ AC_MSG_RESULT(implied by --with-pydebug)
+else
+ AC_MSG_RESULT(no)
+fi
+
# Enable optimization flags
AC_SUBST(DEF_MAKE_ALL_RULE)
AC_SUBST(DEF_MAKE_RULE)
Py_OPT='false'
AC_MSG_CHECKING(for --enable-optimizations)
-AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, etc). Disabled by default.]),
+AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive, stable optimizations (PGO, etc). Disabled by default.]),
[
-if test "$withval" != no
+if test "$enableval" != no
then
Py_OPT='true'
AC_MSG_RESULT(yes);
# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
AC_SUBST(OPT)
+AC_SUBST(CFLAGS_ALIASING)
if test "${OPT-unset}" = "unset"
then
case $GCC in
WRAP="-fwrapv"
fi
- # Clang also needs -fwrapv
case $CC in
- *clang*) WRAP="-fwrapv"
- ;;
+ *clang*)
+ cc_is_clang=1
+ ;;
+ *)
+ if $CC --version 2>&1 | grep -q clang
+ then
+ cc_is_clang=1
+ else
+ cc_is_clang=
+ fi
esac
+ if test -n "${cc_is_clang}"
+ then
+ # Clang also needs -fwrapv
+ WRAP="-fwrapv"
+ # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
+ # see Makefile.pre.in for more information
+ CFLAGS_ALIASING="-fno-strict-aliasing"
+ fi
+
case $ac_cv_prog_cc_g in
yes)
if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
- OPT="-g -Og -Wall $STRICT_PROTO"
+ OPT="-g -Og -Wall"
else
- OPT="-g -O0 -Wall $STRICT_PROTO"
+ OPT="-g -O0 -Wall"
fi
else
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
+ OPT="-g $WRAP -O3 -Wall"
fi
;;
*)
- OPT="-O3 -Wall $STRICT_PROTO"
+ OPT="-O3 -Wall"
;;
esac
+
+ OPT="$OPT $STRICT_PROTO"
+
case $ac_sys_system in
SCO_SV*) OPT="$OPT -m486 -DSCO5"
;;
;;
esac
-if test "$Py_DEBUG" = 'true'; then
+if test "$assertions" = 'true'; then
:
else
OPT="-DNDEBUG $OPT"
# check for systems that require aligned memory access
AC_MSG_CHECKING(aligned memory access is required)
-AC_TRY_RUN([
+AC_CACHE_VAL(ac_cv_aligned_required,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main()
{
char s[16];
if (*p1 == *p2)
return 1;
return 0;
-}
- ],
- [aligned_required=no],
- [aligned_required=yes],
- [aligned_required=yes])
-
-if test "$aligned_required" = yes ; then
+}]])],
+[ac_cv_aligned_required=no],
+[ac_cv_aligned_required=yes],
+[ac_cv_aligned_required=yes])
+])
+AC_MSG_RESULT($ac_cv_aligned_required)
+if test "$ac_cv_aligned_required" = yes ; then
AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1],
[Define if aligned memory access is required])
fi
-AC_MSG_RESULT($aligned_required)
-
# str, bytes and memoryview hash algorithm
AH_TEMPLATE(Py_HASH_ALGORITHM,
if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
echo "" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
- echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&AS_MESSAGE_FD
+ echo "If you want a release build with all stable optimizations active (PGO, etc)," >&AS_MESSAGE_FD
echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
blake2_deps.append('hashlib.h')
blake2_macros = []
- if not cross_compiling and os.uname().machine == "x86_64":
- # Every x86_64 machine has at least SSE2.
+ if (not cross_compiling and
+ os.uname().machine == "x86_64" and
+ sys.maxsize > 2**32):
+ # Every x86_64 machine has at least SSE2. Check for sys.maxsize
+ # in case that kernel is 64-bit but userspace is 32-bit.
blake2_macros.append(('BLAKE2_USE_SSE', '1'))
exts.append( Extension('_blake2',