Skip to content

Not working with PynamoDB 4.0.0 #171

@yan12125

Description

@yan12125

With PynamoDB 4.0.0, a test failed:

=================================== FAILURES ===================================
________________________________ test_exception ________________________________

    def test_exception():
        class SampleModel(Model):
            class Meta:
                region = 'us-west-2'
                table_name = 'mytable'
    
            sample_attribute = UnicodeAttribute(hash_key=True)
    
        try:
            SampleModel.describe_table()
        except Exception:
            pass
    
        subsegments = xray_recorder.current_segment().subsegments
>       assert len(subsegments) == 1
E       assert 0 == 1
E         -0
E         +1

tests/ext/pynamodb/test_pynamodb.py:45: AssertionError

I guess the cause is that PynamoDB now uses urllib3 instead of requests: https://github.com/pynamodb/PynamoDB/blob/master/docs/release_notes.rst

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions