python-teos icon indicating copy to clipboard operation
python-teos copied to clipboard

Get rid of OrderedDicts

Open ritikramuka opened this issue 2 years ago • 4 comments

addressing the issue: #233

Changed OrderedDict to dict as in python ^3.7 dict are ordered by default

ritikramuka avatar Feb 23 '22 12:02 ritikramuka

@ritikramuka there was some issues with circle-ci so i had to roll an update. Can you rebase master so ci tests are run again?

sr-gi avatar Feb 24 '22 10:02 sr-gi

@sr-gi can you help me figure out where the test is failing!

ritikramuka avatar Feb 25 '22 05:02 ritikramuka

Have you run the test locally?

Looks like you've replaced OrderedDict by dict but you have not updated the methods. Here's the traceback:

Traceback (most recent call last):
    File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "/usr/lib/python3.8/threading.py", line 870, in run
      self._target(*self._args, **self._kwargs)
    File "/home/circleci/project/teos/watcher.py", line 491, in do_watch
      self.locator_cache.update(block_hash, locator_txid_map)
    File "/home/circleci/project/teos/watcher.py", line 119, in update
      self.remove_oldest_block()
    File "/home/circleci/project/teos/watcher.py", line 130, in remove_oldest_block
      block_hash, locators = self.blocks.popitem(last=False)
  TypeError: popitem() takes no keyword arguments

sr-gi avatar Feb 25 '22 07:02 sr-gi

@sr-gi I am not able to run any test locally... as having an issue setting up leveldb and plyvel

ritikramuka avatar Feb 25 '22 07:02 ritikramuka