Skip to content

Commit 5dae250

Browse files
committed
Move files into internal for now
1 parent f13d777 commit 5dae250

File tree

14 files changed

+21
-21
lines changed

14 files changed

+21
-21
lines changed

bolt/bolt/assets/storage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
from bolt.assets.utils import check_settings, matches_patterns
1111
from bolt.exceptions import ImproperlyConfigured, SuspiciousFileOperation
12-
from bolt.files import File, locks
13-
from bolt.files.base import ContentFile
14-
from bolt.files.move import file_move_safe
15-
from bolt.files.utils import validate_file_name
12+
from bolt.internal.files import File, locks
13+
from bolt.internal.files.base import ContentFile
14+
from bolt.internal.files.move import file_move_safe
15+
from bolt.internal.files.utils import validate_file_name
1616
from bolt.runtime import settings
1717
from bolt.utils._os import safe_join
1818
from bolt.utils.crypto import get_random_string

bolt/bolt/files/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

bolt/bolt/http/multipartparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
TooManyFieldsSent,
1616
TooManyFilesSent,
1717
)
18-
from bolt.files.uploadhandler import SkipFile, StopFutureHandlers, StopUpload
18+
from bolt.internal.files.uploadhandler import SkipFile, StopFutureHandlers, StopUpload
1919
from bolt.runtime import settings
2020
from bolt.utils.datastructures import MultiValueDict
2121
from bolt.utils.encoding import force_str

bolt/bolt/http/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
RequestDataTooBig,
1313
TooManyFieldsSent,
1414
)
15-
from bolt.files import uploadhandler
1615
from bolt.http.multipartparser import (
1716
MultiPartParser,
1817
MultiPartParserError,
1918
TooManyFilesSent,
2019
)
20+
from bolt.internal.files import uploadhandler
2121
from bolt.runtime import settings
2222
from bolt.utils.datastructures import (
2323
CaseInsensitiveMapping,
File renamed without changes.

bolt/bolt/internal/files/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from bolt.internal.files.base import File
2+
3+
__all__ = ["File"]

bolt/bolt/files/base.py renamed to bolt/bolt/internal/files/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from io import BytesIO, StringIO, UnsupportedOperation
33

4-
from bolt.files.utils import FileProxyMixin
4+
from bolt.internal.files.utils import FileProxyMixin
55
from bolt.utils.functional import cached_property
66

77

bolt/bolt/files/locks.py renamed to bolt/bolt/internal/files/locks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
Example Usage::
1313
14-
>>> from bolt.files import locks
14+
>>> from bolt.internal.files import locks
1515
>>> with open('./file', 'wb') as f:
1616
... locks.lock(f, locks.LOCK_EX)
1717
... f.write('Bolt')

bolt/bolt/files/move.py renamed to bolt/bolt/internal/files/move.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
22
Move a file in the safest way possible::
33
4-
>>> from bolt.files.move import file_move_safe
4+
>>> from bolt.internal.files.move import file_move_safe
55
>>> file_move_safe("/tmp/old_file", "/tmp/new_file")
66
"""
77

88
import os
99
from shutil import copymode, copystat
1010

11-
from bolt.files import locks
11+
from bolt.internal.files import locks
1212

1313
__all__ = ["file_move_safe"]
1414

bolt/bolt/files/temp.py renamed to bolt/bolt/internal/files/temp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import os
2020
import tempfile
2121

22-
from bolt.files.utils import FileProxyMixin
22+
from bolt.internal.files.utils import FileProxyMixin
2323

2424
__all__ = (
2525
"NamedTemporaryFile",

bolt/bolt/files/uploadedfile.py renamed to bolt/bolt/internal/files/uploadedfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import os
66
from io import BytesIO
77

8-
from bolt.files import temp as tempfile
9-
from bolt.files.base import File
10-
from bolt.files.utils import validate_file_name
8+
from bolt.internal.files import temp as tempfile
9+
from bolt.internal.files.base import File
10+
from bolt.internal.files.utils import validate_file_name
1111
from bolt.runtime import settings
1212

1313
__all__ = (

bolt/bolt/files/uploadhandler.py renamed to bolt/bolt/internal/files/uploadhandler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
from io import BytesIO
66

7-
from bolt.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
7+
from bolt.internal.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
88
from bolt.runtime import settings
99
from bolt.utils.module_loading import import_string
1010

@@ -243,7 +243,7 @@ def load_handler(path, *args, **kwargs):
243243
>>> from bolt.http import HttpRequest
244244
>>> request = HttpRequest()
245245
>>> load_handler(
246-
... 'bolt.files.uploadhandler.TemporaryFileUploadHandler',
246+
... 'bolt.internal.files.uploadhandler.TemporaryFileUploadHandler',
247247
... request,
248248
... )
249249
<TemporaryFileUploadHandler object at 0x...>
File renamed without changes.

bolt/bolt/runtime/global_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050

5151
# List of upload handler classes to be applied in order.
5252
FILE_UPLOAD_HANDLERS = [
53-
"bolt.files.uploadhandler.MemoryFileUploadHandler",
54-
"bolt.files.uploadhandler.TemporaryFileUploadHandler",
53+
"bolt.internal.files.uploadhandler.MemoryFileUploadHandler",
54+
"bolt.internal.files.uploadhandler.TemporaryFileUploadHandler",
5555
]
5656

5757
# Maximum size, in bytes, of a request before it will be streamed to the

0 commit comments

Comments
 (0)