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

fix: package versions #847

Open
wants to merge 2 commits into
base: 4.0
Choose a base branch
from
Open
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/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ src/masonite.egg-info/*
.vscode
build/
venv4
.python-version
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ argon2-cffi
bcrypt>=3.2,<3.3
black
cleo>=0.8.1,<0.9
cryptography>=36,<37
cryptography>=36,<=44
dotty_dict>=1.3.0,<1.40
exceptionite>=2.0,<3
hashids>=1.3,<1.4
Expand All @@ -11,7 +11,7 @@ hupper>=1.10,<1.11
inflection>=0.3,<0.4
jinja2<3.2
masonite-orm>=2,<3
pendulum>=2,<3
pendulum>=3,<4
pwnedapi
vonage>=3,<4
pytest
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
install_requires=[
"inflection>=0.3,<0.4",
"exceptionite>=2.2,<3.0",
"pendulum>=2,<3",
"pendulum>=3,<4",
"jinja2<3.2",
"cleo>=0.8.1,<0.9",
"hupper>=1.10,<1.11",
Expand All @@ -50,7 +50,7 @@
"python-dotenv>=0.15,<0.16",
"masonite-orm>=2.14,<3",
"hashids>=1.3,<1.4",
"cryptography>=36,<37",
"cryptography>=36,<=44",
"tldextract>=2.2,<2.3",
"hfilesize>=0.1",
"dotty_dict>=1.3.0,<1.40",
Expand Down
4 changes: 2 additions & 2 deletions src/masonite/tests/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def fakeTime(self, pendulum_datetime: "DateTime" = None) -> "DateTime":
timestamps logic."""
if pendulum_datetime is None:
pendulum_datetime = pendulum.now()
pendulum.set_test_now(pendulum_datetime)
pendulum.travel_to(pendulum_datetime, freeze=True)
return pendulum_datetime

def fakeTimeTomorrow(self) -> None:
Expand Down Expand Up @@ -441,7 +441,7 @@ def restoreTime(self) -> None:
"""Restore time to correct one, so that pendulum new "now" instance are corrects.
This method will be typically called in tearDown() method of a test class."""
# this will clear the mock
pendulum.set_test_now()
pendulum.travel_back()

def assertDatabaseCount(self, table: str, count: int) -> None:
self.assertEqual(self.application.make("builder").table(table).count(), count)
Expand Down
2 changes: 1 addition & 1 deletion src/masonite/utils/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ def migration_timestamp():
"""Return current time formatted for creating migration filenames.
Example: 2021_01_09_043202
"""
return pendulum.now().format("YYYY_MM_DD_HHmmss")
return pendulum.now("UTC").format("YYYY_MM_DD_HHmmss")
2 changes: 1 addition & 1 deletion tests/core/foundation/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def my_method(test: SomeStringTypeHintedAppObject):
return test

obj = self.application.resolve(my_method, 1)
self.assertEquals(obj.app + 1, 2)
self.assertEqual(obj.app + 1, 2)

def test_can_resolve_class_with_type_hinted_parameters(self):
def my_method(test: SomeAppObject):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/utils/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ def test_cookie_expire_time(self):
self.assertEqual(expiration_time_str, "Thu, 28 Jan 2021 07:28:00")

def test_migration_timestamp(self):
self.fakeTime(pendulum.datetime(2021, 10, 25, 8, 12, 54))
self.fakeTime(pendulum.datetime(2021, 10, 25, 8, 12, 54, 0, tz="UTC"))
self.assertEqual(migration_timestamp(), "2021_10_25_081254")
Loading