Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Found via `codespell -L datas,ser,readd,wont,frameword`
  • Loading branch information
kianmeng committed Oct 29, 2024
1 parent 7bc85b3 commit 6be2c4c
Show file tree
Hide file tree
Showing 31 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ After the upload has finished, check the live pages:

* Automatic reconnection
* Configurable WAMP connecting transports
* WAMP Connection abstration
* WAMP Connection abstraction
* Authentication

**0.10** will get into "maintenance mode" after **0.10.6**. We'll have a maintenance branch for that over some time. The new development will be based on **0.11** (see below).
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Autobahn contains **NVX**, a network accelerator library that provides SIMD acce

.. note:
NVX lives in namespace `autobahn.nvx` and currently requires a x86-86 CPU with at least SSE2 and makes use of SSE4.1 if available. The code is written using vector instrinsics, should compile with both GCC and Clang,and interfaces with Python using CFFI, and hence runs fast on PyPy.
NVX lives in namespace `autobahn.nvx` and currently requires a x86-86 CPU with at least SSE2 and makes use of SSE4.1 if available. The code is written using vector intrinsics, should compile with both GCC and Clang,and interfaces with Python using CFFI, and hence runs fast on PyPy.
-----

Expand Down
2 changes: 1 addition & 1 deletion autobahn/nvx/_utf8validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int _nvx_utf8vld_validate_table (void* utf8vld, const uint8_t* data, size_t leng
state = 1; \
} \
} else if (state == 1) { \
/* refective state 1 */ \
/* reflective state 1 */ \
} else { \
/* should not arrive here */ \
}
Expand Down
2 changes: 1 addition & 1 deletion autobahn/twisted/wamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def accept(response):
# be applied for every Autobahn/Twisted protocol instance from the factory
transport_factory.setProtocolOptions(**protocol_options)

# supress pointless log noise
# suppress pointless log noise
transport_factory.noisy = False

