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

pkgcore / snakeoil / 22 / 3
74%
master: 74%

Build:
DEFAULT BRANCH: master
Ran 11 Jun 2014 11:04AM UTC
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

11 Jun 2014 10:56AM UTC coverage: 65.224% (+0.004%) from 65.22%
22.3

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.

2954 of 4529 relevant lines covered (65.22%)

0.65 hits per line

Source Files on job 22.3
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22
  • Travis Job 22.3
  • 45717348 on github
  • Prev Job for on master (#21.3)
  • Next Job for on master (#23.2)
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