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

pkgcore / snakeoil / 22
74%

Build:
DEFAULT BRANCH: master
Ran 11 Jun 2014 11:04AM UTC
Jobs 3
Files 46
Run time 1min
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

pending completion
22

push

travis-ci

radhermit
refactor(demandload): use subclassed method for demandload replace_func

Subclass Placeholder and use the '_replace_func' method instead of using
an external callable passed to Placeholder to substitute values in
scope.

This fixes the issue where demand_compile_regexp must import re in order
to hand re.compile to partial since that's now done when the
_replace_func method is called on first usage of the regex.

In addition, this fixes a subtle race issue under threaded conditions
most often seen when using `pmaint regen`. Specifically, sometimes
context switching between threads occurs at inopportune times when the
'_parse_EAPI_RE' regex (from pkgcore.ebuild.ebuild_src) compiled on
demand using demand_compile_regexp is used during regeneration to get
the parsed EAPI from the ebuild source.

What seems to occur is that the tuple of '(args, kwargs)' set as the
initial value for '_replace_func' when RegexPlaceholder is instantiated
gets replaced by the curried re.compile function and then a thread
switch or similar occurs and causes the following line from the
'_replace' method in RegexPlaceholder to be run again in the same
thread context somehow:

args, kwargs = object.__getattribute__(self, '_replace_func')

This raises a TypeError since it's now trying to iterate over a curried
function which isn't iterable.

This new code avoids the issue by encapsulating all the specific data
structure traversals within the subclassed '_replace_func' methods and
uses the same structures for all calls so types don't change
unexpectedly between context switches.

3380 of 4939 relevant lines covered (68.43%)

1.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22.1 11 Jun 2014 11:05AM UTC 0
62.56
Travis Job 22.1
2 22.2 11 Jun 2014 11:04AM UTC 0
65.2
Travis Job 22.2
3 22.3 11 Jun 2014 11:04AM UTC 0
65.22
Travis Job 22.3
Source Files on build 22
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #22
  • 45717348 on github
  • Prev Build on master (#21)
  • Next Build on master (#23)
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