-
Notifications
You must be signed in to change notification settings - Fork 422
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
Update dependency mock to v5 #2367
Merged
Merged
Conversation
This file contains 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
mjwolf
approved these changes
Aug 21, 2024
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
lksnyder0
added a commit
to huntresslabs/ecs
that referenced
this pull request
Oct 9, 2024
* Add .caseless subfield to process.name & process.executable (elastic#2341) Adds a subfield to the process.name and process.executable fields to improve the compatibility of data sources like System, Sysmon, etc., with our Elastic Defend data, which enables us to handle language limitations in KQL more effectively. * Revert "Add .caseless subfield to process.name & process.executable" (elastic#2350) This reverts commit 7815b3f from elastic#2341. This is being reverted due to storage concerns. The goal will be to advance the native querying capabilities (ES|QL, KQL) of the Elastic stack such that this extra normalized multi-field is not necessary. In the meantime, localized overrides of the ECS field definition will be used to add the additional multi-field where needed. The downside of localized overrides are that it creates inconsistency across usages of the this field. * [RFC] Apple Platform specific fields (elastic#2338) Adds RFS stage 0 --------- Co-authored-by: Alexandra Konrad <[email protected]> Co-authored-by: Michael Wolf <[email protected]> * Add renovate.json (elastic#2352) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update template fields (elastic#2354) Update some templated fields that were missed before merging the RFC * Pin dependencies (elastic#2355) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency PyYAML to v6.0.2 (elastic#2356) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency gitpython to v3.1.43 (elastic#2358) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency yamllint to v1.35.1 (elastic#2361) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update stale PR message (elastic#2369) Add a friendlier stale PR message, based from the [Beats stale message](https://github.com/elastic/beats/blob/main/.github/stale.yml#L63-L74). This will hopefully also prompt contributors to respond, so we'll be better able to track PRs people are still interested in contributing. * Update actions/checkout action to v4 (elastic#2362) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update actions/github-script action to v7 (elastic#2363) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update actions/setup-python action to v5 (elastic#2364) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update actions/stale action to v9 (elastic#2365) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency mock to v5 (elastic#2367) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency ubuntu to v22 (elastic#2368) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency autopep8 to v1.7.0 (elastic#2359) Update dependency autopep8 to v1.7.0 --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * Update dependency autopep8 to v2 (elastic#2366) * Update dependency autopep8 to v2 --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * add license header (elastic#2377) * Update actions/setup-python digest to f677139 (elastic#2374) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Michael Wolf <[email protected]> * [RFC] Stage 0: Introducing new field in rule namespace (elastic#2330) * Update 0000-rfc-template.md Updating the temaplate for RFC Stage 0 for adding 2 new rule fields: rule.tags and rule.remediation * Update 0000-rfc-template.md Incorporating review comments. * Renaming the template file with recommended name * Resolving conflicts * Removing Tag Field * Resolving comments from @trisch-me * Moving file to rfcs/text folder as per @trisch-me comment. using next number in series. * I saw number 44 was used in a recent RFC, using next number in series --------- Co-authored-by: Eric Beahan <[email protected]> Co-authored-by: Alexandra Konrad <[email protected]> * [RFC] Stage 2: Adding Apple Platform specific fields (elastic#2370) Updating the RFC and moving it to stage two. * code blocks specified language yaml (elastic#2380) Co-authored-by: Michael Wolf <[email protected]> * trim trailing whitespace in schema (elastic#2379) Co-authored-by: Michael Wolf <[email protected]> * [RFC] Stage 0: Introducing new fields in ECS vulnerability field set (elastic#2331) * RFC to add new fields in ECS vulnerability field set RFC to add new fields in ECS vulnerability field set * Moving to separate file * set title and add stage 0 PR # * clean up fields table markdown * Moving to (rfcs/text) and renaming file to next number in series. * Resolving the comments from @trisch-me * Update rfcs/text/0045-additional-vulnerability-fields.md Co-authored-by: Alexandra Konrad <[email protected]> * Update rfcs/text/0045-additional-vulnerability-fields.md Co-authored-by: Alexandra Konrad <[email protected]> * Making changed to the date format as per comments from @trisch-me * Resolving @trisch-me comments * Resolving latest comments * Update rfcs/text/0045-additional-vulnerability-fields.md Co-authored-by: Alexandra Konrad <[email protected]> --------- Co-authored-by: Eric Beahan <[email protected]> Co-authored-by: Alexandra Konrad <[email protected]> * Fix type in code signature (elastic#2382) Change the type of code_signature.flags to keyword, which is what it should be. Also add a unit test that will verify all types are valid. * Enforce yamllint in CI (elastic#2381) Start running and enforcing yamllint checks in CI. * Add Stage0 RFC for new fields for fileless execution on Linux (elastic#2322) * Add support for settings * Fix settings merging * Restrict test workflow * Fix merge conflicts * Less restrictive * Add docker files and pipeline * Make building more restrictive * Simplify build workflow * Update tagging strategy * Removing unused variable * Kick? * Anchors aren't supported 😭 * Fix role name * Test branch name * Remove extra default update (#3) * Remove extra default update * Fix role name * Add support for a top-level type (#4) * Add support for a top-level type * Actually, don't need to be all the complicated * Type needs to be nested within the field name (#5) * Add documention for parameters field (#6) * Add undocumented field argument * Remove the PR template --------- Co-authored-by: Jonhnathan <[email protected]> Co-authored-by: Andrew Kroh <[email protected]> Co-authored-by: Thijs Xhaflaire <[email protected]> Co-authored-by: Alexandra Konrad <[email protected]> Co-authored-by: Michael Wolf <[email protected]> Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Stefan Bischof <[email protected]> Co-authored-by: Smriti <[email protected]> Co-authored-by: Eric Beahan <[email protected]> Co-authored-by: Michal Stanek <[email protected]>
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.
This PR contains the following updates:
==4.0.3
->==5.1.0
Release Notes
testing-cabal/mock (mock)
v5.1.0
Compare Source
bpo-44185: :func:
unittest.mock.mock_open
will call the :func:close
method of the file handle mock when it is exiting from the context
manager. Patch by Samet Yaslan.
gh-94924: :func:
unittest.mock.create_autospec
now properly returnscoroutine functions compatible with :func:
inspect.iscoroutinefunction
bpo-17013: Add
ThreadingMock
to :mod:unittest.mock
that can be usedto create Mock objects that can wait until they are called. Patch by
Karthikeyan Singaravelan and Mario Corchero.
bpo-41768: :mod:
unittest.mock
speccing no longer calls class properties.Patch by Melanie Witt.
v5.0.2
Compare Source
gh-102978: Fixes :func:
unittest.mock.patch
not enforcing functionsignatures for methods decorated with
@classmethod
or@staticmethod
when patch is called withautospec=True
.gh-103329: Regression tests for the behaviour of
unittest.mock.PropertyMock
were added.v5.0.1
Compare Source
gh-100740: Fix
unittest.mock.Mock
not respecting the spec forattribute names prefixed with
assert
.gh-100690:
Mock
objects which are not unsafe will now raise anAttributeError
when accessing an attribute that matches the name of anassertion but without the prefix
assert_
, e.g. accessingcalled_once
instead ofassert_called_once
. This is in addition tothis already happening for accessing attributes with prefixes
assert
,assret
,asert
,aseert
, andassrt
.gh-96127:
inspect.signature
was raisingTypeError
on call withmock objects. Now it correctly returns
(*args, **kwargs)
as inferedsignature.
v5.0.0
Compare Source
gh-98624: Add a mutex to unittest.mock.NonCallableMock to protect
concurrent access to mock attributes.
bpo-43478: Mocks can no longer be used as the specs for other Mocks. As a
result, an already-mocked object cannot have an attribute mocked using
autospec=True
or be the subject of acreate_autospec(...)
call. Thiscan uncover bugs in tests since these Mock-derived Mocks will always pass
certain tests (e.g. isinstance) and builtin assert functions (e.g.
assert_called_once_with) will unconditionally pass.
bpo-45156: Fixes infinite loop on :func:
unittest.mock.seal
of mockscreated by :func:
~unittest.create_autospec
.bpo-41403: Make :meth:
mock.patch
raise a :exc:TypeError
with arelevant error message on invalid arg. Previously it allowed a cryptic
:exc:
AttributeError
to escape.gh-91803: Fix an error when using a method of objects mocked with
:func:
unittest.mock.create_autospec
after it was sealed with:func:
unittest.mock.seal
function.bpo-41877: AttributeError for suspected misspellings of assertions on
mocks are now pointing out that the cause are misspelled assertions and
also what to do if the misspelling is actually an intended attribute name.
The unittest.mock document is also updated to reflect the current set of
recognised misspellings.
bpo-43478: Mocks can no longer be provided as the specs for other Mocks.
As a result, an already-mocked object cannot be passed to
mock.Mock()
.This can uncover bugs in tests since these Mock-derived Mocks will always
pass certain tests (e.g. isinstance) and builtin assert functions (e.g.
assert_called_once_with) will unconditionally pass.
bpo-45010: Remove support of special method
__div__
in:mod:
unittest.mock
. It is not used in Python 3.gh-84753: :func:
inspect.iscoroutinefunction
now properly returnsTrue
when an instance of :class:unittest.mock.AsyncMock
is passed toit. This makes it consistent with behavior of
:func:
asyncio.iscoroutinefunction
. Patch by Mehdi ABAAKOUK.bpo-46852: Remove the undocumented private
float.__set_format__()
method, previously known as
float.__setformat__()
in Python 3.7. Itsdocstring said: "You probably don't want to use this function. It exists
mainly to be used in Python's test suite." Patch by Victor Stinner.
gh-98086: Make sure
patch.dict()
can be applied on async functions.gh-100287: Fix the interaction of :func:
unittest.mock.seal
with:class:
unittest.mock.AsyncMock
.gh-83076: Instantiation of
Mock()
andAsyncMock()
is now 3.8xfaster.
bpo-41877: A check is added against misspellings of autospect, auto_spec
and set_spec being passed as arguments to patch, patch.object and
create_autospec.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.