PageRenderTime 29ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/changelog.rst

http://github.com/pycassa/pycassa
ReStructuredText | 933 lines | 715 code | 218 blank | 0 comment | 0 complexity | 8e757b3488b03f3dc0f0d1a8700355f3 MD5 | raw file
Possible License(s): Apache-2.0
  1. Changelog
  2. =========
  3. Changes in Version 1.11.1
  4. -------------------------
  5. Features
  6. ~~~~~~~~
  7. - Add describe_token_map() to SystemManager
  8. Miscellaneous
  9. ~~~~~~~~~~~~~
  10. - Add TimestampType alias for DateType
  11. - Match Cassandra's sorting of TimeUUIDs in stubs
  12. Changes in Version 1.11.0
  13. -------------------------
  14. Features
  15. ~~~~~~~~
  16. - Upgrade Thrift interface to 19.36.1, which adds support for the
  17. ``LOCAL_ONE consistency`` level and the ``populate_io_cache_on_flush``
  18. column family attribute.
  19. Bug Fixes
  20. ~~~~~~~~~
  21. - Return timestamp from ``remove()`` in stub ColumnFamily
  22. Miscellaneous
  23. ~~~~~~~~~~~~~
  24. - Upgrade bundled ``ez_setup.py``
  25. Changes in Version 1.10.0
  26. -------------------------
  27. This release only adds one feature: support for Cassandra
  28. 1.2's atomic batches.
  29. Features
  30. ~~~~~~~~
  31. - Add support for Cassandra 1.2+ atomic batches through a new
  32. ``atomic`` parameter for :class:`.batch.Mutator`,
  33. :class:`.batch.CfMutator`, and :meth:`.ColumnFamily.batch()`.
  34. Changes in Version 1.9.1
  35. ------------------------
  36. This release fixes a few edge cases around connection pooling that
  37. can affect long-running applications. It also adds token range
  38. support to :meth:`.ColumnFamily.get_range()`, which can be useful
  39. for parallelizing full-ring scans.
  40. Features
  41. ~~~~~~~~
  42. - Add token range support to :meth:`.ColumnFamily.get_range()`
  43. Bug Fixes
  44. ~~~~~~~~~
  45. - Prevent possible double connection disposal when recycling connections
  46. - Handle empty strings for IntegerType values
  47. - Prevent closed connections from being returned to the pool.
  48. - Ensure connection count is decremented when pool is disposed
  49. Changes in Version 1.9.0
  50. ------------------------
  51. This release adds a couple of minor new features and improves multithreaded
  52. locking behavior in :class:`~.ConnectionPool`. There should be no
  53. backwards-compatibility concerns.
  54. Features
  55. ~~~~~~~~
  56. - Full support for ``column_start``, ``column_finish``, ``column_count``, and
  57. ``column_reversed`` parameters in :mod:`~.contrib.stubs`
  58. - Addition of an ``include_ttl`` parameter to :class:`~.ColumnFamily` fetching
  59. methods which works like the existing ``include_timestamp`` parameter.
  60. Bug Fixes
  61. ~~~~~~~~~
  62. - Reduce the locked critical section in :class:`~.ConnectionPool`, primarily
  63. to make sure lock aquisition time is not ignored outside of the pool's
  64. ``timeout`` setting.
  65. Changes in Version 1.8.0
  66. ------------------------
  67. This release requires either Python 2.6 or 2.7. Python 2.4 and 2.5
  68. are no longer supported. There are no concrete plans for Python 3
  69. compatibility yet.
  70. Features
  71. ~~~~~~~~
  72. - Add configurable ``socket_factory`` attribute and constructor parameter
  73. to :class:`~.ConnectionPool` and :class:`~.SystemManager`.
  74. - Add SSL support via the new ``socket_factory`` attribute.
  75. - Add support for :class:`~.DynamicCompositeType`
  76. - Add mock support through a new :mod:`pycassa.contrib.stubs` module
  77. Bug Fixes
  78. ~~~~~~~~~
  79. - Don't return closed connections to the pool. This was primarily a
  80. problem when operations failed after retrying up to the limit,
  81. resulting in a :exc:`~.MaximumRetryException` or
  82. :exc:`~.AllServersUnavailable`.
  83. - Set keyspace for connection after logging in instead of before.
  84. This fixes authentication against Cassandra 1.2, which requires
  85. logging in prior to setting a keyspace.
  86. - Specify correct UUID variant when creating v1 :class:`uuid.UUID` objects
  87. from datetimes or timestamps
  88. - Add 900ns to v1 :class:`uuid.UUID` timestamps when the "max" TimeUUID for
  89. a specific datetime or timestamp is requested, such as a
  90. column slice end
  91. - Also look at attributes of parent classes when creating
  92. columns from attributes in :class:`~.ColumnFamilyMap`
  93. Other
  94. ~~~~~
  95. - Upgrade bundled Thrift-generated python to 19.35.0, generated
  96. with Thrift 0.9.0.
  97. Changes in Version 1.7.2
  98. ------------------------
  99. This release fixes a minor bug and upgrades the bundled Cassandra
  100. Thrift client interface to 19.34.0, matching Cassandra 1.2.0-beta1.
  101. This doesn't affect any existing Thrift methods, only adds new ones
  102. (that aren't yet utilized by pycassa), so there should not be any
  103. breakage.
  104. Bug Fixes
  105. ~~~~~~~~~
  106. - Fix single-component composite packing
  107. - Avoid cyclic imports during installation in setup.py
  108. Other
  109. ~~~~~
  110. - Travis CI integration
  111. Changes in Version 1.7.1
  112. ------------------------
  113. This release has few changes, and should make for a smooth upgrade
  114. from 1.7.0.
  115. Features
  116. ~~~~~~~~
  117. - Add support for DecimalType: :class:`~.types.DecimalType`
  118. Bug Fixes
  119. ~~~~~~~~~
  120. - Fix bad slice ends when using :meth:`~.ColumnFamily.xget()` with
  121. composite columns and a `column_finish` parameter
  122. - Fix bad documentation paths in debian packaging scripts
  123. Other
  124. ~~~~~
  125. - Add ``__version__`` and ``__version_info__`` attributes to the
  126. :mod:`pycassa` module
  127. Changes in Version 1.7.0
  128. ------------------------
  129. This release has a few relatively large changes in it: a new
  130. connection pool stats collector, compatibility with Cassandra 0.7
  131. through 1.1, and a change in timezone behavior for datetimes.
  132. Before upgrading, take special care to make sure datetimes that you
  133. pass to pycassa (for TimeUUIDType or DateType data) are in UTC, and
  134. make sure your code expects to get UTC datetimes back in return.
  135. Likewise, the SystemManager changes *should* be backwards compatible,
  136. but there may be minor differences, mostly in
  137. :meth:`~.SystemManager.create_column_family` and
  138. :meth:`~.SystemManager.alter_column_family`. Be sure to test any code
  139. that works programmatically with these.
  140. Features
  141. ~~~~~~~~
  142. - Added :class:`~.StatsLogger` for tracking :class:`~.ConnectionPool`
  143. metrics
  144. - Full Cassandra 1.1 compatibility in :class:`.SystemManager`. To support
  145. this, all column family or keyspace attributes that have existed since
  146. Cassandra 0.7 may be used as keyword arguments for
  147. :meth:`~.SystemManager.create_column_family` and
  148. :meth:`~.SystemManager.alter_column_family`. It is up to the user to
  149. know which attributes are available and valid for their version of
  150. Cassandra.
  151. As part of this change, the version-specific thrift-generated cassandra
  152. modules (``pycassa.cassandra.c07``, ``pycassa.cassandra.c08``, and
  153. ``pycassa.cassandra.c10``) have been replaced by ``pycassa.cassandra``.
  154. A minor related change is that individual connections now
  155. now longer ask for the node's API version, and that information is
  156. no longer stored as an attribute of the :class:`.ConnectionWrapper`.
  157. Bug Fixes
  158. ~~~~~~~~~
  159. - Fix :meth:`~.ColumnFamily.xget()` paging for non-string comparators
  160. - Add :meth:`~.ColumnFamilyMap.batch_insert()` to :class:`.ColumnFamilyMap`
  161. - Use `setattr` instead of directly updating the object's ``__dict__`` in
  162. :class:`.ColumnFamilyMap` to avoid breaking descriptors
  163. - Fix single-column counter increments with :meth:`.ColumnFamily.insert()`
  164. - Include `AuthenticationException` and `AuthorizationException` in
  165. the ``pycassa`` module
  166. - Support counters in :meth:`~.ColumnFamily.xget()`
  167. - Sort column families in pycassaShell for display
  168. - Raise ``TypeError`` when bad keyword arguments are used when creating
  169. a :class:`.ColumnFamily` object
  170. Other
  171. ~~~~~
  172. All ``datetime`` objects create by pycassa now use UTC as their timezone
  173. rather than the local timezone. Likewise, naive ``datetime`` objects that are
  174. passed to pycassa are now assumed to be in UTC time, but ``tz_info`` is respected
  175. if set.
  176. Specifically, the types of data that you may need to make adjustments for
  177. when upgrading are TimeUUIDType and DateType (including OldPycassaDateType
  178. and IntermediateDateType).
  179. Changes in Version 1.6.0
  180. ------------------------
  181. This release adds a few minor features and several important bug fixes.
  182. The most important change to take note of if you are using composite
  183. comparators is the change to the default inclusive/exclusive behavior
  184. for slice ends.
  185. Other than that, this should be a smooth upgrade from 1.5.x.
  186. Features
  187. ~~~~~~~~
  188. - New script for easily building RPM packages
  189. - Add request and parameter information to PoolListener callback
  190. - Add :meth:`.ColumnFamily.xget()`, a generator version of
  191. :meth:`~.ColumnFamily.get()` that automatically pages over columns
  192. in reasonably sized chunks
  193. - Add support for Int32Type, a 4-byte signed integer format
  194. - Add constants for the highest and lowest possible TimeUUID values
  195. to :mod:`pycassa.util`
  196. Bug Fixes
  197. ~~~~~~~~~
  198. - Various 2.4 syntax errors
  199. - Raise :exc:`~.AllServersUnavailable` if ``server_list`` is empty
  200. - Handle custom types inside of composites
  201. - Don't erase ``comment`` when updating column families
  202. - Match Cassandra's sorting of TimeUUIDType values when the timestamps
  203. tie. This could result in some columns being erroneously left off of
  204. the end of column slices when datetime objects or timestamps were used
  205. for ``column_start`` or ``column_finish``
  206. - Use gevent's queue in place of the stdlib version when gevent monkeypatching
  207. has been applied
  208. - Avoid sub-microsecond loss of precision with TimeUUID timestamps when using
  209. :func:`pycassa.util.convert_time_to_uuid`
  210. - Make default slice ends inclusive when using ``CompositeType`` comparator
  211. Previously, the end of the slice was exclusive by default (as was the start
  212. of the slice when ``column_reversed`` was ``True``)
  213. Changes in Version 1.5.1
  214. ------------------------
  215. This release only affects those of you using DateType data,
  216. which has been supported since pycassa 1.2.0. If you are
  217. using DateType, it is **very** important that you read this
  218. closely.
  219. DateType data is internally stored as an 8 byte integer timestamp.
  220. Since version 1.2.0 of pycassa, the timestamp stored has counted
  221. the number of *microseconds* since the unix epoch. The actual
  222. format that Cassandra standardizes on is *milliseconds* since the
  223. epoch.
  224. If you are only using pycassa, you probably won't have noticed any
  225. problems with this. However, if you try to use cassandra-cli,
  226. sstable2json, Hector, or any other client that supports DateType,
  227. DateType data written by pycassa will appear to be far in the future.
  228. Similarly, DateType data written by other clients will appear to
  229. be in the past when loaded by pycassa.
  230. This release changes the default DateType behavior to comply with
  231. the standard, millisecond-based format. **If you use DateType,
  232. and you upgrade to this release without making any modifications,
  233. you will have problems.** Unfortunately, this is a bit of a tricky
  234. situation to resolve, but the appropriate actions to take are detailed
  235. below.
  236. To temporarily continue using the old behavior, a new class
  237. has been created: :class:`pycassa.types.OldPycassaDateType`.
  238. This will read and write DateType data exactly the same as
  239. pycassa 1.2.0 to 1.5.0 did.
  240. If you want to convert your data to the new format, the other
  241. new class, :class:`pycassa.types.IntermediateDateType`, may be useful.
  242. It can read either the new or old format correctly (unless you have
  243. used dates close to 1970 with the new format) and will write only
  244. the new format. The best case for using this is if you have DateType
  245. validated columns that don't have a secondary index on them.
  246. To tell pycassa to use :class:`~.types.OldPycassaDateType` or
  247. :class:`~.types.IntermediateDateType`, use the :class:`~.ColumnFamily`
  248. attributes that control types: :attr:`~.ColumnFamily.column_name_class`,
  249. :attr:`~.ColumnFamily.key_validation_class`,
  250. :attr:`~.ColumnFamily.column_validators`, and so on. Here's an example:
  251. .. code-block:: python
  252. from pycassa.types import OldPycassaDateType, IntermediateDateType
  253. from pycassa.column_family import ColumnFamily
  254. from pycassa.pool import ConnectionPool
  255. pool = ConnectionPool('MyKeyspace', ['192.168.1.1'])
  256. # Our tweet timeline has a comparator_type of DateType
  257. tweet_timeline_cf = ColumnFamily(pool, 'tweets')
  258. tweet_timeline_cf.column_name_class = OldPycassaDateType()
  259. # Our tweet timeline has a comparator_type of DateType
  260. users_cf = ColumnFamily(pool, 'users')
  261. users_cf.column_validators['join_date'] = IntermediateDateType()
  262. If you're using DateType for the `key_validation_class`, column names,
  263. column values with a secondary index on them, or are using the DateType
  264. validated column as a non-indexed part of an index clause with
  265. `get_indexed_slices()` (eg. "where state = 'TX' and join_date > 2012"),
  266. you need to be more careful about the conversion process, and
  267. :class:`~.types.IntermediateDateType` probably isn't a good choice.
  268. In most of cases, if you want to switch to the new date format,
  269. a manual migration script to convert all existing DateType
  270. data to the new format will be needed. In particular, if you
  271. convert keys, column names, or indexed columns on a live data set,
  272. be very careful how you go about it. If you need any assistance or
  273. suggestions at all with migrating your data, please feel free to
  274. send an email to tyler@datastax.com; I would be glad to help.
  275. Changes in Version 1.5.0
  276. ------------------------
  277. The main change to be aware of for this release is the
  278. new no-retry behavior for counter operations. If you have been
  279. maintaining a separate connection pool with retries disabled
  280. for usage with counters, you may discontinue that practice
  281. after upgrading.
  282. Features
  283. ~~~~~~~~
  284. - By default, counter operations will not be retried
  285. automatically. This makes it easier to use a single
  286. connection pool without worrying about overcounting.
  287. Bug Fixes
  288. ~~~~~~~~~
  289. - Don't remove entire row when an empty list is supplied for the
  290. `columns` parameter of :meth:`~ColumnFamily.remove()` or the
  291. batch remove methods.
  292. - Add python-setuptools to debian build dependencies
  293. - Batch :meth:`~.Mutator.remove()` was not removing subcolumns
  294. when the specified supercolumn was 0 or other "falsey" values
  295. - Don't request an extra row when reading fewer than `buffer_size`
  296. rows with :meth:`~.ColumnFamily.get_range()` or
  297. :meth:`~.ColumnFamily.get_indexed_slices()`.
  298. - Remove `pool_type` from logs, which showed up as ``None`` in
  299. recent versions
  300. - Logs were erroneously showing the same server for retries
  301. of failed operations even when the actual server being
  302. queried had changed
  303. Changes in Version 1.4.0
  304. ------------------------
  305. This release is primarily a bugfix release with a couple
  306. of minor features and removed deprecated items.
  307. Features
  308. ~~~~~~~~
  309. - Accept column_validation_classes when creating or altering
  310. column families with SystemManager
  311. - Ignore UNREACHABLE nodes when waiting for schema version
  312. agreement
  313. Bug Fixes
  314. ~~~~~~~~~
  315. - Remove accidental print statement in SystemManager
  316. - Raise TypeError when unexpected types are used for
  317. comparator or validator types when creating or altering
  318. a Column Family
  319. - Fix packing of column values using column-specific validators
  320. during batch inserts when the column name is changed by packing
  321. - Always return timestamps from inserts
  322. - Fix NameError when timestamps are used where a DateType is
  323. expected
  324. - Fix NameError in python 2.4 when unpacking DateType objects
  325. - Handle reading composites with trailing components missing
  326. - Upgrade ez_setup.py to fix broken setuptools link
  327. Removed Deprecated Items
  328. ~~~~~~~~~~~~~~~~~~~~~~~~
  329. - :meth:`pycassa.connect()`
  330. - :meth:`pycassa.connect_thread_local()`
  331. - :meth:`.ConnectionPool.status()`
  332. - :meth:`.ConnectionPool.recreate()`
  333. Changes in Version 1.3.0
  334. ------------------------
  335. This release adds full compatibility with Cassandra 1.0 and
  336. removes support for schema manipulation in Cassandra 0.7.
  337. In this release, schema manipulation should work with Cassandra 0.8
  338. and 1.0, but not 0.7. The data API should continue to work with all
  339. three versions.
  340. Bug Fixes
  341. ~~~~~~~~~
  342. - Don't ignore `columns` parameter in :meth:`.ColumnFamilyMap.insert()`
  343. - Handle empty instance fields in :meth:`.ColumnFamilyMap.insert()`
  344. - Use the same default for `timeout` in :meth:`pycassa.connect()` as
  345. :class:`~.ConnectionPool` uses
  346. - Fix typo which caused a different exception to be thrown when an
  347. :exc:`.AllServersUnavailable` exception was raised
  348. - IPython 0.11 compatibility in pycassaShell
  349. - Correct dependency declaration in :file:`setup.py`
  350. - Add UUIDType to supported types
  351. Features
  352. ~~~~~~~~
  353. - The `filter_empty` parameter was added to
  354. :meth:`~.ColumnFamily.get_range()` with a default of ``True``; this
  355. allows empty rows to be kept if desired
  356. Deprecated
  357. ~~~~~~~~~~
  358. - :meth:`pycassa.connect()`
  359. - :meth:`pycassa.connect_thread_local()`
  360. Changes in Version 1.2.1
  361. ------------------------
  362. This is strictly a bug-fix release addressing a few
  363. issues created in 1.2.0.
  364. Bug Fixes
  365. ~~~~~~~~~
  366. - Correctly check for Counters in :class:`.ColumnFamily`
  367. when setting `default_validation_class`
  368. - Pass kwargs in :class:`.ColumnFamilyMap` to
  369. :class:`.ColumnFamily`
  370. - Avoid potential UnboundLocal in :meth:`.ConnectionPool.execute`
  371. when :meth:`~.ConnectionPool.get` fails
  372. - Fix ez_setup dependency/bundling so that package installations
  373. using easy_install or pip don't fail without ez_setup installed
  374. Changes in Version 1.2.0
  375. ------------------------
  376. This should be a fairly smooth upgrade from pycassa 1.1. The
  377. primary changes that may introduce minor incompatibilities are
  378. the changes to :class:`.ColumnFamilyMap` and the automatic
  379. skipping of "ghost ranges" in :meth:`.ColumnFamily.get_range()`.
  380. Features
  381. ~~~~~~~~
  382. - Add :meth:`.ConnectionPool.fill()`
  383. - Add :class:`~.FloatType`, :class:`~.DoubleType`,
  384. :class:`~.DateType`, and :class:`~.BooleanType` support.
  385. - Add :class:`~.CompositeType` support for static composites.
  386. See :ref:`composite-types` for more details.
  387. - Add `timestamp`, `ttl` to :meth:`.ColumnFamilyMap.insert()`
  388. params
  389. - Support variable-length integers with :class:`~.IntegerType`.
  390. This allows more space-efficient small integers as well as
  391. integers that exceed the size of a long.
  392. - Make :class:`~.ColumnFamilyMap` a subclass of
  393. :class:`~.ColumnFamily` instead of using one as a component.
  394. This allows all of the normal adjustments normally done
  395. to a :class:`~.ColumnFamily` to be done to a :class:`~.ColumnFamilyMap`
  396. instead. See :ref:`column-family-map` for examples of
  397. using the new version.
  398. - Expose the following :class:`~.ConnectionPool` attributes,
  399. allowing them to be altered after creation:
  400. :attr:`~.ConnectionPool.max_overflow`, :attr:`~.ConnectionPool.pool_timeout`,
  401. :attr:`~.ConnectionPool.recycle`, :attr:`~.ConnectionPool.max_retries`,
  402. and :attr:`~.ConnectionPool.logging_name`.
  403. Previously, these were all supplied as constructor arguments.
  404. Now, the preferred way to set them is to alter the attributes
  405. after creation. (However, they may still be set in the
  406. constructor by using keyword arguments.)
  407. - Automatically skip "ghost ranges" in :meth:`ColumnFamily.get_range()`.
  408. Rows without any columns will not be returned by the generator,
  409. and these rows will not count towards the supplied `row_count`.
  410. Bug Fixes
  411. ~~~~~~~~~
  412. - Add connections to :class:`~.ConnectionPool` more readily
  413. when `prefill` is ``False``.
  414. Before this change, if the ConnectionPool was created with
  415. ``prefill=False``, connections would only be added to the pool
  416. when there was concurrent demand for connections.
  417. After this change, if ``prefill=False`` and ``pool_size=N``, the
  418. first `N` operations will each result in a new connection
  419. being added to the pool.
  420. - Close connection and adjust the :class:`~.ConnectionPool`'s
  421. connection count after a :exc:`.TApplicationException`. This
  422. exception generally indicates programmer error, so it's not
  423. extremely common.
  424. - Handle typed keys that evaluate to ``False``
  425. Deprecated
  426. ~~~~~~~~~~
  427. - :meth:`.ConnectionPool.recreate()`
  428. - :meth:`.ConnectionPool.status()`
  429. Miscellaneous
  430. ~~~~~~~~~~~~~
  431. - Better failure messages for :class:`~.ConnectionPool` failures
  432. - More efficient packing and unpacking
  433. - More efficient multi-column inserts in :meth:`.ColumnFamily.insert()`
  434. and :meth:`.ColumnFamily.batch_insert()`
  435. - Prefer Python 2.7's :class:`collections.OrderedDict` over the
  436. bundled version when available
  437. Changes in Version 1.1.1
  438. ------------------------
  439. Features
  440. ~~~~~~~~
  441. - Add ``max_count`` and ``column_reversed`` params to :meth:`~.ColumnFamily.get_count()`
  442. - Add ``max_count`` and ``column_reversed`` params to :meth:`~.ColumnFamily.multiget_count()`
  443. Bug Fixes
  444. ~~~~~~~~~
  445. - Don't retry operations after a ``TApplicationException``. This exception
  446. is reserved for programmatic errors (such as a bad API parameters), so
  447. retries are not needed.
  448. - If the read_consistency_level kwarg was used in a :class:`~.ColumnFamily`
  449. constructor, it would be ignored, resulting in a default read consistency
  450. level of :const:`ONE`. This did not affect the read consistency level if it was
  451. specified in any other way, including per-method or by setting the
  452. :attr:`~.ColumnFamily.read_consistency_level` attribute.
  453. Changes in Version 1.1.0
  454. ------------------------
  455. This release adds compatibility with Cassandra 0.8, including support
  456. for counters and key_validation_class. This release is
  457. backwards-compatible with Cassandra 0.7, and can support running against
  458. a mixed cluster of both Cassandra 0.7 and 0.8.
  459. Changes related to Cassandra 0.8
  460. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  461. - Addition of :data:`~.system_manager.COUNTER_COLUMN_TYPE` to
  462. :mod:`~.system_manager`.
  463. - Several new column family attributes, including ``key_validation_class``,
  464. ``replicate_on_write``, ``merge_shards_chance``, ``row_cache_provider``,
  465. and ``key_alias``.
  466. - The new :meth:`.ColumnFamily.add()` and :meth:`.ColumnFamily.remove_counter()`
  467. methods.
  468. - Support for counters in :mod:`pycassa.batch` and
  469. :meth:`.ColumnFamily.batch_insert()`.
  470. - Autopacking of keys based on ``key_validation_class``.
  471. Other Features
  472. ~~~~~~~~~~~~~~
  473. - :meth:`.ColumnFamily.multiget()` now has a `buffer_size` parameter
  474. - :meth:`.ColumnFamily.multiget_count()` now returns rows
  475. in the order that the keys were passed in, similar to how
  476. :meth:`~.ColumnFamily.multiget()` behaves. It also uses
  477. the :attr:`~.ColumnFamily.dict_class` attribute for the containing
  478. class instead of always using a :class:`dict`.
  479. - Autpacking behavior is now more transparent and configurable,
  480. allowing the user to get functionality similar to the CLI's
  481. ``assume`` command, whereby items are packed and unpacked as
  482. though they were a certain data type, even if Cassandra does
  483. not use a matching comparator type or validation class. This
  484. behavior can be controlled through the following attributes:
  485. - :attr:`.ColumnFamily.column_name_class`
  486. - :attr:`.ColumnFamily.super_column_name_class`
  487. - :attr:`.ColumnFamily.key_validation_class`
  488. - :attr:`.ColumnFamily.default_validation_class`
  489. - :attr:`.ColumnFamily.column_validators`
  490. - A :class:`.ColumnFamily` may reload its schema to handle
  491. changes in validation classes with :meth:`.ColumnFamily.load_schema()`.
  492. Bug Fixes
  493. ~~~~~~~~~
  494. There were several related issues with overlow in :class:`.ConnectionPool`:
  495. - Connection failures when a :class:`.ConnectionPool` was in a state
  496. of overflow would not result in adjustment of the overflow counter,
  497. eventually leading the :class:`.ConnectionPool` to refuse to create
  498. new connections.
  499. - Settings of -1 for :attr:`.ConnectionPool.overflow` erroneously caused
  500. overflow to be disabled.
  501. - If overflow was enabled in conjunction with `prefill` being disabled,
  502. the effective overflow limit was raised to ``max_overflow + pool_size``.
  503. Other
  504. ~~~~~
  505. - Overflow is now disabled by default in :class:`.ConnectionPool`.
  506. - :class:`.ColumnFamilyMap` now sets the underlying :class:`.ColumnFamily`'s
  507. :attr:`~.ColumnFamily.autopack_names` and
  508. :attr:`~.ColumnFamily.autopack_values` attributes to ``False`` upon
  509. construction.
  510. - Documentation and tests will no longer be included in the
  511. packaged tarballs.
  512. Removed Deprecated Items
  513. ~~~~~~~~~~~~~~~~~~~~~~~~
  514. The following deprecated items have been removed:
  515. - :meth:`.ColumnFamilyMap.get_count()`
  516. - The `instance` parameter from :meth:`.ColumnFamilyMap.get_indexed_slices()`
  517. - The :class:`~.types.Int64` Column type.
  518. - :meth:`.SystemManager.get_keyspace_description()`
  519. Deprecated
  520. ~~~~~~~~~~
  521. Athough not technically deprecated, most :class:`.ColumnFamily`
  522. constructor arguments should instead be set by setting the
  523. corresponding attribute on the :class:`.ColumnFamily` after
  524. construction. However, all previous constructor arguments
  525. will continue to be supported if passed as keyword arguments.
  526. Changes in Version 1.0.8
  527. ------------------------
  528. - Pack :class:`.IndexExpression` values in :meth:`~.ColumnFamilyMap.get_indexed_slices()`
  529. that are supplied through the :class:`.IndexClause` instead of just the `instance`
  530. parameter.
  531. - Column names and values which use Cassandra's IntegerType are unpacked as though they
  532. are in a BigInteger-like format. This is (backwards) compatible with the format
  533. that pycassa uses to pack IntegerType data. This fixes an incompatibility with
  534. the format that cassandra-cli and other clients use to pack IntegerType data.
  535. - Restore Python 2.5 compatibility that was broken through out of order keyword
  536. arguments in :class:`.ConnectionWrapper`.
  537. - Pack `column_start` and `column_finish` arguments in :class:`.ColumnFamily`
  538. ``*get*()`` methods when the `super_column` parameter is used.
  539. - Issue a :class:`DeprecationWarning` when a method, parameter, or class that
  540. has been deprecated is used. Most of these have been deprecated for several
  541. releases, but no warnings were issued until now.
  542. - Deprecations are now split into separate sections for each release in the
  543. changelog.
  544. Deprecated
  545. ~~~~~~~~~~
  546. - The `instance` parameter of :meth:`ColumnFamilyMap.get_indexed_slices()`
  547. Changes in Version 1.0.7
  548. ------------------------
  549. - Catch KeyError in :meth:`pycassa.columnfamily.ColumnFamily.multiget()` empty
  550. row removal. If the same non-existent key was passed multiple times, a
  551. :exc:`KeyError` was raised when trying to remove it from the OrderedDictionary
  552. after the first removal. The :exc:`KeyError` is caught and ignored now.
  553. - Handle connection failures during retries. When a connection fails, it tries to
  554. create a new connection to replace itself. Exceptions during this process were
  555. not properly handled; they are now handled and count towards the retry count for
  556. the current operation.
  557. - Close connection when a :exc:`MaximumRetryException` is raised. Normally a connection
  558. is closed when an operation it is performing fails, but this was not happening
  559. for the final failure that triggers the :exc:`MaximumRetryException`.
  560. Changes in Version 1.0.6
  561. ------------------------
  562. - Add :exc:`EOFError` to the list of exceptions that cause a connection swap and retry
  563. - Improved autopacking efficiency for AsciiType, UTF8Type, and BytesType
  564. - Preserve sub-second timestamp precision in datetime arguments for insertion
  565. or slice bounds where a TimeUUID is expected. Previously, precision below a
  566. second was lost.
  567. - In a :exc:`MaximumRetryException`'s message, include details about the last
  568. :exc:`Exception` that caused the :exc:`MaximumRetryException` to be raised
  569. - :meth:`pycassa.pool.ConnectionPool.status()` now always reports a non-negative
  570. overflow; 0 is now used when there is not currently any overflow
  571. - Created :class:`pycassa.types.Long` as a replacement for :class:`pycassa.types.Int64`.
  572. :class:`Long` uses big-endian encoding, which is compatible with Cassandra's LongType,
  573. while :class:`Int64` used little-endian encoding.
  574. Deprecated
  575. ~~~~~~~~~~
  576. - :class:`pycassa.types.Int64` has been deprecated in favor of :class:`pycassa.types.Long`
  577. Changes in Version 1.0.5
  578. ------------------------
  579. - Assume port 9160 if only a hostname is given
  580. - Remove super_column param from :meth:`pycassa.columnfamily.ColumnFamily.get_indexed_slices()`
  581. - Enable failover on functions that previously lacked it
  582. - Increase base backoff time to 0.01 seconds
  583. - Add a timeout paremeter to :class:`pycassa.system_manager.SystemManger`
  584. - Return timestamp on single-column inserts
  585. Changes in Version 1.0.4
  586. ------------------------
  587. - Fixed threadlocal issues that broke multithreading
  588. - Fix bug in :meth:`pycassa.columnfamily.ColumnFamily.remove()` when a super_column
  589. argument is supplied
  590. - Fix minor PoolLogger logging bugs
  591. - Added :meth:`pycassa.system_manager.SystemManager.describe_partitioner()`
  592. - Added :meth:`pycassa.system_manager.SystemManager.describe_snitch()`
  593. - Added :meth:`pycassa.system_manager.SystemManager.get_keyspace_properties()`
  594. - Moved :meth:`pycassa.system_manager.SystemManager.describe_keyspace()`
  595. and :meth:`pycassa.system_manager.SystemManager.describe_column_family()`
  596. to pycassaShell describe_keyspace() and describe_column_family()
  597. Deprecated
  598. ~~~~~~~~~~
  599. - Renamed :meth:`pycassa.system_manager.SystemManager.get_keyspace_description()`
  600. to :meth:`pycassa.system_manager.SystemManager.get_keyspace_column_families()`
  601. and deprecated the previous name
  602. Changes in Version 1.0.3
  603. ------------------------
  604. - Fixed supercolumn slice bug in get()
  605. - pycassaShell now runs scripts with execfile to allow for multiline statements
  606. - 2.4 compatability fixes
  607. Changes in Version 1.0.2
  608. ------------------------
  609. - Failover handles a greater set of potential failures
  610. - pycassaShell now loads/reloads :class:`pycassa.columnfamily.ColumnFamily`
  611. instances when the underlying column family is created or updated
  612. - Added an option to pycassaShell to run a script after startup
  613. - Added :meth:`pycassa.system_manager.SystemManager.list_keyspaces()`
  614. Changes in Version 1.0.1
  615. ------------------------
  616. - Allow pycassaShell to be run without specifying a keyspace
  617. - Added :meth:`pycassa.system_manager.SystemManager.describe_schema_versions()`
  618. Changes in Version 1.0.0
  619. ------------------------
  620. - Created the :class:`~pycassa.system_manager.SystemManager` class to
  621. allow for keyspace, column family, and index creation, modification,
  622. and deletion. These operations are no longer provided by a Connection
  623. class.
  624. - Updated pycassaShell to use the SystemManager class
  625. - Improved retry behavior, including exponential backoff and proper
  626. resetting of the retry attempt counter
  627. - Condensed connection pooling classes into only
  628. :class:`pycassa.pool.ConnectionPool` to provide a simpler API
  629. - Changed :meth:`pycassa.connection.connect()` to return a
  630. connection pool
  631. - Use more performant Thrift API methods for :meth:`insert()`
  632. and :meth:`get()` where possible
  633. - Bundled :class:`~pycassa.util.OrderedDict` and set it as the
  634. default dictionary class for column families
  635. - Provide better :exc:`TypeError` feedback when columns are the wrong
  636. type
  637. - Use Thrift API 19.4.0
  638. Deprecated
  639. ~~~~~~~~~~
  640. - :meth:`ColumnFamilyMap.get_count()` has been deprecated. Use
  641. :meth:`ColumnFamily.get_count()` instead.
  642. Changes in Version 0.5.4
  643. ------------------------
  644. - Allow for more backward and forward compatibility
  645. - Mark a server as being down more quickly in
  646. :class:`~pycassa.connection.Connection`
  647. Changes in Version 0.5.3
  648. ------------------------
  649. - Added :class:`~pycassa.columnfamily.PooledColumnFamily`, which makes
  650. it easy to use connection pooling automatically with a ColumnFamily.
  651. Changes in Version 0.5.2
  652. ------------------------
  653. - Support for adding/updating/dropping Keyspaces and CFs
  654. in :class:`pycassa.connection.Connection`
  655. - :meth:`~pycassa.columnfamily.ColumnFamily.get_range()` optimization
  656. and more configurable batch size
  657. - batch :meth:`~pycassa.columnfamily.ColumnFamily.get_indexed_slices()`
  658. similar to :meth:`.ColumnFamily.get_range()`
  659. - Reorganized pycassa logging
  660. - More efficient packing of data types
  661. - Fix error condition that results in infinite recursion
  662. - Limit pooling retries to only appropriate exceptions
  663. - Use Thrift API 19.3.0
  664. Changes in Version 0.5.1
  665. ------------------------
  666. - Automatically detect if a column family is a standard column family
  667. or a super column family
  668. - :meth:`~pycassa.columnfamily.ColumnFamily.multiget_count()` support
  669. - Allow preservation of key order in
  670. :meth:`~pycassa.columnfamily.ColumnFamily.multiget()` if an ordered
  671. dictionary is used
  672. - Convert timestamps to v1 UUIDs where appropriate
  673. - pycassaShell documentation
  674. - Use Thrift API 17.1.0
  675. Changes in Version 0.5.0
  676. ------------------------
  677. - Connection Pooling support: :mod:`pycassa.pool`
  678. - Started moving logging to :mod:`pycassa.logger`
  679. - Use Thrift API 14.0.0
  680. Changes in Version 0.4.3
  681. ------------------------
  682. - Autopack on CF's default_validation_class
  683. - Use Thrift API 13.0.0
  684. Changes in Version 0.4.2
  685. ------------------------
  686. - Added batch mutations interface: :mod:`pycassa.batch`
  687. - Made bundled thrift-gen code a subpackage of pycassa
  688. - Don't attempt to reencode already encoded UTF8 strings
  689. Changes in Version 0.4.1
  690. ------------------------
  691. - Added :meth:`~pycassa.columnfamily.ColumnFamily.batch_insert()`
  692. - Redifined :meth:`~pycassa.columnfamily.ColumnFamily.insert()`
  693. in terms of :meth:`~pycassa.columnfamily.ColumnFamily.batch_insert()`
  694. - Fixed UTF8 autopacking
  695. - Convert datetime slice args to uuids when appropriate
  696. - Changed how thrift-gen code is bundled
  697. - Assert that the major version of the thrift API is the same on the
  698. client and on the server
  699. - Use Thrift API 12.0.0
  700. Changes in Version 0.4.0
  701. ------------------------
  702. - Added pycassaShell, a simple interactive shell
  703. - Converted the test config from xml to yaml
  704. - Fixed overflow error on
  705. :meth:`~pycassa.columnfamily.ColumnFamily.get_count()`
  706. - Only insert columns which exist in the model object
  707. - Make ColumnFamilyMap not ignore the ColumnFamily's dict_class
  708. - Specify keyspace as argument to :meth:`~pycassa.connection.connect()`
  709. - Add support for framed transport and default to using it
  710. - Added autopacking for column names and values
  711. - Added support for secondary indexes with
  712. :meth:`~pycassa.columnfamily.ColumnFamily.get_indexed_slices()`
  713. and :mod:`pycassa.index`
  714. - Added :meth:`~pycassa.columnfamily.ColumnFamily.truncate()`
  715. - Use Thrift API 11.0.0