Skip to content

Added readinto() method to be more consistant with busdevice.spi. #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 5, 2017

Conversation

mrmcwethy
Copy link
Collaborator

Added warning on read_into() saying it will be deprecated in the future.

I2C & SPI BusDevice readinto/read_into Issue #364

First step is to get this change into the master then start changing libraries that make calls to read_into()

…ed warning on read_into() saying it will be deprecated in the future
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple doc changes. Nothing major.

def read_into(self, buf, **kwargs):
"""
Warning: This method will be deprecated some time in the future.
Please start using readinto() instead. readinto() is functionally
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use backticks around readinto so that sphinx makes it clickable. You can also use .. warning:: to make it called out in a box. http://www.sphinx-doc.org/en/stable/rest.html#directives

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@mrmcwethy
Copy link
Collaborator Author

Scott, i hope this is what you want.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats exactly what I want. Thanks!

@tannewt tannewt merged commit 8a662c5 into adafruit:master Nov 5, 2017
tannewt added a commit to adafruit/adabot that referenced this pull request Nov 21, 2017
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 0.1.0 from e731810:
  > fix .travis.yml
  > add .travis.yml and .gitignore; I2C.read_into -> readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.0 from 1.0.0:
  > Update travis config to use 2.x branch for MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BME280#1 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 2.0.1 from f1e5aa2:
  > Ensure gas property updates reading state.
  > rename fix
  > Update travis config with 2.x branch MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BME680#1 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP280 to 2.0 from 1.0.0:
  > Update travis to use 2.x branch for MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BMP280#2 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 2.0 from 0.1.3:
  > Switch to 2.x branch for MPY generation.
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_CCS811 to 0.0.2 from 0.0.1:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_DS3231 to 2.0.1 from 1.0.0:
  > changed read_into to readinto
  > Add demo example based on PCF8523 guide.
  > Switch to build from circuitpython 2.x branch mpy-cross

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH to 0.1.3 from 0.1.2:
  > busdevice method changed from read_into() to readinto()
  > Optimize the way data in unpacked (adafruit/Adafruit_CircuitPython_LIS3DH#9)
  > added ImportError to except
  >  changed to use struct module instead of ustruct  (adafruit/Adafruit_CircuitPython_LIS3DH#6)
  > Update to upcoming NeoPixel API

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX31855 to 2.0 from 0.1.1:
  > Update .travis.yml
  > changed conditional import for struct and ustruct (adafruit/Adafruit_CircuitPython_MAX31855#2)

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 2.0 from 0.1.1:
  > Update .travis.yml
  > changed read_into to readinto
  > Clarify code indents (adafruit/Adafruit_CircuitPython_MCP9808#2)
  > Minor tidying

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 0.1.2 from 0.1.1:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 0.1.1 from 0.1.0:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI7021 to 2.0 from 0.1.4:
  > Switch travis config to build from 2.0 circuitpython branch.
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_TSL2561 to 2.0 from 51b7cd9:
  > Update travis config to use 2.x branch for MPY generation.
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#6 from caternuson/master
  > fix deploy filename
  > Correct the docs badge
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#3 from caternuson/master
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#2 from caternuson/iss001

Updating https://github.com/adafruit/Adafruit_CircuitPython_VC0706 to 2.0 from 286bd31:
  < Add example with internal filesystem write.

Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 2.0.1 from 0.3.1:
  > remove deprecated method read_into
  > Added readinto() method to be more consistant with busdevice.spi.  (adafruit/Adafruit_CircuitPython_BusDevice#10)

Updating https://github.com/adafruit/Adafruit_CircuitPython_Register to 1.0.3 from 1.0.2:
  > changed read_into to readinto to follow changes in Adafruit_CircuitPython_BusDevice (adafruit/Adafruit_CircuitPython_Register#6)
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 21, 2017
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 0.1.0 from e731810:
  > fix .travis.yml
  > add .travis.yml and .gitignore; I2C.read_into -> readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.0 from 1.0.0:
  > Update travis config to use 2.x branch for MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BME280#1 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 2.0.1 from f1e5aa2:
  > Ensure gas property updates reading state.
  > rename fix
  > Update travis config with 2.x branch MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BME680#1 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP280 to 2.0 from 1.0.0:
  > Update travis to use 2.x branch for MPY generation.
  > changed read_into to readinto
  > Merge pull request adafruit/Adafruit_CircuitPython_BMP280#2 from chickadee-tech/doc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 2.0 from 0.1.3:
  > Switch to 2.x branch for MPY generation.
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_CCS811 to 0.0.2 from 0.0.1:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_DS3231 to 2.0.1 from 1.0.0:
  > changed read_into to readinto
  > Add demo example based on PCF8523 guide.
  > Switch to build from circuitpython 2.x branch mpy-cross

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH to 0.1.3 from 0.1.2:
  > busdevice method changed from read_into() to readinto()
  > Optimize the way data in unpacked (adafruit/Adafruit_CircuitPython_LIS3DH#9)
  > added ImportError to except
  >  changed to use struct module instead of ustruct  (adafruit/Adafruit_CircuitPython_LIS3DH#6)
  > Update to upcoming NeoPixel API

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX31855 to 2.0 from 0.1.1:
  > Update .travis.yml
  > changed conditional import for struct and ustruct (adafruit/Adafruit_CircuitPython_MAX31855#2)

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 2.0 from 0.1.1:
  > Update .travis.yml
  > changed read_into to readinto
  > Clarify code indents (adafruit/Adafruit_CircuitPython_MCP9808#2)
  > Minor tidying

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 0.1.2 from 0.1.1:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 0.1.1 from 0.1.0:
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI7021 to 2.0 from 0.1.4:
  > Switch travis config to build from 2.0 circuitpython branch.
  > changed read_into to readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_TSL2561 to 2.0 from 51b7cd9:
  > Update travis config to use 2.x branch for MPY generation.
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#6 from caternuson/master
  > fix deploy filename
  > Correct the docs badge
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#3 from caternuson/master
  > Merge pull request adafruit/Adafruit_CircuitPython_TSL2561#2 from caternuson/iss001

Updating https://github.com/adafruit/Adafruit_CircuitPython_VC0706 to 2.0 from 286bd31:
  < Add example with internal filesystem write.

Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 2.0.1 from 0.3.1:
  > remove deprecated method read_into
  > Added readinto() method to be more consistant with busdevice.spi.  (adafruit/Adafruit_CircuitPython_BusDevice#10)

Updating https://github.com/adafruit/Adafruit_CircuitPython_Register to 1.0.3 from 1.0.2:
  > changed read_into to readinto to follow changes in Adafruit_CircuitPython_BusDevice (adafruit/Adafruit_CircuitPython_Register#6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants