gh-83076: 3.8x speed improvement in (Async)Mock instantiation by carljm · Pull Request #100252 · python/cpython · GitHub

github.com

GitHub CopilotWrite better code with AI | MCP RegistryIntegrate external tools | ActionsAutomate any workflow | CodespacesInstant dev environments | IssuesPlan and track work | Code ReviewManage code changes | Code QualityEnforce quality at merge | Why GitHub | Marketplace | View all features | Enterprises | Small and medium teams | Startups | View all use cases | View all industries | View all solutions | AI | Software Development | DevOps | Security | View all topics | Customer stories | Events & webinars | Ebooks & reports | Business insights | Trust center | Partners | View all resources

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

performance degradation creating a mock object (by factor 7-8) #83076

: ~4x speed improvement in (Async)Mock instantiation

netlify Bot commented Dec 14, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

netlify Bot commented Dec 14, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

📜🤖 Added by blurb_it.

Remove redundant AsyncMagicMixin.__init__ method

Fix rst syntax in news blurb

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

unittest.mock.seal doesn't work as expected with AsyncMock #100287

Merge branch 'main' into fastmock

fix instance-only async attr

Merge branch 'main' into fastmock

determine spec shape only at mock construction time

View reviewed changes

Merge branch 'main' into fastmock

View reviewed changes

Merged main into regmachine branch (

gh-85934: Use getattr_static when adding mock spec #22209

The help function shows incorrect signature for subclass #105080