Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #9485

Closed (moved)
Open
Opened Aug 14, 2013 by Ximin Luo@infinity0

Cleanup of pyptlib internals

The current code has a few issues:

  • parses config for every method call
  • uses implicit global state (awkward to test)
  • writes unconditionally to stdout (awkward to test)
  • mixes config logic with write/decision logic
  • inconsistent method names (writeMethod vs reportSuccess)

My refactoring deals with these issues. Currently it preserves the current API but deprecates it in favour of the new API and documents an easy transition path.

https://github.com/infinity0/pyptlib/compare/master...api-config

Old API (still supported; marked deprecated):

pyptlib.client.init(transports)
pyptlib.client.reportSuccess(...)
pyptlib.client.reportEnd()

New API:

client = pyptlib.client.ClientTransportPlugin.fromEnv()
client.init(transports)
client.reportMethodSuccess(...)
client.reportMethodsEnd()

Similar sort of thing for the server.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#9485