Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
02d35ded
Verified
Commit
02d35ded
authored
Mar 30, 2020
by
Eliot Berriot
Browse files
Switch back from pendulum to arrow to fix broken build ;)
parent
4459f3eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/music/metadata.py
View file @
02d35ded
...
...
@@ -2,7 +2,7 @@ import base64
from
collections.abc
import
Mapping
import
datetime
import
logging
import
pendulum
import
arrow
import
mutagen._util
import
mutagen.oggtheora
...
...
@@ -575,9 +575,9 @@ class PermissiveDateField(serializers.CharField):
return
datetime
.
date
(
parsed
.
year
,
parsed
.
month
,
parsed
.
day
)
try
:
parsed
=
pendulum
.
parse
(
str
(
value
))
parsed
=
arrow
.
get
(
str
(
value
))
return
datetime
.
date
(
parsed
.
year
,
parsed
.
month
,
parsed
.
day
)
except
(
pendulum
.
exceptions
.
ParserError
,
ValueError
):
except
(
arrow
.
parser
.
ParserError
,
ValueError
):
pass
return
None
...
...
api/funkwhale_api/music/models.py
View file @
02d35ded
...
...
@@ -6,7 +6,7 @@ import tempfile
import
urllib.parse
import
uuid
import
pendulum
import
arrow
import
pydub
from
django.conf
import
settings
from
django.contrib.contenttypes.fields
import
GenericRelation
...
...
@@ -286,7 +286,7 @@ def import_artist(v):
def
parse_date
(
v
):
d
=
pendulum
.
parse
(
v
).
date
()
d
=
arrow
.
get
(
v
).
date
()
return
d
...
...
api/requirements/base.txt
View file @
02d35ded
...
...
@@ -32,7 +32,7 @@ django-cors-headers>=3.2,<3.3
musicbrainzngs==0.6
djangorestframework>=3.11,<3.12
djangorestframework-jwt>=1.11,<1.12
pendulum>=2,<3
arrow>=0.15.5,<0.16
persisting-theory>=0.2,<0.3
django-versatileimagefield>=2.0,<2.1
django-filter>=2.1,<2.2
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment