Skip to content
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

typo in NamedTemporaryFile #410

Merged
merged 2 commits into from Apr 8, 2022
Merged

Conversation

MAKOMO
Copy link
Contributor

@MAKOMO MAKOMO commented Mar 8, 2022

Fixes the typo on creating a NamedTemporaryFile. Should fix the following

writing byte-compilation script Traceback (most recent call last): File "/Users/luther/Documents/Projects/Artisan/Repository/artisan/src/setup-mac3.py", line 165, in <module> setup( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup return distutils.core.setup(**attrs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app/build_app.py", line 932, in run self._run() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app/build_app.py", line 1162, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app/build_app.py", line 1275, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app/build_app.py", line 1571, in create_binaries byte_compile( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app/util.py", line 396, in byte_compile with NamedTemporaryFile(sufix=".py", delete=False) as script: TypeError: NamedTemporaryFile() got an unexpected keyword argument 'sufix'

@hasii2011
Copy link

Great!!! I started getting this error today when I used the --optimize option

@MAKOMO
Copy link
Contributor Author

MAKOMO commented Mar 8, 2022

There is still something wonkey. I am investigating...

in create_binaries byte_compile( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/py2app-0.28-py3.10.egg/py2app/util.py", line 398, in byte_compile script.write( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tempfile.py", line 483, in func_wrapper return func(*args, **kwargs) TypeError: a bytes-like object is required, not 'str'

@MAKOMO
Copy link
Contributor Author

MAKOMO commented Mar 8, 2022

Ok, I added a mode and encoding argument and now the TemporaryFile thing seems to work.

@hasii2011
Copy link

Is this going to make it into the next py2app release? 0.28 ?? ✏️

@MAKOMO
Copy link
Contributor Author

MAKOMO commented Apr 7, 2022

Hopefully, but this is not my call...

@ronaldoussoren
Copy link
Owner

Thanks for the PR.

Weirdly enough I had trouble noticing the typo even after you pointed it out.

@ronaldoussoren ronaldoussoren merged commit b13efa7 into ronaldoussoren:master Apr 8, 2022
@ronaldoussoren
Copy link
Owner

BTW. Current plan is to release 0.28 this weekend.

@MAKOMO
Copy link
Contributor Author

MAKOMO commented Apr 8, 2022

Excellent! Looking forward to 0.28. Thanks for your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants