• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jlafon / PynamoDB / 788 / 3
98%
devel: 98%

Build:
DEFAULT BRANCH: devel
Ran 21 Feb 2017 10:52PM UTC
Files 22
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Feb 2017 10:50PM UTC coverage: 97.552% (+0.001%) from 97.551%
AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id

Pull #234

travis-ci

web-flow
Make sessions threadsafe

I ran into the thread safety issue described here:

https://github.com/jlafon/PynamoDB/issues/153

According to boto3's docs, each thread should have its own session instance:

http://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading

I resolved this by modifying the session property on the connection
class. It makes self._session into a thread local variable, and
attaches a session to self._session.session. The session property still
has the same behavior, but now it's creating a session on a
per-connection-per-thread basis instead of just on a per-thread basis.

This issue was intermittent to begin with, and I hadn't figured out a
way to reliably reproduce it, or I would have written a test. It still
passes PynamoDB's unit tests, and I haven't run into the thread safety
issue described in #153 since I've been running the patched version.
Pull Request #234: Make sessions threadsafe

4821 of 4942 relevant lines covered (97.55%)

0.98 hits per line

Source Files on job 788.3 (AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 788
  • Travis Job 788.3
  • e15a6a57 on github
  • Prev Job for AWS_SECRET_ACCESS_KEY=fake_key AWS_ACCESS_KEY_ID=fake_id on devel (#787.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc