gh-89004: add attribute filemode in zipinfo#120999
Closed
Akasurde wants to merge 33 commits intopython:mainfrom
Closed
gh-89004: add attribute filemode in zipinfo#120999Akasurde wants to merge 33 commits intopython:mainfrom
Akasurde wants to merge 33 commits intopython:mainfrom
Conversation
eendebakpt
reviewed
Jun 28, 2024
Misc/NEWS.d/next/Library/2024-06-25-07-49-16.gh-issue-89004.uJfz2B.rst
Outdated
Show resolved
Hide resolved
eendebakpt
reviewed
Jun 28, 2024
eendebakpt
reviewed
Jun 29, 2024
Add attribute zipfile.ZipInfo.filemode. Fixes: python#89004 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
eendebakpt
reviewed
Jul 1, 2024
Contributor
eendebakpt
left a comment
There was a problem hiding this comment.
@Akasurde Two more comments, but the overall approach looks good.
Please do not use force push on the branch, it makes it hard for other reviewers the follow the history.
Lib/zipfile/__init__.py
Outdated
| self.external_attr = 0 # External file attributes | ||
| self.compress_size = 0 # Size of the compressed file | ||
| self.file_size = 0 # Size of the uncompressed file | ||
| self.file_mode = b"" # External attributes of the uncompressed file |
Contributor
There was a problem hiding this comment.
Why is this line needed?
| def _compresslevel(self, value): | ||
| self.compress_level = value | ||
|
|
||
| @property |
Contributor
There was a problem hiding this comment.
The new property needs unit testing for different modes
…python#121126) asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
…ython#119816) 1. Use pkg-config to check for ncursesw/panelw. If that fails, use pkg-config to check for ncurses/panel. 2. Regardless of pkg-config output, search for curses/panel headers, so we're sure we have all defines in pyconfig.h. 3. Regardless of pkg-config output, check if libncurses or libncursesw contains the 'initscr' symbol; if it does _and_ pkg-config failed earlier, add the resulting -llib linker option to CURSES_LIBS. Ditto for 'update_panels' and PANEL_LIBS. 4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're using updated LIBS and CPPFLAGS for those. Add the PY_CHECK_CURSES convenience macro.
…121195) When creating the JUnit XML file, regrtest now escapes characters which are invalid in XML, such as the chr(27) control character used in ANSI escape sequences.
…hon#120894) Example: ```pycon >>> import ctypes >>> ctypes.__STDC_IEC_559_COMPLEX__ 1 >>> libm = ctypes.CDLL('libm.so.6') >>> libm.clog.argtypes = [ctypes.c_double_complex] >>> libm.clog.restype = ctypes.c_double_complex >>> libm.clog(1+1j) (0.34657359027997264+0.7853981633974483j) ``` Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…ython#121191) dash_R_cleanup() now calls _abc_registry_clear() before calling again register().
Use subTest() to log the pwd entry in test_expanduser_pwd2() of test_posixpath to help debugging.
…621 in /Tools (python#121215) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1216) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
….20240627 in /Tools (python#121217) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…HANDSHAKE (pythonGH-117785) With this change, builds with OpenSSL forks that don't have this functionalty (like AWS-LC or BoringSSL) will require less patching.
…vy (python#121221) Mark test_threaded_weak_value_dict_copy() and test_threaded_weak_key_dict_copy() of test_weakref as CPU-heavy tests
…#121228) Call getpwnam() to get pw_dir, since it can be different than getpwall() pw_dir.
Soft deprecate os.popen() and os.spawn*() functions.
…set_each (pythongh-121236) This will allow Py_TRACE_REFS builds to pass the test suite, until the underlying issue can be resolved.
…ython#120914) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method.
…1244) Avoids the extra conversion from stack refs to PyObjects.
… dark/light modes. (pythonGH-121265)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add attribute zipfile.ZipInfo.filemode.
Fixes: #89004
📚 Documentation preview 📚: https://cpython-previews--120999.org.readthedocs.build/