Skip to content
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

Cleanup code #15

Merged
merged 14 commits into from
Jul 15, 2019
Merged

Cleanup code #15

merged 14 commits into from
Jul 15, 2019

Conversation

aecay
Copy link
Collaborator

@aecay aecay commented Jul 4, 2019

No description provided.

aecay added 6 commits June 28, 2019 15:17
No one ever calls it
the index is never used in the loop body
Itʼs a private function which exists only to return a private member, so
we can just replace its uses by direct access to the member
Itʼs never used.  Necessitates an eventual CLI change as well
It is set to an empty dict in __init__ and never touched after
The new version is ~20 lines less code, avoids copypasta of similar code
in multiple places, and is (IMO) clearer

Still needs testing to make sure it works
mite/__main__.py Show resolved Hide resolved
mite/compat.py Outdated Show resolved Hide resolved
mite/context.py Show resolved Hide resolved
mite/runner.py Outdated Show resolved Hide resolved
mite/runner.py Show resolved Hide resolved
mite/utils.py Show resolved Hide resolved
test/mocks/mock_direct_runner_transport.py Show resolved Hide resolved
aecay added 5 commits July 9, 2019 12:25
- use asynccontextmanager instead of custom classes
- make sending functions async
- compress exception handler and start_transaction into one
- rename and tidy some things
NB the tests need to be run form within the tests/ subdirectory
changes:
- introduce a new mite.utils.sleep function (so that tests donʼt sleep
  for a long time)
- change the base class of HandledException to work around a bug in
  pytest-asyncio (pytest-dev/pytest-asyncio#126)
- better async exception handling
- fix event loop handling in mite_http
- new mite.test module
Weʼll just require python 3.7
@aecay aecay mentioned this pull request Jul 9, 2019
@jb098 jb098 merged commit e288610 into master Jul 15, 2019
aecay added a commit that referenced this pull request Jul 15, 2019
This reverts commit e288610, reversing
changes made to b4ea2d1.
jb098 added a commit that referenced this pull request Jul 15, 2019
Revert "Merge pull request #15 from sky-uk/cleanup-code"
@aecay aecay deleted the cleanup-code branch July 18, 2019 09:32
@aecay aecay restored the cleanup-code branch July 31, 2019 09:39
aecay added a commit that referenced this pull request Jul 31, 2019
These changes were part of #15, which were emergency-reverted by #19.  I
can no longer remember why we had to revert...

These changes are to support unit tests in the id-mite-nft repo, and
they all seem to be safe.
aecay added a commit that referenced this pull request Aug 1, 2019
These changes were part of #15, which were emergency-reverted by #19.  I
can no longer remember why we had to revert...

These changes are to support unit tests in the id-mite-nft repo, and
they all seem to be safe.
@aecay aecay deleted the cleanup-code branch August 5, 2019 14:28
jb098 pushed a commit that referenced this pull request Aug 5, 2019
These changes were part of #15, which were emergency-reverted by #19.  I
can no longer remember why we had to revert...

These changes are to support unit tests in the id-mite-nft repo, and
they all seem to be safe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants