Skip to content

Commit a28cb29

Browse files
authored
Merge pull request #866 from deniszh/backport/1.1.x/pr-834_pr-853_pr-859
[1.1.x] set package long description | Remove pidfile on ValueError exception | Add testing for Python 3.8
2 parents f36da0f + f4fe131 commit a28cb29

6 files changed

Lines changed: 36 additions & 13 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ storage
1414
_trial_temp
1515
htmlcov
1616
*.swp
17+
.eggs/
18+
*.egg-info/
19+
lib/twisted/plugins/dropin.cache

.travis.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,31 @@ language: python
33
python: 2.7
44
# sudo is needed to install libboost-python-dev, which is required by pyhash
55
sudo: required
6+
dist: xenial
67

78
matrix:
89
include:
910
- python: pypy
1011
env:
1112
- TOXENV=pypy
12-
- python: 3.4
13-
env:
14-
- TOXENV=py34
1513
- python: 3.5
1614
env:
1715
- TOXENV=py35
1816
- python: 3.6
1917
env:
2018
- TOXENV=py36
2119
- python: 3.7
22-
dist: xenial
2320
sudo: true
2421
env:
2522
- TOXENV=py37
26-
- python: 3.7
27-
dist: xenial
23+
- python: "3.8-dev"
2824
sudo: true
2925
env:
30-
- TOXENV=py37-pyhash
31-
- python: 3.7
32-
dist: xenial
33-
sudo: true
26+
- TOXENV=py38-pyhash
27+
- python: "3.8-dev"
28+
env:
29+
- TOXENV=py38
30+
- python: "3.8-dev"
3431
env:
3532
- TOXENV=lint
3633

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ recursive-include conf/ *
22
recursive-include distro/ *
33
exclude conf/*.conf
44
include LICENSE
5+
include README.md
56
include lib/carbon/amqp0-8.xml
67
include MANIFEST.in

lib/carbon/conf.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ def handleAction(self):
352352
pf.close()
353353
except ValueError:
354354
print("Failed to parse pid from pidfile %s" % pidfile)
355+
pf.close()
356+
try:
357+
print("removing corrupted pidfile %s" % pidfile)
358+
os.unlink(pidfile)
359+
except IOError:
360+
print("Could not remove pidfile %s" % pidfile)
355361
raise SystemExit(1)
356362
except IOError:
357363
print("Could not read pidfile %s" % pidfile)
@@ -377,6 +383,12 @@ def handleAction(self):
377383
pf.close()
378384
except ValueError:
379385
print("Failed to parse pid from pidfile %s" % pidfile)
386+
pf.close()
387+
try:
388+
print("removing corrupted pidfile %s" % pidfile)
389+
os.unlink(pidfile)
390+
except IOError:
391+
print("Could not remove pidfile %s" % pidfile)
380392
raise SystemExit(1)
381393
except IOError:
382394
print("Failed to read pid from %s" % pidfile)
@@ -398,6 +410,12 @@ def handleAction(self):
398410
pf.close()
399411
except ValueError:
400412
print("Failed to parse pid from pidfile %s" % pidfile)
413+
pf.close()
414+
try:
415+
print("removing corrupted pidfile %s" % pidfile)
416+
os.unlink(pidfile)
417+
except IOError:
418+
print("Could not remove pidfile %s" % pidfile)
401419
raise SystemExit(1)
402420
except IOError:
403421
print("Could not read pidfile %s" % pidfile)

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
'distro/redhat/init.d/carbon-aggregator']) ]
7373
install_files += init_scripts
7474

75+
def read(fname):
76+
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
77+
return f.read()
7578

7679
try:
7780
setup(
@@ -82,7 +85,8 @@
8285
author_email='chrismd@gmail.com',
8386
license='Apache Software License 2.0',
8487
description='Backend data caching and persistence daemon for Graphite',
85-
long_description='Backend data caching and persistence daemon for Graphite',
88+
long_description=read('README.md'),
89+
long_description_content_type='text/markdown',
8690
packages=['carbon', 'carbon.aggregator', 'twisted.plugins'],
8791
package_dir={'' : 'lib'},
8892
scripts=glob('bin/*'),
@@ -97,10 +101,10 @@
97101
'Programming Language :: Python :: 2',
98102
'Programming Language :: Python :: 2.7',
99103
'Programming Language :: Python :: 3',
100-
'Programming Language :: Python :: 3.4',
101104
'Programming Language :: Python :: 3.5',
102105
'Programming Language :: Python :: 3.6',
103106
'Programming Language :: Python :: 3.7',
107+
'Programming Language :: Python :: 3.8',
104108
'Programming Language :: Python :: Implementation :: CPython',
105109
'Programming Language :: Python :: Implementation :: PyPy',
106110
),

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27,34,35,36,37,py}{,-pyhash},
3+
py{27,35,36,37,38,py}{,-pyhash},
44
lint,
55
benchmark
66

0 commit comments

Comments
 (0)