Comments (7)
py27 was passed on CI: https://ci.appveyor.com/project/peter-wangxu/persist-queue/builds/19169922
what's the type of src
and dst
?
from persist-queue.
src = 'c:\\users\\liangr\\appdata\\local\\temp\\tmpol0feq'
dst = 'c:\users\liangr\appdata\local\temp\tmpsulfcsstorops\info'
('type(src)', <type 'str'>)
('type(dst)', <type 'unicode'>)
('isinstance(src, _str)', False)
('isinstance(dst, _str)', True)
('isinstance(src, _bytes)', True)
('isinstance(dst, _bytes)', False)
from persist-queue.
Most of storops python source files set from __future__ import unicode_literals
. This would make any string literal to be unicode.
In TestPQueue
of storops
,
from __future__ import unicode_literals
# ... ...
self.path = tempfile.mkdtemp(suffix='storops')
self.q = tasks.PQueue(self.path)
And this would make _infopath
in Persist-Queue
and dst
of atomic_rename
to be unicode
.
While in Persist-Queue
, unicode_literals
is not imported. And src
of atomic_rename
is returned by tempfile.mkstemp()
, so it is str
.
That is the reason what we got as the above comments.
src
is str
, dst
is unicode
.
So the conclusion is that any source codes with unicode_literals
imported could meet this issue.
Can we convert the type of src
or dst
to make them as the same type first?
from persist-queue.
@Murray-LIANG loooooking forward to your change:)
from persist-queue.
Sorry for the late response. I will do the fix next days. My proposal is that converting the src
and dst
to str
or unicode
first regardless of their original types.
What I don't understand is that why it chooses different ctypes
move functions based on the type of file paths?
from persist-queue.
AFAIK, this is the windows API limitation, MoveFileExW
for unicode MoveFileExA
for ascii only.
Agreed with you to convert, and we can use the former function for both str or unicode.
from persist-queue.
@Murray-LIANG any update?
from persist-queue.
Related Issues (20)
- qsize not changing HOT 1
- pypi release HOT 3
- mySQL db HOT 10
- SQLite objects created in a thread can only be used in that same thread HOT 2
- File is not getting cleared after get() function HOT 13
- Connection not die after kill signal. HOT 1
- Queue gets corrupted after power cut HOT 9
- sqlite vacuum not working HOT 8
- Queue items not removed after each get() HOT 3
- Priority queue HOT 4
- What if data is already serialized HOT 2
- What if data is already serialized Part II ? HOT 1
- Get() hangs when used with pqid HOT 1
- FILOSQLiteAckQueue is not exported from __init__ HOT 2
- AttributeError: module 'persistqueue' has no attribute 'MySQLQueue' HOT 3
- [BUG] "No sqlite3 module found, sqlite3 based queues are not available" during load, despite sqlite3 being present... and also works despite? HOT 3
- Error while get queue element by id
- Feature Request: allow `before` and `after` controls for `put` to fine tune placement within queue
- Feature Request: Add separate metadata block from ID
- Provide async api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from persist-queue.