Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python version deprecation policy #799

Closed
bennuttall opened this issue Sep 19, 2019 · 12 comments · Fixed by #896
Closed

Python version deprecation policy #799

bennuttall opened this issue Sep 19, 2019 · 12 comments · Fixed by #896
Assignees

Comments

@bennuttall
Copy link
Member

bennuttall commented Sep 19, 2019

I think we should drop support for Python versions when they become EOL.

We currently test on Python 2.7, 3.2, 3.3, 3.4, 3.5, 3.6 and 3.7. Two of these (3.2 and 3.3) are EOL, and another (2.7) is approaching EOL:

Python version Debian version EOL Debian version EOL
2.7 Buster 2020-01-01 2020-06-30
3.2 Wheezy 2016-02-20 2018-05-31
3.3 None 2017-09-29 N/A
3.4 Jessie 2019-03-18 2020-06-30
3.5 Stretch 2020-09-13 2022-06-??
3.6 None 2021-12-23 N/A
3.7 Buster 2023-06-27 ?

3.2 / 3.3

I propose we drop 3.2 and 3.3 from tox config now. They're EOL, must be hardly used, and occasionally cause incompatibility issues we have to spend more time fixing.

2.7

I propose that we drop 2.7 from tox config now, and start allowing Python 3-only syntax in the library. Any future releases will support Python 3 only, even if they take place in 2019.

A more conservative approach could be to wait for 1 January to drop it. I just don't see the point creating new Python 2 packages at this late stage. Debian has stopped accepting new Python 2 packages, and is currently removing Python 2 packages from Bullseye (testing).

When we do drop it, there's no need to do a massive refactoring to take advantage of the opportunity for Python only 3 code, but any cleanup can be done as we go along, and any new code can benefit from not having to support both 2 and 3.

3.4

Python 3.4 is EOL but its Debian version is not, until June 2020.

I propose we drop 3.4 in time for the Debian Jessie EOL in June.

3.5

Python 3.5's EOL is approaching in 2020, but it's in Debian Stretch which is EOL in 2022, so I propose we keep supporting it until then.

Voting

I propose that the three core maintainers (@waveform80, @lurch and I) should vote on each proposal, and we'll go with the majority for each one.

  1. Drop Python 3.2 now [y/n]
  2. Drop Python 3.3 now [y/n]
  3. Drop Python 2.7 now [y/n]
  4. Drop Python 2.7 in January (if 3 fails) [y/n]
  5. Drop Python 3.4 in June [y/n]

There's no need to vote on newer Python versions for now, but the decisions taken here will provide precedent for future decisions.

Note that if a future gpiozero release drops support for 2.7, it may become not-installable for Python 2, but older gpiozero versions will still be available. If a future gpiozero release drops support for a Python 3.x version it may simply be that we say we don't support that version any more, but it may still be installable, may even work, but we would not guarantee it. If possible, we would specify this in the meta tags on PyPi to make it not-installable for unsupported 3.x versions.

@bennuttall
Copy link
Member Author

  1. Drop Python 3.2 now [y]
  2. Drop Python 3.3 now [y]
  3. Drop Python 2.7 now [y]
  4. Drop Python 2.7 in January (if 3 fails) [y]
  5. Drop Python 3.4 in June [y]

@lurch
Copy link
Contributor

lurch commented Sep 19, 2019

I have no strong preferences either way, so I'm happy to go along with whatever Ben & Dave decide.

Another python project I'm involved with also made a similar decision recently PyFilesystem/pyfilesystem2#317

@bennuttall Do you know if all the RPF learning resources / Picademy / etc. have all been updated to be exclusively Python3 ?

@bennuttall
Copy link
Member Author

I have no strong preferences either way, so I'm happy to go along with whatever Ben & Dave decide.

In that case, I'll consider your votes to match Dave's.

Do you know if all the RPF learning resources / Picademy / etc. have all been updated to be exclusively Python3 ?

