zou 0.20.16__py3-none-any.whl → 0.20.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zou/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.20.16"
1
+ __version__ = "0.20.17"
@@ -83,9 +83,10 @@ class DownloadAttachmentResource(Resource):
83
83
  ),
84
84
  )
85
85
  except Exception:
86
- current_app.logger.error(
87
- f"Attachment file was not found for: {attachment_file_id}"
88
- )
86
+ if config.LOG_FILE_NOT_FOUND:
87
+ current_app.logger.error(
88
+ f"Attachment file was not found for: {attachment_file_id}"
89
+ )
89
90
  abort(404)
90
91
 
91
92
 
@@ -653,9 +653,10 @@ class PreviewFileMovieResource(BasePreviewFileResource):
653
653
  instance_id, last_modified=self.last_modified
654
654
  )
655
655
  except FileNotFound:
656
- current_app.logger.error(
657
- "Movie file was not found for: %s" % instance_id
658
- )
656
+ if config.LOG_FILE_NOT_FOUND:
657
+ current_app.logger.error(
658
+ "Movie file was not found for: %s" % instance_id
659
+ )
659
660
  abort(404)
660
661
 
661
662
 
@@ -698,9 +699,10 @@ class PreviewFileLowMovieResource(BasePreviewFileResource):
698
699
  instance_id, last_modified=self.last_modified
699
700
  )
700
701
  except FileNotFound:
701
- current_app.logger.error(
702
- "Movie file was not found for: %s" % instance_id
703
- )
702
+ if config.LOG_FILE_NOT_FOUND:
703
+ current_app.logger.error(
704
+ "Movie file was not found for: %s" % instance_id
705
+ )
704
706
  abort(404)
705
707
 
706
708
 
@@ -740,9 +742,10 @@ class PreviewFileMovieDownloadResource(BasePreviewFileResource):
740
742
  last_modified=self.last_modified,
741
743
  )
742
744
  except FileNotFound:
743
- current_app.logger.error(
744
- "Movie file was not found for: %s" % instance_id
745
- )
745
+ if config.LOG_FILE_NOT_FOUND:
746
+ current_app.logger.error(
747
+ "Movie file was not found for: %s" % instance_id
748
+ )
746
749
  abort(404)
747
750
 
748
751
 
@@ -800,9 +803,10 @@ class PreviewFileResource(BasePreviewFileResource):
800
803
  )
801
804
 
802
805
  except FileNotFound:
803
- current_app.logger.error(
804
- "Non-movie file was not found for: %s" % instance_id
805
- )
806
+ if config.LOG_FILE_NOT_FOUND:
807
+ current_app.logger.error(
808
+ "Non-movie file was not found for: %s" % instance_id
809
+ )
806
810
  abort(404)
807
811
 
808
812
 
@@ -869,9 +873,10 @@ class PreviewFileDownloadResource(BasePreviewFileResource):
869
873
  last_modified=self.last_modified,
870
874
  )
871
875
  except FileNotFound:
872
- current_app.logger.error(
873
- "Standard file was not found for: %s" % instance_id
874
- )
876
+ if config.LOG_FILE_NOT_FOUND:
877
+ current_app.logger.error(
878
+ "Standard file was not found for: %s" % instance_id
879
+ )
875
880
  abort(404)
876
881
 
877
882
 
@@ -935,10 +940,11 @@ class AttachmentThumbnailResource(Resource):
935
940
  ),
936
941
  )
937
942
  except FileNotFound:
938
- current_app.logger.error(
939
- "Picture file was not found for attachment: %s"
940
- % (attachment_file_id)
941
- )
943
+ if config.LOG_FILE_NOT_FOUND:
944
+ current_app.logger.error(
945
+ "Picture file was not found for attachment: %s"
946
+ % (attachment_file_id)
947
+ )
942
948
  abort(404)
943
949
 
944
950
 
@@ -982,9 +988,10 @@ class BasePreviewPictureResource(BasePreviewFileResource):
982
988
  last_modified=self.last_modified,
983
989
  )
984
990
  except FileNotFound:
985
- current_app.logger.error(
986
- "Picture file was not found for: %s" % instance_id
987
- )
991
+ if config.LOG_FILE_NOT_FOUND:
992
+ current_app.logger.error(
993
+ "Picture file was not found for: %s" % instance_id
994
+ )
988
995
  abort(404)
989
996
 
990
997
 
@@ -1166,14 +1173,13 @@ class BaseThumbnailResource(Resource):
1166
1173
  ),
1167
1174
  )
1168
1175
  except FileNotFound:
1169
- current_app.logger.error(
1170
- "Thumbnail file was not found for: %s" % instance_id
1171
- )
1176
+ if config.LOG_FILE_NOT_FOUND:
1177
+ current_app.logger.error(
1178
+ "Thumbnail file was not found for: %s" % instance_id
1179
+ )
1172
1180
  abort(404)
1173
- except IOError:
1174
- current_app.logger.error(
1175
- "Thumbnail file was not found for: %s" % instance_id
1176
- )
1181
+ except IOError as e:
1182
+ current_app.logger.error(e)
1177
1183
  abort(404)
1178
1184
 
1179
1185
 
@@ -1680,9 +1686,11 @@ class PreviewBackgroundFileResource(Resource):
1680
1686
  ),
1681
1687
  )
1682
1688
  except FileNotFound:
1683
- current_app.logger.error(
1684
- "Preview background file was not found for: %s" % instance_id
1685
- )
1689
+ if config.LOG_FILE_NOT_FOUND:
1690
+ current_app.logger.error(
1691
+ "Preview background file was not found for: %s"
1692
+ % instance_id
1693
+ )
1686
1694
  raise PreviewBackgroundFileNotFoundException
1687
1695
 
1688
1696
 
zou/app/config.py CHANGED
@@ -142,6 +142,7 @@ LOGS_MODE = os.getenv("LOGS_MODE", "default")
142
142
  LOGS_HOST = os.getenv("LOGS_HOST", "localhost")
143
143
  LOGS_PORT = os.getenv("LOGS_PORT", 2202)
144
144
  LOGS_TOKEN = os.getenv("LOGS_TOKEN")
145
+ LOG_FILE_NOT_FOUND = envtobool("LOG_FILE_NOT_FOUND", True)
145
146
 
146
147
  SENTRY_ENABLED = envtobool("SENTRY_ENABLED", False)
147
148
  SENTRY_DSN = os.getenv("SENTRY_DSN", "")
@@ -1105,6 +1105,7 @@ def get_user_filter_groups(current_user_id):
1105
1105
  )
1106
1106
  )
1107
1107
  .filter(or_(build_open_project_filter(), Project.id == None))
1108
+ .order_by(SearchFilterGroup.created_at.desc())
1108
1109
  .all()
1109
1110
  )
1110
1111
 
zou/app/utils/fs.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import shutil
3
3
  import time
4
+ from flask_fs.errors import FileNotFound
4
5
 
5
6
  import errno
6
7
 
@@ -44,6 +45,8 @@ def get_file_path_and_file(
44
45
  ):
45
46
  if config.FS_BACKEND == "local":
46
47
  file_path = get_local_path(prefix, instance_id)
48
+ if is_unvalid_file(file_path, file_size):
49
+ raise FileNotFound
47
50
  else:
48
51
  file_path = os.path.join(
49
52
  config.TMP_DIR, "cache-%s-%s.%s" % (prefix, instance_id, extension)
@@ -1,6 +1,7 @@
1
1
  from flask_jwt_extended.exceptions import NoAuthorizationError
2
2
  from jwt import ExpiredSignatureError
3
3
  from werkzeug.exceptions import Forbidden, NotFound
4
+ from flask_fs.errors import FileNotFound
4
5
 
5
6
  from zou.app import config
6
7
  from zou.app.utils import permissions
@@ -37,6 +38,7 @@ def init_monitoring(app):
37
38
  NotFound,
38
39
  Forbidden,
39
40
  ExpiredSignatureError,
41
+ FileNotFound,
40
42
  ],
41
43
  )
42
44
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: zou
3
- Version: 0.20.16
3
+ Version: 0.20.17
4
4
  Summary: API to store and manage the data of your animation production
