Opened 5 years ago

Closed 5 years ago

#6631 closed enhancement (implemented)

Caching expansion and test prompt

Reported by: atagar Owned by: neena
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Code review for a couple new features. Initially I was planning to simply add caching for GETCONF and SETCONF requests, but ended up making a few other changes on the way.

The most prominent is a new 'prompt' script that you can use to quickly get python interpretor with a controller instance. Handy for testing.

Changes are available in my caching branch...
git clone -b caching git://git.torproject.org/user/atagar/stem.git
https://gitweb.torproject.org/user/atagar/stem.git/shortlog/refs/heads/caching

I'd suggest looking at the commits individually via "git log -p --reverse origin/master.." since they're each for something different, and the commit message should give a good description of what it's for.

Child Tickets

Change History (4)

comment:1 Changed 5 years ago by atagar

  • Status changed from new to needs_review

comment:2 in reply to: ↑ description Changed 5 years ago by neena

  • Status changed from needs_review to needs_revision

Replying to atagar:

Code review for a couple new features. Initially I was planning to simply add caching for GETCONF and SETCONF requests, but ended up making a few other changes on the way.

Looks fine.

I would've preferred adding the \n to STOP_CONFIRMATION here.

+ print
+ response = raw_input(STOP_CONFIRMATION)

and typo here.

+def start():
+ """
+ Starts up a tor instance that we can attach a contorller to.
+ """

That's all.

comment:3 Changed 5 years ago by neena

Also this

WHITESPACE ISSUES

  • test/prompt.py line 11 - indentation should match surrounding content (2 spaces) line 14 - indentation should match surrounding content (2 spaces) line 65 - indentation should match surrounding content (4 or 6 spaces)

comment:4 Changed 5 years ago by atagar

  • Resolution set to implemented
  • Status changed from needs_revision to closed

Thanks! Merged...

https://gitweb.torproject.org/stem.git/commitdiff/92a0bf0d6afe39db45108626d2e89cde70997a2a?hp=ac5be8cee5f58517c09217fd6860f7ef483dacc2

I've been working on the networkstatus.py changes over these last few days, and they'll likely keep me occupied for the next couple weeks to come (they have some issues, and lack any unit testing).

I would've preferred adding the \n to STOP_CONFIRMATION here.

changed

and typo here.

fixed

Also this

WHITESPACE ISSUES
...

Baka! Shame on me.

Note: See TracTickets for help on using tickets.