The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:
iconv will be deprecated, used in pson/json_pure lib
|Affected Puppet version:||2.7.17||Branch:||https://github.com/puppetlabs/puppet/pull/1151|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
While running Puppet on Fedora 17 with ruby 1.9.3p194, there are many warnings printed by ruby:
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
This seems to be caused by the pson (json_pure) library in
lib/puppet/external/pson/pure.rb, that still uses iconv:
module PSON begin require 'iconv' # An iconv instance to convert from UTF8 to UTF16 Big Endian. UTF16toUTF8 = Iconv.new('utf-8', 'utf-16be') # :nodoc:
This can be shown by changing the require line so the iconv library doesn’t load (forcing the rescue path), then the deprecation warnings disappear.
Originally filed in Fedora as #809911.
#3 Updated by Anonymous almost 4 years ago
This is a really interesting issue the encoding translation changed between ruby 1.8 and ruby 1.9 from
iconv code is used for UTF-8 to UTF-16 translation and for UTF-16 to UTF-8 translation, but I can only find a use of the UTF-16 to UTF-8. With some refactoring a lot of this might just disappear and leave something that we can easily make a shim for supporting both versions of ruby.
#4 Updated by Anonymous over 3 years ago
This was dealt with in the json/pure code with https://github.com/flori/json/blob/master/lib/json/common.rb#L408