Skip to content

Commit 186252a

Browse files
authored
Drop Python 3.7 and lower (#734)
1 parent 071bf63 commit 186252a

File tree

6 files changed

+525
-548
lines changed

6 files changed

+525
-548
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Build wheels
2121
uses: pypa/[email protected]
2222
env:
23-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
23+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
2424
with:
2525
package-dir: .
2626
output-dir: dist

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
matrix:
3535
os: [Ubuntu, MacOS, Windows]
36-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
36+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
3737
defaults:
3838
run:
3939
shell: bash

README.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ Pendulum
77
.. image:: https://img.shields.io/pypi/l/pendulum.svg
88
:target: https://pypi.python.org/pypi/pendulum
99

10-
.. image:: https://img.shields.io/codecov/c/github/sdispater/pendulum/master.svg
11-
:target: https://codecov.io/gh/sdispater/pendulum/branch/master
12-
1310
.. image:: https://github.com/sdispater/pendulum/actions/workflows/tests.yml/badge.svg
1411
:alt: Pendulum Build status
1512
:target: https://github.com/sdispater/pendulum/actions
1613

1714

1815
Python datetimes made easy.
1916

20-
Supports Python **2.7** and **3.4+**.
17+
Supports Python **3.8 and newer**.
2118

2219

2320
.. code-block:: python
@@ -56,6 +53,13 @@ Supports Python **2.7** and **3.4+**.
5653
'2013-03-31T03:00:00+02:00'
5754
5855
56+
Resources
57+
=========
58+
59+
* `Official Website <https://pendulum.eustace.io>`_
60+
* `Documentation <https://pendulum.eustace.io/docs/>`_
61+
* `Issue Tracker <https://github.com/sdispater/pendulum/issues>`_
62+
5963
Why Pendulum?
6064
=============
6165

@@ -121,14 +125,6 @@ a possible solution, if any:
121125
return '' if val is None else val.isoformat()
122126
123127
124-
Resources
125-
=========
126-
127-
* `Official Website <https://pendulum.eustace.io>`_
128-
* `Documentation <https://pendulum.eustace.io/docs/>`_
129-
* `Issue Tracker <https://github.com/sdispater/pendulum/issues>`_
130-
131-
132128
Contributing
133129
============
134130

pendulum/datetime.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import calendar
44
import datetime
5-
import sys
65
import traceback
76

87
from typing import TYPE_CHECKING
@@ -1243,13 +1242,9 @@ def __add__(self, other: datetime.timedelta) -> Self:
12431242
if not isinstance(other, datetime.timedelta):
12441243
return NotImplemented
12451244

1246-
if sys.version_info >= (3, 8):
1247-
# This is a workaround for Python 3.8+
1248-
# since calling astimezone() will call this method
1249-
# instead of the base datetime class one.
1250-
caller = traceback.extract_stack(limit=2)[0].name
1251-
if caller == "astimezone":
1252-
return super().__add__(other)
1245+
caller = traceback.extract_stack(limit=2)[0].name
1246+
if caller == "astimezone":
1247+
return super().__add__(other)
12531248

12541249
return self._add_timedelta_(other)
12551250

0 commit comments

Comments
 (0)