if endpoint:
Expand Down
8 changes: 4 additions & 4 deletions autobahn/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def generate_token(char_groups: int,
:param chars_per_group: Number of characters per character group (or 1 to return a token with no grouping).
:param chars: Characters to choose from. Default is 27 character subset
of the ISO basic Latin alphabet (see: ``DEFAULT_TOKEN_CHARS``).
:param sep: When separating groups in the token, the separater string.
:param sep: When separating groups in the token, the separator string.
:param lower_case: If ``True``, generate token in lower-case.
:returns: The generated token.
Expand Down Expand Up @@ -751,7 +751,7 @@ class ObservableMixin(object):
# be a lot easier to deal with here. Having an __init__ method
# with a "mix in" style class can be fragile and error-prone,
# especially if it takes arguments. Since we don't use the
# "parent" beavior anywhere, I didn't add a .set_parent() (yet?)
# "parent" behavior anywhere, I didn't add a .set_parent() (yet?)

# these are class-level globals; individual instances are
# initialized as-needed (e.g. the first .on() call adds a
Expand Down Expand Up @@ -789,7 +789,7 @@ def on(self, event, handler):
:param event: the name of the event
:param handler: a callable thats invoked when .fire() is
:param handler: a callable that's invoked when .fire() is
called for this events. Arguments will be whatever are given
to .fire()
"""
Expand All @@ -816,7 +816,7 @@ def off(self, event=None, handler=None):
# maybe this should mean "remove the given handler
# from any event at all that contains it"...?
raise RuntimeError(
"Can't specificy a specific handler without an event"
"Can't specify a specific handler without an event"
)
self._listeners = dict()
else:
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def failed(self):
"""
Mark this transport as failed, meaning we won't try to connect to
it any longer (that is: can_reconnect() will always return
False afer calling this).
False after calling this).
"""
self._permanent_failure = True

Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ApplicationError(Error):

PAYLOAD_SIZE_EXCEEDED = "wamp.error.payload_size_exceeded"
"""
The application payload could not be transported becuase the serialized/framed payload
The application payload could not be transported because the serialized/framed payload
exceeds the transport limits.
"""

Expand Down Expand Up @@ -144,7 +144,7 @@ class ApplicationError(Error):

NO_SUCH_SESSION = "wamp.error.no_such_session"
"""
A router could not perform an operation, since a session ID specified was non-existant.
A router could not perform an operation, since a session ID specified was non-existent.
"""

INVALID_ARGUMENT = "wamp.error.invalid_argument"
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/flatbuffers/pubsub.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ table Event
// When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
enc_key: [uint8];

// The WAMP session ID of the pubisher. Only filled when the publisher is disclosed.
// The WAMP session ID of the publisher. Only filled when the publisher is disclosed.
publisher: uint64;

// The WAMP authrole of the publisher. Only filled when publisher is disclosed.
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def onUserError(self, fail, msg):
current stack-trace and then error-message to stdout.
ApplicationSession-derived objects may override this to
provide logging if they prefer. The Twisted implemention does
provide logging if they prefer. The Twisted implementation does
this. (See :class:`autobahn.twisted.wamp.ApplicationSession`)
:param fail: The failure that occurred.
Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ def __init__(self,
assert(retain is None or type(retain) == bool)
assert(transaction_hash is None or type(transaction_hash) == str)

# publisher exlusion and black-/whitelisting
# publisher exclusion and black-/whitelisting
assert(exclude_me is None or type(exclude_me) == bool)

assert(exclude is None or type(exclude) == list)
Expand Down Expand Up @@ -1930,7 +1930,7 @@ def __init__(self,
self._payload = payload
self._acknowledge = acknowledge

# publisher exlusion and black-/whitelisting
# publisher exclusion and black-/whitelisting
self._exclude_me = exclude_me
self._exclude = exclude
self._exclude_authid = exclude_authid
Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _exception_from_message(self, msg):
else:
exc = exception.ApplicationError(msg.error)

# FIXME: cleanup and integate into ctors above
# FIXME: cleanup and integrate into ctors above
if hasattr(exc, 'enc_algo'):
exc.enc_algo = msg.enc_algo
if hasattr(exc, 'callee'):
Expand Down Expand Up @@ -1237,7 +1237,7 @@ def error(err):
reg = self._registrations[msg.registration]
except KeyError:
raise ProtocolError(
"UNREGISTERED received for non-existant registration"
"UNREGISTERED received for non-existent registration"
" ID {0}".format(msg.registration)
)
self.log.debug(
Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/test/test_wamp_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def errback(fail):
self.assertEqual(1, len(got_errors))
# ...now let the async errback continue by completing the
# Deferred we returned in our errback (could be fail or
# success, shoudln't matter)
# success, shouldn't matter)
error_d.callback(None)

# ensure we (now) get our errback
Expand Down Expand Up @@ -666,7 +666,7 @@ def test_unregister_no_such_registration(self):
message.Unregister(0, 1234)
)
self.assertIn(
"UNREGISTERED received for non-existant registration",
"UNREGISTERED received for non-existent registration",
str(ctx.exception)
)

Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/test/test_wamp_user_handler_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_on_join(self):
session.onJoin = exception_raiser(exception)
msg = create_mock_welcome()

# give the sesion a WELCOME, from which it should call onJoin
# give the session a WELCOME, from which it should call onJoin
session.onMessage(msg)

# make sure we got the right error out of onUserError
Expand All @@ -133,7 +133,7 @@ def test_on_join_deferred(self):
session.onJoin = async_exception_raiser(exception)
msg = create_mock_welcome()

# give the sesion a WELCOME, from which it should call onJoin
# give the session a WELCOME, from which it should call onJoin
session.onMessage(msg)

# make sure we got the right error out of onUserError
Expand Down
2 changes: 1 addition & 1 deletion autobahn/websocket/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ def onFrameData(self, payload):
compressedLen = len(payload)
self.log.debug(
"RX compressed [length]: octets",
legnth=compressedLen,
length=compressedLen,
octets=_LazyHexFormatter(payload),
)

Expand Down
2 changes: 1 addition & 1 deletion autobahn/websocket/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, host=None, port=None, resource=None, headers=None, useragent=
:param int port: the port to present to the server
:param str resouce:
:param str resource:
:param headers: extra HTTP headers to send in the opening handshake
:type headers: dict
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ async def _do_market_realm(self, details):
# buyer/seller (payment/paying) channel
channel_type = self.config.extra['channel_type']

# the delgate allowed to use the channel
# the delegate allowed to use the channel
delegate = self.config.extra['delegate']

# amount of market coins for initial channel balance
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def convert(self, value, param, ctx):
value = web3.Web3.toChecksumAddress(value)
adr = binascii.a2b_hex(value[2:])
if len(value) != 20:
raise ValueError('Ethereum addres must be 20 bytes (160 bit), but was {} bytes'.format(len(adr)))
raise ValueError('Ethereum address must be 20 bytes (160 bit), but was {} bytes'.format(len(adr)))
except Exception as e:
self.fail(style_error(str(e)))
else:
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def parse_derivation_path(str_derivation_path):


def mnemonic_to_private_key(mnemonic, str_derivation_path=LEDGER_ETH_DERIVATION_PATH, passphrase=""):
""" Performs all convertions to get a private key from a mnemonic sentence, including:
""" Performs all conversions to get a private key from a mnemonic sentence, including:
BIP39 mnemonic to seed
BIP32 seed to master key
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_seller.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def close_channel(self, market_maker_adr, channel_oid, channel_seq, channel_bala

def sell(self, market_maker_adr, buyer_pubkey, key_id, channel_oid, channel_seq, amount, balance, signature, details=None):
"""
Called by a XBR Market Maker to buy a data encyption key. The XBR Market Maker here is
Called by a XBR Market Maker to buy a data encryption key. The XBR Market Maker here is
acting for (triggered by) the XBR buyer delegate.
:param market_maker_adr: The market maker Ethereum address. The technical buyer is usually the
Expand Down
4 changes: 2 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ Changelog
18.9.1
------

