question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v0.15.0 Changes❗

See original GitHub issue

In the upcoming version 0.15.0 of arrow, we will be making a lot of changes to the behavior of arrow.get() to address a number of reported parsing bugs. We have outlined the changes below:

Fixes

  • Most instances of arrow.get() returning an incorrect arrow object from a partial parsing match have been eliminated.

For example,

>>> arrow.get("garbage2017everywhere")
<Arrow [2017-01-01T00:00:00+00:00]>
>>> arrow.get('Jun-2019', ['MMM-YY', 'MMM-YYYY'])
<Arrow [2020-06-01T00:00:00+00:00]>

These will raise a ParserError in 0.15.0.

  • When a meridian token (a|A) is passed and no meridians are available for the specified locale (e.g. unsupported or untranslated), a ParserError is raised.
  • Timestamp strings are no longer supported in the arrow.get() method without a format string: arrow.get("1565358758"). This change was made to support the ISO 8601 basic format and to address bugs such as https://github.com/crsmithdev/arrow/issues/447.

The following will still work as expected:

arrow.get("1565358758", "X")
arrow.get("1565358758.123413", "X")
arrow.get(1565358758)
arrow.get(1565358758.123413)
  • The timestamp token (X) will now matches float timestamps: arrow.get("1565358758.123415", "X").
  • The timestamp token (X) will now only match on strings that strictly contain integers and floats, preventing incorrect matches.

New Features

  • ISO-8601 basic format style is now supported (e.g. YYYYMMDDThhmmssZ)
  • Added support for DDD and DDDD ordinal date tokens (e.g. "1998-045")

Issues addressed

Development progress

You can view the progress of these changes here: https://github.com/crsmithdev/arrow/tree/Version-0.15.0.

Disable Warnings

To get rid of the ArrowParseWarning messages in 0.14.3 onwards, do the following:

import warnings
from arrow.factory import ArrowParseWarning

warnings.simplefilter("ignore", ArrowParseWarning)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:52 (14 by maintainers)

github_iconTop GitHub Comments

8reactions
kornpowcommented, Jul 29, 2019

I still get warnings when I pass a parser string to .get() Also here is a full example for disabling warnings if anyone needs: Using arrow 0.14.3

import arrow

import warnings

from arrow.factory import ArrowParseWarning

astring = "2019-07-29T13:58:44.460381Z"

# Show warning still?

arrow.get(astring,"YYYY-MM-DD[T]HH:mm:ss.S[Z]")

# Filter out the warnings

warnings.simplefilter("ignore", ArrowParseWarning)

# No warnings anymore

arrow.get(astring,"YYYY-MM-DD[T]HH:mm:ss.S[Z]")
7reactions
joinemmcommented, Aug 7, 2019

The flexible .get() was in my opinion one of the best features of arrow, as it allowed for parsing of unknown or user generated time strings without any extra logic. I wonder if it’s possible you could keep the old functionality of .get() in a new separate function? Maybe like .fuzzy_get() or something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

v0.15.0 Changes❗ · Issue #612 · arrow-py/arrow - GitHub
In the upcoming version 0.15.0 of arrow, we will be making a lot of changes to the behavior of arrow.get() to address a...
Read more >
v0.15.0 – Changelog - Outline
Restored the collection name on documents listed on the dashboard; Fixed an issue where document content changed between image uploading ...
Read more >
WorldBox (@SuperWorldBox) / Twitter
First sneak peek of WorldBox v0.15! ... Big new change in the game! ... gen 🗺️ New Options for Mini Map 🤖 Improved...
Read more >
Overview - Dash Platform
The Dash Platform Protocol (DPP) defines a protocol for the data objects (e.g. identities, data contracts, documents, state transitions) that can be stored ......
Read more >
Versions - Colorful App
v0.19.0. Improvements / features: 👯 Parallel rendering for all photo ... Fixed scene name changes not propagating to dashboard ... Released: 15/02/2022 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found