5
5
  Home-page: https://zou.cg-wire.com
6
6
  Author: CG Wire
@@ -41,7 +41,7 @@ Requires-Dist: flask-jwt-extended==4.7.1
41
41
  Requires-Dist: flask-migrate==4.1.0
42
42
  Requires-Dist: flask-socketio==5.5.1
43
43
  Requires-Dist: flask==3.1.0
44
- Requires-Dist: gazu==0.10.26
44
+ Requires-Dist: gazu==0.10.27
45
45
  Requires-Dist: gevent-websocket==0.10.1
46
46
  Requires-Dist: gevent==24.11.1
47
47
  Requires-Dist: gunicorn==23.0.0
@@ -52,16 +52,16 @@ Requires-Dist: ldap3==2.9.1
52
52
  Requires-Dist: matterhook==0.2
53
53
  Requires-Dist: meilisearch==0.33.1
54
54
  Requires-Dist: numpy==2.0.1; python_version == "3.9"
55
- Requires-Dist: numpy==2.2.2; python_version >= "3.10"
55
+ Requires-Dist: numpy==2.2.3; python_version >= "3.10"
56
56
  Requires-Dist: opencv-python==4.11.0.86
57
57
  Requires-Dist: OpenTimelineIO==0.17.0
58
58
  Requires-Dist: OpenTimelineIO-Plugins==0.17.0
59
59
  Requires-Dist: orjson==3.10.15
60
60
  Requires-Dist: pillow==11.1.0
61
- Requires-Dist: psutil==6.1.1
61
+ Requires-Dist: psutil==7.0.0
62
62
  Requires-Dist: psycopg[binary]==3.2.4
63
63
  Requires-Dist: pyotp==2.9.0
64
- Requires-Dist: pysaml2==7.5.0
64
+ Requires-Dist: pysaml2==7.5.2
65
65
  Requires-Dist: python-nomad==2.1.0
66
66
  Requires-Dist: python-slugify==8.0.4
67
67
  Requires-Dist: python-socketio==5.12.1
@@ -80,14 +80,14 @@ Requires-Dist: gevent; extra == "prod"
80
80
  Provides-Extra: dev
81
81
  Requires-Dist: wheel; extra == "dev"
82
82
  Provides-Extra: test
83
- Requires-Dist: fakeredis==2.26.2; extra == "test"
83
+ Requires-Dist: fakeredis==2.27.0; extra == "test"
84
84
  Requires-Dist: mixer==7.2.2; extra == "test"
85
85
  Requires-Dist: pytest-cov==6.0.0; extra == "test"
86
86
  Requires-Dist: pytest==8.3.4; extra == "test"
87
87
  Provides-Extra: monitoring
88
88
  Requires-Dist: prometheus-flask-exporter==0.23.1; extra == "monitoring"
89
89
  Requires-Dist: pygelf==0.4.2; extra == "monitoring"
90
- Requires-Dist: sentry-sdk==2.20.0; extra == "monitoring"
90
+ Requires-Dist: sentry-sdk==2.21.0; extra == "monitoring"
91
91
  Provides-Extra: lint
92
92
  Requires-Dist: autoflake==2.3.1; extra == "lint"
93
93
  Requires-Dist: black==25.1.0; extra == "lint"
@@ -1,11 +1,11 @@
1
- zou/__init__.py,sha256=H2uay8S6RdWs70UCbs9-a4OHr3MS43oLxQlRC2LPME4,24
1
+ zou/__init__.py,sha256=eM75ih3rRMeRs2KAFT1C-wtFC_fhUYsPhS2X2Aa8ILk,24
2
2
  zou/cli.py,sha256=8JyGrWm7-Ykshv5IBjwlBMn8JkFpHPCADChA9n8loTI,18755
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=EpohqFJwWL0zs-Ic_W5dX5_XSDeCrqHQPL5Re39OnQ0,6382
5
5
  zou/job_settings.py,sha256=_aqBhujt2Q8sXRWIbgbDf-LUdXRdBimdtTc-fZbiXoY,202
6
6
  zou/app/__init__.py,sha256=zGmaBGBHSS_Px34I3_WZmcse62G_AZJArjm4F6TwmRk,7100