* new: Interrupt has Options.reason to signal detailed origin of call cancelation (active cancel vs passive timeout)
* new: Interrupt has Options.reason to signal detailed origin of call cancellation (active cancel vs passive timeout)
* fix: Cancel and Interrupt gets ``"killnowait"`` mode
* new: Cancel and Interrupt no longer have ``ABORT/"abort"``

Expand Down Expand Up @@ -786,7 +786,7 @@ Changelog
* new: support new UBJSON WAMP serialization format
* new: publish universal wheels
* fix: replaced `msgpack-python` with `u-msgpack-python`
* fix: some glitches with `eligible / exlude` when used with `authid / authrole`
* fix: some glitches with `eligible / exclude` when used with `authid / authrole`
* fix: some logging glitches
* fix: pin Twisted at 16.1.1 (for now)

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/autobahn.asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Autobahn asyncio specific classes. These are used when asyncio is run as the und
Component
---------

The component API provides a high-level funcional style method of defining and running WAMP components including authentication configuration
The component API provides a high-level functional style method of defining and running WAMP components including authentication configuration

.. autoclass:: autobahn.asyncio.component.Component
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/autobahn.twisted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Autobahn Twisted specific classes. These are used when Twisted is run as the und
Component
---------

The component API provides a high-level funcional style method of defining and running WAMP components including authentication configuration
The component API provides a high-level functional style method of defining and running WAMP components including authentication configuration

.. autoclass:: autobahn.twisted.component.Component
:members:
Expand Down
6 changes: 3 additions & 3 deletions docs/wamp/programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Many of the examples in this documentation use a decorator style with fixed, sta

It is important to remember that :class:`Component` handles re-connection -- this implies there are times when your component is **not** connected. The `on_join` handlers are run whenever a fresh WAMP session is started, so this is the appropriate way to hook in "initialization"-style code (`on_leave` is where "un-initialization" code goes). Note that each new WAMP session will use a new instance of :class:`ApplicationSession`.

Here's a slightly more complex example that is a small `Klein`_ Web application that publishes to a WAMP session when a certian URL is requested (note that the Crossbario.io router supports `various REST-style integrations <https://crossbar.io/docs/HTTP-Bridge/>`_ already). Using a similar pattern, you could tie together two or more :class:`Component` instances (even connecting to two or more *different* WAMP routers).
Here's a slightly more complex example that is a small `Klein`_ Web application that publishes to a WAMP session when a certain URL is requested (note that the Crossbario.io router supports `various REST-style integrations <https://crossbar.io/docs/HTTP-Bridge/>`_ already). Using a similar pattern, you could tie together two or more :class:`Component` instances (even connecting to two or more *different* WAMP routers).

.. _Klein: https://github.com/twisted/klein

Expand Down Expand Up @@ -438,7 +438,7 @@ A *Publisher* publishes events to topics by providing the topic URI and any payl

*Subscribers* subscribe to topics they are interested in with *Brokers*. *Publishers* initiate publication first at a *Broker*. *Brokers* route events incoming from *Publishers* to *Subscribers* that are subscribed to respective topics.

The *Publisher* and *Subscriber* will usually run application code, while the *Broker* works as a generic router for events thus decoupling *Publishers* from *Subscribers*. That is, there can be many *Subscribers* written in different languages on different machines which can all receive a single event published by an independant *Publisher*.
The *Publisher* and *Subscriber* will usually run application code, while the *Broker* works as a generic router for events thus decoupling *Publishers* from *Subscribers*. That is, there can be many *Subscribers* written in different languages on different machines which can all receive a single event published by an independent *Publisher*.


