Merge branch '3.7-dev'
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 25ea712..82cce55 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -42,6 +42,7 @@
 [[release-3-7-2]]
 === TinkerPop 3.7.2 (NOT OFFICIALLY RELEASED YET)
 
+* Deprecated `ltrim()` and `rTrim()` in favor of `l_trim()` and `r_trim` in Python.
 
 [[release-3-7-1]]
 === TinkerPop 3.7.1 (November 20, 2023)
@@ -73,6 +74,7 @@
 * Fixed bug in `union()` as a start step where the `Path` was including the starting dummy traverser.
 * Moved some TinkerGraph specific transaction tests from `TransactionMultiThreadedTest` to `TinkerTransactionGraphTest`
 * Fixed incorrect read operations in some cases for `TinkerTransactionGraph`.
+* Updated JavaScript tests to check equality on only id and class when comparing elements for consistency with other GLVs.
 * Improved performance for Element comparison by comparing hashCode() prior to doing more expensive checks.
 
 ==== Bugs
diff --git a/LICENSE b/LICENSE
index 47708b1..56d9bf7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -210,5 +210,6 @@
      bootstrap 5.0.0 (http://getbootstrap.com/) - for details, see licenses/bootstrap
      jquery 1.11.0 (https://jquery.com/) - for details, see licenses/jquery
      normalize.css 2.1.2 (https://necolas.github.io/normalize.css/) - for details, see licenses/normalize
-     prism.css/js 1.27.0 (https://prismjs.com) - for details, see licenses/prism
-     wow.js 1.1.2 (https://wowjs.uk/) - for details, see licenses/wow
\ No newline at end of file
+     prism.css/js 1.27.0 (https://prismjs.com/) - for details, see licenses/prism
+     wow.js 1.1.2 (https://wowjs.uk/) - for details, see licenses/wow
+     chai 5.0.0 (https://www.chaijs.com/) - for details, see licenses/chai
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/LICENSE b/gremlin-javascript/src/main/javascript/gremlin-javascript/LICENSE
index 7a4a3ea..1a1a07d 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/LICENSE
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/LICENSE
@@ -199,4 +199,12 @@
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
-   limitations under the License.
\ No newline at end of file
+   limitations under the License.
+
+   ========================================================================
+   MIT Licenses
+   ========================================================================
+
+   The Apache TinkerPop project bundles the following components under the MIT License:
+
+        chai 5.0.0 (https://www.chaijs.com/) - for details, see licenses/chai
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/licenses/chai b/gremlin-javascript/src/main/javascript/gremlin-javascript/licenses/chai
new file mode 100644
index 0000000..eedbe23
--- /dev/null
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/licenses/chai
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Chai.js Assertion Library
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/element-comparison.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/element-comparison.js
new file mode 100644
index 0000000..7f60f47
--- /dev/null
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/element-comparison.js
@@ -0,0 +1,123 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/*
+ * Portions of this code are based on the Chai Assertion Library
+ * at https://www.chaijs.com/, which is licensed under the MIT License.
+ * The functions deepMembersById, flag, and isSubsetOf are adapted from
+ * Chai's source code.
+ * See licenses/chai for full license.
+ */
+
+const chai = require('chai');
+const deepEqual = require('deep-eql');
+const { Edge, Vertex, VertexProperty } = require('../../lib/structure/graph');
+
+function isElement(obj) {
+    return obj instanceof Edge || obj instanceof Vertex || obj instanceof VertexProperty;
+}
+
+const opt = {comparator: compareElements};
+
+function isSubsetOf(subset, superset, cmp, contains, ordered) {
+    if (!contains) {
+        if (subset.length !== superset.length) return false;
+        superset = superset.slice();
+    }
+
+    return subset.every(function(elem, idx) {
+        if (ordered) return cmp ? cmp(elem, superset[idx], opt) : elem === superset[idx];
+
+        if (!cmp) {
+            var matchIdx = superset.indexOf(elem);
+            if (matchIdx === -1) return false;
+
+            // Remove match from superset so not counted twice if duplicate in subset.
+            if (!contains) superset.splice(matchIdx, 1);
+            return true;
+        }
+
+        return superset.some(function(elem2, matchIdx) {
+            if (!cmp(elem, elem2, opt)) return false;
+
+            // Remove match from superset so not counted twice if duplicate in subset.
+            if (!contains) superset.splice(matchIdx, 1);
+            return true;
+        });
+    });
+}
+
+function flag(obj, key, value) {
+    var flags = obj.__flags || (obj.__flags = Object.create(null));
+    if (arguments.length === 3) {
+        flags[key] = value;
+    } else {
+        return flags[key];
+    }
+};
+
+function deepMembersById (subset, msg) {
+    if (msg) flag(this, 'message', msg);
+    var obj = flag(this, 'object')
+        , flagMsg = flag(this, 'message')
+        , ssfi = flag(this, 'ssfi');
+
+    new chai.Assertion(obj, flagMsg, ssfi, true).to.be.an('array');
+    new chai.Assertion(subset, flagMsg, ssfi, true).to.be.an('array');
+
+    var contains = flag(this, 'contains');
+    var ordered = flag(this, 'ordered');
+
+    var subject, failMsg, failNegateMsg;
+
+    if (contains) {
+        subject = ordered ? 'an ordered superset' : 'a superset';
+        failMsg = 'expected #{this} to be ' + subject + ' of #{exp}';
+        failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}';
+    } else {
+        subject = ordered ? 'ordered members' : 'members';
+        failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}';
+        failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}';
+    }
+
+    var cmp = flag(this, 'deep') ? deepEqual : undefined;
+
+    this.assert(
+        isSubsetOf(subset, obj, cmp, contains, ordered)
+        , failMsg
+        , failNegateMsg
+        , subset
+        , obj
+        , true
+    );
+}
+
+function compareElements(a, b) {
+    if (!isElement(a) || !isElement(b)) {
+        return null;
+    } else {
+        return a.constructor === b.constructor && a.id === b.id;
+    }
+}
+
+module.exports = {
+    deepMembersById,
+    compareElements,
+    opt
+}
\ No newline at end of file
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 0a082a9..e0b3e56 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -41,7 +41,7 @@
 const P = traversalModule.P;
 const direction = traversalModule.direction;
 const merge = traversalModule.merge;
-
+const deepMembersById = require('./element-comparison').deepMembersById;
 const parsers = [
   [ 'str\\[(.*)\\]', (stringValue) => stringValue ], //returns the string value as is
   [ 'vp\\[(.+)\\]', toVertexProperty ],
@@ -64,6 +64,12 @@
   [ 'M\\[(.+)\\]', toMerge ]
 ].map(x => [ new RegExp('^' + x[0] + '$'), x[1] ]);
 
+chai.use(function (chai, chaiUtils) {
+  chai.Assertion.overwriteMethod('members', function (_super) {
+    return deepMembersById;
+  });
+});
+
 const ignoreReason = {
   nullKeysInMapNotSupportedWell: "Javascript does not nicely support 'null' as a key in Map instances",
   setNotSupported: "There is no Set support in gremlin-javascript",
@@ -193,7 +199,7 @@
       expect(toCompare(this.result)).to.have.deep.ordered.members(expectedResult);
       break;
     case 'unordered':
-      expect(toCompare(this.result)).to.have.deep.members(expectedResult);
+      expect(toCompare(this.result)).to.have.deep.members(toCompare(expectedResult));
       break;
     case 'of':
       // result is a subset of the expected
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/element-comparison-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/element-comparison-test.js
new file mode 100644
index 0000000..fc459e5
--- /dev/null
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/element-comparison-test.js
@@ -0,0 +1,299 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+const chai = require('chai')
+const { expect } = require('chai');
+const { VertexProperty, Property, Vertex, Edge, Path } = require('../../lib/structure/graph');
+const { deepMembersById, compareElements, opt } = require('../cucumber/element-comparison');
+const deepEqual = require('deep-eql');
+
+chai.use(function (chai, chaiUtils) {
+  chai.Assertion.overwriteMethod('members', function (_super) {
+    return deepMembersById;
+  });
+});
+
+describe('primitives', function () {
+    it('should pass', function () {
+        expect(deepEqual(1, 1, opt)).to.be.true;
+        expect(deepEqual(false, false, opt)).to.be.true;
+        expect(deepEqual(null, null, opt)).to.be.true;
+    });
+
+    it('should fail', function () {
+        expect(deepEqual(1, 2, opt)).to.be.false;
+        expect(deepEqual(true, false, opt)).to.be.false;
+        expect(deepEqual(0, "0", opt)).to.be.false;
+        expect(deepEqual(0, false, opt)).to.be.false;
+        expect(deepEqual(0, null, opt)).to.be.false;
+        expect(deepEqual(false, null, opt)).to.be.false;
+    });
+});
+
+describe('elements', function () {
+    const v1 = new Vertex(1, "dog", undefined);
+    const v2 = new Vertex(1, "cat", undefined);
+    const v3 = new Vertex(2, "cat", undefined);
+
+    const e1 = new Edge(2, v1, "chases", v3, undefined);
+    const e2 = new Edge(3, v1, "chases", v3, undefined);
+    const e3 = new Edge(3, v2, "chases", v3, undefined);
+
+    const vp1 = new VertexProperty(3, "size", "small", undefined);
+    const vp2 = new VertexProperty(3, "size", "large", undefined);
+    const vp3 = new VertexProperty(4, "size", "large", undefined);
+
+    it('should pass with same id, different values', function () {
+        expect(deepEqual(v1, v2, opt)).to.be.true;
+        expect(deepEqual(e2, e3, opt)).to.be.true;
+        expect(deepEqual(vp1, vp2, opt)).to.be.true;
+    });
+
+    it('should fail with different id, same values', function () {
+        expect(deepEqual(v2, v3, opt)).to.be.false;
+        expect(deepEqual(e1, e2, opt)).to.be.false;
+        expect(deepEqual(vp2, vp3, opt)).to.be.false;
+    });
+
+    it('should fail with same id, different type', function () {
+        expect(deepEqual(v3, e1, opt)).to.be.false;
+        expect(deepEqual(e3, vp1, opt)).to.be.false;
+    });
+
+    describe('element arrays', function () {
+        const ea1 = [v1, e2, v3];
+        const ea2 = [v1, e2, v3];
+        const ea3 = [e2, v1, v3];
+        const ea4 = [e2, e2, v3];
+        const ea5 = [v1, e2, v3, vp1];
+
+        it('unordered', function () {
+            expect(ea1).to.have.deep.members(ea2);
+            expect(ea1).to.have.deep.members(ea3);
+            expect(ea1).to.not.have.deep.members(ea4);
+            expect(ea1).to.not.have.deep.members(ea5);
+            expect(ea5).to.not.have.deep.members(ea1);
+        });
+
+        it('ordered', function () {
+            expect(ea1).to.have.deep.ordered.members(ea2);
+            expect(ea1).to.not.have.deep.ordered.members(ea3);
+            expect(ea1).to.not.have.deep.ordered.members(ea4);
+            expect(ea1).to.not.have.deep.ordered.members(ea5);
+            expect(ea5).to.not.have.deep.ordered.members(ea1);
+        });
+
+        it('include', function () {
+            expect(ea1).to.include.deep.members(ea2);
+            expect(ea1).to.include.deep.members(ea3);
+            expect(ea1).to.include.deep.members(ea4);
+            expect(ea1).to.not.include.deep.members(ea5);
+
+            expect(ea2).to.include.deep.members(ea1);
+            expect(ea3).to.include.deep.members(ea1);
+            expect(ea4).to.not.include.deep.members(ea1);
+            expect(ea5).to.include.deep.members(ea1);
+        });
+    });
+});
+
+describe('property', function () {
+    const p1 = new Property("a", "1");
+    const p2 = new Property("a", "1");
+    const p3 = new Property("a", 1);
+    const p4 = new Property(1, 1);
+    const p5 = new Property(1, "a");
+
+    it('should pass only properties that match exactly', function () {
+        expect(deepEqual(p1, p2, opt)).to.be.true;
+        expect(deepEqual(p1, p3, opt)).to.be.false;
+        expect(deepEqual(p1, p4, opt)).to.be.false;
+        expect(deepEqual(p3, p5, opt)).to.be.false;
+    });
+});
+
+describe('arrays', function () {
+    const a1 = [1, 2, 3];
+    const a2 = [1, 2, 3];
+    const a3 = [2, 1, 3];
+    const a4 = [2, 2, 3];
+    const a5 = [1, 2, 3, 4];
+
+    it('unordered', function () {
+        expect(a1).to.have.deep.members(a2);
+        expect(a1).to.have.deep.members(a3);
+        expect(a1).to.not.have.deep.members(a4);
+        expect(a1).to.not.have.deep.members(a5);
+        expect(a5).to.not.have.deep.members(a1);
+    });
+
+    it('ordered', function () {
+        expect(a1).to.have.deep.ordered.members(a2);
+        expect(a1).to.not.have.deep.ordered.members(a3);
+        expect(a1).to.not.have.deep.ordered.members(a4);
+        expect(a1).to.not.have.deep.ordered.members(a5);
+        expect(a5).to.not.have.deep.ordered.members(a1);
+    });
+
+    const a6 = [1, 2, a1];
+    const a7 = [1, a3, 2];
+    const a8 = [1, 2, a5];
+
+    const a9 = [1, a1, a1];
+    const a10 = [1, a1, a3];
+
+    const a11 = [a9]
+    const a12 = [a10]
+
+    it('unordered nested', function () {
+        expect(a6).to.have.not.deep.members(a7); // nested arrays ordered differently don't pass as the same item
+        expect(a6).to.not.have.deep.members(a8);
+        expect(a9).to.not.have.deep.members(a10);
+        expect(a11).to.not.have.deep.members(a12);
+    });
+
+    it('ordered nested', function () {
+        expect(a6).to.have.deep.ordered.members(a6);
+        expect(a6).to.not.have.deep.ordered.members(a7);
+        expect(a6).to.not.have.deep.ordered.members(a8);
+        expect(a9).to.not.have.deep.ordered.members(a10);
+        expect(a10).to.have.deep.ordered.members(a10);
+        expect(a11).to.have.deep.ordered.members(a11);
+        expect(a11).to.not.have.deep.ordered.members(a12);
+    });
+});
+
+describe('map', function () {
+    const m1 = [new Map([
+        ['ripple', [new Vertex(5, 'software', undefined)]],
+        ['peter', [new Vertex(6, 'person', undefined)]],
+        ['vadas', [new Vertex(2, 'person', undefined)]]
+    ])];
+    const m2 = [new Map([
+        ['ripple', [new Vertex(5, 'software', undefined)]],
+        ['peter', [new Vertex(6, 'person', undefined)]]
+    ])];
+    const m3 = [new Map([
+        ['ripple', [new Vertex(5, 'software', undefined)]],
+        ['vadas', [new Vertex(2, 'person', undefined)]],
+        ['peter', [new Vertex(6, 'person', undefined)]]
+    ])];
+    const m4 = [new Map([
+        ['ripple', [new Vertex(5, 'software', undefined)]],
+        ['vadas', [new Vertex(6, 'person', undefined)]],
+        ['peter', [new Vertex(2, 'person', undefined)]]
+    ])];
+
+    it('unordered', function () {
+        expect(m1).to.have.deep.members(m1);
+        expect(m1).to.not.have.deep.members(m2);
+        expect(m1).to.have.deep.members(m3);
+        expect(m1).to.not.have.deep.members(m4);
+    });
+
+    it('ordered', function () {
+        expect(m1).to.have.deep.ordered.members(m1);
+        expect(m1).to.not.have.deep.ordered.members(m2);
+        expect(m1).to.have.deep.ordered.members(m3); // map entries can be unordered
+        expect(m1).to.not.have.deep.ordered.members(m4);
+    });
+});
+
+describe('objects', function () {
+    const obj1 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: { k4: "v4", k5: "v5" }
+    }];
+    const obj2 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: { k4: "v4", k5: "v5" }
+    }];
+    const obj3 = [{
+        k2: "v2",
+        k1: "v1",
+        k3: { k5: "v5", k4: "v4" }
+    }];
+    const obj4 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: { k4: "v4" }
+    }];
+    const obj5 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: { k4: "v5", k5: "v4" }
+    }];
+
+    it('should pass', function () {
+        expect(obj1).to.have.deep.members(obj2); // identical
+        expect(obj1).to.have.deep.members(obj3); // order swapped
+    });
+
+    it('should fail', function () {
+        expect(obj1).to.not.have.deep.members(obj4); // missing nested kvp
+        expect(obj1).to.not.have.deep.members(obj5); // values swapped
+    });
+
+    const obj6 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: [ 1, 2, 3 ]
+    }];
+    const obj7 = [{
+        k3: [ 1, 2, 3 ],
+        k1: "v1",
+        k2: "v2"
+    }];
+    const obj8 = [{
+        k1: "v1",
+        k2: "v2",
+        k3: [ 2, 1, 3 ]
+    }];
+
+    it('unordered', function () {
+        expect(obj6).to.have.deep.members(obj7);
+        expect(obj6).to.not.have.deep.members(obj8);
+    });
+
+    it('ordered', function () {
+        expect(obj6).to.have.deep.ordered.members(obj7); // kvp can be unordered
+        expect(obj6).to.not.have.deep.ordered.members(obj8); // array must be ordered
+    });
+
+    const path1 = new Path(["path"], [new Vertex(1, 'person', undefined),
+                                      new Vertex(2, 'person', undefined)]);
+    const path2 = new Path(["path"], [new Vertex(1, 'person', undefined)]);
+    const path3 = new Path(["path"], [new Vertex(2, 'person', undefined),
+                                      new Vertex(1, 'person', undefined)]);
+
+    it('unordered', function () {
+        expect(deepEqual(path1, path1)).to.be.true;
+        expect(deepEqual(path1, path2)).to.be.false;
+        expect(deepEqual(path1, path3)).to.be.false;
+    });
+
+    it('ordered', function () {
+        expect(deepEqual(path1, path1)).to.be.true;
+        expect(deepEqual(path1, path2)).to.be.false;
+        expect(deepEqual(path1, path3)).to.be.false;
+    });
+
+});
diff --git a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
index 21f1b7e..ff9edae 100644
--- a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
@@ -652,6 +652,10 @@
         self.bytecode.add_step("lTrim", *args)
         return self
 
