Jira (PUP-11634) Use constants and methods that aren't removed in Ruby 3.2

33 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Sep 29, 2022, 1:35:02 PM9/29/22
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Task PUP-11634
Use constants and methods that aren't removed in Ruby 3.2
Issue Type: Task Task
Assignee: Unassigned
Created: 2022/09/29 10:34 AM
Priority: Normal Normal
Reporter: Josh Cooper

Ruby 3.2 has removed several constants and classes. See https://github.com/ruby/ruby/blob/v3_2_0_preview2/NEWS.md#compatibility-issues

For Dir.exists? and File.exists? call the non-deprecated/removed version, e.g. Dir.exist?

Struct::Group & Struct::Passwd should be replaced with Etc::Group/Etc::Passwd

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Sep 29, 2022, 1:35:02 PM9/29/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2022-10-26

Josh Cooper (Jira)

unread,
Oct 7, 2022, 1:21:02 PM10/7/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 7, 2022, 1:21:03 PM10/7/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Ruby 3.2 has removed several constants and classes. See https://github.com/ruby/ruby/blob/v3_2_0_preview2/NEWS.md#compatibility-issues

For Dir.exists? and File.exists? call the non-deprecated/removed version, e.g. Dir.exist?

Struct::Group & Struct::Passwd should be replaced with Etc::Group/Etc::Passwd


Fast-gettext is not compatible with Ruby 3.2, because it calls String#untaint and that method was removed. We'll need to bump our dependency on fast-gettext to "~> 2.1", see related ticket PA-4725

Morgan Rhodes (Jira)

unread,
Oct 13, 2022, 1:26:03 PM10/13/22
to puppe...@googlegroups.com

Morgan Rhodes (Jira)

unread,
Dec 1, 2022, 1:27:03 PM12/1/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 5, 2022, 2:02:03 PM12/5/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 5, 2022, 7:24:02 PM12/5/22
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-11634
 
Re: Use constants and methods that aren't removed in Ruby 3.2

I started working on this, but am blocked until a new rspec-mocks is released.

Morgan Rhodes (Jira)

unread,
Dec 7, 2022, 1:34:01 PM12/7/22
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
Dec 15, 2022, 1:16:02 PM12/15/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 16, 2022, 1:04:02 PM12/16/22
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-11634
 
Re: Use constants and methods that aren't removed in Ruby 3.2

Most of the changes were merged to 7.x (since they're backwards compatible and we want to avoid merge conflicts in spec tests across 7.x and main).

Last remaining item is to bump fast_gettext in puppet's .gemspec

Josh Cooper (Jira)

unread,
Dec 16, 2022, 1:04:03 PM12/16/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 13, 2023, 12:25:01 PM4/13/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Not Needed
Reply all
Reply to author
Forward
0 new messages