Skip to content

Python: make abstraction usage consistent#1052

Merged
lemillermicrosoft merged 7 commits intomicrosoft:mainfrom
awharrison-28:python/cleanup_abstraction_usage
May 19, 2023
Merged

Python: make abstraction usage consistent#1052
lemillermicrosoft merged 7 commits intomicrosoft:mainfrom
awharrison-28:python/cleanup_abstraction_usage

Conversation

@awharrison-28
Copy link
Contributor

@awharrison-28 awharrison-28 commented May 18, 2023

Motivation and Context

Use of abstraction was not consistent in the python SK. This PR makes the import and use of ABC consistent and removes unused file kernel.py.

Description

  • MemoryStoreBase derives from ABC - this properly sets its metaclass. MemoryStoreBase itself should never be instantiated, only derived.
  • RetryMechanism derives ABC, so should be named 'Base' like all other derivatives of ABC in this repo.
  • removed kernel_base.py, was made obsolete by Python: Merge Kernel, KernelBase, KernelExtensions #1015

Contribution Checklist

@awharrison-28 awharrison-28 requested review from dluc and mkarle May 18, 2023 01:40
@awharrison-28 awharrison-28 changed the title Python/cleanup abstraction usage Python: make abstraction usage consistent May 18, 2023
@github-actions github-actions bot added the python Pull requests for the Python Semantic Kernel label May 18, 2023
@lemillermicrosoft lemillermicrosoft merged commit 7a884d4 into microsoft:main May 19, 2023
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### Motivation and Context
Use of abstraction was not consistent in the python SK. This PR makes
the import and use of ABC consistent and removes unused file kernel.py.

### Description
- MemoryStoreBase derives from ABC - this properly sets its metaclass.
MemoryStoreBase itself should never be instantiated, only derived.
- RetryMechanism derives ABC, so should be named 'Base' like all other
derivatives of ABC in this repo.
- removed kernel_base.py, was made obsolete by
microsoft#1015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants