[Bug 2067361] Re: Programs using netrc with containing an entry without a password fail with an exception "malformed machine entry <> terminated by ''"

Nick Rosbrook 2067361 at bugs.launchpad.net
Wed Jul 17 18:14:07 UTC 2024


I am tagging this so that Foundations can review. There are some
developers who specifically work on the Python toolchain, and I would
prefer that they be the ones to review and sponsor this.

A couple things in the meantime:

* There has been a security update since the last time you refreshed the patch. Ideally, your patch should be rebased on top of the most recent update.
* This package is using a version number convention that makes the `ubuntu` suffix unwanted. I.e., the `~22.04.X` convention indicates that this is the Jammy (22.04 LTS) version of this package. Hence, please only increment the final number in the version string (at the time of writing this comment, the correct version would be 3.10.12-1~22.04.5). 

** Changed in: python3.10 (Ubuntu)
       Status: Incomplete => New

** Tags added: rls-jj-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2067361

Title:
  Programs using netrc with containing an entry without a password fail
  with an exception "malformed machine entry <> terminated by ''"

Status in python3.10 package in Ubuntu:
  New
Status in python3.10 source package in Jammy:
  New

Bug description:
  Some services use provide token authentication, where the users token is input as the "username" field, resulting in a netrc entry containing
  ```
  machine SOME_ADDRESS
  login SOME_TOKEN
  ```

  but no password entry.

  Trying to run some python based program, that uses netrc, such as
  ```
  ansible-galaxy collection install SOME_PACKAGE
  ```

  with this such a netrc file will fail with an exception
  "malformed machine entry SOME_ADDRESS terminated by ''".

  This is upstream bug https://bugs.python.org/issue34908 fixed in
  python3.11.

  [ Impact ]

   * Users are not able to run Python based programs using netrc
  credentials, such as ansible.

  [ Test Plan ]

   * Install ansible with `sudo apt install ansible`

   * Add an entry to ~/.netrc containing only the "machine" and "login"
  tokens

   * observe failure when trying to run `ansible-galaxy collection
  install community.crypto`

  [ Where problems could occur ]

   * Some over specific test suite relying on current overly strict
  parsing. However such a test suite would have to be fixed for
  python3.11 anyway.

  [ Other Info ]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/2067361/+subscriptions




More information about the Ubuntu-sponsors mailing list