Skip to content

Commit

Permalink
release 0.0.46 (#43)
Browse files Browse the repository at this point in the history
* clean up

---------

Co-authored-by: nggit <[email protected]>
  • Loading branch information
nggit and nggit authored Nov 7, 2024
1 parent 5222ac3 commit 43d942b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion httpout/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2024 nggit

__version__ = '0.0.45'
__version__ = '0.0.46'
__all__ = ('HTTPOut',)

from .httpout import HTTPOut # noqa: E402
8 changes: 4 additions & 4 deletions httpout/httpout.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ def ho_import(name, globals=None, locals=None, fromlist=(), level=0):

if (globals['__name__'] == '__globals__' or
child not in module.__server__):
try:
module.__dict__[child] = worker[child]
except KeyError as exc:
if child not in worker:
raise ImportError(
f'cannot import name \'{child}\' '
f'from \'{name}\''
) from exc
)

module.__dict__[child] = worker[child]
else:
module.__dict__[child] = module.__server__[
child
Expand Down
2 changes: 1 addition & 1 deletion httpout/utils/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def exec_module(module, code=None, max_size=8 * 1048576):
if code is None:
if os.stat(module.__file__).st_size > max_size:
raise OSError(f'File {module.__file__} exceeds the max_size')
raise ValueError(f'File {module.__file__} exceeds the max_size')

with open(module.__file__, 'r') as f:
code = compile(f.read(), '<string>', 'exec')
Expand Down
3 changes: 1 addition & 2 deletions httpout/utils/modules.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ def exec_module(module, code=None, size_t max_size=8 * 1048576):

if file_size > max_size:
fclose(fp)
raise OSError(f'File {module.__file__} exceeds the max_size')
raise ValueError(f'File {module.__file__} exceeds the max_size')

fseek(fp, 0, SEEK_SET)

data = bytearray()

while True:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description = """\
requires-python = '>=3.7'
dependencies = [
'awaiter',
'tremolo>=0.0.760',
'tremolo>=0.0.761',
]
license = { text = 'MIT License' }
classifiers = [
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
awaiter
tremolo>=0.0.760
tremolo>=0.0.761

0 comments on commit 43d942b

Please sign in to comment.