Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ jobs:
needs: build-context
if: needs.build-context.outputs.run-ios == 'true'
timeout-minutes: 60
runs-on: macos-15
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -405,10 +405,10 @@ jobs:
# https://github.com/actions/runner-images/issues/12751.
- name: Select Xcode version
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app
sudo xcode-select --switch /Applications/Xcode_15.4.app

- name: Build and test
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e,OS=18.5'
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'

build-wasi:
name: 'WASI'
Expand Down
47 changes: 40 additions & 7 deletions Doc/using/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,12 @@ Passing ``--dry-run`` will generate output and logs, but will not modify any
installs.

In addition to the above options, the ``--target`` option will extract the
runtime to the specified directory instead of doing a normal install. This is
useful for embedding runtimes into larger applications.
runtime to the specified directory instead of doing a normal install.
This is useful for embedding runtimes into larger applications.
Unlike a normal install, ``py`` will not be aware of the extracted runtime,
and no Start menu or other shortcuts will be created.
To launch the runtime, directly execute the main executable (typically
``python.exe``) in the target directory.

.. code::

Expand Down Expand Up @@ -378,10 +382,13 @@ overridden installs may resolve settings differently.

A global configuration file may be configured by an administrator, and would be
read first. The user configuration file is stored at
:file:`%AppData%\\Python\\pymanager.json` (by default) and is read next,
:file:`%AppData%\\Python\\pymanager.json`
(note that this location is under ``Roaming``, not ``Local``) and is read next,
overwriting any settings from earlier files. An additional configuration file
may be specified as the ``PYTHON_MANAGER_CONFIG`` environment variable or the
``--config`` command line option (but not both).
These locations may be modified by administrative customization options listed
later.

The following settings are those that are considered likely to be modified in
normal use. Later sections list those that are intended for administrative
Expand Down Expand Up @@ -420,8 +427,8 @@ customization.

* - ``automatic_install``
- ``PYTHON_MANAGER_AUTOMATIC_INSTALL``
- True to allow automatic installs when specifying a particular runtime
to launch.
- True to allow automatic installs when using ``py exec`` to launch.
Other commands will not automatically install.
By default, true.

* - ``include_unmanaged``
Expand Down Expand Up @@ -799,6 +806,12 @@ default).
* -
- Check that the ``py`` and ``pymanager`` commands work.

* -
- Ensure your :envvar:`PATH` variable contains the entry for
``%UserProfile%\AppData\Local\Microsoft\WindowsApps``.
The operating system includes this entry once by default, after other
user paths. If removed, shortcuts will not be found.

* - ``py`` gives me a "command not found" error when I type it in my terminal.
- Did you :ref:`install the Python install manager <pymanager>`?

Expand All @@ -809,6 +822,12 @@ default).
The "Python (default windowed)" and "Python install manager" commands
may also need refreshing.

* -
- Ensure your :envvar:`PATH` variable contains the entry for
``%UserProfile%\AppData\Local\Microsoft\WindowsApps``.
The operating system includes this entry once by default, after other
user paths. If removed, shortcuts will not be found.

* - ``py`` gives me a "can't open file" error when I type commands in my
terminal.
- This usually means you have the legacy launcher installed and
Expand Down Expand Up @@ -839,7 +858,7 @@ default).
- Prerelease and experimental installs that are not managed by the Python
install manager may be chosen ahead of stable releases.
Configure your default tag or uninstall the prerelease runtime
and reinstall using ``py install``.
and reinstall it using ``py install``.

* - ``pythonw`` or ``pyw`` don't launch the same runtime as ``python`` or ``py``
- Click Start, open "Manage app execution aliases", and check that your
Expand Down Expand Up @@ -869,6 +888,20 @@ default).
the `legacy launcher`_, or with the Python install manager when installed
from the MSI.

* - I have installed the Python install manager multiple times.
- It is possible to install from the Store or WinGet, from the MSIX on
the Python website, and from the MSI, all at once.
They are all compatible and will share configuration and runtimes.

* -
- See the earlier :ref:`pymanager-advancedinstall` section for ways to
uninstall the install manager other than the typical Installed Apps
(Add and Remove Programs) settings page.

* - My old ``py.ini`` settings no longer work.
- The new Python install manager no longer supports this configuration file
or its settings, and so it will be ignored.
See :ref:`pymanager-config` for information about configuration settings.

.. _windows-embeddable:

Expand All @@ -886,7 +919,7 @@ To install an embedded distribution, we recommend using ``py install`` with the

.. code::

$> py install 3.14-embed --target=runtime
$> py install 3.14-embed --target=<directory>

When extracted, the embedded distribution is (almost) fully isolated from the
user's system, including environment variables, system registry settings, and
Expand Down
16 changes: 0 additions & 16 deletions Lib/profiling/sampling/_heatmap_assets/heatmap.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
overflow: hidden;
}

.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--python-blue), var(--python-gold));
opacity: 0;
transition: opacity var(--transition-fast);
}

.stat-card:nth-child(1) { --i: 0; --card-color: 55, 118, 171; }
.stat-card:nth-child(2) { --i: 1; --card-color: 40, 167, 69; }
.stat-card:nth-child(3) { --i: 2; --card-color: 255, 193, 7; }
Expand All @@ -101,10 +89,6 @@
box-shadow: 0 4px 16px rgba(var(--card-color), 0.15);
}

.stat-card:hover::before {
opacity: 1;
}

.stat-icon {
width: 40px;
height: 40px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<header class="top-bar">
<div class="brand">
<div class="brand-logo"><!-- PYTHON_LOGO --></div>
<span class="brand-text">Tachyon</span>
<a href="index.html" class="brand-text">Tachyon</a>
<span class="brand-divider"></span>
<span class="brand-subtitle" style="font-family: var(--font-mono); font-size: 13px;"><!-- FILENAME --></span>
</div>
Expand Down
3 changes: 3 additions & 0 deletions Lib/profiling/sampling/_shared_assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ body {
}

.brand-text {
font-family: var(--font-sans);
font-weight: 700;
font-size: 16px;
letter-spacing: -0.3px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
color: inherit;
text-decoration: none;
}

.brand-subtitle {
Expand Down
9 changes: 7 additions & 2 deletions Lib/profiling/sampling/heatmap_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,14 @@ def render_hierarchical_html(self, trees: Dict[str, TreeNode]) -> str:
icon = '▶' if is_collapsed else '▼'
content_style = ' style="display: none;"' if is_collapsed else ''

file_word = "file" if tree.count == 1 else "files"
sample_word = "sample" if tree.samples == 1 else "samples"
section_html = f'''
<div class="type-section">
<div class="type-header" onclick="toggleTypeSection(this)">
<span class="type-icon">{icon}</span>
<span class="type-title">{type_names[module_type]}</span>
<span class="type-stats">({tree.count} files, {tree.samples:,} samples)</span>
<span class="type-stats">({tree.count} {file_word}, {tree.samples:,} {sample_word})</span>
</div>
<div class="type-content"{content_style}>
'''
Expand Down Expand Up @@ -380,11 +382,14 @@ def _render_folder(self, node: TreeNode, name: str, level: int = 1) -> str:
parts = []

# Render folder header (collapsed by default)
file_word = "file" if node.count == 1 else "files"
sample_word = "sample" if node.samples == 1 else "samples"
parts.append(f'{indent}<div class="folder-node collapsed" data-level="{level}">')
parts.append(f'{indent} <div class="folder-header" onclick="toggleFolder(this)">')
parts.append(f'{indent} <span class="folder-icon">▶</span>')
parts.append(f'{indent} <span class="folder-name">📁 {html.escape(name)}</span>')
parts.append(f'{indent} <span class="folder-stats">({node.count} files, {node.samples:,} samples)</span>')
parts.append(f'{indent} <span class="folder-stats">'
f'({node.count} {file_word}, {node.samples:,} {sample_word})</span>')
parts.append(f'{indent} </div>')
parts.append(f'{indent} <div class="folder-content" style="display: none;">')

Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ WHEEL_PKG_DIR= @WHEEL_PKG_DIR@

# Detailed destination directories
BINLIBDEST= @BINLIBDEST@
LIBDEST= $(SCRIPTDIR)/python$(VERSION)$(ABI_THREAD)
LIBDEST= @LIBDEST@
INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Honor :option:`--with-platlibdir` in the pure-Python standard library
installation path, if ``PLATLIBDIR`` doesn't match the value used in
``LIBDIR``.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
When calculating the digest of the JIT stencils input, sort the hashed files
by filenames before adding their content to the hasher. This ensures
deterministic hash input and hence deterministic hash, independent on
filesystem order.
2 changes: 1 addition & 1 deletion Tools/jit/_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _compute_digest(self) -> str:
# Exclude cache files from digest computation to ensure reproducible builds.
if dirpath.endswith("__pycache__"):
continue
for filename in filenames:
for filename in sorted(filenames):
hasher.update(pathlib.Path(dirpath, filename).read_bytes())
return hasher.hexdigest()

Expand Down
19 changes: 9 additions & 10 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6420,15 +6420,10 @@ if test "$ac_sys_system" = "iOS"; then
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)"
fi


AC_SUBST([BINLIBDEST])
BINLIBDEST='$(LIBDIR)/python$(VERSION)$(ABI_THREAD)'


# Check for --with-platlibdir
# /usr/$PLATLIBDIR/python$(VERSION)$(ABI_THREAD)
AC_SUBST([PLATLIBDIR])
PLATLIBDIR="lib"
PLATLIBDIR="lib" # XXX: We should probably calculate the defauly from libdir, if defined.
AC_MSG_CHECKING([for --with-platlibdir])
AC_ARG_WITH(
[platlibdir],
Expand All @@ -6445,19 +6440,22 @@ if test -n "$withval" -a "$withval" != yes -a "$withval" != no
then
AC_MSG_RESULT([yes])
PLATLIBDIR="$withval"
BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
else
AC_MSG_RESULT([no])
fi],
[AC_MSG_RESULT([no])])

AC_SUBST([LIBDEST])
AC_SUBST([BINLIBDEST])
LIBDEST='${prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'
BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)$(ABI_THREAD)'

dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST([PY_ENABLE_SHARED])
if test x$PLATFORM_TRIPLET = x; then
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}"
LIBPL='$(LIBDEST)'"/config-${LDVERSION}"
else
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}${ABI_THREAD}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
LIBPL='$(LIBDEST)'"/config-${LDVERSION}-${PLATFORM_TRIPLET}"
fi
AC_SUBST([LIBPL])

Expand Down
Loading