Opened 5 years ago

Closed 5 years ago

#7616 closed enhancement (implemented)

add STREAM_BW event handler

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

Description

Adds STREAM_BW event handler class and tests.

This patch series includes an aliasing of is_valid_circuit_id to is_valid_stream_id. I am not sure how to provide context to the associated pydoc to keep it linked to the alias assignment.

These patches may not want to apply cleanly due to my end-of-file configuration instructions to my text editor. But, the changes are whitespace clean and do not add anything but working code. Hopefully, I will not continue working near the end of files and this will not crop up again.

Child Tickets

Attachments (2)

stream_bw_event.tar.gz (2.0 KB) - added by robinson 5 years ago.
stream_bw-event.tar.gz (2.0 KB) - added by robinson 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by robinson

Attachment: stream_bw_event.tar.gz added

comment:1 Changed 5 years ago by atagar

Thanks, robinson! Would you mind making a git repository somewhere (maybe github) that I could pull from? That would make it far easier for me to apply patches. I'm having a little bit of trouble for instance with this one...

atagar@morrigan:~/Desktop/stem$ git am ../stream_bw_event/*
Applying: Add is_valid_stream_id helper function
/home/atagar/Desktop/stem/.git/rebase-apply/patch:25: trailing whitespace.
  
warning: 1 line adds whitespace errors.
Applying: Add STREAM_BW event handler
/home/atagar/Desktop/stem/.git/rebase-apply/patch:17: trailing whitespace.
  
/home/atagar/Desktop/stem/.git/rebase-apply/patch:22: trailing whitespace.
  
/home/atagar/Desktop/stem/.git/rebase-apply/patch:24: trailing whitespace.
  
/home/atagar/Desktop/stem/.git/rebase-apply/patch:34: trailing whitespace.
    
error: patch failed: stem/response/events.py:482
error: stem/response/events.py: patch does not apply
Patch failed at 0002 Add STREAM_BW event handler
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

Changed 5 years ago by robinson

Attachment: stream_bw-event.tar.gz added

comment:2 Changed 5 years ago by robinson

I have uploaded a tar with 3 fixed patches. These should work.

See #7617 for the reason why this failed and why a pull would probably have also failed.

P.S. Is it possible to remove old attachments from Trac?

comment:3 Changed 5 years ago by atagar

Resolution: implemented
Status: newclosed

Thanks! Pushed with a couple very minor tweaks...

https://gitweb.torproject.org/stem.git/commitdiff/fb03666

P.S. Is it possible to remove old attachments from Trac?

Hmmm, even with my magical adminy powers I'm not spotting an option for it. It would probably require dripping it from the DB.

Note: See TracTickets for help on using tickets.