-
Notifications
You must be signed in to change notification settings - Fork 2
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
Merge branch 'master' into enums #1
Commits on Jun 7, 2022
-
Support PyCapsule (uqfoundation#477)
* Support PyCapsule * Import PyCapsule if it already exists and add descriptive warnings * Suggestions from code review * Update copyright
Configuration menu - View commit details
-
Copy full SHA for 74de347 - Browse repository at this point
Copy the full SHA 74de347View commit details -
Configuration menu - View commit details
-
Copy full SHA for 260b372 - Browse repository at this point
Copy the full SHA 260b372View commit details
Commits on Jun 8, 2022
-
Fix
dill._dill
submodule being saved as `GLOBAL "dill._shims" "_dil……l"` (uqfoundation#490) I'm tracing some problems with my "portable" mode prototype and hit a bug with references the `_dill` submodule saved as global: ```python >>> import dill >>> dill.dumps(dill._dill, 0) b'cdill._shims\n_dill\np0\n.' ``` The `_dill` submodule is saved as an attribute of the `dill._shims` submodule, which is valid, but it should be just `dill._dill`. The `_dill` submodule is special-cased to be saved as global: https://github.com/uqfoundation/dill/blob/8e5e450b9ed8dff164fc259c468365e2235c6581/dill/_dill.py#L1807-L1810 But `pickle.whichmodule` misidentifies it as pertaining to `dill._shims`, because this entry is set earlier in `sys.modules` and it picks the first match. --- The change fixes things for this especial case, but there is potential for new bugs related to other submodules: ```python >>> import dill, glob, importlib, os, pickle, pprint >>> os.chdir(dill.__path__[0]) >>> modules = [mod.rpartition('.')[0] for mod in glob.glob('*py') if not mod.startswith('__')] >>> modules = {mod: importlib.import_module('dill.' + mod) for mod in modules} >>> pprint.pprint({name: pickle.whichmodule(mod, name) for name, mod in modules.items()}) {'_dill': 'dill._shims', '_objects': 'dill', '_shims': 'dill._dill', 'detect': 'dill', 'objtypes': 'dill', 'pointers': 'dill', 'settings': '__main__', 'source': 'dill', 'temp': 'dill'} ``` Note how `_shims` is attributed to `dill._dill` and `settings` is attributed to `__main__`(???). But currently they are not saved as globals.
Configuration menu - View commit details
-
Copy full SHA for 4462409 - Browse repository at this point
Copy the full SHA 4462409View commit details
Commits on Jun 9, 2022
-
Create a soft_def shim to combine move_to and Getattr (uqfoundation#473)
* Create a soft_def shim to combine move_to and Getattr * Rename `soft_def` to `register_shim`
Configuration menu - View commit details
-
Copy full SHA for a6bf9a2 - Browse repository at this point
Copy the full SHA a6bf9a2View commit details
Commits on Jun 10, 2022
-
Incidental implementation specific types (uqfoundation#472)
* Incidental implementation specific types * Add incedental types to objects.py * Remove types for objects that are automatically by Python * Rename `SymtableStentryType` to `SymtableEntryType`
Configuration menu - View commit details
-
Copy full SHA for 0ce3baf - Browse repository at this point
Copy the full SHA 0ce3bafView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc9a1b9 - Browse repository at this point
Copy the full SHA dc9a1b9View commit details
Commits on Jun 16, 2022
-
Bring back old method pickling function (uqfoundation#511)
This is a very strange use case of functions and methods that Python's pickle package doesn't handle correctly (uqfoundation#510). This case used to work in pre-0.3.5 dill, so let's bring back the old dill implementation. The comments are irrelevant in Python 3.
Configuration menu - View commit details
-
Copy full SHA for 408b8de - Browse repository at this point
Copy the full SHA 408b8deView commit details
Commits on Jun 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 13e3f80 - Browse repository at this point
Copy the full SHA 13e3f80View commit details
Commits on Jun 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 60911fc - Browse repository at this point
Copy the full SHA 60911fcView commit details
Commits on Jun 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 178e7c0 - Browse repository at this point
Copy the full SHA 178e7c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73d9f85 - Browse repository at this point
Copy the full SHA 73d9f85View commit details -
Merge pull request uqfoundation#519 from uqfoundation/objects
correct failures, registered, and succeeds
Configuration menu - View commit details
-
Copy full SHA for 2cbc2a9 - Browse repository at this point
Copy the full SHA 2cbc2a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecf60d0 - Browse repository at this point
Copy the full SHA ecf60d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38d2a95 - Browse repository at this point
Copy the full SHA 38d2a95View commit details
Commits on Jul 1, 2022
-
Add detailed trace mode showing saved object size and visual depth le…
…vel (uqfoundation#471) * Add detailed trace mode showing dumped object size and visual depeth level * Tests: logging code coverage * logger: just show size after writing object * Box drawing formatting * fallback for non-UTF-8 terminals * review: corrections and improvements * review: adjustments * split module imports into separated lines * deal with non-standardized UTF-8 encoding name * update sample trace in module docs * use trace() as a context manager * pypy special cases * accept file handle in trace context manager * fix dict (PyPy) and mappingproxy (CPython) trace Co-authored-by: anivegesana <anirudh.vegesana@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9000ab9 - Browse repository at this point
Copy the full SHA 9000ab9View commit details -
Kickstart support drop for Python < 3.7 (uqfoundation#499)
* Kickstart support drop for Python < 3.7 Step 1 of code clean-up: mechanically remove if-else branches that would never run in Python/PyPy >= 3.7. There's still some unused or redundant code, left for the next step to facilitate review. Note: all the remaining `sys.hexversion` tests were standardized to use numerical comparison and hexadecimal integer literals (e.g. `0x30b00a7` for version 3.11.0a7) as most of them already were. * convert single function defined via exec() due to Python2/3 differences * drop 'from __future__ import print_function' statements * remove conditional imports due to Python 2 and old Python 3 * substitute bare 'except' clauses by 'except Exception' or more specific where it's obvious * split module imports into separated lines * idem, but for test files * review: adjustments * tests: get a default Python 3 executable * update module docs * update README * review: corrections * remove unicode prefix from strings in docs/source/conf.py
Configuration menu - View commit details
-
Copy full SHA for 4220929 - Browse repository at this point
Copy the full SHA 4220929View commit details
Commits on Jul 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3881a2b - Browse repository at this point
Copy the full SHA 3881a2bView commit details
Commits on Jul 3, 2022
-
Rewrite _create_code() with Structural Pattern Matching (limited to t…
…uples) (uqfoundation#496) * rewrite _create_code() with Structural Pattern Matching (limited to tuples) * lnotab and linetable: fixup * pattern matching: optimizations * pattern matching: more optimizations * _create_code: tests * match/case: don't check code members' types
Configuration menu - View commit details
-
Copy full SHA for dc35b66 - Browse repository at this point
Copy the full SHA dc35b66View commit details
Commits on Jul 6, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7b63977 - Browse repository at this point
Copy the full SHA 7b63977View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2382432 - Browse repository at this point
Copy the full SHA 2382432View commit details
Commits on Jul 8, 2022
-
Fix tox tests so they will actually fail (uqfoundation#524)
As things stand, the tests never fail when run via tox. `__main__.py` runs each individual test script, but always exits 0, even if a test script exits >0. Signed-off-by: Adam Williamson <awilliam@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 80ad351 - Browse repository at this point
Copy the full SHA 80ad351View commit details
Commits on Jul 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0802fdd - Browse repository at this point
Copy the full SHA 0802fddView commit details
Commits on Jul 10, 2022
-
Fix load_session() and restrict loading a session in a different modu…
…le (uqfoundation#507) * Don't update vars(main) twice * Inspect the pickle beginnig to identify main and check against 'main' argument * Save and restore modules created at runtime with ModuleType() * tests: don't need to add runtime module to sys.modules * load_session_copy(): load a session state into a runtime module * tests: session tests code reorganization * tests: test runtime created module session saving * tests: test load_session_copy * review: adjustments * small fixes * use __dict__ * naming changes * review: final renaming and adjustments
Configuration menu - View commit details
-
Copy full SHA for 0fa524a - Browse repository at this point
Copy the full SHA 0fa524aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c23e049 - Browse repository at this point
Copy the full SHA c23e049View commit details
Commits on Jul 15, 2022
-
fix dump_module() bugs and rename parameter 'main' to 'module' (uqfou…
…ndation#526) * fix dump_module() bugs and rename parameter 'main' to 'module' (fixes uqfoundation#525) New phrasing of mismatching modules error messages in load_session(): ```python >>> import dill >>> dill.dump_module() >>> dill.load_module(module='math') ValueError: can't update module 'math' with the saved state of module '__main__' >>> import types >>> main = types.ModuleType('__main__') >>> dill.load_module(module=main) ValueError: can't update module-type object '__main__' with the saved state of imported module '__main__' >>> dill.dump_module(module=main) >>> dill.load_module(module='__main__') ValueError: can't update imported module '__main__' with the saved state of module-type object '__main__' ``` * dump_module: clarify refimport description * improvements to 'refimported' handling and extra checks in *_module() functions * load_session(): clarify that the 'module' argument must match the session file's module
Configuration menu - View commit details
-
Copy full SHA for 6b90f52 - Browse repository at this point
Copy the full SHA 6b90f52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 166a024 - Browse repository at this point
Copy the full SHA 166a024View commit details
Commits on Jul 21, 2022
-
A temporary quick fix for dataclass serialization (uqfoundation#500) (u…
…qfoundation#503) * A temporary quick fix for dataclass serialization (uqfoundation#500) This quick fix will be removed when proper dataclass serialization support is added to dill. This is just here to allow for better support, at least for now. dataclasses pickled with this PR will be unpicklable by future versions of dill, but the future versions of dill will be able to be automatically use the newer features in dataclasses.py that were not available in older versions of Python. That forward compatibility features is not present in this PR. * Fix bug in pickling MappingProxyType in PyPy 3.7+
Configuration menu - View commit details
-
Copy full SHA for 74e0fd4 - Browse repository at this point
Copy the full SHA 74e0fd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 990b5a1 - Browse repository at this point
Copy the full SHA 990b5a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c21d67a - Browse repository at this point
Copy the full SHA c21d67aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 863d73c - Browse repository at this point
Copy the full SHA 863d73cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7489dd3 - Browse repository at this point
Copy the full SHA 7489dd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59b7b8f - Browse repository at this point
Copy the full SHA 59b7b8fView commit details
Commits on Jul 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 72a43b9 - Browse repository at this point
Copy the full SHA 72a43b9View commit details
Commits on Jul 23, 2022
-
Move session-related code to new session module (uqfoundation#530)
* move session-related code to new session module * export objects to ._dill for compatibility with 0.3.5.1 * use dill._dill.__builtin__ instead of builtins for consistency
Configuration menu - View commit details
-
Copy full SHA for 5a66152 - Browse repository at this point
Copy the full SHA 5a66152View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ca195f - Browse repository at this point
Copy the full SHA 0ca195fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ee740ab - Browse repository at this point
Copy the full SHA ee740abView commit details
Commits on Jul 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a9ec103 - Browse repository at this point
Copy the full SHA a9ec103View commit details
Commits on Jul 29, 2022
-
Temporary quick fix for getsource() on IPython interpreter (fixes uqf…
…oundation#346) (uqfoundation#531) * Temporary quick fix getsource() on IPython interpreter (fixes uqfoundation#346) * minor changes
Configuration menu - View commit details
-
Copy full SHA for b2fa04d - Browse repository at this point
Copy the full SHA b2fa04dView commit details
Commits on Aug 1, 2022
-
Fix pickling errors thrown when saving some Stdlib modules (uqfoundat…
…ion#529) * fix KeyError when pickling type with '__dict__' or '__weakref__' in '__slots__' * fix KeyError when pickling a type where '__slots__' is a string
Configuration menu - View commit details
-
Copy full SHA for 87b8541 - Browse repository at this point
Copy the full SHA 87b8541View commit details
Commits on Aug 6, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bfba6d1 - Browse repository at this point
Copy the full SHA bfba6d1View commit details