This commit is contained in:
Christian Heimes 2016-09-12 10:48:55 +02:00
commit 4d9a72902d
40 changed files with 579 additions and 128 deletions

View File

@ -763,7 +763,7 @@ Named tuples assign meaning to each position in a tuple and allow for more reada
self-documenting code. They can be used wherever regular tuples are used, and
they add the ability to access fields by name instead of position index.
.. function:: namedtuple(typename, field_names, *, verbose=False, rename=False)
.. function:: namedtuple(typename, field_names, *, verbose=False, rename=False, module=None)
Returns a new tuple subclass named *typename*. The new subclass is used to
create tuple-like objects that have fields accessible by attribute lookup as
@ -790,6 +790,9 @@ they add the ability to access fields by name instead of position index.
built. This option is outdated; instead, it is simpler to print the
:attr:`_source` attribute.
If *module* is defined, the ``__module__`` attribute of the named tuple is
set to that value.
Named tuple instances do not have per-instance dictionaries, so they are
lightweight and require no more memory than regular tuples.
@ -800,6 +803,8 @@ they add the ability to access fields by name instead of position index.
The *verbose* and *rename* parameters became
:ref:`keyword-only arguments <keyword-only_parameter>`.
.. versionchanged:: 3.6
Added the *module* parameter.
.. doctest::
:options: +NORMALIZE_WHITESPACE

View File

@ -614,6 +614,8 @@ iterations of the loop.
or module body contains :term:`variable annotations <variable annotation>`
statically.
.. versionadded:: 3.6
.. opcode:: IMPORT_STAR
Loads all symbols not starting with ``'_'`` directly from the module TOS to
@ -900,6 +902,8 @@ All of the following opcodes use their arguments.
Stores TOS as ``locals()['__annotations__'][co_names[namei]] = TOS``.
.. versionadded:: 3.6
.. opcode:: LOAD_CLOSURE (i)

View File

