forked from warner/foolscap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog.0.6.4
4897 lines (3927 loc) · 209 KB
/
ChangeLog.0.6.4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2012-06-18 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.6.4
* NEWS: update for 0.6.4 release
2012-06-18 Brian Warner <[email protected]>
* NEWS: update with recent changes
* foolscap/logging/filter.py: fix a missing mode=b when opening
the output of "flogtool filter", which could result in corrupted
flogfiles on windows. Should close #179.
* setup.py (extras_require): remove "secure_connections" dep on
pyOpenSSL, closes #174. Patch by Zooko, thanks!
* README.packagers: explain what OS packages and python-package
authors need to depend upon to get secure connections
* foolscap/logging/log.py (bridgeLogsFromTwisted): ignore multiple
calls with identical twisted_logger/foolscap_logger pairs, to
avoid recording duplicate twisted log messages in flogfiles.
Closes #194.
* foolscap/negotiate.py (Negotiation.negotiationFailed): don't log
tracebacks for normal negotiation failures, since they aren't
helpful. Closes #195.
* doc/examples/git-foolscap (create): add the git reponame to the
generated FURL (e.g. pb://TUBID@HINT/SWISS/REPONAME) so that 'git
clone' will give the checkout a meaningful name. Technically, the
'swissnum' is thus SWISS/REPONAME, but foolscap doesn't care about
slashes inside swissnums. Closes #197.
* foolscap/appserver/cli.py (Stop): add --quiet to hush the "this
does not look like a running node" message
(Restart.run): use --quiet
* doc/examples/git-foolscap: make it importable, add run(). Fix
help text.
2012-06-15 Brian Warner <[email protected]>
* NEWS: update with all recent changes
* foolscap/pb.py (Tub.stopService): make copies of any lists that
we might mutate before iterating over them, in particular
self.reconnectors. Otherwise we can fail to shut everything down
properly. Closes #196.
2012-06-09 Brian Warner <[email protected]>
* foolscap/logging/gatherer.py (IncidentObserver): keep fetching
incidents even when some fail, to skip ones that can't be
serialized due to buggy code calling log.msg() with non-data.
Patch by David-Sarah Hopwood. Closes #190.
* foolscap/logging/web.py: make 'flogtool web-viewer --timestamps'
use format_time() too (adds --epoch)
* foolscap/test/test_logging.py (Web.test_basic): update to match
* foolscap/util.py (format_time): add --epoch, closes #192
* foolscap/util.py (format_time): factor out timestamp formatting
from logging/dumper.py
* foolscap/logging/dumper.py (LogDumper): same
* foolscap/test/test_logging.py (Dumper.test_dump): update
2012-05-31 Zancas <[email protected]>
* foolscap/logging/dumper.py: improve docs, closes #191
* foolscap/logging/web.py: same
2012-03-31 Zancas <[email protected]>
* doc/using-foolscap.xhtml: minor edits
2012-03-29 Brian Warner <[email protected]>
* foolscap/referenceable.py (decode_location_hints): update
connection-hint extension rules to require extensions start with
"TYPE:" and not be followed by all-digits. Reject "HOST" without a
portnum to catch errors like setLocation("HOST") earlier (it
should be setLocation("HOST:PORT")). Allow "pb://TUBID@" as
legal but unrouteable (still valid for inbound connections).
(NONAUTH_STURDYREF_RE): fix no-crypto tests by allowing
"pbu:///SWISS" as legal but unrouteable. It's completely useless,
though, because unauthenticated FURLs can't accept inbound
connections.
* foolscap/test/test_sturdyref.py (URL.testBrokenHints): enhance
* foolscap/test/test_tub.py (BadLocationFURL): update
* foolscap/logging/dumper.py (LogDumper.run): when 'dump' is
pointed at a FURL file instead of an event log file, give a
helpful error message instead of the confusing pickle error
* foolscap/test/test_logging.py (Dumper.test_oops_furl): tests
* foolscap/logging/cli.py: let commands control the sys.exit()
return code, to prepare for tests of improved error handling
* foolscap/test/test_logging.py (run_wrapper): update to match
2012-01-05 Brian Warner <[email protected]>
* foolscap/_version.py: bump version number while between releases
2012-01-05 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.6.3
* NEWS: update for 0.6.3 release
2012-01-05 Brian Warner <[email protected]>
* README (DEPENDENCIES): give up on twisted-2.4.0 compatibility,
the tests fail now
* NEWS: update
2012-01-04 Brian Warner <[email protected]>
* foolscap/call.py (CallUnslicer.receiveChild): raise a Violation
when the CLID is stale, so the caller gets an errback. Previously,
the otherwise-unhandled exception got put in the receiver's log,
but the caller didn't get a clear notification. Closes #106.
* foolscap/broker.py (Broker.remote_decref): tolerate "late"
decrefs that happen after their target has gone away, which causes
a mostly-harmless error to be logged, typically at the end of unit
test cases when Tub.stopService is called on multiple Tubs in the
same process that are talking to each other. refs #106.
* foolscap/broker.py: oops, un-break no-SSL support
* foolscap: Twisted-11.1 has new TLS code which reports
connectionLost() significantly after we call loseConnection(),
such as when we drop a stale connection in favor of a replacement.
This breaks a number of assumptions, generally by allowing
Tub.stopService() to finish too early, so tests for users of
foolscap (like tahoe) fail with DirtyReactorError, or
port-already-in-use errors. These changes fix the problem, and
update the Foolscap unit tests to handle the changes.
* foolscap/test/test_negotiate.py: tolerate RemoteNegotiationError
error too, since now it can appear earlier and beat the local
NegotiationError.
* foolscap/pb.py (Tub): track connections separately from Brokers.
Broker.shutdown() fires brokerDetached (which severs all rrefs and
stops using that connection). The subsequent connectionLost()
fires connectionDropped(), which allows Tub.stopService()'s
Deferred to fire. This should fix the tests-end-too-early problem.
* foolscap/negotiate.py (Negotiation.switchToBanana): call
tub.connectionAttached() to track connections
* foolscap/broker.py (Broker.connectionLost): and
tub.connectionDropped()
* foolscap/broker.py: the new TLS code sometimes reports abandoned
connections with SSL.Error, so when we're ignoring ConnectionLost
and ConnectionDone, ignore SSL.Error too.
* foolscap/test/test_negotiate.py: wait more turns for each step,
now that connection-loss events are not synchronous
* foolscap/test/common.py (ShouldFailMixin.shouldFail): improve
error message
2011-10-16 Brian Warner <[email protected]>
* misc/*/debian: remove debian packaging tools. They were pretty
stale anyways.
* MANIFEST.in: same
* Makefile (debian-*): same
* MANIFEST.in: remove entries for figleaf code and misc/testutils
to hush some build-time warnings. I should have done before
releasing 0.6.2, but the warnings are benign.
* foolscap/_version.py: bump version number while between releases
2011-10-15 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.6.2
* misc/*/debian/changelog: same
* NEWS: update for 0.6.2 release
2011-10-08 Brian Warner <[email protected]>
* foolscap/test/test_tub.py (TestCertFile.test_generate): tolerate
certs generated by more recent versions of OpenSSL (which say
"BEGIN PRIVATE KEY" instead of "BEGIN RSA PRIVATE KEY"). Thanks to
jtaylor, zooko, and davidsarah for the catch. Closes #184.
* Makefile: remove figleaf code. It was out-of-date anyways,
coverage.py is a better modern choice. Tahoe has some sample code,
including emacs integration.
* misc/testutils: same, removed the whole thing
2011-10-07 Zooko O'Whielacronx <[email protected]>
* foolscap/pb.py (Tub.setLogGathererFURL): accept an iterable of
log gatherer furls in addition to a single log gatherer furl.
Closes #176
* test/test_logging.py (Gatherer): test for same
* doc/logging.xhtml: update docs
2011-10-05 Brian Warner <[email protected]>
* foolscap/appserver/client.py (UploadFile.run): fix
lambda-capturing-loop-variables bug spotted by David-Sarah
Hopwood's automated tool. The fault would appear when trying to
upload three or more files in the same call: only the first and
last would actually happen (the last file would be uploaded
multiple times).
* foolscap/test/test_appserver.py (Upload.test_run): test it
* NEWS: mention the bug
2011-10-04 Brian Warner <[email protected]>
* NEWS: update for upcoming release
2011-06-09 Brian Warner <[email protected]>
* foolscap/test/test_appserver.py (RunCommand.test_run): use a
helper script, instead of /bin/cat and /bin/dd, so this test can
run on windows too. Closes #178.
* foolscap/test/apphelper.py: same
* foolscap/test/test_reconnector.py: hush pyflakes
2011-06-05 Brian Warner <[email protected]>
* foolscap/negotiate.py (Negotiation.switchToBanana): rather than
replacing self.transport.protocol with the Banana protocol, leave
the Negotiation protocol in place, but swap out its .dataReceived
and .connectionLost methods with pointers to the Banana's methods.
This avoids a bug with current Twisted trunk (>11.0.0) in which
the new TLS implementation (enabled if you have pyOpenSSL>0.10)
doesn't appreciate having its .protocol changed on it after
initialization. Closes #173.
* foolscap/banana.py (Banana.handleError): stop passing a 'reason'
argument into loseConnection(), not all implementations accept it.
* foolscap/test/test_reconnector.py (Reconnector._got_ref): same
* foolscap/logging/incident.py (TIME_FORMAT): change to use
hyphens on all platforms, despite colons being easier to read and
valid on everything but windows. Filenames now look like
incident-2011-06-05--14-40-21Z-w2qn32q.flog . Closes #177 again.
* doc/logging.xhtml: update to match
* foolscap/_version.py: change "in-between releases" version from
"0.6.1+" to "0.6.1.post0", to satisfy PEP 386 (and make it
possible for Tahoe to use development versions of Foolscap). I am
slightly annoyed by the need to use a less-readable versioning
scheme, but a number of people (in particular Tarek and the Pycon
community) seem to support PEP 386, so I'll play along. Closes
#175.
* misc/*/debian/changelog: same
* .gitignore: ignore generated files
2011-05-09 Brian Warner <[email protected]>
* foolscap/appserver/client.py (run_flappclient.oops): write error
message to stderr, not stdout, else git-remote-pb (which expects
protocol messages on stdout) gets confused
* foolscap/appserver/client.py (StandardIO): improve
TwitchyStandardIO workaround: use f.check(), not f.value.__class__
* foolscap/logging/log.py (FoolscapLogger.msg): return event
number even if generation_threshold says to not record event
2011-05-08 Brian Warner <[email protected]>
* foolscap/logging/filter.py (Filter.run): when doing
modify-in-place on windows, don't attempt an atomic rename of the
output file. Closes #180.
* foolscap/logging/incident.py (TIME_FORMAT): remove colons from
incident filenames when running on windows, since it can't handle
them. Thanks to David-Sarah Hopwood for the catch. Closes #177.
* foolscap/logging/gatherer.py: same (just import TIME_FORMAT from
incident.py)
2011-02-07 Brian Warner <[email protected]>
* foolscap/appserver/client.py: work around an apparent twisted
StandardIO bug when git closes our stdout and then writes to our
stdin.
* doc/examples/git-foolscap, git-remote-pb: new git-over-foolscap
tools, uses 'git-remote-helpers' for easy setup.
* foolscap/appserver/cli.py: split make_swissnum() out
2011-02-06 Brian Warner <[email protected]>
* .darcs-boringfile, .hgignore, .hgtags: remove old files now that
Foolscap lives in git
* foolscap/appserver/cli.py: split list_service/add_service out
into separate functions, for use by other code
* foolscap/test/test_appserver.py (CLI): test them
* foolscap/appserver/cli.py (BaseOptions): fix --help text for
subcommands: override getSynopsis() to prevent usage.Options from
simply concatenating root synopsis with subcommand synopsis. Add
-h as an alias for --help. Also improve some of the docs
* foolscap/appserver/services.py (FileUploaderOptions): same
* foolscap/_version.py: bump version while between releases
* misc/*/debian/changelog: same
2011-01-16 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.6.1
* misc/*/debian/changelog: same
* NEWS: update NEWS for next release
* foolscap/eventual.py (_SimpleCallQueue._turn): remove
unreachable code. Thanks to 'ivank' for the catch. Closes #165.
* foolscap/referenceable.py (RemoteReferenceOnly.getDataLastReceivedAt):
new method to let application code know whether the connection
appears alive: tells you when we last heard anything from the
other end on this connection. Only enabled if keepalives are
turned on, since otherwise we don't want to spend the overhead of
calling time.time() upon every inbound packet. (if keepalives are
disabled, which is the default, you get None). Closes #169.
* foolscap/banana.py (Banana.getDataLastReceivedAt): same
* foolscap/test/test_keepalive.py (Keepalives): test enabled case
* foolscap/test/test_pb.py (TestReferenceable): test disabled case
* foolscap/banana.py (Banana.initSend): stop importing the
deprecated 'sets' module, to hush warnings when used with newer
pythons, since we don't really need it here. We still import it
from foolscap/slicers/set.py to manage compatibility with older
code, but that's wrapped with a warning-suppressor. This is mainly
to help fix Tahoe's #1329.
2010-12-28 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.6.0
* misc/*/debian/changelog: same
* NEWS: update for upcoming release
2010-12-28 Brian Warner <[email protected]>
* foolscap/sslverify.py: hush pyflakes warnings
* foolscap/referenceable.py (RemoteReference.callRemoteOnly): same
2010-12-06 Brian Warner <[email protected]>
* NEWS: start collecting items for the next release
* foolscap/test/test_banana.py (InboundByteStream.testLong): add
more tests. Thanks to Zarutian for the suggestions.
2010-12-05 Brian Warner <[email protected]>
* misc/*/debian/rules: include all *.xhtml files in the debian
packages. Closes #131.
* foolscap/referenceable.py (RemoteReferenceTracker._handleRefLost):
guard against self.ref==None, in case that's the problem in #147.
It doesn't seem likely, though.
* foolscap/__init__.py: empty it, except for __version__. This
finishes the transition to foolscap.api, and closes #122 .
* foolscap/deprecated.py: deleted
2010-11-29 Brian Warner <[email protected]>
* foolscap/pb.py (Listener): fix Twisted-10.2 compatiblity: stop
using strports.service() . Fixes #167.
* foolscap/logging/web.py (WebViewer): same
2010-08-09 Brian Warner <[email protected]>
* foolscap/logging/log.py (FLOGTOTWISTED): honor FLOGLEVEL= when
using FLOGTOTWISTED=1, just like FLOGFILE= does. Closes #154.
* foolscap/logging/incident.py (IncidentReporter.TIME_FORMAT):
change incident filenames to have timestamps in UTC (not
localtime) and in a format almost like ISO-8601. They are now
2008-08-22--16:20:28Z . The real ISO-8601 would use "_" instead of
"--", but I find the underscore to visually "bind" more tightly
than the hyphen, making it hard to tell whether the 16 is part of
the date side or the time side. This should close #111.
* foolscap/logging/gatherer.py (GathererService): same for
log-gatherer filenames. Also changed the from-vs-to separator to
three hyphens now that we're using two hyphens in the timestamps.
Filenames now look like this:
from-2010-08-09--16:13:19Z---to-2010-08-09--22:13:19Z.flog.bz2
2010-08-08 Brian Warner <[email protected]>
* setup.py (setup_args packages=): use proper "foolscap.slicers"
instead of incorrect "foolscap/slicers". This apparently caused
problems with some external setuptools stuff. Closes #156.
* foolscap/appserver/services.py (FileUploader.remote_putfile._err):
fix error-handling code which would fail to unlink the tempfile
upon client read() error. Fixes #157.
* foolscap/test/test__versions.py (Versions.test_required): oops,
tolerate Twisted versions like 10.1 (numeric compare instead of
alphabetical), rather than thinking that 10.1 was older than the
problematic 8.1.0 .
* foolscap/_version.py: bump version while between releases
* misc/*/debian/changelog: same
2010-03-25 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.5.1
* misc/{dapper|edgy|feisty|gutsy|hardy|sarge|etch|sid}/debian/changelog:
same
2010-03-25 Brian Warner <[email protected]>
* foolscap/banana.py, broker.py, copyable.py, pb.py
* foolscap/appserver/cli.py, foolscap/logging/gatherer.py
* foolscap/test/test_call.py, test_logging.py, test_observer.py,
* test_promise.py, test_reference.py, test_registration.py,
* test_schema.py, test_tub.py: clean up lots of pyflakes warnings,
revealed by the new more-strict version of pyflakes
* foolscap/banana.py (Banana.dataReceived): apply zooko's patch to
use stringchain on the inbound data path, to fix the O(n^2)
performance in large tokens (e.g. a 10MB string token). Thanks
Zooko! Closes #149.
* foolscap/test/bench_banana.py: also zooko's performance tests
* foolscap/stringchain.py: Zooko's utility class to efficiently
handle large strings split into several pieces, such as the
inbound socket buffers that Banana.dataReceived() winds up with.
* foolscap/test/test_stringchain.py: unit tests for the same.
Zooko has given me permission to distribute both of these under
Foolscap's MIT license.
2010-03-14 Brian Warner <[email protected]>
* foolscap/constraint.py: remove maxSize/maxDepth methods, and the
related UnboundedSchema exception. As described in ticket #127,
I'm giving up on resource-exhaustion defenses, which allows for a
lot of code simplification.
* foolscap/{copyable.py|removeinterface.py|schema.py}: same
* foolscap/slicers/*.py: same
* foolscap/test/test_schema.py: remove tests
* doc/jobs.txt: remove TODO items around maxSize
* foolscap/_version.py: bump version while between releases
* misc/*/debian/changelog: same
2010-01-18 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.5.0
* misc/{dapper|edgy|feisty|gutsy|hardy|sarge|etch|sid}/debian/changelog:
same
2010-01-18 Brian Warner <[email protected]>
* NEWS: update for upcoming release
2010-01-11 Brian Warner <[email protected]>
* foolscap/logging/web.py (WebViewer.start): add --open, which
uses stdlib's webbrowser.open() function to automatically open a
browser window with the "flogtool web-viewer" contents.
* foolscap/pb.py (Tub.getReferenceForName): for unknown names,
only include the first two letters of the swissnum in the KeyError
we return, to avoid revealing the whole thing in the caller's
error logs. Closes #133.
* foolscap/test/test_pb.py (TestCallable.testWrongSwiss): test it
* foolscap/test/test_gifts.py (Bad.test_swissnum): same
(Bad.testReturn_swissnum): same
2009-12-28 Brian Warner <[email protected]>
* doc/flappserver.xhtml: general improvements
* foolscap/appserver/cli.py (Create.run): chmod the basedir go-rwx
to keep the private key hidden from other users
* foolscap/test/test_appserver.py (CLI.test_create): test it
* doc/flappserver.xhtml: mention the chmod
* foolscap/appserver/cli.py (Start.run): use the handy run()
function from twisted.scripts.twistd instead of os.execvp to give
control to twistd. This removes a lot of grossness and should
remove the need to modify $PATH when running "bin/flappserver
start" from an uninstalled source tree.
* foolscap/logging/dumper.py (LogDumper.run): don't eat IOErrors
when you point it at a missing file. Only eat the EPIPE that
occurs when you run "flogtool dump FILE |less" and quit the pager
early.
* foolscap/logging/dumper.py: add --timestamps, which can be
"short-local", "long-local" (ISO-8601 with timezone), or
"utc" (ISO-8601 with "Z" suffix). Closes #100.
* foolscap/logging/web.py: add --timestamps, "local" or "utc".
This controls the default format. Added tooltips over the time
strings to show the event time in local, iso-8601, and
iso-8601-utc. Added links to the all-events page to reload it with
various timestamp formats and sort options.
* foolscap/test/test_logging.py (Dumper): update tests to match
(Web): same
2009-10-04 Brian Warner <[email protected]>
* foolscap/slicers/set.py: suppress the DeprecationWarning that
occurs when you import 'sets' on py2.6: seems like the best way to
preserve compatibility with py2.3-compatible application code
while still avoiding the noise when running with 2.6. Closes #124.
* foolscap/appserver/client.py (Uploader.run): expanduser() the
filename, so you can use 'flappclient upload-file ~/foo.txt' even
without the shell expanding the filename for you
(ClientOptions.read_furlfile): same, closes #134.
2009-09-17 Brian Warner <[email protected]>
* setup.py: use entry_points= on windows, to create executable
.bat files for flogtool/flappserver/flappclient . Stick to
scripts= on non-windows (and remember to install with
--single-version-externally-managed) to get non-opaque flogtool
scripts that don't use magic pkg_resources functions to import
foolscap. This should close #109.
2009-07-30 Brian Warner <[email protected]>
* foolscap/pb.py (Tub.setLocationAutomatically): fix comment
* foolscap/test/test_serialize.py: oops, fix pyflakes warnings
* foolscap/test/test_reference.py: same
* foolscap/test/test_gifts.py: same
2009-07-28 Brian Warner <[email protected]>
* foolscap/test/*: stop using old-style shouldFail (which would
mask errors)
2009-06-24 Brian Warner <[email protected]>
* doc/listings/xfer-client.py, xfer-server.py, command-client.py,
command-server.py: remove, obsoleted by flappserver
* foolscap/pb.py (getRemoteURL_TCP): remove this function, I never
liked it, and it wasn't very good anyway.
* foolscap/api.py, foolscap/__init__/py, foolscap/deprecated.py:
same
* foolscap/test/test_pb.py: remove dead code
* foolscap/deprecated.py: define wrappers that emit
DeprecationWarning upon use, then wrap them around everything that
used to be in foolscap/__init__.py .
* foolscap/__init__.py: apply the wrappers. Please import from
foolscap.api instead. See #122 for details.
* foolscap/*: stop importing functions/classes directly from the
top-level 'foolscap' module, instead import them from the
'foolscap.api' module (i.e. 'from foolscap.api import Tub' instead
of 'from foolscap import Tub'). I'm planning to add deprecation
wrappers around the things you can get from 'foolscap', and this
is to make sure our own code doesn't run afoul of those warnings.
2009-06-22 Brian Warner <[email protected]>
* foolscap/ipb.py (DeadReferenceError): improve the string form by
adding remote tubid, and information from the PendingRequest.
Since DeadReferenceError frequently happens in an eventually()
context, there's not usually a useful stack trace, so any piece of
information will help.
* foolscap/referenceable.py (RemoteReference._callRemote): give
interfacename+methodname to PendingRequest, so it can give that
information to DeadReferenceError.__str__ . Some day it'd be cool
to include a stack trace here.
* foolscap/call.py (PendingRequest.__init__): store it
(PendingRequest.getMethodNameInfo): return it
* foolscap/broker.py (Broker.abandonAllRequests): pass
PendingRequest to DeadReferenceError
* foolscap/test/test_call.py (TestCall.test_connection_lost_is_deadref):
test it
* foolscap/test/test_pb.py: update to match, remove dead code
* doc/examples/git-remote-add-furl: fix shbang line
* doc/examples/git-clone-furl: same
2009-06-20 Brian Warner <[email protected]>
* doc/examples/git-clone-furl: easier tool to set up FURL-based
git repo
* doc/examples/git-remote-add-furl: same
* doc/examples/git-publish-with-furl: better name for
git-setup-flappserver-repo
* doc/examples/git-proxy-flappclient: mention those scripts
* foolscap/appserver/client.py: improve --help strings
* foolscap/appserver/cli.py (CreateOptions.opt_umask): capture the
current umask at "flappserver create" time for use by the eventual
server. This should reduce surprises.
* doc/flappserver.xhtml: explain the new behavior
* foolscap/appserver/server.py (AppServer): require the
umask file to contain an octal string, don't use eval()
* foolscap/test/test_appserver.py: update tests
2009-06-19 Brian Warner <[email protected]>
* doc/flappserver.xhtml: add --umask= to "flappserver create",
since twisted forces it to 077 on startup, and the
git-proxy-flappclient system was winding up with overly
restrictive filemodes
* foolscap/appserver/cli.py (CreateOptions): same
* foolscap/appserver/server.py (AppServer): same
* foolscap/test/test_appserver.py (CLI.test_create2): test it
* doc/examples/git-setup-flappserver-repo: suggest --umask
2009-06-18 Brian Warner <[email protected]>
* doc/examples/git-proxy-flappclient:
* doc/examples/git-setup-flappserver-repo: new pair of tools to
run the Git remote-access protocol over a flappserver-based
connection
* MANIFEST.in: include them in the source tarball
* foolscap/_version.py: bump version between releases
* misc/*/debian/changelog: same
2009-06-16 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.4.2
* misc/{dapper|edgy|feisty|gutsy|hardy|sarge|etch|sid}/debian/changelog:
same
2009-06-16 Brian Warner <[email protected]>
* foolscap/test/test_gifts.py: remove all timeouts.. I think one
buildslave took slightly too long, which flunked the test, and
then screwed up every test after that point.
* setup.py (packages): add foolscap/appserver
* NEWS: update for upcoming release
* setup.py (setup_args): include flappclient as a script
* foolscap/negotiate.py (TubConnector.connect): if we have no
location hints, set self.failureReason so we can error out
cleanly. Closes #129.
* foolscap/tokens.py (NoLocationHintsError): new exception for
this purpose
* foolscap/negotiate.py (TubConnector.failed): call
tub.connectorFinished() too, so any pending Tub.stopService can be
retired.
* foolscap/pb.py (Tub.getReference): wrap in a maybeDeferred, so
that unparseable FURLs give us errbacks instead of synchronous
exceptions. This is the other half of #129.
(Tub.connectorFinished): stop complaining (at log.WEIRD) if the
connector wasn't in our table. I don't know what was causing this,
and I don't really care. Closes #81.
* foolscap/test/test_tub.py (BadLocationFURL): test #129 stuff
* foolscap/pb.py (Tub.getReference): always return a Deferred,
even if given an unparseable FURL. Addresses #129.
* foolscap/test/test_tub.py (NoLocationFURL): test it
* foolscap/appserver/client.py (UploadFile): accept multiple files
* foolscap/test/test_appserver.py (Upload.test_run): test it
* doc/flappserver.xhtml: update example to match
* doc/flappserver.xhtml: rename tools: use "upload-file" and
"run-command" instead of file-uploader and exe
* doc/foolscap/appserver/client.py: same
* doc/foolscap/appserver/services.py: same
* foolscap/test/test_appserver.py: same
* foolscap/test/test_appserver.py (RunCommand): improve coverage
* foolscap/appserver/cli.py: move flappclient code out of cli.py ..
* foolscap/appserver/client.py (run_flappclient): .. into client.py
(Exec.dataReceived): don't spin up StandardIO until after the
server tells us they want stdin. This also means we can stop
buffering stdin.
* foolscap/test/test_appserver.py: match client.run_flappclient
change
(RunCommand.test_run): first test of run-command/exec code
* foolscap/broker.py (Broker.doNextCall): don't run any calls
after we've been shut down. This fixes a racy bug in which two
calls arrive and get queued in the same input hunk, the first one
provokes a Tub.stopService, and the second one gets run after the
Tub has been shutdown, leaving an "Unhandled Error in Deferred"
lying around. This was occasionally flunking an appserver test.
* foolscap/test/test_tub.py (CancelPendingDeliveries): test it
* foolscap/appserver/cli.py (Restart): add 'flappserver restart'
* foolscap/appserver/services.py (Exec): make run-command work,
including optional stdin/stdout/stderr, logging of each, and
return of exitcode. Still needs unit tests and a better name.
* foolscap/appserver/client.py (Exec): same
(parse_options): pass a 'stdio' object in separately, to let
unit tests control stdin
2009-06-15 Brian Warner <[email protected]>
* foolscap/appserver/services.py (FileUploader.remote_putfile):
use os.chmod, since Twisted-2.5 doesn't have FilePath.chmod
* bin/flappclient: generic client for flappserver
* foolscap/appserver/client.py: same
* foolscap/test/test_appserver.py (Upload.test_run): test file
uploading
(Client.test_help): test --help and --version
* foolscap/appserver/*: fixes to make file-upload work
* foolscap/appserver/services.py (FileUploader): implement it for
real, using twisted's FilePath. Not sure it actually works yet.
* foolscap/test/test_appserver.py: begin unit tests for appserver
* foolscap/appserver/*: clean up Create, add
AppServer.when_ready() to handle setLocationAutomatically()
better, display simple UsageError/BadServiceArguments exceptions
better (no traceback)
2009-06-14 Brian Warner <[email protected]>
* foolscap/appserver/server.py (AppServer.__init__): improve
startup message
* foolscap/appserver/services.py (FileUploader.__init__): note
that tub= might be None (such as in 'add' when we're merely
validating the service arguments)
* foolscap/appserver/cli.py: run Tub for 'create', but not for
'add' or 'list'. Stash the furl-prefix to support this. The idea
will be to rewrite furl-prefix each time the server is started.
This also allows 'add' and 'list' to be used while the server is
already running.
* doc/flappserver.xhtml: add example transcript
* foolscap/pb.py (generateSwissnumber): pull this out to a
seperate function, to be called externally
(Tub.generateSwissnumber): same
* doc/flappserver.xhtml: start to create an "application server":
an easy tool to deploy pre-written foolscap-based services in a
shared server process. This first step creates the bin/flappserver
tool, and implements the "create", "add", "list", "start", and
"stop" commands. The next step will be to write some basic tests,
then implement some built-in services (file-upload and
exec-command), then write some clients to drive those services.
Eventually new services will be loaded with a plugin architecture.
Tracked in ticket #82.
* bin/flappserver: this tool is used to manipulate app servers
* foolscap/appserver/*.py: the actual code
* setup.py: bin/flappserver is a script too
2009-06-05 Brian Warner <[email protected]>
* foolscap/referenceable.py (RemoteReferenceOnly.getLocationHints):
new method
(RemoteReferenceOnly.getSturdyRef): remove "this is not secure"
comment: getSturdyRef now *does* check the tubid against the
connection
(SturdyRef): factor out encode_furl/decode_furl into new functions
* foolscap/test/test_pb.py (TestReferenceable): test both
getLocationHints() and isConnected()
(TestCallable.testGetSturdyRef): same
* foolscap/test/test_gifts.py: update to use encode_furl
2009-06-03 Brian Warner <[email protected]>
* foolscap/referenceable.py (RemoteReferenceOnly.isConnected): new
method, tests the same thing as notifyOnDisconnect but this one is
immediate instead of callback-based
* foolscap/test/test_call.py (TestCall.testNotifyOnDisconnect):
test it
* foolscap/test/test_call.py
(ReferenceCounting.test_reference_counting):
oops, turn off debugging noise which was accidentally left in back
at 0.4.0
* foolscap/referenceable.py (TheirReferenceUnslicer): remove the
200-byte limit on FURLs which are passed as third-party "gifts".
(ReferenceUnslicer): same, for inbound my-references
* foolscap/_version.py: bump version between releases
* misc/*/debian/changelog: same
2009-05-22 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.4.1
* misc/{dapper|edgy|feisty|gutsy|hardy|sarge|etch|sid}/debian/changelog:
same
2009-05-22 Brian Warner <[email protected]>
* NEWS: udpate for upcoming release
* foolscap/tokens.py (RemoteException): override __str__, since we
don't put arguments in .args . Otherwise, attempting to stringify
a RemoteException will fail under python2.4 (but not 2.5).
* foolscap/test/test_logging.py (Basic.testFailure): test it
* foolscap/test/test_call.py (ExamineFailuresMixin._examine_raise):
more thorough test
* foolscap/_version.py: bump version between releases
2009-05-19 Brian Warner <[email protected]>
* foolscap/_version.py: release Foolscap-0.4.0
* misc/{dapper|edgy|feisty|gutsy|hardy|sarge|etch|sid}/debian/changelog:
same
2009-05-19 Brian Warner <[email protected]>
* NEWS: update for the next release
* README: mention python2.6 compatibility
* foolscap/test/test__versions.py (Versions.test_record): record
versions of platform/python/twisted/foolscap in the test logs
* foolscap/api.py: add some more symbols: ChoiceOf, IntegerConstraint
* foolscap/banana.py (Banana.handleData): increment the inbound
objectCounter as soon as we see the OPEN token, rather than doing
it in handleOpen(), since the latter is skipped if we're dropping
tokens due to a Violation. This avoids the loss-of-sync that
occurred when the dropped tokens included more OPEN
sequences (e.g. when a remote method call used a bad method name,
and its arguments contained lists or tuples or other sequences).
This fixes the bug in which subsequent method calls that used
shared arguments saw their "reference" sequences point to the
wrong value. Closes #104.
* foolscap/test/test_call.py (ReferenceCounting): test it
* foolscap/referenceable.py (RemoteReferenceTracker.__init__):
require the proposed per-my-reference FURL to match the TubID that
we're using for the parent Broker. This prevents the far end from
sending a bogus FURL and thus breaking the security properties of
rref.getSturdyRef(). (they couldn't confuse Tub.getReference,
because the spoofed FURL would only be added to the per-Broker
table, but they could confuse someone who relied upon the
correctness of getSturdyRef). This closes #84.
(RemoteReferenceTracker.__init__): oops, don't compare tubids when
using an UnauthenticatedTub, since that fails the non-crypto tests
* foolscap/test/test_reference.py (TubID): test it
* foolscap/test/test_schema.py (Interfaces.test_remotereference):
update to match
* foolscap/hashutil.py: new file to smoothly use hashlib when
available and fall back to sha1/md5 when not (i.e. python2.4).
When we eventually drop py2.4 support, we'll get rid of this file.
Thanks to Stephan Peijnik for the patch. Closes #118.
* foolscap/sslverify.py: use hashutil instead of the md5 module
* foolscap/vocab.py (hashVocabTable): use hashutil instead of the
sha module
* foolscap/schema.py (PolyConstraint.checkToken): remove unused
code, thanks to Stephan Peijnik for the patch.
* foolscap/test/test_banana.py (VocabTest1.test_table_hashes):
make sure we don't change the pre-agreed vocab tables, or the hash
algorithm that we use to confirm their contents. This is in
preparation for the conditional switch to 'hashlib', from
Stephan's patch in ticket #118
2009-05-18 Stephan Peijnik <[email protected]>
* foolscap/call.py, foolscap/constraint.py, foolscap/eventual.py,
foolscap/observer.py, foolscap/promise.py,
foolscap/reconnector.py, foolscap/remoteinterface.py,
foolscap/slicer.py: Convert all old-style classes to new-style
classes. Should close #96.
* foolscap/reconnector.py, foolscap/referenceable.py,
foolscap/remoteinterface.py: Import each module with a separate
import statement.
2009-05-18 Brian Warner <[email protected]>
* foolscap/test/test_tub.py (TestCertFile.test_tubid): confirm
that we get the TubID right when using a pre-recorded cert. If we
were to accidentally change the TubID-computing hash function in
the future, this test should catch it.
(CERT_DATA): stash the contents of a pre-recorded cert
* bin/flogtool: let 'base' default to abs("."), to help windows and
systems where somebody has managed to copy it to /tmp/flogtool or
/sbin/flogtool . Closes #108.
2009-05-13 Brian Warner <[email protected]>
* foolscap/test/test_call.py (ExamineFailuresMixin): rearrange
code to try and fix a weird py2.4 failure
* foolscap/api.py (RemoteException): hush pyflakes
2009-05-12 Brian Warner <[email protected]>
* foolscap/logging/dumper.py: emit PID and embedded versions,
except when using --just-numbers or --verbose. Closes #97.
* foolscap/logging/web.py (Welcome.render): same
* foolscap/logging/log.py (LogFileObserver): store app_versions in
the log file created by $FLOGFILE
* foolscap/test/test_logging.py: test it all
* foolscap/tokens.py (RemoteException): add a Tub option that
causes remote exceptions to be reported with a special exception
type, named foolscap.api.RemoteException, so that they won't
be confused with locally-generated exceptions. Closes #105.
* foolscap/api.py: make RemoteException available through api.py
* doc/failures.xhtml: explain the new option
* foolscap/pb.py (Tub.setOption): handle the new
expose-remote-exception-types option, default remains True to
retain the old behavior
* foolscap/broker.py (Broker.setTub): copy the flag from the Tub
into the Broker
* foolscap/call.py (ErrorUnslicer.receiveClose): wrap exceptions
if the mode says we should
* foolscap/test/test_call.py (Failures): test RemoteException
wrapping
(TubFailures): test setOption() too
* foolscap/test/common.py (ShouldFailMixin.shouldFail.done):
return the Failure for further testing, but wrapped in an array to
avoid triggering the errback
2009-05-11 Brian Warner <[email protected]>
* Makefile (LORE): parameterize "lore" binary
* doc/stylesheet.css: update to new version from Lore
* doc/schema.xhtml: fix mis-nested H3 header, to appease new Lore
2009-05-04 Brian Warner <[email protected]>
* foolscap/api.py: new preferred entry point. Application code
should import symbols from "foolscap.api" instead of directly from
foolscap/__init__.py . Importing from the __init__.py will be
deprecated in the next major release, and removed in the
subsequent one. Addresses #122 (but it won't be closed until we
remove everything from __init__.py).
* foolscap/__init__.py: add comment about preferring foolscap.api
* doc/using-foolscap.xhtml: update examples to use e.g.
"from foolscap.api import Tub"
* doc/listings/*.py: update examples
* foolscap/pb.py (Tub.setLogGathererFURL): allow users to call
both Tub.setOption("log-gatherer-furl") and
Tub.setOption("log-gatherer-furlfile") on the same Tub. Previously
this was disallowed. Also avoid making multiple connections to the
same gatherer. Closes #114.
* foolscap/test/test_logging.py
(Gatherer.test_log_gatherer_furlfile_multiple): test it
* foolscap/test/test_logging.py (Publish.test_logpublisher_catchup):
don't use an absolute delay, since it causes spurious test
failures on slow systems.
* foolscap/logging/web.py (WebViewer.start): put the welcome page
at the root URL, in addition to /welcome . This simplifies the
starting URL. Closes #120.
(Reload.render_POST): make the "Reload Logfile" button point at
the new URL too.
* foolscap/logging/web.py (Welcome.render): display PID of
logfile, if available. This will be present in incident records
that were written out by the original process or gathered by a log
gatherer, in the files written by "flogtool tail --save-to=", and
in the file written by creating an explicit FileLogObserver (such
as done by setting the FLOGFILE environment variable). This should
close #80.
* foolscap/logging/log.py (LogFileObserver): record PID in header
* foolscap/test/test_logging.py (Web.test_basic): test PID
* foolscap/test/test_banana.py (ThereAndBackAgain.test_decimal):
use Decimal("Inf") instead of decimal.Inf, to unbreak python2.6.2
which privatized both Inf and Nan. Thanks to ivank for the patch.
Closes #121.
2008-10-15 Brian Warner <[email protected]>
* misc/*/debian/rules (install/python-foolscap): include
misc/classify_foolscap.py in the debian package, uncompressed, so
it goes into /usr/share/doc/python-foolscap/classify_foolscap.py ,
so you can make a symlink to it from an incident-gatherer.
* misc/classify_foolscap.py (TUBCON_RE): update to match
foolscap-tubconnector messages for both old and new versions of
Foolscap, and for python2.4 and 2.5 .
* foolscap/logging/incident.py (IncidentClassifier): add --verbose
option to 'flogtool classify-incident' to show the trigger
dictionary for any unclassifiable incidents. This is useful when
developing classification functions.