.. _subscribing-to-topics:
Expand Down Expand Up @@ -655,7 +655,7 @@ Before any logging happens of course you must activate the logging system. There

If you have instead got your own log-starting code (e.g. ``twistd``) or Twisted/asyncio specific log handlers (``logging.Handler`` subclass on asyncio and ``ILogObserver`` implementer under Twisted) then you will still get |Ab| and `Crossbar`_ messages. Probably the formatting will be slightly different from what ``txaio.start_logging`` provides. In either case, **do not depend on the formatting** of the messages e.g. by "screen-scraping" the logs.

We very much **recommend using the ``txaio.start_logging()`` method** of activating the logging system, as we've gone to pains to ensure that over-level logs are a "no-op" and incur minimal runtime cost. We achieve this by re-binding all out-of-scope methods on any logger created by ``txaio.make_logger()`` to a do-nothing function (by saving weak-refs of all the loggers created); at least on `PyPy`_ this is very well optimized out. This allows us to be generous with ``.debug()`` or ``.trace()`` calls without incurring very much overhead. Your Milage May Vary using other methods. If you haven't called ``txaio.start_logging()`` this optimization is not activated.
We very much **recommend using the ``txaio.start_logging()`` method** of activating the logging system, as we've gone to pains to ensure that over-level logs are a "no-op" and incur minimal runtime cost. We achieve this by re-binding all out-of-scope methods on any logger created by ``txaio.make_logger()`` to a do-nothing function (by saving weak-refs of all the loggers created); at least on `PyPy`_ this is very well optimized out. This allows us to be generous with ``.debug()`` or ``.trace()`` calls without incurring very much overhead. Your Mileage May Vary using other methods. If you haven't called ``txaio.start_logging()`` this optimization is not activated.


Upgrading
Expand Down
8 changes: 4 additions & 4 deletions docs/work/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* performance (passthrough of app payloads, general zero copy)
* support end-to-end encryption
* carrying proprietory binary payloads (MQTT)
* carrying proprietary binary payloads (MQTT)
* strict static typing of interfaces

---
Expand Down Expand Up @@ -44,13 +44,13 @@ The approach taken (**XX**) allows for a number of useful features:

1. flexible support of popular dynamically typed serializers, namely: JSON, MsgPack, CBOR and UBJSON
2. allow arbitrary adhoc extensibility (as the router basically does not care about new app payloads)
3. transparantly translate the *application payload* between serialization formats used by different clients connected at the same time.
3. transparently translate the *application payload* between serialization formats used by different clients connected at the same time.
4. support optional router side application payload validation: both static, and dynamic (calling into user supplied payload validators)

However, a number of downsides have become apparent as well:

1. resource consumption: serialization/deserialization can eat significant chunks of CPU, and produce GC pressure
2. legacy (MQTT) and proprietory payloads that should simply be transported "as is" (passthrough, without ever touching)
2. legacy (MQTT) and proprietary payloads that should simply be transported "as is" (passthrough, without ever touching)
3. as apps and systems get larger and more complex, the dynamic typing flexibility turns into a major problem: **the internal and external interfaces and APIs in a microservices based application must be relied upon and their evolution actively managed**

The latter does not mean an "either or" question. You can have important base APIs and external interfaces defined rigorously, using static, strict typing discipline, while at the same time have other parts of your system evolve more freely, basically allowing weakly and dynamically typed data exchange - for limited areas.
Expand All @@ -60,7 +60,7 @@ The latter does not mean an "either or" question. You can have important base AP

### Payload Transparency Mode

**Payload Transparancy Mode (PTM)** adds a 4th application payload variant to above **XX**
**Payload Transparency Mode (PTM)** adds a 4th application payload variant to above **XX**

4. `[CALL, Request|id, Options|dict, Procedure|uri, Payload|binary]`

Expand Down
2 changes: 1 addition & 1 deletion docs/work/apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WAMP Application
Introduction
------------

Flask-like syntaxe for WAMP projects.
Flask-like syntax for WAMP projects.

This is intended to make it easier to start with autobahn/crossbar.io
and abstract a lot of things : you don't have to think about the main
Expand Down
Loading

0 comments on commit 6be2c4c

Please sign in to comment.