@ -226,6 +226,9 @@ View Last Restart
Restart Shell
Restart the shell to clean the environment.
Interrupt Execution
Stop a running program.
Debug menu (Shell window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -83,6 +83,10 @@ An explanation of some terminology and conventions is in order.
and :attr:`tm_zone` attributes when platform supports corresponding
``struct tm`` members.
.. versionchanged:: 3.6
The :class:`struct_time` attributes :attr:`tm_gmtoff` and :attr:`tm_zone`
are now available on all platforms.
* Use the following functions to convert between time representations:
+-------------------------+-------------------------+-------------------------+
@ -566,10 +570,6 @@ The module defines the following functions and data items:
:class:`struct_time`, or having elements of the wrong type, a
:exc:`TypeError` is raised.
.. versionchanged:: 3.3
:attr:`tm_gmtoff` and :attr:`tm_zone` attributes are available on platforms
with C library supporting the corresponding fields in ``struct tm``.
.. function:: time()
Return the time in seconds since the epoch as a floating point number.

View File

@ -1315,8 +1315,9 @@ Identity comparisons
--------------------
The operators :keyword:`is` and :keyword:`is not` test for object identity: ``x
is y`` is true if and only if *x* and *y* are the same object. ``x is not y``
yields the inverse truth value. [#]_
is y`` is true if and only if *x* and *y* are the same object. Object identity
is determined using the :meth:`id` function. ``x is not y`` yields the inverse
truth value. [#]_
.. _booleans:

View File

@ -87,6 +87,12 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
def _start(self, args, shell, stdin, stdout, stderr, bufsize, **kwargs):
raise NotImplementedError
def set_protocol(self, protocol):
self._protocol = protocol
def get_protocol(self):
return self._protocol
def is_closing(self):
return self._closed

View File

@ -66,6 +66,12 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
def _set_extra(self, sock):
self._extra['pipe'] = sock
def set_protocol(self, protocol):
self._protocol = protocol
def get_protocol(self):
return self._protocol
def is_closing(self):
return self._closing

View File

@ -39,6 +39,17 @@ def _test_selector_event(selector, fd, event):
return bool(key.events & event)
if hasattr(socket, 'TCP_NODELAY'):
def _set_nodelay(sock):
if (sock.family in {socket.AF_INET, socket.AF_INET6} and
sock.type == socket.SOCK_STREAM and
sock.proto == socket.IPPROTO_TCP):
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
else:
def _set_nodelay(sock):
pass
class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""Selector event loop.
@ -560,6 +571,12 @@ class _SelectorTransport(transports._FlowControlMixin,
def abort(self):
self._force_close(None)
def set_protocol(self, protocol):
self._protocol = protocol
def get_protocol(self):
return self._protocol
def is_closing(self):
return self._closing
@ -635,6 +652,11 @@ class _SelectorSocketTransport(_SelectorTransport):
self._eof = False
self._paused = False
# Disable the Nagle algorithm -- small writes will be
# sent without waiting for the TCP ACK. This generally
# decreases the latency (in some cases significantly.)
_set_nodelay(self._sock)
self._loop.call_soon(self._protocol.connection_made, self)
# only start reading when connection_made() has been called
self._loop.call_soon(self._loop.add_reader,

View File

@ -305,6 +305,12 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
"""Get optional transport information."""
return self._ssl_protocol._get_extra_info(name, default)
def set_protocol(self, protocol):
self._app_protocol = protocol
def get_protocol(self):
return self._app_protocol
def is_closing(self):
return self._closed

View File

@ -33,6 +33,14 @@ class BaseTransport:
"""
raise NotImplementedError
def set_protocol(self, protocol):
"""Set a new protocol."""
raise NotImplementedError
def get_protocol(self):
"""Return the current protocol."""
raise NotImplementedError
class ReadTransport(BaseTransport):
"""Interface for read-only transports."""

View File

@ -374,6 +374,12 @@ class _UnixReadPipeTransport(transports.ReadTransport):
def resume_reading(self):
self._loop.add_reader(self._fileno, self._read_ready)
def set_protocol(self, protocol):
self._protocol = protocol
def get_protocol(self):
return self._protocol
def is_closing(self):
return self._closing
@ -571,6 +577,12 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
self._loop.remove_reader(self._fileno)
self._loop.call_soon(self._call_connection_lost, None)
def set_protocol(self, protocol):
self._protocol = protocol
def get_protocol(self):
return self._protocol
def is_closing(self):
return self._closing

View File

@ -353,7 +353,7 @@ _field_template = '''\
{name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}')
'''
def namedtuple(typename, field_names, *, verbose=False, rename=False):
def namedtuple(typename, field_names, *, verbose=False, rename=False, module=None):
"""Returns a new subclass of tuple with named fields.
>>> Point = namedtuple('Point', ['x', 'y'])
@ -434,11 +434,15 @@ def namedtuple(typename, field_names, *, verbose=False, rename=False):
# For pickling to work, the __module__ variable needs to be set to the frame
# where the named tuple is created. Bypass this step in environments where
# sys._getframe is not defined (Jython for example) or sys._getframe is not
# defined for arguments greater than 0 (IronPython).
try:
result.__module__ = _sys._getframe(1).f_globals.get('__name__', '__main__')
except (AttributeError, ValueError):
pass
# defined for arguments greater than 0 (IronPython), or where the user has
# specified a particular module.
if module is None:
try:
module = _sys._getframe(1).f_globals.get('__name__', '__main__')
except (AttributeError, ValueError):
pass
if module is not None:
result.__module__ = module
return result

View File

@ -2,6 +2,9 @@ What's New in IDLE 3.6.0?
===========================
*Release date: 2016-12-16?*
- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
Patch by Roger Serwy, updated by Bayard Randel.
- Issue #27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
- Issue #27891: Consistently group and sort imports within idlelib modules.

View File

@ -160,13 +160,14 @@ Edit
Show surrounding parens # parenmatch (& Hyperparser)
Shell # pyshell
View Last Restart# pyshell.?
Restart Shell # pyshell.?
View Last Restart # pyshell.PyShell.view_restart_mark
Restart Shell # pyshell.PyShell.restart_shell
Interrupt Execution # pyshell.PyShell.cancel_callback
Debug (Shell only)
Go to File/Line
debugger # debugger, debugger_r
Stack Viewer # stackviewer
debugger # debugger, debugger_r, PyShell.toggle_debuger
Stack Viewer # stackviewer, PyShell.open_stack_viewer
Auto-open Stack Viewer # stackviewer
Format (Editor only)

View File

@ -65,6 +65,21 @@
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
<li class="nav-item nav-item-2"><a href="tk.html" accesskey="U">25. Graphical User Interfaces with Tk</a> &raquo;</li>
<li class="right">
<div class="inline-search" style="display: none" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="Quick search" type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('.inline-search').show(0);</script>
|
</li>
</ul>
</div>
@ -240,6 +255,8 @@ line.</dd>
<dd>Scroll the shell window to the last Shell restart.</dd>
<dt>Restart Shell</dt>
<dd>Restart the shell to clean the environment.</dd>
<dt>Interrupt Execution</dt>
<dd>Stop a running program.</dd>
</dl>
</div>
<div class="section" id="debug-menu-shell-window-only">
@ -649,26 +666,14 @@ are currently:</p>
<h4>Next topic</h4>
<p class="topless"><a href="othergui.html"
title="next chapter">25.6. Other Graphical User Interface Packages</a></p>
<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>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
<div role="note" aria-label="source link">
<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>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
@ -697,6 +702,21 @@ are currently:</p>
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
<li class="nav-item nav-item-2"><a href="tk.html" >25. Graphical User Interfaces with Tk</a> &raquo;</li>
<li class="right">
<div class="inline-search" style="display: none" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="Quick search" type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('.inline-search').show(0);</script>
|
</li>
</ul>
</div>
<div class="footer">
@ -705,7 +725,7 @@ are currently:</p>
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
Last updated on Aug 30, 2016.
Last updated on Sep 12, 2016.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.6.

View File

@ -69,6 +69,8 @@ menudefs = [
('shell', [
('_View Last Restart', '<<view-restart>>'),
('_Restart Shell', '<<restart-shell>>'),
None,
('_Interrupt Execution', '<<interrupt-execution>>'),
]),
('debug', [
('_Go to File/Line', '<<goto-file-line>>'),

View File

@ -25,6 +25,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
sslcontext = test_utils.dummy_ssl_context()
app_proto = asyncio.Protocol()
proto = sslproto.SSLProtocol(self.loop, app_proto, sslcontext, waiter)
self.assertIs(proto._app_transport.get_protocol(), app_proto)
self.addCleanup(proto._app_transport.close)
return proto

View File

@ -242,6 +242,10 @@ class TestNamedTuple(unittest.TestCase):
]:
self.assertEqual(namedtuple('NT', spec, rename=True)._fields, renamed)
def test_module_parameter(self):
NT = namedtuple('NT', ['x', 'y'], module=collections)
self.assertEqual(NT.__module__, collections)
def test_instance(self):
Point = namedtuple('Point', 'x y')
p = Point(11, 22)

View File

@ -471,7 +471,7 @@ class Tuple_TestCase(unittest.TestCase):
ret = get_args(*TupleSubclass([1, 2]))
self.assertEqual(ret, (1, 2))
self.assertIs(type(ret), tuple)
self.assertIsInstance(ret, tuple)
ret = get_args()
self.assertIn(ret, ((), None))

View File

@ -470,7 +470,9 @@ class StartupImportTests(unittest.TestCase):
'heapq', 'itertools', 'keyword', 'operator',
'reprlib', 'types', 'weakref'
}.difference(sys.builtin_module_names)
self.assertFalse(modules.intersection(collection_mods), stderr)
# http://bugs.python.org/issue28095
if sys.platform != 'darwin':
self.assertFalse(modules.intersection(collection_mods), stderr)
if __name__ == "__main__":

View File

@ -409,6 +409,14 @@ class ElementTreeTest(unittest.TestCase):
self.assertEqual(ET.tostring(elem),
b'<test testa="testval" testb="test1" testc="test2">aa</test>')
elem = ET.Element('test')
elem.set('a', '\r')
elem.set('b', '\r\n')
elem.set('c', '\t\n\r ')
elem.set('d', '\n\n')
self.assertEqual(ET.tostring(elem),
b'<test a="&#10;" b="&#10;" c="&#09;&#10;&#10; " d="&#10;&#10;" />')
def test_makeelement(self):
# Test makeelement handling.

View File

@ -1084,8 +1084,19 @@ def _escape_attrib(text):
text = text.replace(">", "&gt;")
if "\"" in text:
text = text.replace("\"", "&quot;")
# The following business with carriage returns is to satisfy
# Section 2.11 of the XML specification, stating that
# CR or CR LN should be replaced with just LN
# http://www.w3.org/TR/REC-xml/#sec-line-ends
if "\r\n" in text:
text = text.replace("\r\n", "\n")
if "\r" in text:
text = text.replace("\r", "\n")
#The following four lines are issue 17582
if "\n" in text:
text = text.replace("\n", "&#10;")
if "\t" in text:
text = text.replace("\t", "&#09;")
return text
except (TypeError, AttributeError):
_raise_serialization_error(text)

View File

@ -1209,6 +1209,7 @@ Burton Radons
Abhilash Raj
Shorya Raj
Jeff Ramnani
Bayard Randel
Varpu Rantala
Brodie Rao
Rémi Rampin

View File

@ -33,6 +33,8 @@ Core and Builtins
- Issue #28046: Remove platform-specific directories from sys.path.
- Issue #28071: Add early-out for differencing from an empty set.
- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
(patch by Eryk Sun)
@ -143,6 +145,13 @@ Core and Builtins
Library
-------
- Issue #28037: Use sqlite3_get_autocommit() instead of setting
Connection->inTransaction manually.
- Issue #25283: Attributes tm_gmtoff and tm_zone are now available on
all platforms in the return values of time.localtime() and
time.gmtime().
- Issue #24454: Regular expression match object groups are now
accessible using __getitem__. "mo[x]" is equivalent to
"mo.group(x)".
@ -150,6 +159,8 @@ Library
- Issue #10740: sqlite3 no longer implicitly commit an open transaction
before DDL statements.
- Issue #17941: Add a *module* parameter to collections.namedtuple().
- Issue #22493: Inline flags now should be used only at the start of the
regular expression. Deprecation warning is emitted if uses them in the
middle of the regular expression.
@ -200,6 +211,9 @@ Library
- Issue #24594: Validates persist parameter when opening MSI database
- Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes
(Patch by Duane Griffin. Reviewed and approved by Stefan Behnel.)
- Issue #28047: Fixed calculation of line length used for the base64 CTE
in the new email policies.
@ -363,9 +377,16 @@ Library
- Issue #21201: Improves readability of multiprocessing error message. Thanks
to Wojciech Walczak for patch.
- asyncio: Add set_protocol / get_protocol to Transports.
- Issue #27456: asyncio: Set TCP_NODELAY by default.
IDLE
----
- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
Patch by Roger Serwy, updated by Bayard Randel.
- Issue #27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
- Issue #27891: Consistently group and sort imports within idlelib modules.
@ -443,6 +464,8 @@ Tools/Demos
Windows
-------
- Issue #28065: Update xz dependency to 5.2.2 and build it from source.
- Issue #25144: Ensures TargetDir is set before continuing with custom
install.
@ -868,6 +891,9 @@ C API
Build
-----
- Issue #28066: Fix the logic that searches build directories for generated
include files when building outside the source tree.
- Issue #27442: Expose the Android API level that python was built against, in
sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'.

View File

@ -403,10 +403,28 @@ deque_extend(dequeobject *deque, PyObject *iterable)
iternext = *Py_TYPE(it)->tp_iternext;
while ((item = iternext(it)) != NULL) {
if (deque_append_internal(deque, item, maxlen) < 0) {
Py_DECREF(item);
Py_DECREF(it);
return NULL;
if (deque->rightindex == BLOCKLEN - 1) {
block *b = newblock();
if (b == NULL) {
Py_DECREF(item);
Py_DECREF(it);
return NULL;
}
b->leftlink = deque->rightblock;
CHECK_END(deque->rightblock->rightlink);
deque->rightblock->rightlink = b;
deque->rightblock = b;
MARK_END(b->rightlink);
deque->rightindex = -1;
}
Py_SIZE(deque)++;
deque->rightindex++;
deque->rightblock->data[deque->rightindex] = item;
if (NEEDS_TRIM(deque, maxlen)) {
PyObject *olditem = deque_popleft(deque, NULL);
Py_DECREF(olditem);
} else {
deque->state++;
}
}
return finalize_iterator(it);
@ -450,10 +468,28 @@ deque_extendleft(dequeobject *deque, PyObject *iterable)
iternext = *Py_TYPE(it)->tp_iternext;
while ((item = iternext(it)) != NULL) {
if (deque_appendleft_internal(deque, item, maxlen) < 0) {
Py_DECREF(item);
Py_DECREF(it);
return NULL;
if (deque->leftindex == 0) {
block *b = newblock();
if (b == NULL) {
Py_DECREF(item);
Py_DECREF(it);
return NULL;
}
b->rightlink = deque->leftblock;
CHECK_END(deque->leftblock->leftlink);
deque->leftblock->leftlink = b;
deque->leftblock = b;
MARK_END(b->leftlink);
deque->leftindex = BLOCKLEN;
}
Py_SIZE(deque)++;
deque->leftindex--;
deque->leftblock->data[deque->leftindex] = item;
if (NEEDS_TRIM(deque, maxlen)) {
PyObject *olditem = deque_pop(deque, NULL);
Py_DECREF(olditem);
} else {
deque->state++;
}
}
return finalize_iterator(it);

View File

@ -165,7 +165,6 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
self->statement_cache->decref_factory = 0;
Py_DECREF(self);
self->inTransaction = 0;
self->detect_types = detect_types;
self->timeout = timeout;
(void)sqlite3_busy_timeout(self->db, (int)(timeout*1000));
@ -385,9 +384,7 @@ PyObject* _pysqlite_connection_begin(pysqlite_Connection* self)
}
rc = pysqlite_step(statement, self);
if (rc == SQLITE_DONE) {
self->inTransaction = 1;
} else {
if (rc != SQLITE_DONE) {
_pysqlite_seterror(self->db, statement);
}
@ -418,7 +415,7 @@ PyObject* pysqlite_connection_commit(pysqlite_Connection* self, PyObject* args)
return NULL;
}
if (self->inTransaction) {
if (!sqlite3_get_autocommit(self->db)) {
Py_BEGIN_ALLOW_THREADS
rc = sqlite3_prepare(self->db, "COMMIT", -1, &statement, &tail);
@ -429,9 +426,7 @@ PyObject* pysqlite_connection_commit(pysqlite_Connection* self, PyObject* args)
}
rc = pysqlite_step(statement, self);
if (rc == SQLITE_DONE) {
self->inTransaction = 0;
} else {
if (rc != SQLITE_DONE) {
_pysqlite_seterror(self->db, statement);
}
@ -463,7 +458,7 @@ PyObject* pysqlite_connection_rollback(pysqlite_Connection* self, PyObject* args
return NULL;
}
if (self->inTransaction) {
if (!sqlite3_get_autocommit(self->db)) {
pysqlite_do_all_statements(self, ACTION_RESET, 1);
Py_BEGIN_ALLOW_THREADS
@ -475,9 +470,7 @@ PyObject* pysqlite_connection_rollback(pysqlite_Connection* self, PyObject* args
}
rc = pysqlite_step(statement, self);
if (rc == SQLITE_DONE) {
self->inTransaction = 0;
} else {
if (rc != SQLITE_DONE) {
_pysqlite_seterror(self->db, statement);
}
@ -1158,6 +1151,17 @@ static PyObject* pysqlite_connection_get_total_changes(pysqlite_Connection* self
}
}
static PyObject* pysqlite_connection_get_in_transaction(pysqlite_Connection* self, void* unused)
{
if (!pysqlite_check_connection(self)) {
return NULL;
}
if (!sqlite3_get_autocommit(self->db)) {
Py_RETURN_TRUE;
}
Py_RETURN_FALSE;
}
static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level)
{
if (isolation_level == Py_None) {
@ -1168,7 +1172,6 @@ static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, Py
Py_DECREF(res);
self->begin_statement = NULL;
self->inTransaction = 0;
} else {
const char * const *candidate;
PyObject *uppercase_level;
@ -1606,6 +1609,7 @@ PyDoc_STR("SQLite database connection object.");
static PyGetSetDef connection_getset[] = {
{"isolation_level", (getter)pysqlite_connection_get_isolation_level, (setter)pysqlite_connection_set_isolation_level},
{"total_changes", (getter)pysqlite_connection_get_total_changes, (setter)0},
{"in_transaction", (getter)pysqlite_connection_get_in_transaction, (setter)0},
{NULL}
};
@ -1667,7 +1671,6 @@ static struct PyMemberDef connection_members[] =
{"NotSupportedError", T_OBJECT, offsetof(pysqlite_Connection, NotSupportedError), READONLY},
{"row_factory", T_OBJECT, offsetof(pysqlite_Connection, row_factory)},
{"text_factory", T_OBJECT, offsetof(pysqlite_Connection, text_factory)},
{"in_transaction", T_BOOL, offsetof(pysqlite_Connection, inTransaction), READONLY},
{NULL}
};

View File

@ -37,10 +37,6 @@ typedef struct
PyObject_HEAD
sqlite3* db;
/* 1 if we are currently within a transaction, i. e. if a BEGIN has been
* issued */
char inTransaction;
/* the type detection mode. Only 0, PARSE_DECLTYPES, PARSE_COLNAMES or a
* bitwise combination thereof makes sense */
int detect_types;

View File

@ -644,15 +644,6 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
}
error:
/* just to be sure (implicit ROLLBACKs with ON CONFLICT ROLLBACK/OR
* ROLLBACK could have happened */
#ifdef SQLITE_VERSION_NUMBER
#if SQLITE_VERSION_NUMBER >= 3002002
if (self->connection && self->connection->db)
self->connection->inTransaction = !sqlite3_get_autocommit(self->connection->db);
#endif
#endif
Py_XDECREF(parameters);
Py_XDECREF(parameters_iter);
Py_XDECREF(parameters_list);

View File

@ -5030,11 +5030,13 @@ os_spawnv_impl(PyObject *module, int mode, path_t *path, PyObject *argv)
mode = _P_OVERLAY;
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
#ifdef HAVE_WSPAWNV
spawnval = _wspawnv(mode, path->wide, argvlist);
#else
spawnval = _spawnv(mode, path->narrow, argvlist);
#endif
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
free_string_array(argvlist, argc);
@ -5122,11 +5124,13 @@ os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv,
mode = _P_OVERLAY;
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
#ifdef HAVE_WSPAWNV
spawnval = _wspawnve(mode, path->wide, argvlist, envlist);
#else
spawnval = _spawnve(mode, path->narrow, argvlist, envlist);
#endif
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (spawnval == -1)

View File

@ -250,10 +250,8 @@ static PyStructSequence_Field struct_time_type_fields[] = {
{"tm_wday", "day of week, range [0, 6], Monday is 0"},
{"tm_yday", "day of year, range [1, 366]"},
{"tm_isdst", "1 if summer time is in effect, 0 if not, and -1 if unknown"},
#ifdef HAVE_STRUCT_TM_TM_ZONE
{"tm_zone", "abbreviation of timezone name"},
{"tm_gmtoff", "offset from UTC in seconds"},
#endif /* HAVE_STRUCT_TM_TM_ZONE */
{0}
};
@ -275,7 +273,11 @@ static PyTypeObject StructTimeType;
static PyObject *
tmtotuple(struct tm *p)
tmtotuple(struct tm *p
#ifndef HAVE_STRUCT_TM_TM_ZONE
, const char *zone, int gmtoff
#endif
)
{
PyObject *v = PyStructSequence_New(&StructTimeType);
if (v == NULL)
@ -296,6 +298,10 @@ tmtotuple(struct tm *p)
PyStructSequence_SET_ITEM(v, 9,
PyUnicode_DecodeLocale(p->tm_zone, "surrogateescape"));
SET(10, p->tm_gmtoff);
#else
PyStructSequence_SET_ITEM(v, 9,
PyUnicode_DecodeLocale(zone, "surrogateescape"));
SET(10, gmtoff);
#endif /* HAVE_STRUCT_TM_TM_ZONE */
#undef SET
if (PyErr_Occurred()) {
@ -348,9 +354,26 @@ time_gmtime(PyObject *self, PyObject *args)
return PyErr_SetFromErrno(PyExc_OSError);
}
buf = *local;
#ifdef HAVE_STRUCT_TM_TM_ZONE
return tmtotuple(&buf);
#else
return tmtotuple(&buf, "UTC", 0);
#endif
}
#ifndef HAVE_TIMEGM
static time_t
timegm(struct tm *p)
{
/* XXX: the following implementation will not work for tm_year < 1970.
but it is likely that platforms that don't have timegm do not support
negative timestamps anyways. */
return p->tm_sec + p->tm_min*60 + p->tm_hour*3600 + p->tm_yday*86400 +
(p->tm_year-70)*31536000 + ((p->tm_year-69)/4)*86400 -
((p->tm_year-1)/100)*86400 + ((p->tm_year+299)/400)*86400;
}
#endif
PyDoc_STRVAR(gmtime_doc,
"gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n\
tm_sec, tm_wday, tm_yday, tm_isdst)\n\
@ -391,7 +414,18 @@ time_localtime(PyObject *self, PyObject *args)
return NULL;
if (pylocaltime(&when, &buf) == -1)
return NULL;
#ifdef HAVE_STRUCT_TM_TM_ZONE
return tmtotuple(&buf);
#else
{
struct tm local = buf;
char zone[100];
int gmtoff;
strftime(zone, sizeof(buf), "%Z", &buf);
gmtoff = timegm(&buf) - when;
return tmtotuple(&local, zone, gmtoff);
}
#endif
}
PyDoc_STRVAR(localtime_doc,
@ -1145,6 +1179,27 @@ PyDoc_STRVAR(get_clock_info_doc,
\n\
Get information of the specified clock.");
static void
get_zone(char *zone, int n, struct tm *p)
{
#ifdef HAVE_STRUCT_TM_TM_ZONE
strncpy(zone, p->tm_zone ? p->tm_zone : " ", n);
#else
tzset();
strftime(zone, n, "%Z", p);
#endif
}
static int
get_gmtoff(time_t t, struct tm *p)
{
#ifdef HAVE_STRUCT_TM_TM_ZONE
return p->tm_gmtoff;
#else
return timegm(p) - t;
#endif
}
static void
PyInit_timezone(PyObject *m) {
/* This code moved from PyInit_time wholesale to allow calling it from
@ -1177,7 +1232,6 @@ PyInit_timezone(PyObject *m) {
otz1 = PyUnicode_DecodeLocale(tzname[1], "surrogateescape");
PyModule_AddObject(m, "tzname", Py_BuildValue("(NN)", otz0, otz1));
#else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#ifdef HAVE_STRUCT_TM_TM_ZONE
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
time_t t;
@ -1186,13 +1240,13 @@ PyInit_timezone(PyObject *m) {
char janname[10], julyname[10];
t = (time((time_t *)0) / YEAR) * YEAR;
p = localtime(&t);
janzone = -p->tm_gmtoff;
strncpy(janname, p->tm_zone ? p->tm_zone : " ", 9);
get_zone(janname, 9, p);
janzone = -get_gmtoff(t, p);
janname[9] = '\0';
t += YEAR/2;
p = localtime(&t);
julyzone = -p->tm_gmtoff;
strncpy(julyname, p->tm_zone ? p->tm_zone : " ", 9);
get_zone(julyname, 9, p);
julyzone = -get_gmtoff(t, p);
julyname[9] = '\0';
if( janzone < julyzone ) {
@ -1214,8 +1268,6 @@ PyInit_timezone(PyObject *m) {
janname, julyname));
}
}
#else
#endif /* HAVE_STRUCT_TM_TM_ZONE */
#ifdef __CYGWIN__
tzset();
PyModule_AddIntConstant(m, "timezone", _timezone);
@ -1225,25 +1277,6 @@ PyInit_timezone(PyObject *m) {
Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
#endif /* __CYGWIN__ */
#endif /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#if defined(HAVE_CLOCK_GETTIME)
PyModule_AddIntMacro(m, CLOCK_REALTIME);
#ifdef CLOCK_MONOTONIC
PyModule_AddIntMacro(m, CLOCK_MONOTONIC);
#endif
#ifdef CLOCK_MONOTONIC_RAW
PyModule_AddIntMacro(m, CLOCK_MONOTONIC_RAW);
#endif
#ifdef CLOCK_HIGHRES
PyModule_AddIntMacro(m, CLOCK_HIGHRES);
#endif
#ifdef CLOCK_PROCESS_CPUTIME_ID
PyModule_AddIntMacro(m, CLOCK_PROCESS_CPUTIME_ID);
#endif
#ifdef CLOCK_THREAD_CPUTIME_ID
PyModule_AddIntMacro(m, CLOCK_THREAD_CPUTIME_ID);
#endif
#endif /* HAVE_CLOCK_GETTIME */
}
@ -1350,17 +1383,32 @@ PyInit_time(void)
/* Set, or reset, module variables like time.timezone */
PyInit_timezone(m);
#if defined(HAVE_CLOCK_GETTIME)
PyModule_AddIntMacro(m, CLOCK_REALTIME);
#ifdef CLOCK_MONOTONIC
PyModule_AddIntMacro(m, CLOCK_MONOTONIC);
#endif
#ifdef CLOCK_MONOTONIC_RAW
PyModule_AddIntMacro(m, CLOCK_MONOTONIC_RAW);
#endif
#ifdef CLOCK_HIGHRES
PyModule_AddIntMacro(m, CLOCK_HIGHRES);
#endif
#ifdef CLOCK_PROCESS_CPUTIME_ID
PyModule_AddIntMacro(m, CLOCK_PROCESS_CPUTIME_ID);
#endif
#ifdef CLOCK_THREAD_CPUTIME_ID
PyModule_AddIntMacro(m, CLOCK_THREAD_CPUTIME_ID);
#endif
#endif /* HAVE_CLOCK_GETTIME */
if (!initialized) {
if (PyStructSequence_InitType2(&StructTimeType,
&struct_time_type_desc) < 0)
return NULL;
}
Py_INCREF(&StructTimeType);
#ifdef HAVE_STRUCT_TM_TM_ZONE
PyModule_AddIntConstant(m, "_STRUCT_TM_ITEMS", 11);
#else
PyModule_AddIntConstant(m, "_STRUCT_TM_ITEMS", 9);
#endif
PyModule_AddObject(m, "struct_time", (PyObject*) &StructTimeType);
initialized = 1;
return m;

View File

@ -399,7 +399,7 @@ range_contains_long(rangeobject *r, PyObject *ob)
tmp2 = PyNumber_Remainder(tmp1, r->step);
if (tmp2 == NULL)
goto end;
/* result = (int(ob) - start % step) == 0 */
/* result = ((int(ob) - start) % step) == 0 */
result = PyObject_RichCompareBool(tmp2, zero, Py_EQ);
end:
Py_XDECREF(tmp1);

View File

@ -1476,6 +1476,10 @@ PyDoc_STRVAR(isdisjoint_doc,
static int
set_difference_update_internal(PySetObject *so, PyObject *other)
{
if (PySet_GET_SIZE(so) == 0) {
return 0;
}
if ((PyObject *)so == other)
return set_clear_internal(so);
@ -1550,6 +1554,10 @@ set_difference(PySetObject *so, PyObject *other)
Py_ssize_t pos = 0;
int rv;
if (PySet_GET_SIZE(so) == 0) {
return set_copy(so);
}
if (!PyAnySet_Check(other) && !PyDict_CheckExact(other)) {
return set_copy_and_difference(so, other);
}

View File

@ -61,13 +61,11 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(lzmaDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<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 Condition="'$(Platform)' == 'Win32'">$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Platform)' == 'x64'">$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalDependencies>$(OutDir)/liblzma$(PyDebugExt).lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@ -81,8 +79,12 @@
<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>
</Project>

View File

@ -59,7 +59,7 @@ set libraries=%libraries% sqlite-3.14.1.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
set libraries=%libraries% xz-5.0.5
set libraries=%libraries% xz-5.2.2
for %%e in (%libraries%) do (
if exist %%e (

216
PCbuild/liblzma.vcxproj Normal file
View File

@ -0,0 +1,216 @@
<?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>

View File

@ -7,7 +7,6 @@
<OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
<Py_IntDir Condition="'$(Py_IntDir)' == ''">$(MSBuildThisFileDirectory)obj\</Py_IntDir>
<IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
<IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(Py_IntDir)\$(ArchName)_PGO\$(ProjectName)\</IntDir>
<TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
<TargetName>$(TargetName)$(PyDebugExt)</TargetName>
<GenerateManifest>false</GenerateManifest>

View File

@ -25,7 +25,6 @@
-->
<ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName>
<ArchName Condition="'$(ArchName)' == ''">win32</ArchName>
<ArchName Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(ArchName)-pgo</ArchName>
<!-- Root directory of the repository -->
<PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>
@ -45,7 +44,7 @@
<ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>
<sqlite3Dir>$(ExternalsDir)sqlite-3.14.1.0\</sqlite3Dir>
<bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
<lzmaDir>$(ExternalsDir)xz-5.0.5\</lzmaDir>
<lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
<opensslDir>$(ExternalsDir)openssl-1.0.2h\</opensslDir>
<opensslIncludeDir>$(opensslDir)include32</opensslIncludeDir>
<opensslIncludeDir Condition="'$(ArchName)' == 'amd64'">$(opensslDir)include64</opensslIncludeDir>

View File

@ -111,16 +111,10 @@ if "%1" EQU "x86" (
set BUILD_PLAT=Win32
set OUTDIR_PLAT=win32
set OBJDIR_PLAT=x86
) else if "%~2" NEQ "" (
call "%PCBUILD%env.bat" amd64
set PGO=%~2
set BUILD=%PCBUILD%amd64-pgo\
set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64
set OBJDIR_PLAT=x64
) else (
call "%PCBUILD%env.bat" amd64
set BUILD=%PCBUILD%amd64\
set PGO=%~2
set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64
set OBJDIR_PLAT=x64
@ -177,7 +171,6 @@ if not "%SKIPBUILD%" EQU "1" (
)
set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%
if "%PGO%" NEQ "" set BUILDOPTS=%BUILDOPTS% /p:PGOBuildPath=%BUILD%
msbuild "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true
if errorlevel 1 exit /B
msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false

2
configure vendored
View File

@ -2679,7 +2679,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$abs_srcdir" != "$abs_builddir"; then
if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
# If we're building out-of-tree, we need to make sure the following
# resources get picked up before their $srcdir counterparts.
# Objects/ -> typeslots.inc

View File

@ -10,7 +10,7 @@ AC_PREREQ(2.65)
AC_INIT(python, PYTHON_VERSION, https://bugs.python.org/)
AC_SUBST(BASECPPFLAGS)
if test "$abs_srcdir" != "$abs_builddir"; then
if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
# If we're building out-of-tree, we need to make sure the following
# resources get picked up before their $srcdir counterparts.
# Objects/ -> typeslots.inc