Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1431 +/- ##
=======================================
Coverage 81.35% 81.36%
=======================================
Files 208 208
Lines 23554 23563 +9
Branches 3716 3716
=======================================
+ Hits 19162 19171 +9
+ Misses 3134 3133 -1
- Partials 1258 1259 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
hmstepanek
left a comment
There was a problem hiding this comment.
Had a couple questions, otherwise looks good!
| # If it is a buildout created script, it will replace the whole | ||
| # sys.path again later anyway. | ||
| root_directory = os.path.dirname(os.path.dirname(boot_directory)) | ||
| root_directory = str(Path(boot_directory).parent.parent) |
There was a problem hiding this comment.
This is actually cleaner code than it was before which is nice. 😊
|
|
||
| try: | ||
| pseudoDevices = os.listdir("/devices/pseudo/") | ||
| pseudoDevices = Path("/devices/pseudo/").iterdir() |
There was a problem hiding this comment.
I don't think these locations make sense on windows but I assume we'll address that later.
There was a problem hiding this comment.
No but according to the commend above in this file, that line is not reachable as Windows is already handled. That block is only for checking on Solaris systems I think based on the other comment.
# The multiprocessing module provides support for Windows,
# BSD systems (including MacOS X) and systems which support
# the POSIX API for querying the number of CPUs.
try:
return multiprocessing.cpu_count()
except NotImplementedError:
pass
# Assuming that Solaris will support POSIX API for querying
# the number of CPUs. Just in case though, work it out by
# looking at the devices corresponding to the available CPUs.
try:
pseudoDevices = os.listdir("/devices/pseudo/")
|
|
||
| atexit.register(self.__socket_cleanup, self.__listener_socket) | ||
| os.chmod(self.__listener_socket, 0o600) | ||
| Path(self.__listener_socket).chmod(0o600) |
There was a problem hiding this comment.
Does this work on windows?
There was a problem hiding this comment.
Sounds like no, but it'll ignore it. Can try and fix that when we get to trying to run this on Windows if it's necessary to fix.
| uwsgi_dir = temp_dir / "uwsgi" | ||
| init_file = uwsgi_dir / "__init__.py" | ||
| uwsgi_dir.mkdir(parents=True) | ||
| with init_file.open("w") as f: |
There was a problem hiding this comment.
Is the default mode when opening a file the same between os.open and pathlib.open?
There was a problem hiding this comment.
Yes, they're both read-only by default.

Overview
To make paths more portable for Windows support:
os.pathto usepathlib.Path.flake8-pathliblinter to ensure no regressions.ruffto latest version and ignore new violations about module import order.