Skip to content

Commit c3e1b1d

Browse files
committed
Remove f-string add supports for py35
1 parent 207e476 commit c3e1b1d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [macos-latest, ubuntu-latest, windows-latest]
26-
python-version: ['3.6' , '3.7' , '3.8' , '3.9']
26+
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
2727

2828
steps:
2929
- uses: actions/checkout@v2

ThreadPoolExecutorPlus/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def __init__(self, max_workers=None, thread_name_prefix='',
213213
# used to overlap I/O instead of CPU work.
214214
max_workers = DEFAULT_MAXIMUM_WORKER_NUM
215215
if max_workers < 1:
216-
raise ValueError(f"max_workers must be greater than min_workers , min_workers must be greater than 1")
216+
raise ValueError("max_workers must be greater than min_workers , min_workers must be greater than 1")
217217
elif 1 <= max_workers < self._min_workers:
218218
self._min_workers = max_workers
219219

misc/stress_testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def report_thread(executor , statistics , dataflow , scale_factor):
3030
line = deque()
3131
while True:
3232
await asyncio.sleep(2)
33-
print(f"Report every 2 secs : [success] {statistics[0]} \t[fail] {statistics[1]} \t[dataflow] {'%.2f' % round(dataflow[0],2)} \t[currentthread] {len(executor._threads)} \t[qps] {round((statistics[0] / (time.time() - st)) , 2)}")
33+
print("Report every 2 secs : [success] {0} \t[fail] {1} \t[dataflow] {2} \t[currentthread] {3} \t[qps] {4}".format(statistics[0], statistics[1]), '%.2f' % round(dataflow[0],2), len(executor._threads), round((statistics[0] / (time.time() - st)) , 2))
3434

3535
async def main():
3636
loop = asyncio.get_running_loop()

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_install_requires(filename):
1818

1919
#
2020
url = 'https://github.com/GoodManWEN/ThreadPoolExecutorPlus'
21-
release = f'{url}/releases/latest'
21+
release = '{0}/releases/latest'.format(url)
2222
headers = {
2323
"User-Agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
2424
"Connection": "keep-alive",
@@ -30,8 +30,8 @@ def get_install_requires(filename):
3030
description = html.find('meta' ,{'name':'description'}).get('content')
3131
html = BeautifulSoup(rget(release , headers).text ,'lxml')
3232
version = html.find('div',{'class':'release-header'}).find('a').text
33-
logger.info(f"description: {description}")
34-
logger.info(f"version: {version}")
33+
logger.info("description: {0}".format(description))
34+
logger.info("version: {0}".format(version))
3535

3636
#
3737
with open('README.md','r',encoding='utf-8') as f:
@@ -47,7 +47,7 @@ def get_install_requires(filename):
4747

4848
for line in init_content:
4949
if line == "__version__ = ''\n":
50-
long_description_lines_copy.append(f"__version__ = '{version}'\n")
50+
long_description_lines_copy.append("__version__ = '{0}'\n".format(version))
5151
else:
5252
long_description_lines_copy.append(line)
5353

@@ -70,6 +70,6 @@ def get_install_requires(filename):
7070
'Operating System :: POSIX :: Linux',
7171
'Operating System :: Microsoft :: Windows',
7272
],
73-
python_requires='>=3.6',
73+
python_requires='>=3.5',
7474
keywords=["concurrent.futures" , "threading" , "multi-threads" ,"ThreadPoolExecutor"]
7575
)

0 commit comments

Comments
 (0)