As far as I'm aware, yes. Picademy always has been, learning resources generally so, and we've removed IDLE2 from the Raspbian image in favour of Thonny and Mu which are Python 3 only.

@lurch
Copy link
Contributor

lurch commented Nov 17, 2019

Just adding a note here that when this changes, you'll need to remember to update https://gpiozero.readthedocs.io/en/stable/contributing.html#python-2-3 too.

@bennuttall
Copy link
Member Author

@waveform80 happy to defer some of these calls but can we agree to drop some of them?

i.e. 3.2/3.3 now, 3.4 in June. 2.7 more contentious - I'd rather drop it now but what do you think now January has passed?

If we do a minor release soonish, that could be the last that supports these versions?

@lurch
Copy link
Contributor

lurch commented Feb 4, 2020

I guess after we drop Python2.7, @XECDesign also needs to stop building python2 deb packages of gpiozero for Raspbian?

If we do a minor release soonish, that could be the last that supports these versions?

Sounds good to me 👍

@bennuttall
Copy link
Member Author

Serge doesn't build them, does he? My understanding is that @waveform80 does and publishes to the repo.

@XECDesign
Copy link

Since it's in Debian now, I believe the plan is to take the package from there in the future.

@lurch
Copy link
Contributor

lurch commented Feb 4, 2020

Sorry, my mistake! 🙁

@bennuttall
Copy link
Member Author

But that's always going to be an older version (it's already quite out-of-date - and that version won't work on Pi 4).

@XECDesign
Copy link

I think the idea is that we'd use their packaging an pull in the latest 'upstream' gpiozero.

fangchenli added a commit to fangchenli/gpiozero that referenced this issue Oct 12, 2020
fangchenli added a commit to fangchenli/gpiozero that referenced this issue Oct 12, 2020
@bennuttall
Copy link
Member Author

Decision: 1.6.0 will be the last to support Python 2. After this we'll support Python 3.5+.

