Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19989 closed Bug (fixed)

Validating BinaryField against validators.EMPTY_VALUES raises UnicodeWarning

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django/db/models/fields/__init__.py:160: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if value in validators.EMPTY_VALUES:

I don't know which test triggers this.

Attachments (1)

19989-1.diff (1.8 KB) - added by Claude Paroz 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by Claude Paroz

Component: Python 3Core (Other)
Summary: Warning when running the tests under Python 3.3Validating BinaryField against validators.EMPTY_VALUES raises UnicodeWarning
Triage Stage: UnreviewedAccepted

Changed 4 years ago by Claude Paroz

Attachment: 19989-1.diff added

comment:2 Changed 4 years ago by Claude Paroz

Has patch: set

With this patch, the warning is gone.

comment:3 Changed 4 years ago by Simon Charette

Triage Stage: AcceptedReady for checkin

comment:4 Changed 4 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 22be90dd171deebd0cf52bdd749f27b18e29a2f2:

Fixed #19989 -- Suppressed UnicodeWarning during BinaryField validation

Thanks Aymeric Augustin for the report and Simon Charette for the
review.

comment:5 Changed 4 years ago by Claude Paroz <claude@…>

In 2add24cc2c605a51695258d45d6d1b61556dec9f:

One more EMPTY_VALUES replacement following 22be90dd17

Thanks Loic Bistuer for catching this omission. Refs #19989.

Note: See TracTickets for help on using tickets.
Back to Top