From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_GREY autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 690251F542 for ; Sat, 27 May 2023 10:12:46 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=ArV5w6B1; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sendgrid.net header.i=@sendgrid.net header.a=rsa-sha256 header.s=smtpapi header.b=pILIKmhd; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 602C77E823; Sat, 27 May 2023 10:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1685182354; bh=Vhxu9GYhXpK6ja0U3wnLI8zCAo2SZ+3z4+ZozRIM1/g=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=ArV5w6B1C2tS2uEw+QJPFt6bLxMN64493DdycNKHffgYEJh8xzT+89Q6eeQ7pV9wq i8NGAPFRlgnnZFNk1LXXf4wnSu+isisMWzFwHjf0rjKzPBCyYICUJN2UPRuBq2aVI/ +CQesp5yXW65vziMsw4j7ONp9ZPogFXqLoBv3m0s= Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by nue.mailmanlists.eu (Postfix) with ESMTPS id D7F5E7E7CC for ; Sat, 27 May 2023 10:12:28 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (1024-bit key; unprotected) header.d=sendgrid.net header.i=@sendgrid.net header.a=rsa-sha256 header.s=smtpapi header.b=pILIKmhd; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.net; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=smtpapi; bh=wlk6woATUlNPJk8uwc0TNZODs0Tzoae+nvCaqlxTk0E=; b=pILIKmhdhozgJZvWkzZucQtmxoEugv0wBzkEgeQGypweUj7rhHT/BjPZA5xb7EBUp4RK TP808bThRLT5HE30zeRTBemcVJvrsy278+bsEjs51vQV3veTYS8j0PWHvVgS325NgDCpIi +Ol9hYDujndt0AAwE8E4ZABNE3+UPtuCM= Received: by filterdrecv-77869f68cc-5zdvl with SMTP id filterdrecv-77869f68cc-5zdvl-1-6471D78A-2A 2023-05-27 10:12:26.95190087 +0000 UTC m=+1420584.749756785 Received: from herokuapp.com (unknown) by geopod-ismtpd-9 (SG) with ESMTP id 8Dz_U_A4T9-PJbT-OhVvsA for ; Sat, 27 May 2023 10:12:26.889 +0000 (UTC) Date: Sat, 27 May 2023 10:12:26 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Misc X-Redmine-Issue-Id: 17591 X-Redmine-Issue-Author: Eregon X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 90148 X-SG-EID: =?us-ascii?Q?DvL3W2Xo+Vk=2FeUn3F50L=2FNc8u9NqZCnbE0mXZHiyye797xMYAwNZ5voKHXw+al?= =?us-ascii?Q?7ja0u2=2F4FhV998eBFHFHTQAz=2FTEZDsThU+2L77V?= =?us-ascii?Q?yFnip+RcPIwPQVEJCA37e0BdF3u0xpBScykZ5dy?= =?us-ascii?Q?OTFs6ldy2k15Wv4xOo+IZ1k0VJhNKyknZ39eiC8?= =?us-ascii?Q?krLfNx=2FLgfNom6BBkaW7U1cELWUfZY4F3cNal5=2F?= =?us-ascii?Q?7bWhXGXpNkpmsoRuGBOvy1Fa8Nd7ac1un=2FFoJ3S?= =?us-ascii?Q?iVKJiVMmZ3DZrqSLfm7dw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: 2YYW2LDYFHAZTGCDE652QJNNS676D5ZF X-Message-ID-Hash: 2YYW2LDYFHAZTGCDE652QJNNS676D5ZF X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@sendgrid.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:113682] [Ruby master Misc#17591] Test frameworks and REPLs do not show deprecation warnings by default List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Eregon (Benoit Daloze) via ruby-core" Cc: "Eregon (Benoit Daloze)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #17591 has been updated by Eregon (Benoit Daloze). IMO we should find a way for RSpec to enable them by default, it is hurting RSpec users and destroying ruby-core's efforts to provide nice migration paths. Maybe more voices on that RSpec issue could help to convince the RSpec devs (but probably not). Or potentially workaround by enabling them e.g. when running tests of a rails app. RSpec does have `-w` which enables them, so another potential way could be to teach rspec users about that, maybe via a gem-install-time message? RSpec users will likely learn about it when something breaks without warning, but then they will probably think it's CRuby's fault when it's RSpec's fault. I agree enabling deprecation warnings by default seems best, and then people who don't want to see it can just set `Warning[:deprecated] = false`. Let's see what others think, but I suspect many would be reticent to change this again. ---------------------------------------- Misc #17591: Test frameworks and REPLs do not show deprecation warnings by default https://bugs.ruby-lang.org/issues/17591#change-103326 * Author: Eregon (Benoit Daloze) * Status: Closed * Priority: Normal ---------------------------------------- Various people in #16345 said that: > The issue can be mitigated if all test frameworks enable all deprecation warnings. > The developer's practice can be supported by tools, such as test frameworks enable deprecation warnings automatically. And this was used as a base to disable deprecation warnings by default in Ruby 2.7.2. However, it seems no test frameworks or REPLs actually show deprecation warnings by default! So Ruby developers will typically never see deprecation warnings for keyword arguments, and it will just break when they try Ruby 3.0. I think only MSpec does `Warning[:deprecated] = true`, whether or not `-w` is passed, which seems the right thing to do. Currently, RSpec enables `Warning[:deprecated] = true` only for `rspec -w`. Same for `test/unit` 3.3.4 shipped with 2.7.2. IRB in 2.7.2 does not show deprecated warnings. Same for `pry`. I think ruby-core needs to have a clear message here, like: > All test frameworks and REPLs should include this snippet and run it before running tests: `Warning[:deprecated] = true if Warning.respond_to?(:[]=)`. > This is important so that developers see warnings in development, and that they see the warnings before updating to the next Ruby version. > Developers can choose to disable deprecation warnings explicitly if they want with `Warning[:deprecated] = false`. And I think it would be good that ruby-core makes a PR or an issue to the main test frameworks/REPLs to show examples. P.S.: if someone wants to disable all warnings with `-W0` or `$VERBOSE = nil`, it will indeed disable them all, including deprecation warnings, so there is no need to check `$VERBOSE` for setting `Warning[:deprecated] = true`. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/