crs-k referenced this issue in crs-k/pwnagotchi-scoreboard Feb 17, 2024
Bumps [gpiozero](https://github.com/gpiozero/gpiozero) from 1.5.1 to
2.0.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/gpiozero/gpiozero/blob/master/docs/changelog.rst">gpiozero's
changelog</a>.</em></p>
<blockquote>
<h1>Release 2.0.1 (2024-02-15)</h1>
<ul>
<li>Fixed Python 3.12 compatibility, and clarify that 3.9 is the lowest
supported
version in our CI configuration
(<code>[#1113](https://github.com/gpiozero/gpiozero/issues/1113)</code>_)</li>
</ul>
<p>.. _<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/1113">#1113</a>:
<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/1113">gpiozero/gpiozero#1113</a></p>
<h1>Release 2.0 (2023-09-12)</h1>
<ul>
<li>Removed Python 2.x support; many thanks to Fangchen Li for a
substantial
amount of work on this!
(<code>[#799](https://github.com/gpiozero/gpiozero/issues/799)</code>_
<code>[#896](https://github.com/gpiozero/gpiozero/issues/896)</code>_)</li>
<li>Removed RPIO pin implementation</li>
<li>Made :class:<code>gpiozero.pins.lgpio.LGPIOFactory</code> the
default factory; the
former default,
:class:<code>gpiozero.pins.rpigpio.RPiGPIOFactory</code>, is now the
second place preference</li>
<li>Added :doc:<code>compat</code> chapter</li>
<li>Added :program:<code>pintest</code> utility</li>
<li>Added Raspberry Pi 5 board data</li>
</ul>
<p>.. _<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/799">#799</a>:
<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/799">gpiozero/gpiozero#799</a>
.. _<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/896">#896</a>:
<a
href="https://redirect.github.com/gpiozero/gpiozero/issues/896">gpiozero/gpiozero#896</a></p>
<h1>Release 1.6.2 (2021-03-18)</h1>
<ul>
<li>Correct docs referring to 1.6.0 as the last version supporting
Python 2</li>
</ul>
<p>.. warning::</p>
<pre><code>This is the last release to support Python 2
</code></pre>
<h1>Release 1.6.1 (2021-03-17)</h1>
<ul>
<li>Fix missing font files for 7-segment displays</li>
</ul>
<h1>Release 1.6.0 (2021-03-14)</h1>
<ul>
<li>Added :class:<code>RotaryEncoder</code> class (thanks to Paulo
Mateus)
(<code>[#482](https://github.com/gpiozero/gpiozero/issues/482)</code><em>,
<code>[#928](https://github.com/gpiozero/gpiozero/issues/928)</code></em>)</li>
<li>Added support for multi-segment character displays with
:class:<code>LEDCharDisplay</code> and
:class:<code>LEDMultiCharDisplay</code> along with &quot;font&quot;
support using :class:<code>LEDCharFont</code> (thanks to Martin
O'Hanlon)
(<code>[#357](https://github.com/gpiozero/gpiozero/issues/357)</code><em>,

<code>[#485](https://github.com/gpiozero/gpiozero/issues/485)</code></em>,
<code>[#488](https://github.com/gpiozero/gpiozero/issues/488)</code><em>,
<code>[#493](https://github.com/gpiozero/gpiozero/issues/493)</code></em>,
<code>[#930](https://github.com/gpiozero/gpiozero/issues/930)</code>_)</li>
<li>Added :class:<code>Pibrella</code> class (thanks to Carl Monk)
(<code>[#773](https://github.com/gpiozero/gpiozero/issues/773)</code><em>,
<code>[#798](https://github.com/gpiozero/gpiozero/issues/798)</code></em>)</li>
<li>Added :class:<code>TrafficpHat</code> class (thanks to Ryan
Walmsley)
(<code>[#845](https://github.com/gpiozero/gpiozero/issues/845)</code><em>,
<code>[#846](https://github.com/gpiozero/gpiozero/issues/846)</code></em>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/a13848bd9701844c139709750cfa038c59b2ab5f"><code>a13848b</code></a>
Run copyrights script for release</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/3ee415cbfd5de07324696ceadd22ded92c48a517"><code>3ee415c</code></a>
Bump revision and add changelog for release</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/ebf8874bd71d353ebb5f83dcb1fdbc6be58b454d"><code>ebf8874</code></a>
Fix <a
href="https://redirect.github.com/gpiozero/gpiozero/issues/1113">#1113</a></li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/fa114311048c052ea1b6810c235cc0f858720f36"><code>fa11431</code></a>
Set 3.9 as base version, fix 3.12 compatibility</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/981e3f70b00853fd011baf8cd1cb17f241e4ab65"><code>981e3f7</code></a>
Merge pull request <a
href="https://redirect.github.com/gpiozero/gpiozero/issues/1104">#1104</a>
from lurch/patch-2</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/0f09a5a1d0c3b0055cdfe52de3009deea30f8654"><code>0f09a5a</code></a>
Small docs typo</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/e59c55c77bdd635a566ff31815e93a51d54907e8"><code>e59c55c</code></a>
Workaround rtd's ancient flag</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/025ba5bc2f0b7a0936afc792345a0615586f6b61"><code>025ba5b</code></a>
Would help if I specified the right requirement...</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/cba887aa60d3c844ea7e36f8c4d170fd9073d87c"><code>cba887a</code></a>
RTD builds &quot;old&quot; projects with sphinx 1.8</li>
<li><a
href="https://github.com/gpiozero/gpiozero/commit/390caf61ba73af65f39395551c25674631eca7d0"><code>390caf6</code></a>
The root doc default changed to 'contents'</li>
<li>Additional commits viewable in <a
href="https://github.com/gpiozero/gpiozero/compare/v1.5.1...v2.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gpiozero&package-manager=pip&previous-version=1.5.1&new-version=2.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants