Skip to content

Commit

Permalink
Python313 (#1744)
Browse files Browse the repository at this point in the history
* Updated dependencies for python 3.13

* Added python 3.13
  • Loading branch information
RhetTbull authored Nov 30, 2024
1 parent a8ab36d commit 204c65f
Show file tree
Hide file tree
Showing 50 changed files with 2,344 additions and 990 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# and I don't have time to try to fix this
# os: [macos-14, ubuntu-latest]
os: [macos-14]
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Limited support is also provided for exporting photos and metadata from iPhoto l

This package will read Photos databases for any supported version on any supported macOS version. E.g. you can read a database created with Photos 5.0 on MacOS 10.15 on a machine running macOS 10.12 and vice versa.

Requires python >= `3.9`, <= `3.12`. Reading iPhoto libraries requires python >= `3.10`.
Requires python >= `3.10`, <= `3.13`.

For macOS 15.0 / Sequoia developer preview, alpha support is provided (very preliminary, not guaranteed to work). Not all features of osxphotos have been tested and some features may not work. If you encounter issues, please open an issue on GitHub.

Expand Down Expand Up @@ -98,7 +98,7 @@ Once you've installed osxphotos with `uv`, to upgrade to the latest version:
uv tool upgrade osxphotos
```

If you want to try `osxphotos` without installing it, you can run `uv tool run osxphotos` or `uvx osxphotos`.
If you want to try `osxphotos` without installing it, you can run `uv tool run --python 3.12 osxphotos` or `uvx --python 3.12 osxphotos`.

### Installation using pip

Expand Down
6 changes: 3 additions & 3 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ furo
isort
m2r2==0.3.3.post2
pdbpp
pyinstaller==5.13.2
pyinstaller>=6.11.1
pytest-cov==4.0.0
pytest-mock
pytest==7.4.0
ruff==0.7.2
pytest>=7.4.0,<8.0.0
ruff==0.8.1
Sphinx
sphinx_click
sphinx_rtd_theme
Expand Down
4 changes: 2 additions & 2 deletions docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a02785b8a9b27357a3304c5646993811
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 453689a36d886f59523b5b58791e91e0
tags: 645f666f9bcd5a90fca523b33c5a78b7
124 changes: 99 additions & 25 deletions docs/API_README.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Python Reference" href="reference.html" /><link rel="prev" title="OSXPhotos Python Package Overview" href="package_overview.html" />

<!-- Generated with Sphinx 7.3.7 and Furo 2023.09.10 -->
<!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 -->
<title>OSXPhotos Python API - osxphotos 0.68.6 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=36a5483c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" />



Expand Down Expand Up @@ -69,7 +69,7 @@
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
Expand All @@ -84,22 +84,63 @@
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
<title>Auto light/dark, in light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
<circle cx="14.5" cy="9.55" r="3.6"/>
</svg>
</symbol>
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
<title>Auto light/dark, in dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
</svg>
</symbol>
<symbol id="svg-pencil" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
<path d="M13.5 6.5l4 4" />
<path d="M20 21l2 -2l-2 -2" />
<path d="M17 17l-2 2l2 2" />
</svg>
</symbol>
<symbol id="svg-eye" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
<path d="M20 21l2 -2l-2 -2" />
<path d="M17 17l-2 2l2 2" />
</svg>
</symbol>
</svg>
Expand All @@ -113,6 +154,8 @@
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>

<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>



<div class="page">
Expand All @@ -130,7 +173,8 @@
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
Expand Down Expand Up @@ -182,11 +226,17 @@
<span>Back to top</span>
</a>
<div class="content-icon-container">

<div class="view-this-page">
<a class="muted-link" href="_sources/API_README.rst.txt" title="View this page">
<svg><use href="#svg-eye"></use></svg>
<span class="visually-hidden">View this page</span>
</a>
</div>
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
Expand All @@ -196,7 +246,7 @@
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<article role="main" id="furo-main-content">
<section id="osxphotos-python-api">
<h1>OSXPhotos Python API<a class="headerlink" href="#osxphotos-python-api" title="Link to this heading"></a></h1>
<p>In addition to a command line interface, OSXPhotos provides a access to a Python API that allows you to easily access a Photos library, often with just a few lines of code.</p>
Expand Down Expand Up @@ -1114,15 +1164,33 @@ <h4><code class="docutils literal notranslate"><span class="pre">original_filena
</section>
<section id="date">
<h4><code class="docutils literal notranslate"><span class="pre">date</span></code><a class="headerlink" href="#date" title="Link to this heading"></a></h4>
<p>Returns the create date of the photo as a datetime.datetime object</p>
<p>Returns the create date of the photo as a timezone aware datetime.datetime object</p>
</section>
<section id="tzoffset">
<h4><code class="docutils literal notranslate"><span class="pre">tzoffset</span></code><a class="headerlink" href="#tzoffset" title="Link to this heading"></a></h4>
<p>Returns the timezone offset from UTC in seconds for the Photo creation date</p>
</section>
<section id="tzname">
<h4><code class="docutils literal notranslate"><span class="pre">tzname</span></code><a class="headerlink" href="#tzname" title="Link to this heading"></a></h4>
<p>Returns the timezone name for the Photos creation date; on Photos version &lt; 5, returns None</p>
</section>
<section id="date-original">
<h4><code class="docutils literal notranslate"><span class="pre">date_original</span></code><a class="headerlink" href="#date-original" title="Link to this heading"></a></h4>
<p>Returns the original creation date of the photo as a timezone aware datetime.datetime object.
If user changed the photo’s date in Photos, this will return the original date Photos assigned
as the creation date at the time of import. The original date is stored by Photos at import time
from the date in the photo’s EXIF data. If this is not set (photo had no EXIF date or photo was
imported on an older version of macOS that did not store original date) then <code class="docutils literal notranslate"><span class="pre">date_original</span></code>
returns the same value as <code class="docutils literal notranslate"><span class="pre">date</span></code>.</p>
<p>Photos 5+ only; on Photos &lt; 5.0, this will return the same value as <code class="docutils literal notranslate"><span class="pre">date</span></code>.</p>
</section>
<section id="date-added">
<h4><code class="docutils literal notranslate"><span class="pre">date_added</span></code><a class="headerlink" href="#date-added" title="Link to this heading"></a></h4>
<p>Returns the date the photo was added to the Photos library as a timezone aware datetime.datetime object, or None if the data added cannot be determined</p>
<p>Returns the date the photo was added to the Photos library as a timezone aware datetime.datetime object in the local timezone, or None if the data added cannot be determined</p>
</section>
<section id="date-modified">
<h4><code class="docutils literal notranslate"><span class="pre">date_modified</span></code><a class="headerlink" href="#date-modified" title="Link to this heading"></a></h4>
<p>Returns the modification date of the photo as a datetime.datetime object or None if photo has no modification date</p>
<p>Returns the modification date of the photo as a timezone aware atetime.datetime object in the local timezone or None if photo has no modification date</p>
</section>
<section id="description">
<h4><code class="docutils literal notranslate"><span class="pre">description</span></code><a class="headerlink" href="#description" title="Link to this heading"></a></h4>
Expand Down Expand Up @@ -1276,7 +1344,7 @@ <h4><code class="docutils literal notranslate"><span class="pre">intrash</span><
</section>
<section id="date-trashed">
<h4><code class="docutils literal notranslate"><span class="pre">date_trashed</span></code><a class="headerlink" href="#date-trashed" title="Link to this heading"></a></h4>
<p>Returns the date the photo was placed in the trash as a datetime.datetime object or None if photo is not in the trash</p>
<p>Returns the date the photo was placed in the trash as a timezone aware datetime.datetime object in the local timezone or None if photo is not in the trash</p>
</section>
<section id="location">
<h4><code class="docutils literal notranslate"><span class="pre">location</span></code><a class="headerlink" href="#location" title="Link to this heading"></a></h4>
Expand Down Expand Up @@ -1665,6 +1733,9 @@ <h3>ExifInfo<a class="headerlink" href="#id98" title="Link to this heading">¶</
<span class="n">camera_model</span><span class="p">:</span> <span class="nb">str</span>
<span class="n">codec</span><span class="p">:</span> <span class="nb">str</span>
<span class="n">lens_model</span><span class="p">:</span> <span class="nb">str</span>
<span class="n">date</span><span class="p">:</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span> <span class="o">|</span> <span class="kc">None</span>
<span class="n">tzoffset</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span>
<span class="n">tzname</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span>
</pre></div>
</div>
<p>For example:</p>
Expand Down Expand Up @@ -3409,6 +3480,9 @@ <h2>Additional Examples<a class="headerlink" href="#id174" title="Link to this h
<li><a class="reference internal" href="#filename"><code class="docutils literal notranslate"><span class="pre">filename</span></code></a></li>
<li><a class="reference internal" href="#id26"><code class="docutils literal notranslate"><span class="pre">original_filename</span></code></a></li>
<li><a class="reference internal" href="#date"><code class="docutils literal notranslate"><span class="pre">date</span></code></a></li>
<li><a class="reference internal" href="#tzoffset"><code class="docutils literal notranslate"><span class="pre">tzoffset</span></code></a></li>
<li><a class="reference internal" href="#tzname"><code class="docutils literal notranslate"><span class="pre">tzname</span></code></a></li>
<li><a class="reference internal" href="#date-original"><code class="docutils literal notranslate"><span class="pre">date_original</span></code></a></li>
<li><a class="reference internal" href="#date-added"><code class="docutils literal notranslate"><span class="pre">date_added</span></code></a></li>
<li><a class="reference internal" href="#date-modified"><code class="docutils literal notranslate"><span class="pre">date_modified</span></code></a></li>
<li><a class="reference internal" href="#description"><code class="docutils literal notranslate"><span class="pre">description</span></code></a></li>
Expand Down Expand Up @@ -3680,9 +3754,9 @@ <h2>Additional Examples<a class="headerlink" href="#id174" title="Link to this h
</aside>
</div>
</div><script src="_static/documentation_options.js?v=a98ddb9b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
<script src="_static/scripts/furo.js?v=5fa4622c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
</body>
Expand Down
Loading

0 comments on commit 204c65f

Please sign in to comment.