---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP021 [*] `universal_newlines` is deprecated, use `text`
 --> UP021.py:5:25
  |
4 | # Errors
5 | subprocess.run(["foo"], universal_newlines=True, check=True)
  |                         ^^^^^^^^^^^^^^^^^^
6 | subprocess.run(["foo"], universal_newlines=True, text=True)
7 | run(["foo"], universal_newlines=True, check=False)
  |
help: Replace with `text` keyword argument
  |
4 | # Errors
  - subprocess.run(["foo"], universal_newlines=True, check=True)
5 + subprocess.run(["foo"], text=True, check=True)
6 | subprocess.run(["foo"], universal_newlines=True, text=True)
  |

UP021 [*] `universal_newlines` is deprecated, use `text`
 --> UP021.py:6:25
  |
4 | # Errors
5 | subprocess.run(["foo"], universal_newlines=True, check=True)
6 | subprocess.run(["foo"], universal_newlines=True, text=True)
  |                         ^^^^^^^^^^^^^^^^^^
7 | run(["foo"], universal_newlines=True, check=False)
  |
help: Replace with `text` keyword argument
  |
5 | subprocess.run(["foo"], universal_newlines=True, check=True)
  - subprocess.run(["foo"], universal_newlines=True, text=True)
6 + subprocess.run(["foo"], text=True)
7 | run(["foo"], universal_newlines=True, check=False)
  |

UP021 [*] `universal_newlines` is deprecated, use `text`
 --> UP021.py:7:14
  |
5 | subprocess.run(["foo"], universal_newlines=True, check=True)
6 | subprocess.run(["foo"], universal_newlines=True, text=True)
7 | run(["foo"], universal_newlines=True, check=False)
  |              ^^^^^^^^^^^^^^^^^^
8 |
9 | # OK
  |
help: Replace with `text` keyword argument
  |
6 | subprocess.run(["foo"], universal_newlines=True, text=True)
  - run(["foo"], universal_newlines=True, check=False)
7 + run(["foo"], text=True, check=False)
8 |
  |
