Skip to content

Commit 131f397

Browse files
committed
fix: Workaround for uv/uvx bug
The uv/uvx tools break scripts that contain a __future__ import by injecting a multiline string infront of it. Future imports are very limited on where they can appear. See astral-sh/uv#6489 We cannot remove the __future__ import in bottle-0.13 because Python 2.7 support still depends on it, but we can move it above the docstring, so the uv/uvx modifications no longer trigger a SyntaxError. fix #1486
1 parent b03fb13 commit 131f397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bottle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
from __future__ import print_function
34
"""
45
Bottle is a fast and simple micro-framework for small web applications. It
56
offers request dispatching (Routes) with URL parameter support, templates,
@@ -13,7 +14,6 @@
1314
License: MIT (see LICENSE for details)
1415
"""
1516

16-
from __future__ import print_function
1717
import sys
1818

1919
__author__ = 'Marcel Hellkamp'

0 commit comments

Comments
 (0)