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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: OS ${{ matrix.os}} - Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## [Unreleased]

### Add
* Add support for Python 3.12

### Changed
* BREAKING CHANGE: Arithmetic operations on `date`/`datetime` against an unknown type will now return `NotImplemented` instead of raising `TypeError`
* Drop Python 3.7 support

### Fixed
* treat %% as an escape sequence in strftime

Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ build: false

environment:
matrix:
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python38"
- PYTHON: "C:\\Python39"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python310"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python311"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python312"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
description=("Jalali datetime binding for python"),
url="https://github.com/slashmili/python-jalali",
long_description=open('README').read(),
python_requires=">=3.7",
python_requires=">=3.8",
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
],
)
119 changes: 0 additions & 119 deletions tests/pickled_objects/jdate_py2_jdatetime3.7.pickle

This file was deleted.

128 changes: 0 additions & 128 deletions tests/pickled_objects/jdatetime_py2_jdatetime3.7.pickle

This file was deleted.

8 changes: 1 addition & 7 deletions tests/test_jdate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import datetime
import pickle
import sys
import time
from unittest import TestCase

Expand Down Expand Up @@ -166,12 +165,7 @@ def test_pickle(self):
self.assertEqual(pickle.loads(pickle.dumps(d)), d)

def test_unpickle_older_date_object(self):
if sys.version_info[0] >= 3: # py3
pickled_object_file = 'jdate_py3_jdatetime3.7.pickle'
else:
pickled_object_file = 'jdate_py2_jdatetime3.7.pickle'

d = load_pickle(pickled_object_file)
d = load_pickle('jdate_py3_jdatetime3.7.pickle')
self.assertEqual(d, jdatetime.date(1400, 10, 11))

def test_fromisoformat(self):
Expand Down
7 changes: 1 addition & 6 deletions tests/test_jdatetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,12 +765,7 @@ def test_pickle(self):
self.assertEqual(pickle.loads(pickle.dumps(dt)), dt)

def test_unpickle_older_datetime_object(self):
if sys.version_info[0] >= 3: # py3
pickled_object_file = 'jdatetime_py3_jdatetime3.7.pickle'
else:
pickled_object_file = 'jdatetime_py2_jdatetime3.7.pickle'

dt = load_pickle(pickled_object_file)
dt = load_pickle('jdatetime_py3_jdatetime3.7.pickle')
self.assertEqual(dt, jdatetime.datetime(1400, 10, 11, 1, 2, 3, 30))


Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[tox]
envlist =
py{37,38,39,310,311}
py{38,39,310,311,312}
flake8
isort

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
deps =
Expand Down