-
Notifications
You must be signed in to change notification settings - Fork 18
Support python 3.11 #241
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
Merged
Merged
Support python 3.11 #241
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2776194
refactor: undo rename of wrapt
apotterri 646d1bc
refactor: switch to vendoring
apotterri c62e64e
fix: handle 3.11 find_spec implementation
apotterri e00527a
refactor: split appmap.unittest
apotterri bd9598b
fix: update unittest integration for python 3.11
apotterri 15b0ddc
feat: support python 3.11
apotterri affdbda
fix: relax restriction on packaging to >=19.0
apotterri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: switch to vendoring
Use the vendoring package to install and patch v1.15.0 of wrapt.
- Loading branch information
commit 646d1bc713a0238ea8bc84776fea23ddca947b17
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +0,0 @@ | ||
| [submodule "extern/wrapt"] | ||
| path = vendor/wrapt | ||
| url = https://github.com/applandinc/wrapt.git | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| ../vendor/wrapt/src/wrapt | ||
| ../vendor/_appmap/wrapt | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is here to make development easier. It's exclude from the wheel when it gets built: https://github.com/getappmap/appmap-python/pull/241/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R25 |
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| Copyright (c) 2013-2023, Graham Dumpleton | ||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
|
|
||
| * Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| POSSIBILITY OF SUCH DAMAGE. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| __version_info__ = ('1', '15', '0') | ||
| __version__ = '.'.join(__version_info__) | ||
|
|
||
| from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper, | ||
| BoundFunctionWrapper, WeakFunctionProxy, PartialCallableObjectProxy, | ||
| resolve_path, apply_patch, wrap_object, wrap_object_attribute, | ||
| function_wrapper, wrap_function_wrapper, patch_function_wrapper, | ||
| transient_function_wrapper) | ||
|
|
||
| from .decorators import (adapter_factory, AdapterFactory, decorator, | ||
| synchronized) | ||
|
|
||
| from .importer import (register_post_import_hook, when_imported, | ||
| notify_module_loaded, discover_post_import_hooks) | ||
|
|
||
| # Import of inspect.getcallargs() included for backward compatibility. An | ||
| # implementation of this was previously bundled and made available here for | ||
| # Python <2.7. Avoid using this in future. | ||
|
|
||
| from inspect import getcallargs | ||
|
|
||
| # Variant of inspect.formatargspec() included here for forward compatibility. | ||
| # This is being done because Python 3.11 dropped inspect.formatargspec() but | ||
| # code for handling signature changing decorators relied on it. Exposing the | ||
| # bundled implementation here in case any user of wrapt was also needing it. | ||
|
|
||
| from .arguments import formatargspec |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # The inspect.formatargspec() function was dropped in Python 3.11 but we need | ||
| # need it for when constructing signature changing decorators based on result of | ||
| # inspect.getargspec() or inspect.getfullargspec(). The code here implements | ||
| # inspect.formatargspec() base on Parameter and Signature from inspect module, | ||
| # which were added in Python 3.6. Thanks to Cyril Jouve for the implementation. | ||
|
|
||
| try: | ||
| from inspect import Parameter, Signature | ||
| except ImportError: | ||
| from inspect import formatargspec | ||
| else: | ||
| def formatargspec(args, varargs=None, varkw=None, defaults=None, | ||
| kwonlyargs=(), kwonlydefaults={}, annotations={}): | ||
| if kwonlydefaults is None: | ||
| kwonlydefaults = {} | ||
| ndefaults = len(defaults) if defaults else 0 | ||
| parameters = [ | ||
| Parameter( | ||
| arg, | ||
| Parameter.POSITIONAL_OR_KEYWORD, | ||
| default=defaults[i] if i >= 0 else Parameter.empty, | ||
| annotation=annotations.get(arg, Parameter.empty), | ||
| ) for i, arg in enumerate(args, ndefaults - len(args)) | ||
| ] | ||
| if varargs: | ||
| parameters.append(Parameter(varargs, Parameter.VAR_POSITIONAL)) | ||
| parameters.extend( | ||
| Parameter( | ||
| kwonlyarg, | ||
| Parameter.KEYWORD_ONLY, | ||
| default=kwonlydefaults.get(kwonlyarg, Parameter.empty), | ||
| annotation=annotations.get(kwonlyarg, Parameter.empty), | ||
| ) for kwonlyarg in kwonlyargs | ||
| ) | ||
| if varkw: | ||
| parameters.append(Parameter(varkw, Parameter.VAR_KEYWORD)) | ||
| return_annotation = annotations.get('return', Signature.empty) | ||
| return str(Signature(parameters, return_annotation=return_annotation)) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.