7
7
  zou/app/api.py,sha256=JTB_IMVO8EOoyqx9KdRkiIix0chOLi0yGDY-verUJXA,5127
8
- zou/app/config.py,sha256=U3DuUOwZ66FZWVwwV-11SyhmpktGh7J7CgoE11jidSs,6687
8
+ zou/app/config.py,sha256=qHf5txUICLVbzQH1dTKrrUU1pVzgpevNu27DbJPP0vg,6746
9
9
  zou/app/mixin.py,sha256=eYwfS_CUFvNmldaQXrjsN5mK_gX0wYrBFykfx60uUM8,4897
10
10
  zou/app/swagger.py,sha256=Jr7zsMqJi0V4FledODOdu-aqqVE02jMFzhqVxHK0_2c,54158
11
11
  zou/app/blueprints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -18,7 +18,7 @@ zou/app/blueprints/breakdown/resources.py,sha256=pmGlHLiXFsPRbxf403SiVgGiaBbtK8G
18
18
  zou/app/blueprints/chats/__init__.py,sha256=YGmwGvddg3MgSYVIh-hmkX8t2em9_LblxBeJzFqFJD4,558
19
19
  zou/app/blueprints/chats/resources.py,sha256=4yLFermdwOsnBLs9nx8yxuHWLar24uQWQy0XgsUNDD0,5950
20
20
  zou/app/blueprints/comments/__init__.py,sha256=WqpJ7-_dK1cInGTFJAxQ7syZtPCotwq2oO20UEnk1h4,1532
21
- zou/app/blueprints/comments/resources.py,sha256=X1I0lu6iv1xS-5Tci9P9qnJzCy3jOpE9tDfcti3XwUA,18810
21
+ zou/app/blueprints/comments/resources.py,sha256=Jy20lMmdP-Zeg90P8-k-HQYfE83xW5DMK8B5WX5uFvs,18864
22
22
  zou/app/blueprints/concepts/__init__.py,sha256=sP_P4mfYvfMcgeE6MHZYP3eD0Lz0Lwit5-CFuVnA-Jg,894
23
23
  zou/app/blueprints/concepts/resources.py,sha256=maJNrBAWX0bKbDKtOZc3YFp4nTVtIdkkAA4H9WA9n1Y,10140
24
24
  zou/app/blueprints/crud/__init__.py,sha256=qn7xkEh2EG0mPS_RBmm0GgYr0O1jnmI8ymXZnFWZCz8,8361
@@ -91,7 +91,7 @@ zou/app/blueprints/persons/resources.py,sha256=PfK6epzRn_kbqN6g9qYiH9XWStFlccTVC
91
91
  zou/app/blueprints/playlists/__init__.py,sha256=vuEk1F3hFHsmuKWhdepMoLyOzmNKDn1YrjjfcaIz0lQ,1596
92
92
  zou/app/blueprints/playlists/resources.py,sha256=alRlMHypUFErXLsEYxpFK84cdjFJ3YWwamZtW0KcwLY,17211
93
93
  zou/app/blueprints/previews/__init__.py,sha256=ihC6OQ9AUjnZ2JeMnjRh_tKGO0UmAjOwhZnOivc3BnQ,4460
94
- zou/app/blueprints/previews/resources.py,sha256=22-ISgZba0SpQ2sS0l5WjVtLTaiLKoal4aLcqxLQX9s,53176
94
+ zou/app/blueprints/previews/resources.py,sha256=gEOPfX47HEfcEHRS-gmF5Ui1ASaxoVt64WNvtLwcPXU,53614
95
95
  zou/app/blueprints/projects/__init__.py,sha256=Pn3fA5bpNFEPBzxTKJ2foV6osZFflXXSM2l2uZh3ktM,3927
96
96
  zou/app/blueprints/projects/resources.py,sha256=1WBS2FyaY1RSA_T-BdPnc8X9myjTJ127bMDigyoAklk,31979
97
97
  zou/app/blueprints/search/__init__.py,sha256=QCjQIY_85l_orhdEiqav_GifjReuwsjZggN3V0GeUVY,356
