From 2144b1856170fcc59abd7acbf2f180d3f1fe0a34 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 30 Nov 2013 17:31:00 -0500 Subject: [PATCH] - the pronoun removal commit. there was only one instance of a standalone gendered pronoun with a gender-neutral subject, but also have replaced all occurences of "his/her", "his or her", etc. The docs have always strived to account for both genders in any non-specific singular pronoun, however recent controversy in the community suggests that a zero-gendered-pronoun policy is probably best going forward. Conflicts: doc/build/changelog/migration_08.rst doc/build/orm/session.rst examples/nested_sets/nested_sets.py --- doc/build/changelog/changelog_02.rst | 2 +- doc/build/orm/session.rst | 2 +- doc/build/orm/tutorial.rst | 27 +++++++++++++++------------ examples/beaker_caching/advanced.py | 2 +- examples/nested_sets/nested_sets.py | 7 ++++--- test/orm/test_assorted_eager.py | 4 ++-- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/doc/build/changelog/changelog_02.rst b/doc/build/changelog/changelog_02.rst index a2b0ab10bd..d85d57fdf6 100644 --- a/doc/build/changelog/changelog_02.rst +++ b/doc/build/changelog/changelog_02.rst @@ -203,7 +203,7 @@ turned on for individual table, schema, and column identifiers when used in all queries/creates/drops. Enabled via "quote=True" in Table or Column, as well as "quote_schema=True" in Table. Thanks to - Aaron Spike for his excellent efforts. + Aaron Spike for the excellent efforts. .. change:: :tags: diff --git a/doc/build/orm/session.rst b/doc/build/orm/session.rst index c02842396f..b1b7ab5b9c 100644 --- a/doc/build/orm/session.rst +++ b/doc/build/orm/session.rst @@ -243,7 +243,7 @@ Session Frequently Asked Questions and **session scope**. The implication here is that the SQLAlchemy ORM is encouraging the - developer to establish these two scopes in his or her application, + developer to establish these two scopes in their application, including not only when the scopes begin and end, but also the expanse of those scopes, for example should a single :class:`.Session` instance be local to the execution flow within a diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst index a1990b39ab..29765a76a7 100644 --- a/doc/build/orm/tutorial.rst +++ b/doc/build/orm/tutorial.rst @@ -424,7 +424,7 @@ We can add more ``User`` objects at once using ... User('mary', 'Mary Contrary', 'xxg527'), ... User('fred', 'Fred Flinstone', 'blah')]) -Also, Ed has already decided his password isn't too secure, so lets change it: +Also, we've decided the password for Ed isn't too secure, so lets change it: .. sourcecode:: python+sql @@ -1243,9 +1243,10 @@ using any SQL: >>> jack.addresses[1].user -Let's add and commit ``Jack Bean`` to the database. ``jack`` as well as the -two ``Address`` members in his ``addresses`` collection are both added to the -session at once, using a process known as **cascading**: +Let's add and commit ``Jack Bean`` to the database. ``jack`` as well +as the two ``Address`` members in the corresponding ``addresses`` +collection are both added to the session at once, using a process +known as **cascading**: .. sourcecode:: python+sql @@ -1837,8 +1838,8 @@ including the cascade configuration (we'll leave the constructor out too):: ... def __repr__(self): ... return "" % (self.name, self.fullname, self.password) -Then we recreate ``Address``, noting that in this case we've created the ``Address.user`` relationship -via the ``User`` class already:: +Then we recreate ``Address``, noting that in this case we've created +the ``Address.user`` relationship via the ``User`` class already:: >>> class Address(Base): ... __tablename__ = 'addresses' @@ -1849,9 +1850,10 @@ via the ``User`` class already:: ... def __repr__(self): ... return "" % self.email_address -Now when we load Jack (below using :meth:`~.Query.get`, which loads by primary key), -removing an address from his ``addresses`` collection will result in that -``Address`` being deleted: +Now when we load the user ``jack`` (below using :meth:`~.Query.get`, +which loads by primary key), removing an address from the +corresponding ``addresses`` collection will result in that ``Address`` +being deleted: .. sourcecode:: python+sql @@ -1892,7 +1894,8 @@ removing an address from his ``addresses`` collection will result in that ('jack@google.com', 'j25@yahoo.com') {stop}1 -Deleting Jack will delete both Jack and his remaining ``Address``: +Deleting Jack will delete both Jack and the remaining ``Address`` associated +with the user: .. sourcecode:: python+sql @@ -2111,8 +2114,8 @@ keyword string 'firstpost'": ('firstpost',) {stop}[BlogPost("Wendy's Blog Post", 'This is a test', )] -If we want to look up just Wendy's posts, we can tell the query to narrow down -to her as a parent: +If we want to look up posts owned by the user ``wendy``, we can tell +the query to narrow down to that ``User`` object as a parent: .. sourcecode:: python+sql diff --git a/examples/beaker_caching/advanced.py b/examples/beaker_caching/advanced.py index 31beeff6f9..5597a230a4 100644 --- a/examples/beaker_caching/advanced.py +++ b/examples/beaker_caching/advanced.py @@ -23,7 +23,7 @@ def load_name_range(start, end, invalidate=False): The `Person.addresses` collections are also cached. Its basically another level of tuning here, as that particular cache option can be transparently replaced with joinedload(Person.addresses). - The effect is that each Person and his/her Address collection + The effect is that each Person and their Address collection is cached either together or separately, affecting the kind of SQL that emits for unloaded Person objects as well as the distribution of data within the cache. diff --git a/examples/nested_sets/nested_sets.py b/examples/nested_sets/nested_sets.py index e35ea61c37..f4aac4813a 100644 --- a/examples/nested_sets/nested_sets.py +++ b/examples/nested_sets/nested_sets.py @@ -83,14 +83,15 @@ session.commit() print session.query(Employee).all() -# 1. Find an employee and all his/her supervisors, no matter how deep the tree. +# 1. Find an employee and all their supervisors, no matter how deep the tree. ealias = aliased(Employee) print session.query(Employee).\ filter(ealias.left.between(Employee.left, Employee.right)).\ filter(ealias.emp=='Eddie').all() -#2. Find the employee and all his/her subordinates. (This query has a nice symmetry with the first query.) -print session.query(Employee).\ +#2. Find the employee and all their subordinates. +# (This query has a nice symmetry with the first query.) +print(session.query(Employee).\ filter(Employee.left.between(ealias.left, ealias.right)).\ filter(ealias.emp=='Chuck').all() diff --git a/test/orm/test_assorted_eager.py b/test/orm/test_assorted_eager.py index dded00256f..4c30b9882c 100644 --- a/test/orm/test_assorted_eager.py +++ b/test/orm/test_assorted_eager.py @@ -120,8 +120,8 @@ class EagerTest(fixtures.MappedTest): self.tables.categories) # I want to display a list of tests owned by owner 1 - # if someoption is false or he hasn't specified it yet (null) - # but not if he set it to true (example someoption is for hiding) + # if someoption is false or they haven't specified it yet (null) + # but not if they set it to true (example someoption is for hiding) # desired output for owner 1 # test_id, cat_name -- 2.47.2