Skip to content

Commit

Permalink
new: Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
* master: (25 commits)
  new: Check for version incompatibilities during setter, and slight refactor.
  fix: [display plugin] Handle internal exception types. Fixes #118
  chg: Only warn about missing grako when the plugin is used. Fixes #115
  fix: IOError (nor OSError) have a message attr.
  Fix bad frames detection in stats plugin for python3 (#113)
  script exits with 0 status when called with --version/--help (#109)
  Update pytest-runner from 2.12.1 to 3.0 (#108)
  Update sphinx from 1.6.4 to 1.6.5 (#106)
  Update flake8 from 3.4.1 to 3.5.0 (#107)
  Release prep.  !wip
  fix: Reload and process after tag removals, fixes #102. (PR #103)
  pep doc strings.  !wip
  Update nicfit.py from 0.6.5 to 0.6.6 (#100)
  Update pyaml from 17.8.0 to 17.10.0 (#99)
  pep8 !wip
  Update pytest from 3.2.2 to 3.2.3 (#98)
  Update tox from 2.9.0 to 2.9.1 (#97)
  Update tox from 2.8.2 to 2.9.0 (#96)
  Update pip-tools from 1.9.0 to 1.10.1 (#95)
  Update sphinx from 1.6.3 to 1.6.4 (#93)
  ...
  • Loading branch information
nicfit committed Nov 4, 2017
2 parents 0513b18 + d7f1711 commit 1e3de10
Show file tree
Hide file tree
Showing 21 changed files with 308 additions and 123 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: python

python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "3.5"
- "3.4"
- "3.3"
- "pypy"
- "pypy3"
- "3.7-dev"

Expand Down
3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Authors
-------

eyeD3 is written and maintained by:

* Travis Shirk <travis@pobox.com>
* nicfit <travis@pobox.com>

Expand Down Expand Up @@ -34,3 +34,4 @@ and has been contributed to by (ordered by date of first contribution):
* grun <grunseid@gmail.com>
* pyup.io bot <github-bot@pyup.io>
* pyup-bot <github-bot@pyup.io>
* Chris Newton <redshodan@gmail.com>
30 changes: 30 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@ Release History

.. :changelog:
v0.8.3 (2017-10-22) : So Alone
-------------------------------

Fix
~~~
- Reload and process after tag removals, fixes #102. (PR #103)
- Display incorrectly encoded strings (usually filenames)

Other
~~~~~
- Make the classic output span the actual width of the tty so you can
see the actual path with a long file name. (#92) <redshodan@gmail.com>


v0.8.2 (2017-09-23) : Standing At the Station
----------------------------------------------

New
~~~
- Pypy and pypy3 support.

Changes
~~~~~~~
- 'nose' is no longer used/required for testing.

Fix
~~~
- Fix for Unicode paths when using Python2. Fixes #56.


v0.8.1 (2017-08-26) : I Can't Talk To You
------------------------------------------

Expand Down
6 changes: 1 addition & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@

# -- Options for HTML output -------------------------------------------

on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
html_theme = 'default'
else:
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand Down
13 changes: 8 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
Sphinx==1.6.3
Sphinx==1.6.5
check-manifest==0.35
cogapp==2.5.1
flake8==3.4.1
flake8==3.5.0
git+https://github.com/nicfit/gitchangelog.git
hg+https://nicfit@bitbucket.org/nicfit/sphinxcontrib-bitbucket
ipdb==0.10.3
nicfit.py[cookiecutter]==0.6.5
nicfit.py[cookiecutter]==0.6.6
paver==1.2.4
pip-tools==1.9.0
pip-tools==1.10.1
pss==1.41
pyaml==17.10.0
sphinx-issues==0.3.1
sphinx_rtd_theme==0.2.4
sphinxcontrib-paverutils==1.16.0
tox==2.8.2
tox==2.9.1
twine==1.9.1
wheel==0.30.0
3 changes: 3 additions & 0 deletions requirements/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ test_py33:
dev:
- nicfit.py[cookiecutter]
- Sphinx
- sphinx_rtd_theme
- check-manifest
- flake8
- git+https://github.com/nicfit/gitchangelog.git
Expand All @@ -27,6 +28,8 @@ dev:
- tox
- twine
- wheel
- pyaml
- pss
- sphinx-issues
# Upstream PR: https://bitbucket.org/dhellmann/sphinxcontrib-bitbucket/pull-requests/1/use-setuptools-over-distribute-python3/diff
#- sphinxcontrib-bitbucket
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
factory-boy==2.9.2
pytest==3.2.2
pytest==3.2.3
pytest-cov==2.5.1
pytest-runner==2.12.1
pytest-runner==3.0
2 changes: 1 addition & 1 deletion src/eyed3/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __parse_version(v): # pragma: nocover


__version__ = "0.9a0"
__release_name__ = "I Can't Talk To You"
__release_name__ = ""
__years__ = "2002-2017"

_, __release__, __version_info__ = __parse_version(__version__)
Expand Down
4 changes: 2 additions & 2 deletions src/eyed3/id3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def isValidVersion(v, fully_qualified=False):


def normalizeVersion(v):
'''If version tuple ``v`` is of the non-specific type (v1 or v2, any, etc.)
a fully qualified version is returned.'''
"""If version tuple ``v`` is of the non-specific type (v1 or v2, any, etc.)
a fully qualified version is returned."""
if v == ID3_V1:
v = ID3_V1_1
elif v == ID3_V2:
Expand Down
50 changes: 25 additions & 25 deletions src/eyed3/id3/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ def encoding(self, enc):


class TextFrame(Frame):
'''Text frames.
"""Text frames.
Data string format: encoding (one byte) + text
'''
"""
@requireUnicode("text")
def __init__(self, id, text=None):
super(TextFrame, self).__init__(id)
Expand Down Expand Up @@ -298,8 +298,8 @@ def description(self, txt):
self._description = txt

def parse(self, data, frame_header):
'''Data string format:
encoding (one byte) + description + b"\x00" + text '''
"""Data string format:
encoding (one byte) + description + b"\x00" + text """
# Calling Frame, not TextFrame implementation here since TextFrame
# does not know about description
Frame.parse(self, data, frame_header)
Expand Down Expand Up @@ -403,10 +403,10 @@ def render(self):


class UserUrlFrame(UrlFrame):
'''
"""
Data string format:
encoding (one byte) + description + b"\x00" + url (ascii)
'''
"""
@requireUnicode("description")
def __init__(self, id=USERURL_FID, description=u"", url=b""):
UrlFrame.__init__(self, id, url=url)
Expand Down Expand Up @@ -755,7 +755,7 @@ def filename(self, txt):
self._filename = txt

def parse(self, data, frame_header):
'''Parse the frame from ``data`` bytes using details from
"""Parse the frame from ``data`` bytes using details from
``frame_header``.
Data string format:
Expand All @@ -765,7 +765,7 @@ def parse(self, data, frame_header):
Filename <text string according to encoding> $00 (00)
Content description <text string according to encoding> $00 (00)
Encapsulated object <binary data>
'''
"""
super(ObjectFrame, self).parse(data, frame_header)

input = BytesIO(self.data)
Expand Down Expand Up @@ -824,7 +824,7 @@ def render(self):


class PrivateFrame(Frame):
'''PRIV'''
"""PRIV"""

def __init__(self, id=PRIVATE_FID, owner_id=b"", owner_data=b""):
super(PrivateFrame, self).__init__(id)
Expand Down Expand Up @@ -889,13 +889,13 @@ def render(self):


class PopularityFrame(Frame):
'''Frame type for 'POPM' frames; popularity.
"""Frame type for 'POPM' frames; popularity.
Frame format:
<Header for 'Popularimeter', ID: "POPM">
Email to user <text string> $00
Rating $xx
Counter $xx xx xx xx (xx ...)
'''
"""
def __init__(self, id=POPULARITY_FID, email=b"", rating=0, count=0):
super(PopularityFrame, self).__init__(id)
assert(self.id == POPULARITY_FID)
Expand Down Expand Up @@ -980,11 +980,11 @@ def __init__(self, id=UNIQUE_FILE_ID_FID, owner_id=None, uniq_id=None):
self.uniq_id = uniq_id

def parse(self, data, frame_header):
'''
"""
Data format
Owner identifier <text string> $00
Identifier up to 64 bytes binary data>
'''
"""
super(UniqueFileIDFrame, self).parse(data, frame_header)
split_data = self.data.split(b'\x00', 1)
if len(split_data) == 2:
Expand Down Expand Up @@ -1143,7 +1143,7 @@ def render(self):


class TocFrame(Frame):
'''Table of content frame. There may be more than one, but only one may
"""Table of content frame. There may be more than one, but only one may
have the top-level flag set.
Data format:
Expand All @@ -1152,7 +1152,7 @@ class TocFrame(Frame):
Entry count: %xx
Child elem IDs: <string>\x00 (... num entry count)
Description: TIT2 frame (optional)
'''
"""
TOP_LEVEL_FLAG_BIT = 6
ORDERED_FLAG_BIT = 7

Expand Down Expand Up @@ -1227,22 +1227,22 @@ def render(self):


StartEndTuple = namedtuple("StartEndTuple", ["start", "end"])
'''A 2-tuple, with names 'start' and 'end'.'''
"""A 2-tuple, with names 'start' and 'end'."""


class ChapterFrame(Frame):
'''Frame type for chapter/section of the audio file.
"""Frame type for chapter/section of the audio file.
<ID3v2.3 or ID3v2.4 frame header, ID: "CHAP"> (10 bytes)
Element ID <text string> $00
Start time $xx xx xx xx
End time $xx xx xx xx
Start offset $xx xx xx xx
End offset $xx xx xx xx
<Optional embedded sub-frames>
'''
"""

NO_OFFSET = 4294967295
'''No offset value, aka "0xff0xff0xff0xff"'''
"""No offset value, aka '0xff0xff0xff0xff'"""

def __init__(self, id=CHAPTER_FID, element_id=None, times=None,
offsets=None, sub_frames=None):
Expand Down Expand Up @@ -1354,9 +1354,9 @@ def __init__(self):
dict.__init__(self)

def parse(self, f, tag_header, extended_header):
'''Read frames starting from the current read position of the file
"""Read frames starting from the current read position of the file
object. Returns the amount of padding which occurs after the tag, but
before the audio content. A return valule of 0 does not mean error.'''
before the audio content. A return valule of 0 does not mean error."""
self.clear()

padding_size = 0
Expand Down Expand Up @@ -1442,8 +1442,8 @@ def __setitem__(self, fid, frame):
dict.__setitem__(self, fid, [frame])

def getAllFrames(self):
'''Return all the frames in the set as a list. The list is sorted
in an arbitrary but consistent order.'''
"""Return all the frames in the set as a list. The list is sorted
in an arbitrary but consistent order."""
frames = []
for flist in list(self.values()):
frames += flist
Expand All @@ -1453,11 +1453,11 @@ def getAllFrames(self):
@requireBytes(1)
@requireUnicode(2)
def setTextFrame(self, fid, text):
'''Set a text frame value.
"""Set a text frame value.
Text frame IDs must be unique. If a frame with
the same Id is already in the list it's value is changed, otherwise
the frame is added.
'''
"""
assert(fid[0:1] == b"T" and (fid in ID3_FRAMES or
fid in NONSTANDARD_ID3_FRAMES))

Expand Down
Loading

0 comments on commit 1e3de10

Please sign in to comment.