-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build.py: fix to support Python 3.8.2 #359
Conversation
@@ -17,7 +17,7 @@ def run_python(cmd): | |||
cmd = Path(__file__).with_name(cmd) | |||
if not cmd.is_file(): | |||
raise UserWarning(f'no such file: {original}') | |||
return run_path(cmd) | |||
return run_path(str(cmd)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I was sure that I fixed similar issue previously..
Could you provide sample case to reproduce this bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just add these lines to build:
'post_build': [
'web_meta_gen.py'
]
using python3.8, it causes an error:
Traceback (most recent call last):
File "build.py", line 171, in <module>
backup_and_run()
File "build.py", line 87, in backup_and_run
iitc_build(source, workdir, deps_list=deps_list)
File "build.py", line 65, in iitc_build
run_cmds(settings.post_build, source, outdir)
File "build.py", line 38, in run_cmds
module = run_python(Path(cmd))
File "build.py", line 20, in run_python
return run_path(cmd)
File "/usr/lib/python3.8/runpy.py", line 262, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "/usr/lib/python3.8/runpy.py", line 232, in _get_code_from_file
with io.open_code(fname) as f:
TypeError: open_code() argument 'path' must be str, not PosixPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's weird.
I have Python 3.8.0.
And have these lines in localbuildsettings.py
:
'post_build': [
'web_meta_gen.py',
And when I run build.py
I see no problems:
IITC build: local
Generating meta for build: local
This was broken in 3.8.1, and fixed back in 3.8.3 (RC). |
This was broken in [3.8.1 RC1], and fixed back in [3.8.3 RC1]. Ref: https://bugs.python.org/issue39517 [3.8.1 RC1]:https://docs.python.org/3/whatsnew/changelog.html#python-3-8-1-release-candidate-1 [3.8.3 RC1]:https://docs.python.org/3/whatsnew/changelog.html#python-3-8-3-release-candidate-1
In version 3.8 --bind argument enhanced to support IPv6. (https://docs.python.org/3/library/http.server.html#http.server.SimpleHTTPRequestHandler) this causes the server to start at http://[::1]:8000/.