@@ -213,7 +213,7 @@ zou/app/services/sync_service.py,sha256=kJ1LGMNfPh9_BDwGTfoYWHrLZ8OlT0hWk-R8wNt0
213
213
  zou/app/services/tasks_service.py,sha256=6lJHxVAQ0dxHdO8_2PaVqLwy87s44kvLRj6S9dw-Bvs,68534
214
214
  zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
215
215
  zou/app/services/time_spents_service.py,sha256=H9X-60s6oqtY9rtU-K2jKwUSljfkdGlf_9wMr3iVfIA,15158
216
- zou/app/services/user_service.py,sha256=QlyckTfiCx-bzRewqVwHMJQXerg6BWXYWfURhvp65G4,50291
216
+ zou/app/services/user_service.py,sha256=74gi_ao4gQenmN95Yf2aRmVyTFTJ8TIZO3joov2SNJ4,50346
217
217
  zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
218
  zou/app/stores/auth_tokens_store.py,sha256=-qOJPybLHvnMOq3PWk073OW9HJwOHGhFLZeOIlX1UVw,1290
219
219
  zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
@@ -235,10 +235,10 @@ zou/app/utils/events.py,sha256=a_W70v0Oi4QJwJzCLVUQ8RTwjlWo-VzAT_hQZCz2HQU,3024
235
235
  zou/app/utils/fido.py,sha256=qhUWZdDCvgWqydYS4DN1SVkNwdAQkRSV9zs0Xw9O15E,536
236
236
  zou/app/utils/fields.py,sha256=uZbKRqeG5_SmbOu3K0W-i-KmlTI1Y7X4rlKcVnu4DzI,3475
237
237
  zou/app/utils/flask.py,sha256=t0sC6yEDyzn-vCsijWzI9lpNWoxAYWfui25QtjQi_64,1822
238
- zou/app/utils/fs.py,sha256=TcPpuTq5u2B9Yyl-vieceuYOksF1oQnAnl2bCS4uya4,3234
238
+ zou/app/utils/fs.py,sha256=EIRfKJXtHubVVi8FlDd9s9TcUok91LvRgU0l_B3Fq3w,3356
239
239
  zou/app/utils/git.py,sha256=MhmAYvEY-bXsnLvcHUW_NY5V636lJL3H-cdNrTHgLGk,114
240
240
  zou/app/utils/logs.py,sha256=lB6kyFmeANxCILUULLqGN8fuq9IY5FcbrVWmLdqWs2U,1404
241
- zou/app/utils/monitoring.py,sha256=xOwyfM-7ZKWNtOxmX2WB1fOav5NpY6k8Tmuhli0nMBs,2082
241
+ zou/app/utils/monitoring.py,sha256=XCpl0QshKD_tSok1vrIu9lB97JsvKLhvxJo3UyeqEoQ,2153
242
242
  zou/app/utils/permissions.py,sha256=Oq91C_lN6aGVCtCVUqQhijMQEjXOiMezbngpjybzzQk,3426
243
243
  zou/app/utils/query.py,sha256=q8ETGPAqnz0Pt9xWoQt5o7FFAVYUKVCJiWpwefIr-iU,4592
244
244
  zou/app/utils/redis.py,sha256=xXEh9pl-3qPbr89dKHvcXSUTC6hd77vv_N8PVcRRZTE,377
@@ -416,9 +416,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
416
416
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
417
417
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
418
418
  zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
419
- zou-0.20.16.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
420
- zou-0.20.16.dist-info/METADATA,sha256=Y3kFPwIc_wcpvLRJuqwDa1N7PhokrXxeYtZjvnj1jgo,6733
421
- zou-0.20.16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
422
- zou-0.20.16.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
423
- zou-0.20.16.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
424
- zou-0.20.16.dist-info/RECORD,,
419
+ zou-0.20.17.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
420
+ zou-0.20.17.dist-info/METADATA,sha256=lkJtGd3fG9hUuzaxsrEAsG7_CvPPOcSwwTgA95p83bI,6733
421
+ zou-0.20.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
422
+ zou-0.20.17.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
423
+ zou-0.20.17.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
424
+ zou-0.20.17.dist-info/RECORD,,
File without changes
File without changes