+    def l_trim(self, *args):
+        self.bytecode.add_step("lTrim", *args)
+        return self
+
     def map(self, *args):
         self.bytecode.add_step("map", *args)
         return self
@@ -834,6 +838,10 @@
         self.bytecode.add_step("rTrim", *args)
         return self
 
+    def r_trim(self, *args):
+        self.bytecode.add_step("rTrim", *args)
+        return self
+
     def sack(self, *args):
         self.bytecode.add_step("sack", *args)
         return self
@@ -1406,7 +1414,15 @@
 
     @classmethod
     def ltrim(cls, *args):
-        return cls.graph_traversal(None, None, Bytecode()).ltrim(*args)
+        warnings.warn(
+            "gremlin_python.process.__.ltrim will be replaced by "
+            "gremlin_python.process.__.l_trim.",
+            DeprecationWarning)
+        return cls.l_trim(*args)
+    
+    @classmethod
+    def l_trim(cls, *args):
+        return cls.graph_traversal(None, None, Bytecode()).l_trim(*args)
 
     @classmethod
     def map(cls, *args):
@@ -1554,7 +1570,15 @@
 
     @classmethod
     def rTrim(cls, *args):
-        return cls.graph_traversal(None, None, Bytecode()).rTrim(*args)
+        warnings.warn(
+            "gremlin_python.process.__.rTrim will be replaced by "
+            "gremlin_python.process.__.r_trim.",
+            DeprecationWarning)
+        return cls.r_trim(*args)
+
+    @classmethod
+    def r_trim(cls, *args):
+        return cls.graph_traversal(None, None, Bytecode()).r_trim(*args)
 
     @classmethod
     def sack(cls, *args):
@@ -2081,7 +2105,11 @@
 
 
 def ltrim(*args):
-    return __.ltrim(*args)
+    return __.l_trim(*args)
+
+
+def l_trim(*args):
+    return __.l_trim(*args)
 
 
 def map(*args):
@@ -2201,7 +2229,11 @@
 
 
 def rTrim(*args):
-    return __.rTrim(*args)
+    return __.r_trim(*args)
+
+
+def r_trim(*args):
+    return __.r_trim(*args)
 
 
 def sack(*args):
@@ -2482,6 +2514,8 @@
 
 statics.add_static('ltrim', ltrim)
 
+statics.add_static('l_trim', l_trim)
+
 statics.add_static('map', map)
 
 statics.add_static('match', match)
@@ -2542,6 +2576,8 @@
 
 statics.add_static('rTrim', rTrim)
 
+statics.add_static('r_trim', r_trim)
+
 statics.add_static('sack', sack)
 
 statics.add_static('sample', sample)
diff --git a/licenses/chai b/licenses/chai
new file mode 100644
index 0000000..eedbe23
--- /dev/null
+++ b/licenses/chai
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Chai.js Assertion Library
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.